* grp.cc (internal_getgroups): Drop local buf. Allocate groups
directly using alloca.
This commit is contained in:
parent
a4ed1daa7f
commit
ab6cadb0c3
@ -1,3 +1,8 @@
|
|||||||
|
2008-04-16 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* grp.cc (internal_getgroups): Drop local buf. Allocate groups
|
||||||
|
directly using alloca.
|
||||||
|
|
||||||
2008-04-14 Corinna Vinschen <corinna@vinschen.de>
|
2008-04-14 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* postinstall: Fix copy/paste bug.
|
* postinstall: Fix copy/paste bug.
|
||||||
|
@ -365,10 +365,9 @@ internal_getgroups (int gidsetsize, __gid32_t *grouplist, cygpsid * srchsid)
|
|||||||
if (GetTokenInformation (hToken, TokenGroups, NULL, 0, &size)
|
if (GetTokenInformation (hToken, TokenGroups, NULL, 0, &size)
|
||||||
|| GetLastError () == ERROR_INSUFFICIENT_BUFFER)
|
|| GetLastError () == ERROR_INSUFFICIENT_BUFFER)
|
||||||
{
|
{
|
||||||
char buf[size];
|
PTOKEN_GROUPS groups = (PTOKEN_GROUPS) alloca (size);
|
||||||
TOKEN_GROUPS *groups = (TOKEN_GROUPS *) buf;
|
|
||||||
|
|
||||||
if (GetTokenInformation (hToken, TokenGroups, buf, size, &size))
|
if (GetTokenInformation (hToken, TokenGroups, groups, size, &size))
|
||||||
{
|
{
|
||||||
cygsid sid;
|
cygsid sid;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user