- Properly disable impersonation in PsDisableImpersonation if it was previously enabl...
authorAlex Ionescu <aionescu@gmail.com>
Wed, 16 Aug 2006 03:17:21 +0000 (03:17 +0000)
committerAlex Ionescu <aionescu@gmail.com>
Wed, 16 Aug 2006 03:17:21 +0000 (03:17 +0000)
svn path=/trunk/; revision=23588

reactos/ntoskrnl/ps/security.c

index 899905b..d20bf0b 100644 (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;