https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=a785d996c94155422168f5d66386b41ec8ae098c
commit a785d996c94155422168f5d66386b41ec8ae098c Author: Corinna Vinschen <[email protected]> AuthorDate: Wed Jan 15 11:58:57 2025 +0100 Commit: Corinna Vinschen <[email protected]> CommitDate: Wed Jan 15 12:27:03 2025 +0100 Revert "Cygwin: get_posix_access: do not merge permissions for just created files" This reverts commit 971d2dffea7848270aa9dfb5c14dcd946c8971c0. This patch was supposed to fix lots of FAILs in our own testsuite/winsup.api/ltp/umask03.c test. The reason was that umask masking in get_posix_access when generating new files was overriden by later code in the same function, merging permissions in old-style or Windows generated ACLs. However, the solution to skip merging was not the right thing, because this breaks handling of Windows-generated ACLs. Rather, umask masking should be performed pretty late, certainly after merging permissions. This will be done by a followup patch. Fixes: 971d2dffea78 ("Cygwin: get_posix_access: do not merge permissions for just created files") Signed-off-by: Corinna Vinschen <[email protected]> Diff: --- winsup/cygwin/sec/acl.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/cygwin/sec/acl.cc b/winsup/cygwin/sec/acl.cc index 1d374b5e5a6d..b1dafaaae96a 100644 --- a/winsup/cygwin/sec/acl.cc +++ b/winsup/cygwin/sec/acl.cc @@ -1101,7 +1101,7 @@ get_posix_access (PSECURITY_DESCRIPTOR psd, pos = MAX_ACL_ENTRIES; /* For old-style or non-Cygwin ACLs, check for merging permissions. */ - if (!just_created && !new_style) + if (!new_style) for (idx = 0; idx < pos; ++idx) { if (lacl[idx].a_type & (USER_OBJ | USER)
