From 66c161baac1a31cd8c87eeec2e9b7dab9a2f50c8 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 15 Nov 2000 21:04:02 +0000 Subject: * 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. --- winsup/cygwin/spawn.cc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'winsup/cygwin/spawn.cc') 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; -- cgit v1.2.3