This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
Re: [PATCH 3/3] Cygwin: fchownat and fstatat: support the AT_EMPTY_PATH flag
- From: Ken Brown <kbrown at cornell dot edu>
- To: "cygwin-patches at cygwin dot com" <cygwin-patches at cygwin dot com>
- Date: Sun, 29 Dec 2019 15:18:01 +0000
- Subject: Re: [PATCH 3/3] Cygwin: fchownat and fstatat: support the AT_EMPTY_PATH flag
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cornell.edu; dmarc=pass action=none header.from=cornell.edu; dkim=pass header.d=cornell.edu; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Q2p/DppvF30JTjax454nJppwQ60LZszrOivTeLYObAU=; b=lFPcUS0XDu93V5j+STsrOpHYmwp8feSo+5IKOfvMRvvdR3OOaXD7fL+3SWnt4ArOKXMfEMCSd2y5Yd1Qk8tBouLytrzqMpjKkrgFAq63nM2VMW+hNLZYJSpDW2hNmLzIKppXSb+SYvsAg32kg8+30qz4kKnHFUy3oWoX/RxMoWA7tzG5Vi98jQNebQkb756iJZwF1M9+sG3bSe6gEbvvBookUGUwV0xBZtWJlW7ED/FQEHH1aLEyEvrE/OWcIotuIX+ddjp38EouJ5xr12Q1gN/AS5KNr70MTSkK5spT5UrZASJHBC2ZwH+Z3MHfHJg4AGQTNj5YZNq4dBVmAvxQLg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZRoQuYBzzvBcaYPmOFPrjwDDDse4lFpB84F0pLzbp1kGRKkJR2U3cwqQd+LJpgQa1NVqrf3OVgbCU5Te3v8MDVAXl6ktMoW6iIbsLcV4CoFIE2TLj6inLU2/bBiQ7/hVbjdkIIkDa8nF6rXSaf9pDp0rhcdoVT9/YJu6SOPFYmGUazc0wF/hWZ6IgzJTDeXJQDdPx4PAMxR/iHDWxyInBdOkBBpMXk+6ilGfhxnIPLXEcCvz7KtpxYnv5smVSXrpfBtx6+C76NMdZ6qP52vo4Pc52tGQPAWHNa/taIo32ryVkk3tvNhWaDUJ3inrU0YkCU6oMnsxBuN0VKPSltq24g==
- References: <20191228195213.1570-1-kbrown@cornell.edu> <20191228195213.1570-4-kbrown@cornell.edu>
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