Author: tkreuzer
Date: Sun Feb 16 08:56:34 2014
New Revision: 62206
URL: http://svn.reactos.org/svn/reactos?rev=62206&view=rev
Log:
[NTOSKRNL]
- Fix logic in PsReferenceEffectiveToken
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] Sun Feb 16 08:56:34 2014
@@ -698,25 +698,7 @@
/* Check if we don't have impersonation info */
Process = Thread->ThreadsProcess;
- if (!Thread->ActiveImpersonationInfo)
- {
- /* Fast Reference the Token */
- Token = ObFastReferenceObject(&Process->Token);
-
- /* Check if we got the Token or if we got locked */
- if (!Token)
- {
- /* Lock the Process */
- PspLockProcessSecurityShared(Process);
-
- /* Do a Locked Fast Reference */
- Token = ObFastReferenceObjectLocked(&Process->Token);
-
- /* Unlock the Process */
- PspUnlockProcessSecurityShared(Process);
- }
- }
- else
+ if (Thread->ActiveImpersonationInfo)
{
/* Lock the Process */
PspLockProcessSecurityShared(Process);
@@ -737,6 +719,22 @@
PspUnlockProcessSecurityShared(Process);
return Token;
}
+
+ /* Unlock the Process */
+ PspUnlockProcessSecurityShared(Process);
+ }
+
+ /* Fast Reference the Token */
+ Token = ObFastReferenceObject(&Process->Token);
+
+ /* Check if we got the Token or if we got locked */
+ if (!Token)
+ {
+ /* Lock the Process */
+ PspLockProcessSecurityShared(Process);
+
+ /* Do a Locked Fast Reference */
+ Token = ObFastReferenceObjectLocked(&Process->Token);
/* Unlock the Process */
PspUnlockProcessSecurityShared(Process);
Author: tkreuzer
Date: Sun Feb 16 08:54:38 2014
New Revision: 62205
URL: http://svn.reactos.org/svn/reactos?rev=62205&view=rev
Log:
[NTOSKRNL]
- Do not fail in CmLoadKey, when a trust class key was passed. Instead just ignore it.
Modified:
trunk/reactos/ntoskrnl/config/cmapi.c
Modified: trunk/reactos/ntoskrnl/config/cmapi.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmapi.c?re…
==============================================================================
--- trunk/reactos/ntoskrnl/config/cmapi.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/config/cmapi.c [iso-8859-1] Sun Feb 16 08:54:38 2014
@@ -1896,8 +1896,7 @@
if (KeyBody)
{
/* Fail */
- DPRINT1("Trusted classes not yet supported\n");
- return STATUS_NOT_IMPLEMENTED;
+ DPRINT("Trusted classes not yet supported\n");
}
/* Build a service QoS for a security context */