Fix a missing referencing in PsImpersonateClient (dereferenced in PsRevertThreadToSelf)
authorHervé Poussineau <hpoussin@reactos.org>
Sat, 26 Aug 2006 08:46:18 +0000 (08:46 +0000)
committerHervé Poussineau <hpoussin@reactos.org>
Sat, 26 Aug 2006 08:46:18 +0000 (08:46 +0000)
PspWriteTebImpersonationInfo may be used to set or to clear impersonation info => remove an extra assignment

svn path=/trunk/; revision=23715

reactos/ntoskrnl/ps/security.c

index d20bf0b..25222ed 100644 (file)
@@ -150,9 +150,6 @@ PspWriteTebImpersonationInfo(IN PETHREAD Thread,
             Teb->IsImpersonating = 0;
         }
 
-        /* Set new flag */
-        Thread->ActiveImpersonationInfo = TRUE;
-
         /* Check if we're in a different thread */
         if (Thread != CurrentThread)
         {
@@ -638,6 +635,7 @@ PsImpersonateClient(IN PETHREAD Thread,
         Impersonation->CopyOnOpen = CopyOnOpen;
         Impersonation->EffectiveOnly = EffectiveOnly;
         Impersonation->Token = Token;
+        ObReferenceObject(Token);
 
         /* Unlock the thread */
         PspUnlockThreadSecurityExclusive(Thread);