diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2003-02-18 13:09:37 +0300 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2003-02-18 13:09:37 +0300 |
commit | afe13e845405e56077925c4f7af02691a265675f (patch) | |
tree | 3e3851664914bc87b4a978f0d1bf8e2d8a31090e /winsup/cygwin/grp.cc | |
parent | c7887f970580f470cc6e44fd396a203db6dd2222 (diff) |
* grp.cc (internal_getgroups): Handle properly tokens with
no groups. Fix bug introduced on 2003-02-04.
Diffstat (limited to 'winsup/cygwin/grp.cc')
-rw-r--r-- | winsup/cygwin/grp.cc | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/winsup/cygwin/grp.cc b/winsup/cygwin/grp.cc index 2d385c6ff..a0d73ae26 100644 --- a/winsup/cygwin/grp.cc +++ b/winsup/cygwin/grp.cc @@ -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,8 +292,7 @@ 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; + return cnt; } gid = myself->gid; |