* 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:
@ -423,9 +423,11 @@ fork ()
|
||||
forked->process_state |= PID_INITIALIZING |
|
||||
(myself->process_state & PID_USETTY);
|
||||
memcpy (forked->username, myself->username, MAX_USER_NAME);
|
||||
memcpy (forked->sidbuf, myself->sidbuf, MAX_SID_LEN);
|
||||
if (myself->psid)
|
||||
forked->psid = forked->sidbuf;
|
||||
if (myself->use_psid)
|
||||
{
|
||||
memcpy (forked->psid, myself->psid, MAX_SID_LEN);
|
||||
forked->use_psid = 1;
|
||||
}
|
||||
memcpy (forked->logsrv, myself->logsrv, MAX_HOST_NAME);
|
||||
memcpy (forked->domain, myself->domain, MAX_COMPUTERNAME_LENGTH+1);
|
||||
forked->token = myself->token;
|
||||
|
Reference in New Issue
Block a user