On Fri, 3 Mar 2017 12:28:01 -0600
Eric Blake <ebl...@redhat.com> wrote:

> On 03/03/2017 12:15 PM, Greg Kurz wrote:
> 
> > 
> > O_PATH | O_NOFOLLOW is a special case as described in the last paragraph
> > of O_PATH in the man page:
> > 
> >               If  pathname  is a symbolic link and the O_NOFOLLOW flag is 
> > also
> >               specified, then the call returns a file descriptor referring  
> > to
> >               the  symbolic  link.   This  file  descriptor can be used as 
> > the
> >               dirfd argument in calls to fchownat(2),  fstatat(2),  
> > linkat(2),
> >               and readlinkat(2) with an empty pathname to have the calls 
> > oper‐
> >               ate on the symbolic link.  
> 
> Only when coupled with AT_EMPTY_PATHNAME.  Without that additional flag,
> then it must be a directory.
> 

And we don't use AT_EMPTY_PATHNAME, so this should work indeed.

Attachment: pgpX_xTfoIOvF.pgp
Description: OpenPGP digital signature

Reply via email to