summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/grp.cc
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2002-11-14 10:28:55 +0000
committerCorinna Vinschen <corinna@vinschen.de>2002-11-14 10:28:55 +0000
commitdae01cb624969c8279bcd1289ec6db3a9f5cecf6 (patch)
tree75d566e1317b0334f4dd7830a9b2979c551db75c /winsup/cygwin/grp.cc
parent052990e6b3cedbe869a66dd70e41a681a056eb76 (diff)
downloadcygnal-dae01cb624969c8279bcd1289ec6db3a9f5cecf6.tar.gz
cygnal-dae01cb624969c8279bcd1289ec6db3a9f5cecf6.tar.bz2
cygnal-dae01cb624969c8279bcd1289ec6db3a9f5cecf6.zip
* grp.cc (getgroups32): Don't use access token of current user when
retrieving group info for another user.
Diffstat (limited to 'winsup/cygwin/grp.cc')
-rw-r--r--winsup/cygwin/grp.cc1
1 files changed, 1 insertions, 0 deletions
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)