https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=c86c08e0ab41ba8d181876a4bdcfa4cd62264827
commit c86c08e0ab41ba8d181876a4bdcfa4cd62264827 Author: Corinna Vinschen <cori...@vinschen.de> AuthorDate: Tue Jul 8 21:54:19 2025 +0200 Commit: Corinna Vinschen <cori...@vinschen.de> CommitDate: Tue Jul 8 22:15:17 2025 +0200 Cygwin: open: only fix file attributes when trying to create file Only try to fix the cached DOS attributes if the caller actually tried to create the file. Otherwise the fixup code is called even in cases where we open the file with minimal query access bits and NtQueryInformationFile() could fail with STATUS_ACCESS_DENIED and the new cached DOS attributes are wrong again. Fixes: 37c49decc835f ("Cygwin: open: only fix up cached DOS file attributes for on-disk files") Signed-off-by: Corinna Vinschen <cori...@vinschen.de> Diff: --- winsup/cygwin/fhandler/base.cc | 4 ++-- winsup/cygwin/release/3.6.4 | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/fhandler/base.cc b/winsup/cygwin/fhandler/base.cc index 6c95e2b60254..64a5f6aea812 100644 --- a/winsup/cygwin/fhandler/base.cc +++ b/winsup/cygwin/fhandler/base.cc @@ -720,9 +720,9 @@ fhandler_base::open (int flags, mode_t mode) goto done; } - if (get_device () == FH_FS) + if (get_device () == FH_FS && (flags & O_CREAT)) { - /* Fix up file attributes, they are desperately needed later. + /* Fix up file attributes if we just made an attempt to create the file. Originally we only did that in the FILE_CREATED case below, but that's insufficient: diff --git a/winsup/cygwin/release/3.6.4 b/winsup/cygwin/release/3.6.4 index 3286991cc081..4338214a694f 100644 --- a/winsup/cygwin/release/3.6.4 +++ b/winsup/cygwin/release/3.6.4 @@ -25,3 +25,6 @@ Fixes: - Fix potential crashing a process PID by accessing /proc/PID/maps in parallel. Addresses: https://cygwin.com/pipermail/cygwin/2025-May/258198.html + +- Fix ACL operations on directories. + Addresses: https://cygwin.com/pipermail/cygwin/2025-July/258433.html