Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2002-06-11 20:06:16 +0400
committerChristopher Faylor <me@cgf.cx>2002-06-11 20:06:16 +0400
commit077d8b23c867d95ca8742fdb9102a4450ea6e397 (patch)
tree07b318e9401c1dc3487620c57699819379d0e55d /winsup/cygwin/spawn.cc
parent2fbf4a7f3604268f163f040318f1b7a0b1bbb5e0 (diff)
* spawn.cc (spawn_guts): More hToken removal cleanup.
Diffstat (limited to 'winsup/cygwin/spawn.cc')
-rw-r--r--winsup/cygwin/spawn.cc9
1 files changed, 2 insertions, 7 deletions
diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc
index c1934b17a..12e82a64d 100644
--- a/winsup/cygwin/spawn.cc
+++ b/winsup/cygwin/spawn.cc
@@ -654,10 +654,7 @@ spawn_guts (const char * prog_arg, const char *const *argv,
since it's value is needed by `sec_user'. */
PSECURITY_ATTRIBUTES sec_attribs = sec_user_nih (sa_buf, sid);
- /* Remove impersonation */
- if (cygheap->user.impersonated
- && cygheap->user.token != INVALID_HANDLE_VALUE)
- RevertToSelf ();
+ RevertToSelf ();
/* Load users registry hive. */
load_registry_hive (sid);
@@ -694,9 +691,7 @@ spawn_guts (const char * prog_arg, const char *const *argv,
&pi);
/* Restore impersonation. In case of _P_OVERLAY this isn't
allowed since it would overwrite child data. */
- if (mode != _P_OVERLAY
- && cygheap->user.impersonated
- && cygheap->user.token != INVALID_HANDLE_VALUE)
+ if (mode != _P_OVERLAY)
ImpersonateLoggedOnUser (cygheap->user.token);
}