From ddeb45ecbdc02b522027d23db7cd1dc656ba900e Mon Sep 17 00:00:00 2001 From: corinna Date: Thu, 22 May 2008 21:03:54 +0000 Subject: [PATCH] * grp.cc (internal_getgroups): Don't add deny-only groups to the group list. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/grp.cc | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index f389278408..5f68f3b720 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,10 @@ 2008-05-22 Corinna Vinschen + * grp.cc (internal_getgroups): Don't add deny-only groups to the group + list. + +2008-05-22 Corinna Vinschen + * cygtls.h (struct san): Add two int values to store the current tls_pathbuf counters. (return_from_fault): Restore tls_pathbuf counters. diff --git a/winsup/cygwin/grp.cc b/winsup/cygwin/grp.cc index e9e657d881..64423d8fa3 100644 --- a/winsup/cygwin/grp.cc +++ b/winsup/cygwin/grp.cc @@ -381,8 +381,10 @@ internal_getgroups (int gidsetsize, __gid32_t *grouplist, cygpsid * srchsid) for (int gidx = 0; (gr = internal_getgrent (gidx)); ++gidx) if (sid.getfromgr (gr)) for (DWORD pg = 0; pg < groups->GroupCount; ++pg) - if (sid == groups->Groups[pg].Sid && - sid != well_known_world_sid) + if (sid == groups->Groups[pg].Sid + && !(groups->Groups[pg].Attributes + & SE_GROUP_USE_FOR_DENY_ONLY) + && sid != well_known_world_sid) { if (cnt < gidsetsize) grouplist[cnt] = gr->gr_gid; -- 2.11.0