summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/grp.cc1
2 files changed, 6 insertions, 0 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index b5c62194a..6b07adcd0 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+2002-11-14 Corinna Vinschen <corinna@vinschen.de>
+
+ * grp.cc (getgroups32): Don't use access token of current user when
+ retrieving group info for another user.
+
2002-11-13 Christopher Faylor <cgf@redhat.com>
* dll_init.cc (dll_list::detach): Eliminate reliance on passed in dll
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)