[NTOS:OB] Correctly check SeSinglePrivilegeCheck() return value (#1323)

SeSinglePrivilegeCheck() returns a BOOLEAN, not a NTSTATUS.
CORE-14271
This commit is contained in:
Serge Gautherie 2019-01-30 00:43:13 +01:00 committed by Hermès BÉLUSCA - MAÏTO
parent 1e05f9cc32
commit 0483a5a380

View file

@ -1427,9 +1427,10 @@ NtMakePermanentObject(IN HANDLE ObjectHandle)
PAGED_CODE();
/* Make sure that the caller has SeCreatePermanentPrivilege */
Status = SeSinglePrivilegeCheck(SeCreatePermanentPrivilege,
PreviousMode);
if (!NT_SUCCESS(Status)) return STATUS_PRIVILEGE_NOT_HELD;
if (!SeSinglePrivilegeCheck(SeCreatePermanentPrivilege, PreviousMode))
{
return STATUS_PRIVILEGE_NOT_HELD;
}
/* Reference the object */
Status = ObReferenceObjectByHandle(ObjectHandle,