* syscalls.cc (seteuid): Initialize pi.token before calling
internal_getlogin(). * uinfo.cc (internal_getlogin): Use impersonation token instead of process token in case of active impersonation. Add some comments. (uinfo_init): Initializing myself->token and myself->impersonated before calling internal_getlogin(). Add some comments.
This commit is contained in:
@ -1856,6 +1856,11 @@ seteuid (uid_t uid)
|
||||
|
||||
struct pinfo pi;
|
||||
pi.psid = (PSID) pi.sidbuf;
|
||||
/* pi.token is used in internal_getlogin() to determine if
|
||||
impersonation is active. If so, the token is used for
|
||||
retrieving user's SID. */
|
||||
pi.token = myself->impersonated ? myself->token
|
||||
: INVALID_HANDLE_VALUE;
|
||||
struct passwd *pw_cur = getpwnam (internal_getlogin (&pi));
|
||||
if (pw_cur != pw_new)
|
||||
{
|
||||
|
Reference in New Issue
Block a user