[PATCH 3/3] Cygwin: fchownat and fstatat: support the AT_EMPTY_PATH flag

Ken Brown kbrown@cornell.edu
Sun Dec 29 15:18:00 GMT 2019


On 12/28/2019 2:52 PM, Ken Brown wrote:
> Following Linux, allow the pathname argument to be empty if the
> AT_EMPTY_PATH is specified.  In this case the dirfd argument can refer
> to any type of file, not just a directory, and the call operates on
> that file.  In particular, dirfd can refer to a symlink that was
> opened with O_PATH and O_NOFOLLOW.
> 
> Add a new optional argument to gen_full_path_at to help implement
> this.

I don't like the way I did this, at least for fstatat.  If dirfd was opened with 
O_PATH, I've ignored the purpose of that flag.  I'll rethink this and possibly 
submit a v2.

Ken



More information about the Cygwin-patches mailing list