This is the mail archive of the
cygwin-cvs@cygwin.com
mailing list for the Cygwin project.
[newlib-cygwin/topic/posix_acl_funcs] get_posix_access: Fix primary group handing when multiple ACEs exist
- From: Corinna Vinschen <corinna at sourceware dot org>
- To: cygwin-cvs at sourceware dot org
- Date: 28 Jan 2016 21:08:32 -0000
- Subject: [newlib-cygwin/topic/posix_acl_funcs] get_posix_access: Fix primary group handing when multiple ACEs exist
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=a16ab1751c64557b46945d4c093b8977c0584327
commit a16ab1751c64557b46945d4c093b8977c0584327
Author: Corinna Vinschen <corinna@vinschen.de>
Date: Thu Jan 28 14:34:11 2016 +0100
get_posix_access: Fix primary group handing when multiple ACEs exist
Handle additional ACE for primary group only as another GROUP
entry if it's an allow ACE. Deny ACEs don't qualify.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diff:
---
winsup/cygwin/sec_acl.cc | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/winsup/cygwin/sec_acl.cc b/winsup/cygwin/sec_acl.cc
index 51003c4..be54423 100644
--- a/winsup/cygwin/sec_acl.cc
+++ b/winsup/cygwin/sec_acl.cc
@@ -829,10 +829,12 @@ get_posix_access (PSECURITY_DESCRIPTOR psd,
else if (type == GROUP_OBJ)
{
/* Same for the primary group. */
- if (saw_group_obj)
- type = GROUP;
if (ace->Header.AceType == ACCESS_ALLOWED_ACE_TYPE)
- saw_group_obj = true;
+ {
+ if (saw_group_obj)
+ type = GROUP;
+ saw_group_obj = true;
+ }
}
if ((pos = searchace (lacl, MAX_ACL_ENTRIES, type, id)) >= 0)
{