diff options
author | Christopher Faylor <me@cgf.cx> | 2002-06-11 16:06:16 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2002-06-11 16:06:16 +0000 |
commit | 077d8b23c867d95ca8742fdb9102a4450ea6e397 (patch) | |
tree | 07b318e9401c1dc3487620c57699819379d0e55d /winsup/cygwin/spawn.cc | |
parent | 2fbf4a7f3604268f163f040318f1b7a0b1bbb5e0 (diff) | |
download | cygnal-077d8b23c867d95ca8742fdb9102a4450ea6e397.tar.gz cygnal-077d8b23c867d95ca8742fdb9102a4450ea6e397.tar.bz2 cygnal-077d8b23c867d95ca8742fdb9102a4450ea6e397.zip |
* spawn.cc (spawn_guts): More hToken removal cleanup.
Diffstat (limited to 'winsup/cygwin/spawn.cc')
-rw-r--r-- | winsup/cygwin/spawn.cc | 9 |
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); } |