* grp.cc (internal_getgroups): Handle properly tokens with
no groups. Fix bug introduced on 2003-02-04.
This commit is contained in:
parent
c7887f9705
commit
afe13e8454
|
@ -1,3 +1,8 @@
|
|||
2003-02-17 Pierre Humblet <pierre.humblet@ieee.org>
|
||||
|
||||
* grp.cc (internal_getgroups): Handle properly tokens with
|
||||
no groups. Fix bug introduced on 2003-02-04.
|
||||
|
||||
2003-02-16 Christopher Faylor <cgf@redhat.com>
|
||||
|
||||
* cygwin.din: Export all appropriate newlibc libm functions. Sort.
|
||||
|
|
|
@ -267,7 +267,6 @@ internal_getgroups (int gidsetsize, __gid32_t *grouplist, cygpsid * srchsid)
|
|||
for (DWORD pg = 0; pg < groups->GroupCount; ++pg)
|
||||
if ((cnt = (*srchsid == groups->Groups[pg].Sid)))
|
||||
break;
|
||||
cnt = -1;
|
||||
}
|
||||
else
|
||||
for (int gidx = 0; (gr = internal_getgrent (gidx)); ++gidx)
|
||||
|
@ -293,7 +292,6 @@ internal_getgroups (int gidsetsize, __gid32_t *grouplist, cygpsid * srchsid)
|
|||
debug_printf ("%d = GetTokenInformation(NULL) %E", size);
|
||||
if (hToken != cygheap->user.token)
|
||||
CloseHandle (hToken);
|
||||
if (cnt)
|
||||
return cnt;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue