Skip to content

Commit f37138c

Browse files
committed
[NTOS:OB] Allow ObpCaseInsensitive to be configured via registry (reactos#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.
1 parent c71845e commit f37138c

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

ntoskrnl/config/cmdata.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -542,6 +542,13 @@ DATA_SEG("INITDATA") CM_SYSTEM_CONTROL_VECTOR CmControlVector[] =
542542
&ObpUnsecureGlobalNamesLength,
543543
NULL
544544
},
545+
{
546+
L"Session Manager\\Kernel",
547+
L"ObCaseInsensitive",
548+
&ObpCaseInsensitive,
549+
NULL,
550+
NULL
551+
},
545552
{
546553
L"Session Manager\\I/O System",
547554
L"CountOperations",

ntoskrnl/include/internal/ob.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -648,6 +648,7 @@ extern ALIGNEDNAME ObpDosDevicesShortNameRoot;
648648
extern UNICODE_STRING ObpDosDevicesShortName;
649649
extern WCHAR ObpUnsecureGlobalNamesBuffer[128];
650650
extern ULONG ObpUnsecureGlobalNamesLength;
651+
extern ULONG ObpCaseInsensitive;
651652
extern ULONG ObpObjectSecurityMode;
652653
extern ULONG ObpProtectionMode;
653654
extern ULONG ObpLUIDDeviceMapsDisabled;

ntoskrnl/ob/obname.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#define NDEBUG
1616
#include <debug.h>
1717

18-
BOOLEAN ObpCaseInsensitive = TRUE;
18+
ULONG ObpCaseInsensitive = TRUE;
1919
POBJECT_DIRECTORY ObpRootDirectoryObject;
2020
POBJECT_DIRECTORY ObpTypeDirectoryObject;
2121

0 commit comments

Comments
 (0)