diff options
author | Christopher Faylor <me@cgf.cx> | 2000-08-09 06:33:47 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2000-08-09 06:33:47 +0400 |
commit | 0072fdab860eb12ab2a454860a8c25ade253de6c (patch) | |
tree | fa970886fb81871f5714dbe2734ba91e40a7740a /winsup/cygwin/spawn.cc | |
parent | c51a2a8ba4b5d7fa3831303f2bf8611d23b52765 (diff) |
* select.cc (allocfd_set): Zero allocated fd_set.
(cygwin_select): Move fd_set copying logic from ::wait to here. Use common
return through sell.poll.
(select_stuff::wait): Just return success or failure and let caller fill in
fd_set.
* pinfo.h (pinfo): Eliminate self-referential pointer to sidbuf since pinfo
structure exists at random locations now.
* fork.cc (fork): Use 'use_psid' element to control when the psid is relevant.
* shared.cc (sec_user): Ditto.
* spawn.cc (spawn_guts): Ditto.
* uinfo.cc (internal_getlogin): Ditto.
* syscall.cc (seteuid): Ditto. Set use_psid element.
Diffstat (limited to 'winsup/cygwin/spawn.cc')
-rw-r--r-- | winsup/cygwin/spawn.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index be35a0b7d..36098a279 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -670,9 +670,11 @@ skip_arg_parsing: child->ctty = myself->ctty; child->umask = myself->umask; child->process_state |= PID_INITIALIZING; - memcpy (child->sidbuf, myself->sidbuf, MAX_SID_LEN); - if (myself->psid) - child->psid = child->sidbuf; + if (myself->use_psid) + { + child->use_psid = 1; + memcpy (child->psid, myself->psid, MAX_SID_LEN); + } memcpy (child->logsrv, myself->logsrv, MAX_HOST_NAME); memcpy (child->domain, myself->domain, MAX_COMPUTERNAME_LENGTH+1); memcpy (child->root, myself->root, MAX_PATH+1); @@ -691,7 +693,7 @@ skip_arg_parsing: /* Set child->uid to USHRT_MAX to force calling internal_getlogin() from child process. Clear username and psid to play it safe. */ child->uid = USHRT_MAX; - child->psid = NULL; + child->use_psid = 0; } child.remember (); } |