aboutsummaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2006-08-31 15:58:13 +0000
committerCorinna Vinschen <corinna@vinschen.de>2006-08-31 15:58:13 +0000
commitb2adedd501a2224a247bc4e6a1c5d5a699e8fc33 (patch)
tree2afcca22e9b19e0a5f13d76d02acefd6d2677856 /winsup
parentfd59a3acddbf5936cbe978475f90afaa4a0e7c09 (diff)
downloadnewlib-b2adedd501a2224a247bc4e6a1c5d5a699e8fc33.zip
newlib-b2adedd501a2224a247bc4e6a1c5d5a699e8fc33.tar.gz
newlib-b2adedd501a2224a247bc4e6a1c5d5a699e8fc33.tar.bz2
* grp.cc (initgroups32): Run get_server_groups under original token.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog6
-rw-r--r--winsup/cygwin/grp.cc3
2 files changed, 8 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index cb2cf68..d6593a1 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,4 +1,8 @@
-2006-08-20 Hideki Iwamoto <h-iwamoto@kit.hi-ho.ne.jp>
+2006-08-31 Corinna Vinschen <corinna@vinschen.de>
+
+ * grp.cc (initgroups32): Run get_server_groups under original token.
+
+2006-08-20 Hideki Iwamoto <h-iwamoto@kit.hi-ho.ne.jp>
* fhandler_disk_file.cc (fhandler_disk_file::pread): Fix comparison
of return value of lseek.
diff --git a/winsup/cygwin/grp.cc b/winsup/cygwin/grp.cc
index c59f25f..20698ad 100644
--- a/winsup/cygwin/grp.cc
+++ b/winsup/cygwin/grp.cc
@@ -471,6 +471,7 @@ initgroups32 (const char *name, __gid32_t gid)
if (wincap.has_security ())
{
ret = -1;
+ cygheap->user.deimpersonate ();
struct passwd *pw = internal_getpwnam (name);
struct __group32 *gr = internal_getgrgid (gid);
cygsid usersid, grpsid;
@@ -492,6 +493,8 @@ initgroups32 (const char *name, __gid32_t gid)
ret = 0;
out:
+ if (wincap.has_security ())
+ cygheap->user.reimpersonate ();
syscall_printf ( "%d = initgroups (%s, %u)", ret, name, gid);
return ret;
}