mirror of
https://github.com/reactos/reactos.git
synced 2025-07-03 17:01:25 +00:00
[NTOSKRNL] Implement ObIsLUIDDeviceMapsEnabled and call it in NtQueryInformationProcess
This commit is contained in:
parent
7898b2eaa3
commit
b16a07fa69
5 changed files with 21 additions and 7 deletions
|
@ -429,6 +429,12 @@ ObpCreateDosDevicesDirectory(
|
||||||
VOID
|
VOID
|
||||||
);
|
);
|
||||||
|
|
||||||
|
ULONG
|
||||||
|
NTAPI
|
||||||
|
ObIsLUIDDeviceMapsEnabled(
|
||||||
|
VOID
|
||||||
|
);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Security descriptor cache functions
|
// Security descriptor cache functions
|
||||||
//
|
//
|
||||||
|
@ -621,6 +627,7 @@ extern ULONG ObpUnsecureGlobalNamesLength;
|
||||||
extern ULONG ObpObjectSecurityMode;
|
extern ULONG ObpObjectSecurityMode;
|
||||||
extern ULONG ObpProtectionMode;
|
extern ULONG ObpProtectionMode;
|
||||||
extern ULONG ObpLUIDDeviceMapsDisabled;
|
extern ULONG ObpLUIDDeviceMapsDisabled;
|
||||||
|
extern ULONG ObpLUIDDeviceMapsEnabled;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Inlined Functions
|
// Inlined Functions
|
||||||
|
|
|
@ -13,6 +13,9 @@
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
|
ULONG ObpLUIDDeviceMapsDisabled;
|
||||||
|
ULONG ObpLUIDDeviceMapsEnabled;
|
||||||
|
|
||||||
/* PRIVATE FUNCTIONS ******************************************************/
|
/* PRIVATE FUNCTIONS ******************************************************/
|
||||||
|
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
|
@ -249,6 +252,14 @@ ObQueryDeviceMapInformation(IN PEPROCESS Process,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ULONG
|
||||||
|
NTAPI
|
||||||
|
ObIsLUIDDeviceMapsEnabled(VOID)
|
||||||
|
{
|
||||||
|
return ObpLUIDDeviceMapsEnabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
NTAPI
|
NTAPI
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
BOOLEAN ObpLUIDDeviceMapsEnabled;
|
|
||||||
POBJECT_TYPE ObpDirectoryObjectType = NULL;
|
POBJECT_TYPE ObpDirectoryObjectType = NULL;
|
||||||
|
|
||||||
/* PRIVATE FUNCTIONS ******************************************************/
|
/* PRIVATE FUNCTIONS ******************************************************/
|
||||||
|
@ -141,7 +140,7 @@ ObpLookupEntryDirectory(IN POBJECT_DIRECTORY Directory,
|
||||||
PAGED_CODE();
|
PAGED_CODE();
|
||||||
|
|
||||||
/* Check if we should search the shadow directory */
|
/* 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 */
|
/* Fail if we don't have a directory or name */
|
||||||
if (!(Directory) || !(Name)) goto Quickie;
|
if (!(Directory) || !(Name)) goto Quickie;
|
||||||
|
|
|
@ -32,9 +32,6 @@ UNICODE_STRING ObpDosDevicesShortName =
|
||||||
WCHAR ObpUnsecureGlobalNamesBuffer[128] = {0};
|
WCHAR ObpUnsecureGlobalNamesBuffer[128] = {0};
|
||||||
ULONG ObpUnsecureGlobalNamesLength = sizeof(ObpUnsecureGlobalNamesBuffer);
|
ULONG ObpUnsecureGlobalNamesLength = sizeof(ObpUnsecureGlobalNamesBuffer);
|
||||||
|
|
||||||
ULONG ObpLUIDDeviceMapsDisabled;
|
|
||||||
ULONG ObpLUIDDeviceMapsEnabled;
|
|
||||||
|
|
||||||
/* PRIVATE FUNCTIONS *********************************************************/
|
/* PRIVATE FUNCTIONS *********************************************************/
|
||||||
|
|
||||||
INIT_FUNCTION
|
INIT_FUNCTION
|
||||||
|
|
|
@ -911,8 +911,8 @@ NtQueryInformationProcess(IN HANDLE ProcessHandle,
|
||||||
/* Protect write in SEH */
|
/* Protect write in SEH */
|
||||||
_SEH2_TRY
|
_SEH2_TRY
|
||||||
{
|
{
|
||||||
/* Return FALSE -- we don't support this */
|
/* Query Ob */
|
||||||
*(PULONG)ProcessInformation = FALSE;
|
*(PULONG)ProcessInformation = ObIsLUIDDeviceMapsEnabled();
|
||||||
}
|
}
|
||||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue