aboutsummaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
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;
}