https://git.reactos.org/?p=reactos.git;a=commitdiff;h=eea0beca35e54507f5261d...
commit eea0beca35e54507f5261d85871b6bd70e4a5d1e Author: Pierre Schweitzer pierre@reactos.org AuthorDate: Tue May 7 22:48:41 2019 +0200 Commit: Pierre Schweitzer pierre@reactos.org CommitDate: Wed May 8 18:34:28 2019 +0200
[BASESRV] Enable the ProtectionMode query code And make it global --- subsystems/win/basesrv/basesrv.h | 4 ++++ subsystems/win/basesrv/init.c | 6 +----- 2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/subsystems/win/basesrv/basesrv.h b/subsystems/win/basesrv/basesrv.h index e9abac970d..03ebb9c8e3 100644 --- a/subsystems/win/basesrv/basesrv.h +++ b/subsystems/win/basesrv/basesrv.h @@ -65,5 +65,9 @@ extern HANDLE BaseSrvHeap; extern HANDLE BaseSrvSharedHeap; extern PBASE_STATIC_SERVER_DATA BaseStaticServerData; extern ULONG SessionId; +extern ULONG ProtectionMode; + +#define SM_REG_KEY \ + L"\Registry\Machine\System\CurrentControlSet\Control\Session Manager"
#endif /* __BASESRV_H__ */ diff --git a/subsystems/win/basesrv/init.c b/subsystems/win/basesrv/init.c index 00aa891734..87514d96b4 100644 --- a/subsystems/win/basesrv/init.c +++ b/subsystems/win/basesrv/init.c @@ -30,6 +30,7 @@ HANDLE BaseSrvSharedHeap = NULL; // Shared heap with CSR. (CsrSrvSharedSectio PBASE_STATIC_SERVER_DATA BaseStaticServerData = NULL; // Data that we can share amongst processes. Initialized inside BaseSrvSharedHeap.
ULONG SessionId = 0; +ULONG ProtectionMode = 0;
PINIFILE_MAPPING BaseSrvIniFileMapping;
@@ -177,14 +178,10 @@ CreateBaseAcls(OUT PACL* Dacl, SID_IDENTIFIER_AUTHORITY NtAuthority = {SECURITY_NT_AUTHORITY}; SID_IDENTIFIER_AUTHORITY WorldAuthority = {SECURITY_WORLD_SID_AUTHORITY}; NTSTATUS Status; -#if 0 // Unused code UCHAR KeyValueBuffer[0x40]; PKEY_VALUE_PARTIAL_INFORMATION KeyValuePartialInfo; UNICODE_STRING KeyName; - ULONG ProtectionMode = 0; -#endif ULONG AclLength; -#if 0 // Unused code ULONG ResultLength; HANDLE hKey; OBJECT_ATTRIBUTES ObjectAttributes; @@ -220,7 +217,6 @@ CreateBaseAcls(OUT PACL* Dacl, /* Close the handle */ NtClose(hKey); } -#endif
/* Allocate the System SID */ Status = RtlAllocateAndInitializeSid(&NtAuthority,