mirror of
https://github.com/reactos/reactos.git
synced 2024-06-29 01:12:06 +00:00
[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:
parent
89cff88aa2
commit
0a82f829ed
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue