* fork.cc (fork): Fix error in copying SID pointer.
* spawn.cc (_spawnve): Ditto. * passwd.cc: Remove static from `passwd_in_memory_p'. (read_etc_passwd): Remove static. * uinfo.cc: Move global declaration of `read_etc_group' and `group_in_memory_p' into `uinfo_init'. (internal_getlogin): Try to get SID from current process first. (uinfo_init): Don't set uid and gid if `myself' has a valid SID. Only load /etc/passwd and /etc/group in that case.
This commit is contained in:
@ -419,8 +419,9 @@ fork ()
|
||||
child->process_state |= PID_INITIALIZING |
|
||||
(myself->process_state & PID_USETTY);
|
||||
memcpy (child->username, myself->username, MAX_USER_NAME);
|
||||
child->psid = myself->psid;
|
||||
memcpy (child->sidbuf, myself->sidbuf, 40);
|
||||
if (myself->psid)
|
||||
child->psid = child->sidbuf;
|
||||
memcpy (child->logsrv, myself->logsrv, 256);
|
||||
memcpy (child->domain, myself->domain, MAX_COMPUTERNAME_LENGTH+1);
|
||||
child->token = myself->token;
|
||||
|
Reference in New Issue
Block a user