From 22917c0ebeba3ed5d8faa104afb2ed3748f57015 Mon Sep 17 00:00:00 2001 From: Alex Ionescu Date: Wed, 16 Aug 2006 03:17:21 +0000 Subject: [PATCH] - 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 --- reactos/ntoskrnl/ps/security.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reactos/ntoskrnl/ps/security.c b/reactos/ntoskrnl/ps/security.c index 899905b144b..d20bf0bb2ea 100644 --- a/reactos/ntoskrnl/ps/security.c +++ b/reactos/ntoskrnl/ps/security.c @@ -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;