- Properly disable impersonation in PsDisableImpersonation if it was previously enabled, instead of not disabling it. (fix a wrong check). Thanks to Arty.

svn path=/trunk/; revision=23588
This commit is contained in:
Alex Ionescu 2006-08-16 03:17:21 +00:00
parent a2976ce0d4
commit 22917c0ebe

View file

@ -814,8 +814,8 @@ PsDisableImpersonation(IN PETHREAD Thread,
OldValue);
} while (NewValue != OldValue);
/* Did someone disable behind our back? */
if (!(NewValue & CT_ACTIVE_IMPERSONATION_INFO_BIT))
/* Make sure nobody disabled it behind our back */
if (NewValue & CT_ACTIVE_IMPERSONATION_INFO_BIT)
{
/* Copy the old state */
Impersonation = Thread->ImpersonationInfo;