mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-18 23:12:15 +08:00
Cygwin: seteuid: allow inheriting impersonation user profile handle
The child process needs access to the handle to be able to unload it when switching user context. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
parent
8eee25241e
commit
dd3730ed9c
@ -3612,7 +3612,11 @@ seteuid32 (uid_t uid)
|
||||
cygheap->user.imp_profile = load_user_profile (new_token, pw_new,
|
||||
usersid);
|
||||
if (cygheap->user.imp_profile)
|
||||
cygheap->user.imp_profile_token = new_token;
|
||||
{
|
||||
cygheap->user.imp_profile_token = new_token;
|
||||
SetHandleInformation (cygheap->user.imp_profile,
|
||||
HANDLE_FLAG_INHERIT, HANDLE_FLAG_INHERIT);
|
||||
}
|
||||
}
|
||||
|
||||
/* Try setting owner to same value as user. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user