https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=5da6fdf7f1ee83dc22731a1fc4e1a2e9541c6405

commit 5da6fdf7f1ee83dc22731a1fc4e1a2e9541c6405
Author:     Corinna Vinschen <cori...@vinschen.de>
AuthorDate: Sun Mar 30 12:54:07 2025 +0200
Commit:     Corinna Vinschen <cori...@vinschen.de>
CommitDate: Sun Mar 30 22:00:43 2025 +0200

    Cygwin: set_posix_access: Use DEF objects when creating default ACL entries 
from scratch
    
    When creating default ACL entries from scratch, set_posix_access
    accidentally sets the type to GROUP_OBJ and OTHER_OBJ, rather than
    DEF_GROUP_OBJ/DEF_OTHER_OBJ.  This shouldn't be noticable most of
    time since creating from scratch is seldom necessary.
    
    Fixes: bc444e5aa4ca ("Reapply POSIX ACL changes.")
    Signed-off-by: Corinna Vinschen <cori...@vinschen.de>
    
    (cherry picked from commit aa481e001636389c28458e18250e42a24bfcb272)

Diff:
---
 winsup/cygwin/sec/acl.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/winsup/cygwin/sec/acl.cc b/winsup/cygwin/sec/acl.cc
index fa4ea4ceeede..5d27a91280f4 100644
--- a/winsup/cygwin/sec/acl.cc
+++ b/winsup/cygwin/sec/acl.cc
@@ -219,10 +219,10 @@ set_posix_access (mode_t attr, uid_t uid, gid_t gid,
          aclbufp[3].a_type = DEF_USER_OBJ;
          aclbufp[3].a_id = ACL_UNDEFINED_ID;
          aclbufp[3].a_perm = (attr >> 6) & S_IRWXO;
-         aclbufp[4].a_type = GROUP_OBJ;
+         aclbufp[4].a_type = DEF_GROUP_OBJ;
          aclbufp[4].a_id = ACL_UNDEFINED_ID;
          aclbufp[4].a_perm = (attr >> 3) & S_IRWXO;
-         aclbufp[5].a_type = OTHER_OBJ;
+         aclbufp[5].a_type = DEF_OTHER_OBJ;
          aclbufp[5].a_id = ACL_UNDEFINED_ID;
          aclbufp[5].a_perm = attr & S_IRWXO;
          nentries += MIN_ACL_ENTRIES;

Reply via email to