[ros-diffs] [ekohl] 46370: [NTOSKRNL] Fail if you query a primary token for its impersonation level.
ekohl at svn.reactos.org
ekohl at svn.reactos.org
Tue Mar 23 22:53:19 CET 2010
Author: ekohl
Date: Tue Mar 23 22:53:19 2010
New Revision: 46370
URL: http://svn.reactos.org/svn/reactos?rev=46370&view=rev
Log:
[NTOSKRNL]
Fail if you query a primary token for its impersonation level.
Modified:
trunk/reactos/ntoskrnl/se/token.c
Modified: trunk/reactos/ntoskrnl/se/token.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/se/token.c?rev=46370&r1=46369&r2=46370&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/se/token.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/se/token.c [iso-8859-1] Tue Mar 23 22:53:19 2010
@@ -1347,6 +1347,14 @@
PSECURITY_IMPERSONATION_LEVEL sil = (PSECURITY_IMPERSONATION_LEVEL)TokenInformation;
DPRINT("NtQueryInformationToken(TokenImpersonationLevel)\n");
+
+ /* Fail if the token is not an impersonation token */
+ if (Token->TokenType != TokenImpersonation)
+ {
+ Status = STATUS_INVALID_INFO_CLASS;
+ break;
+ }
+
RequiredLength = sizeof(SECURITY_IMPERSONATION_LEVEL);
_SEH2_TRY
More information about the Ros-diffs
mailing list