* grp.cc (getgroups32): Protect against closing cygheap->user.token.

This commit is contained in:
Christopher Faylor 2002-11-16 03:50:56 +00:00
parent a87878a965
commit 463e739282
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2002-11-15 Pierre Humblet <pierre.humblet@ieee.org>
* grp.cc (getgroups32): Protect against closing cygheap->user.token.
2002-11-15 Christopher Faylor <cgf@redhat.com> 2002-11-15 Christopher Faylor <cgf@redhat.com>
* include/cygwin/version.h: Bump API_MINOR to accommodate below * include/cygwin/version.h: Bump API_MINOR to accommodate below

View File

@ -372,7 +372,8 @@ getgroups32 (int gidsetsize, __gid32_t *grouplist, __gid32_t gid,
++cnt; ++cnt;
if (gidsetsize && cnt > gidsetsize) if (gidsetsize && cnt > gidsetsize)
{ {
CloseHandle (hToken); if (hToken != cygheap->user.token)
CloseHandle (hToken);
goto error; goto error;
} }
break; break;