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. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature