* grp.cc (internal_getgroups): Don't add deny-only groups to the group

list.
This commit is contained in:
Corinna Vinschen 2008-05-22 21:03:54 +00:00
parent c15121a287
commit 2122048bd6
2 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2008-05-22 Corinna Vinschen <corinna@vinschen.de>
* grp.cc (internal_getgroups): Don't add deny-only groups to the group
list.
2008-05-22 Corinna Vinschen <corinna@vinschen.de>
* cygtls.h (struct san): Add two int values to store the current

View File

@ -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;