From c14215de386c5e03195c2218a773a32cd4694ccc Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 16 Apr 2015 22:25:23 +0200 Subject: [PATCH] Fix setting saw_group_obj flag * sec_acl.cc (get_posix_access): Only set saw_group_obj flag if we saw the ACCESS_ALLOWED_ACE. Signed-off-by: Corinna Vinschen --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/sec_acl.cc | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 9ec866f2e..bd5ea550a 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2015-04-16 Corinna Vinschen + + * sec_acl.cc (get_posix_access): Only set saw_group_obj flag if we saw + the ACCESS_ALLOWED_ACE. + 2015-04-16 Corinna Vinschen * fhandler_disk_file.cc (fhandler_disk_file::fchmod): Deliberatly diff --git a/winsup/cygwin/sec_acl.cc b/winsup/cygwin/sec_acl.cc index 58683cf9a..1855bb625 100644 --- a/winsup/cygwin/sec_acl.cc +++ b/winsup/cygwin/sec_acl.cc @@ -757,7 +757,8 @@ get_posix_access (PSECURITY_DESCRIPTOR psd, if (owner_eq_group && !saw_group_obj) { type = GROUP_OBJ; - saw_group_obj = true; + if (ace->Header.AceType == ACCESS_ALLOWED_ACE_TYPE) + saw_group_obj = true; } else type = USER;