diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2000-11-15 21:04:02 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2000-11-15 21:04:02 +0000 |
commit | 66c161baac1a31cd8c87eeec2e9b7dab9a2f50c8 (patch) | |
tree | b530de5f8919203459f7443243ebdc46161c41c0 /winsup/cygwin/spawn.cc | |
parent | e00449d65705c976fcb970e4b39c4f3fd860c861 (diff) | |
download | cygnal-66c161baac1a31cd8c87eeec2e9b7dab9a2f50c8.tar.gz cygnal-66c161baac1a31cd8c87eeec2e9b7dab9a2f50c8.tar.bz2 cygnal-66c161baac1a31cd8c87eeec2e9b7dab9a2f50c8.zip |
* cygheap.h: Move `token' and `impersonated' from class _pinfo
to class cygheap_user.
* pinfo.h: Ditto.
* fork.cc (fork_child): Change usage of `token' and `impersonated'
accordingly.
(fork_parent): Ditto.
* security.cc (cygwin_set_impersonation_token): Ditto.
* sigproc.cc (proc_subproc): Ditto.
* spawn.cc (spawn_guts): Ditto.
* syscalls.cc (seteuid): Ditto.
* uinfo.cc (uinfo_init): Ditto.
Diffstat (limited to 'winsup/cygwin/spawn.cc')
-rw-r--r-- | winsup/cygwin/spawn.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index d2338e995..097ecedc9 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -562,8 +562,8 @@ skip_arg_parsing: /* Preallocated buffer for `sec_user' call */ char sa_buf[1024]; - if (!hToken && myself->token != INVALID_HANDLE_VALUE) - hToken = myself->token; + if (!hToken && cygheap->user.token != INVALID_HANDLE_VALUE) + hToken = cygheap->user.token; const char *runpath = null_app_name ? NULL : (const char *) real_path; @@ -624,7 +624,8 @@ skip_arg_parsing: /* Remove impersonation */ uid_t uid = geteuid(); - if (myself->impersonated && myself->token != INVALID_HANDLE_VALUE) + if (cygheap->user.impersonated + && cygheap->user.token != INVALID_HANDLE_VALUE) seteuid (cygheap->user.orig_uid); /* Load users registry hive. */ @@ -644,7 +645,8 @@ skip_arg_parsing: /* Restore impersonation. In case of _P_OVERLAY this isn't allowed since it would overwrite child data. */ if (mode != _P_OVERLAY && mode != _P_VFORK - && myself->impersonated && myself->token != INVALID_HANDLE_VALUE) + && cygheap->user.impersonated + && cygheap->user.token != INVALID_HANDLE_VALUE) seteuid (uid); } @@ -717,7 +719,7 @@ skip_arg_parsing: sigproc_printf ("spawned windows pid %d", pi.dwProcessId); - if (hToken && hToken != myself->token) + if (hToken && hToken != cygheap->user.token) CloseHandle (hToken); DWORD res; |