From dae01cb624969c8279bcd1289ec6db3a9f5cecf6 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 14 Nov 2002 10:28:55 +0000 Subject: * grp.cc (getgroups32): Don't use access token of current user when retrieving group info for another user. --- winsup/cygwin/grp.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'winsup/cygwin/grp.cc') diff --git a/winsup/cygwin/grp.cc b/winsup/cygwin/grp.cc index 506208bc3..648d5a3da 100644 --- a/winsup/cygwin/grp.cc +++ b/winsup/cygwin/grp.cc @@ -342,6 +342,7 @@ getgroups32 (int gidsetsize, __gid32_t *grouplist, __gid32_t gid, read_etc_group (); if (allow_ntsec && + strcasematch (username, cygheap->user.name ()) && OpenProcessToken (hMainProc, TOKEN_QUERY, &hToken)) { if (GetTokenInformation (hToken, TokenGroups, NULL, 0, &size) -- cgit v1.2.3