mirror of
https://github.com/reactos/reactos.git
synced 2025-05-24 19:56:38 +00:00
[RTL]
When we are impersonating, also set the flag, so that on release, we can kill it. This hopefully fixes 2nd stage and the whole mess it was causing in privileges. svn path=/trunk/; revision=58959
This commit is contained in:
parent
a330845fa1
commit
be5914df2f
1 changed files with 5 additions and 2 deletions
|
@ -247,8 +247,9 @@ RtlAcquirePrivilege(IN PULONG Privilege,
|
|||
goto Cleanup;
|
||||
}
|
||||
|
||||
/* Save said token */
|
||||
/* Save said token and the fact we have impersonated */
|
||||
State->Token = ImpersonationToken;
|
||||
State->Flags |= RTL_ACQUIRE_PRIVILEGE_IMPERSONATE;
|
||||
|
||||
ZwClose(ProcessToken);
|
||||
}
|
||||
|
@ -372,7 +373,9 @@ RtlReleasePrivilege(IN PVOID ReturnedState)
|
|||
|
||||
DPRINT("RtlReleasePrivilege(%p)\n", ReturnedState);
|
||||
|
||||
/* If we had an active impersonation before we acquired privileges */
|
||||
/* If we had an active impersonation before we acquired privileges
|
||||
* Or if we have impersonated, quit it
|
||||
*/
|
||||
if (State->Flags & RTL_ACQUIRE_PRIVILEGE_IMPERSONATE)
|
||||
{
|
||||
/* Restore it for the current thread */
|
||||
|
|
Loading…
Reference in a new issue