* grp.cc (internal_getgroups): Check for group attributes and
Everyone sid before calling internal_getgrsid.
This commit is contained in:
parent
093fe9b598
commit
9b54770bd7
|
@ -1,3 +1,8 @@
|
|||
2015-02-23 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* grp.cc (internal_getgroups): Check for group attributes and
|
||||
Everyone sid before calling internal_getgrsid.
|
||||
|
||||
2015-02-23 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* cygwait.h (enum cw_wait_mask): Add cw_sig_restart. Add comments
|
||||
|
|
|
@ -538,18 +538,17 @@ internal_getgroups (int gidsetsize, gid_t *grouplist, cyg_ldap *pldap,
|
|||
for (DWORD pg = 0; pg < groups->GroupCount; ++pg)
|
||||
{
|
||||
cygpsid sid = groups->Groups[pg].Sid;
|
||||
if ((groups->Groups[pg].Attributes
|
||||
& (SE_GROUP_ENABLED | SE_GROUP_INTEGRITY_ENABLED)) == 0
|
||||
|| sid == well_known_world_sid)
|
||||
continue;
|
||||
if ((grp = internal_getgrsid (sid, pldap)))
|
||||
{
|
||||
if ((groups->Groups[pg].Attributes
|
||||
& (SE_GROUP_ENABLED | SE_GROUP_INTEGRITY_ENABLED))
|
||||
&& sid != well_known_world_sid)
|
||||
{
|
||||
if (cnt < gidsetsize)
|
||||
grouplist[cnt] = grp->gr_gid;
|
||||
++cnt;
|
||||
if (gidsetsize && cnt > gidsetsize)
|
||||
goto error;
|
||||
}
|
||||
if (cnt < gidsetsize)
|
||||
grouplist[cnt] = grp->gr_gid;
|
||||
++cnt;
|
||||
if (gidsetsize && cnt > gidsetsize)
|
||||
goto error;
|
||||
}
|
||||
if (timeout_ns && GetTickCount_ns () - t0 >= timeout_ns)
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue