From fcd8a0d4f4e9750ab2ddccb64318bf7a495af4ef Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Sat, 12 Mar 2016 17:57:34 +0100 Subject: [PATCH] Fix typo which might break permission evaluation * sec_acl.cc (get_posix_access): Fix a typo checking for a_id rather than a_type. Signed-off-by: Corinna Vinschen --- 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 1919fb75b..c99e05634 100644 --- a/winsup/cygwin/sec_acl.cc +++ b/winsup/cygwin/sec_acl.cc @@ -1124,7 +1124,7 @@ get_posix_access (PSECURITY_DESCRIPTOR psd, } /* For all groups, if everyone has more permissions, add everyone perms to group perms. Skip groups with deny ACE. */ - else if (lacl[idx].a_id & (GROUP_OBJ | GROUP) + else if (lacl[idx].a_type & (GROUP_OBJ | GROUP) && !(lacl[idx].a_type & ACL_DEFAULT) && !(lacl[idx].a_perm & DENY_RWX)) lacl[idx].a_perm |= lacl[2].a_perm & S_IRWXO;