Author: sir_richard
Date: Wed Mar 10 05:12:25 2010
New Revision: 46049
URL:
http://svn.reactos.org/svn/reactos?rev=46049&view=rev
Log:
[NTOS]: No good deed goes unpunished. Continuing the novel/saga from a couple of days ago,
it seems that now that impersonation works, various code paths are being tickled into
existence. For example, it would seem parts of the system now attempt setting primary
tokens. This would cause an assertion, since PspAssignPrimaryToken incorrectly
dereferenced the token (leading to a double-dereference) due to an off-by-! mistake.
Modified:
trunk/reactos/ntoskrnl/ps/security.c
Modified: trunk/reactos/ntoskrnl/ps/security.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/security.c?rev…
==============================================================================
--- trunk/reactos/ntoskrnl/ps/security.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ps/security.c [iso-8859-1] Wed Mar 10 05:12:25 2010
@@ -206,7 +206,7 @@
/* Dereference Tokens and Return */
if (NT_SUCCESS(Status)) ObDereferenceObject(OldToken);
- if (AccessToken) ObDereferenceObject(NewToken);
+ if (!AccessToken) ObDereferenceObject(NewToken);
return Status;
}