From 8a179967e670032fb2decf0ebcdd0059f9d139d8 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 22 May 2008 21:14:30 +0000 Subject: [PATCH] * grp.cc (internal_getgroups): Fix thinko. Only add enabled groups to the group list. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/grp.cc | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 5f68f3b72..4b342b7c2 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2008-05-22 Corinna Vinschen + + * grp.cc (internal_getgroups): Fix thinko. Only add enabled groups to + the group list. + 2008-05-22 Corinna Vinschen * grp.cc (internal_getgroups): Don't add deny-only groups to the group diff --git a/winsup/cygwin/grp.cc b/winsup/cygwin/grp.cc index 64423d8fa..35428fa97 100644 --- a/winsup/cygwin/grp.cc +++ b/winsup/cygwin/grp.cc @@ -382,8 +382,7 @@ internal_getgroups (int gidsetsize, __gid32_t *grouplist, cygpsid * srchsid) if (sid.getfromgr (gr)) for (DWORD pg = 0; pg < groups->GroupCount; ++pg) if (sid == groups->Groups[pg].Sid - && !(groups->Groups[pg].Attributes - & SE_GROUP_USE_FOR_DENY_ONLY) + && (groups->Groups[pg].Attributes & SE_GROUP_ENABLED) && sid != well_known_world_sid) { if (cnt < gidsetsize)