From a33a69b3f4c8124f5d2364300f64612a049c0872 Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Sat, 18 May 2019 10:28:32 +0200 Subject: [PATCH] [NTOSKRNL] Save ObjectSecurityMode value on boot --- ntoskrnl/config/cmdata.c | 2 +- ntoskrnl/include/internal/ob.h | 1 + ntoskrnl/ob/obinit.c | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ntoskrnl/config/cmdata.c b/ntoskrnl/config/cmdata.c index 77d82616ded..9b788b5f461 100644 --- a/ntoskrnl/config/cmdata.c +++ b/ntoskrnl/config/cmdata.c @@ -149,7 +149,7 @@ INIT_SECTION CM_SYSTEM_CONTROL_VECTOR CmControlVector[] = { L"Session Manager", L"ObjectSecurityMode", - &DummyData, + &ObpObjectSecurityMode, NULL, NULL }, diff --git a/ntoskrnl/include/internal/ob.h b/ntoskrnl/include/internal/ob.h index 355e9339d8d..59bd66956c2 100644 --- a/ntoskrnl/include/internal/ob.h +++ b/ntoskrnl/include/internal/ob.h @@ -618,6 +618,7 @@ extern ALIGNEDNAME ObpDosDevicesShortNameRoot; extern UNICODE_STRING ObpDosDevicesShortName; extern WCHAR ObpUnsecureGlobalNamesBuffer[128]; extern ULONG ObpUnsecureGlobalNamesLength; +extern ULONG ObpObjectSecurityMode; // // Inlined Functions diff --git a/ntoskrnl/ob/obinit.c b/ntoskrnl/ob/obinit.c index e4de1a16d7d..fece62e45a3 100644 --- a/ntoskrnl/ob/obinit.c +++ b/ntoskrnl/ob/obinit.c @@ -52,6 +52,8 @@ PsInitializeQuotaSystem(VOID); ULONG ObpInitializationPhase; +ULONG ObpObjectSecurityMode = 0; + /* PRIVATE FUNCTIONS *********************************************************/ static -- 2.17.1