https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0483a5a38089217868401…
commit 0483a5a38089217868401fb9fe5e9885cddebcc6
Author: Serge Gautherie <32623169+SergeGautherie(a)users.noreply.github.com>
AuthorDate: Wed Jan 30 00:43:13 2019 +0100
Commit: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito(a)reactos.org>
CommitDate: Wed Jan 30 00:43:13 2019 +0100
[NTOS:OB] Correctly check SeSinglePrivilegeCheck() return value (#1323)
SeSinglePrivilegeCheck() returns a BOOLEAN, not a NTSTATUS.
CORE-14271
---
ntoskrnl/ob/oblife.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/ntoskrnl/ob/oblife.c b/ntoskrnl/ob/oblife.c
index 6cc1403e63..d649b0f049 100644
--- a/ntoskrnl/ob/oblife.c
+++ b/ntoskrnl/ob/oblife.c
@@ -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,