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:
authorCorinna Vinschen <corinna@vinschen.de>2000-11-16 00:04:02 +0300
committerCorinna Vinschen <corinna@vinschen.de>2000-11-16 00:04:02 +0300
commit66c161baac1a31cd8c87eeec2e9b7dab9a2f50c8 (patch)
treeb530de5f8919203459f7443243ebdc46161c41c0 /winsup/cygwin/spawn.cc
parente00449d65705c976fcb970e4b39c4f3fd860c861 (diff)
* 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.cc12
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;