svn commit: r276008 - in head/sys: kern sys
Andriy Gapon
avg at FreeBSD.org
Tue Dec 23 10:46:30 UTC 2014
On 23/12/2014 11:46, Konstantin Belousov wrote:
> On Tue, Dec 23, 2014 at 10:18:43AM +0200, Andriy Gapon wrote:
>> Hmm, I mean that given this code:
>>
>> flags = O_CREAT | FWRITE | O_NOFOLLOW;
>> NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, name, td);
>> error = vn_open_cred(&nd, &flags, cmode, oflags, td->td_ucred, NULL);
>>
>> 'name' is the name, right? Can we keep and use it?
> No, not right. It is the name used for resolution using namei(), while
> the path obtained from vn_fullpath() is passed to usermode. For 'name'
> to be useful, it must be used in exactly the same lookup environment,
> i.e. cwd/root dir at al should be the same.
I see now. Thanks!
--
Andriy Gapon
More information about the svn-src-head
mailing list