Reactos

[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.

+9 -1
+7
ntoskrnl/config/cmdata.c
··· 543 543 NULL 544 544 }, 545 545 { 546 + L"Session Manager\\Kernel", 547 + L"ObCaseInsensitive", 548 + &ObpCaseInsensitive, 549 + NULL, 550 + NULL 551 + }, 552 + { 546 553 L"Session Manager\\I/O System", 547 554 L"CountOperations", 548 555 &DummyData,
+1
ntoskrnl/include/internal/ob.h
··· 648 648 extern UNICODE_STRING ObpDosDevicesShortName; 649 649 extern WCHAR ObpUnsecureGlobalNamesBuffer[128]; 650 650 extern ULONG ObpUnsecureGlobalNamesLength; 651 + extern ULONG ObpCaseInsensitive; 651 652 extern ULONG ObpObjectSecurityMode; 652 653 extern ULONG ObpProtectionMode; 653 654 extern ULONG ObpLUIDDeviceMapsDisabled;
+1 -1
ntoskrnl/ob/obname.c
··· 15 15 #define NDEBUG 16 16 #include <debug.h> 17 17 18 - BOOLEAN ObpCaseInsensitive = TRUE; 18 + ULONG ObpCaseInsensitive = TRUE; 19 19 POBJECT_DIRECTORY ObpRootDirectoryObject; 20 20 POBJECT_DIRECTORY ObpTypeDirectoryObject; 21 21