diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2006-08-31 19:57:56 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2006-08-31 19:57:56 +0400 |
commit | 55283468e62dd074fe9b1b0428b319d908e0e5d2 (patch) | |
tree | ed7933648a6cab1b46c93087b137148a06b8d188 /winsup/cygwin/grp.cc | |
parent | c9f1f4b438be2ad49806ae4abc89ecc6badfb5ef (diff) |
* grp.cc (initgroups32): Run get_server_groups under original token.
* syscalls.cc (seteuid32): Slightly reorganize code creating a token.
Diffstat (limited to 'winsup/cygwin/grp.cc')
-rw-r--r-- | winsup/cygwin/grp.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/winsup/cygwin/grp.cc b/winsup/cygwin/grp.cc index c59f25fc0..20698ad5f 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; } |