[NTOS:OB] Allow ObpCaseInsensitive to be configured via registry (#7751)

This feature can be controlled by the system policy:
"System objects: Require case insensitivity for non-Windows subsystems"
https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/jj852277(v=ws.11)

It is also used in conjunction with NTFS to get system-wide filesystem case-sensitivity:
https://www.betaarchive.com/wiki/index.php/Microsoft_KB_Archive/929110

This is controlled with a REG_DWORD value named `ObCaseInsensitive`
inside the registry key
`HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Kernel` .

Object case (in)sensitivity check is done in the ObpLookupObjectName() helper.
The `ObpCaseInsensitive` variable is used to retrieve the data,
hence it needs to be a ULONG.
This commit is contained in:
Hermès Bélusca-Maïto 2025-03-04 21:55:47 +01:00
parent c71845ee8c
commit f37138ce91
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
3 changed files with 9 additions and 1 deletions

View file

@ -542,6 +542,13 @@ DATA_SEG("INITDATA") CM_SYSTEM_CONTROL_VECTOR CmControlVector[] =
&ObpUnsecureGlobalNamesLength,
NULL
},
{
L"Session Manager\\Kernel",
L"ObCaseInsensitive",
&ObpCaseInsensitive,
NULL,
NULL
},
{
L"Session Manager\\I/O System",
L"CountOperations",

View file

@ -648,6 +648,7 @@ extern ALIGNEDNAME ObpDosDevicesShortNameRoot;
extern UNICODE_STRING ObpDosDevicesShortName;
extern WCHAR ObpUnsecureGlobalNamesBuffer[128];
extern ULONG ObpUnsecureGlobalNamesLength;
extern ULONG ObpCaseInsensitive;
extern ULONG ObpObjectSecurityMode;
extern ULONG ObpProtectionMode;
extern ULONG ObpLUIDDeviceMapsDisabled;

View file

@ -15,7 +15,7 @@
#define NDEBUG
#include <debug.h>
BOOLEAN ObpCaseInsensitive = TRUE;
ULONG ObpCaseInsensitive = TRUE;
POBJECT_DIRECTORY ObpRootDirectoryObject;
POBJECT_DIRECTORY ObpTypeDirectoryObject;