mirror of
https://github.com/reactos/reactos.git
synced 2026-05-31 08:17:09 +08:00
[NTOSKRNL] Implement ObIsLUIDDeviceMapsEnabled and call it in NtQueryInformationProcess
This commit is contained in:
@@ -429,6 +429,12 @@ ObpCreateDosDevicesDirectory(
|
||||
VOID
|
||||
);
|
||||
|
||||
ULONG
|
||||
NTAPI
|
||||
ObIsLUIDDeviceMapsEnabled(
|
||||
VOID
|
||||
);
|
||||
|
||||
//
|
||||
// Security descriptor cache functions
|
||||
//
|
||||
@@ -621,6 +627,7 @@ extern ULONG ObpUnsecureGlobalNamesLength;
|
||||
extern ULONG ObpObjectSecurityMode;
|
||||
extern ULONG ObpProtectionMode;
|
||||
extern ULONG ObpLUIDDeviceMapsDisabled;
|
||||
extern ULONG ObpLUIDDeviceMapsEnabled;
|
||||
|
||||
//
|
||||
// Inlined Functions
|
||||
|
||||
@@ -13,6 +13,9 @@
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
ULONG ObpLUIDDeviceMapsDisabled;
|
||||
ULONG ObpLUIDDeviceMapsEnabled;
|
||||
|
||||
/* PRIVATE FUNCTIONS ******************************************************/
|
||||
|
||||
NTSTATUS
|
||||
@@ -249,6 +252,14 @@ ObQueryDeviceMapInformation(IN PEPROCESS Process,
|
||||
}
|
||||
|
||||
|
||||
ULONG
|
||||
NTAPI
|
||||
ObIsLUIDDeviceMapsEnabled(VOID)
|
||||
{
|
||||
return ObpLUIDDeviceMapsEnabled;
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
BOOLEAN ObpLUIDDeviceMapsEnabled;
|
||||
POBJECT_TYPE ObpDirectoryObjectType = NULL;
|
||||
|
||||
/* PRIVATE FUNCTIONS ******************************************************/
|
||||
@@ -141,7 +140,7 @@ ObpLookupEntryDirectory(IN POBJECT_DIRECTORY Directory,
|
||||
PAGED_CODE();
|
||||
|
||||
/* Check if we should search the shadow directory */
|
||||
if (!ObpLUIDDeviceMapsEnabled) SearchShadow = FALSE;
|
||||
if (ObpLUIDDeviceMapsEnabled == 0) SearchShadow = FALSE;
|
||||
|
||||
/* Fail if we don't have a directory or name */
|
||||
if (!(Directory) || !(Name)) goto Quickie;
|
||||
|
||||
@@ -32,9 +32,6 @@ UNICODE_STRING ObpDosDevicesShortName =
|
||||
WCHAR ObpUnsecureGlobalNamesBuffer[128] = {0};
|
||||
ULONG ObpUnsecureGlobalNamesLength = sizeof(ObpUnsecureGlobalNamesBuffer);
|
||||
|
||||
ULONG ObpLUIDDeviceMapsDisabled;
|
||||
ULONG ObpLUIDDeviceMapsEnabled;
|
||||
|
||||
/* PRIVATE FUNCTIONS *********************************************************/
|
||||
|
||||
INIT_FUNCTION
|
||||
|
||||
@@ -911,8 +911,8 @@ NtQueryInformationProcess(IN HANDLE ProcessHandle,
|
||||
/* Protect write in SEH */
|
||||
_SEH2_TRY
|
||||
{
|
||||
/* Return FALSE -- we don't support this */
|
||||
*(PULONG)ProcessInformation = FALSE;
|
||||
/* Query Ob */
|
||||
*(PULONG)ProcessInformation = ObIsLUIDDeviceMapsEnabled();
|
||||
}
|
||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user