[NTOSKRNL]

NtAccessCheck:
- Fix returned status if the token is not an impersonation token.
- Add a check for the token impersonation level.

svn path=/trunk/; revision=46347
This commit is contained in:
Eric Kohl 2010-03-23 00:16:14 +00:00
parent 89cff88aa2
commit 0a82f829ed

View file

@ -743,7 +743,15 @@ NtAccessCheck(IN PSECURITY_DESCRIPTOR SecurityDescriptor,
{
DPRINT1("No impersonation token\n");
ObDereferenceObject(Token);
return STATUS_ACCESS_DENIED;
return STATUS_NO_IMPERSONATION_TOKEN;
}
/* Check the impersonation level */
if (Token->ImpersonationLevel < SecurityIdentification)
{
DPRINT1("Impersonation level < SecurityIdentification\n");
ObDereferenceObject(Token);
return STATUS_BAD_IMPERSONATION_LEVEL;
}
/* Set up the subject context, and lock it */