* 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.
This commit is contained in:
Christopher Faylor
2000-08-09 02:33:47 +00:00
parent c51a2a8ba4
commit 0072fdab86
8 changed files with 69 additions and 68 deletions

View File

@ -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 ();
}