https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f42c81e4edfab2aee4da4…
commit f42c81e4edfab2aee4da407664edbe9571585b34
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Sat Aug 10 17:20:44 2024 +0200
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Sun Dec 15 22:12:51 2024 +0100
[NTOS:CM] Allow CmSelfHeal to be configured via registry.
This is controlled with a REG_DWORD value named
`SelfHealingEnabled` inside the registry key
`HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Configuration Manager` .
The `CmSelfHeal` variable is used to retrieve the data,
hence it needs to be a ULONG.
---
ntoskrnl/config/cmdata.c | 9 ++++++++-
ntoskrnl/include/internal/cm.h | 4 ++--
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/ntoskrnl/config/cmdata.c b/ntoskrnl/config/cmdata.c
index 4656fe85cdd..aa9b1f010be 100644
--- a/ntoskrnl/config/cmdata.c
+++ b/ntoskrnl/config/cmdata.c
@@ -60,7 +60,7 @@ BOOLEAN CmpShareSystemHives;
BOOLEAN CmpMiniNTBoot;
ULONG CmpBootType;
-BOOLEAN CmSelfHeal = TRUE;
+ULONG CmSelfHeal = TRUE;
BOOLEAN CmpSelfHeal = TRUE;
USHORT CmpUnknownBusCount;
@@ -666,6 +666,13 @@ DATA_SEG("INITDATA") CM_SYSTEM_CONTROL_VECTOR
CmControlVector[] =
&DummyData,
&DummyData
},
+ {
+ L"Session Manager\\Configuration Manager",
+ L"SelfHealingEnabled",
+ &CmSelfHeal,
+ NULL,
+ NULL
+ },
{
L"Session Manager",
L"ForceNpxEmulation",
diff --git a/ntoskrnl/include/internal/cm.h b/ntoskrnl/include/internal/cm.h
index f40d8420895..8d33736c482 100644
--- a/ntoskrnl/include/internal/cm.h
+++ b/ntoskrnl/include/internal/cm.h
@@ -1452,9 +1452,9 @@ extern HIVE_LIST_ENTRY CmpMachineHiveList[];
extern UNICODE_STRING CmSymbolicLinkValueName;
extern UNICODE_STRING CmpSystemStartOptions;
extern UNICODE_STRING CmpLoadOptions;
-extern BOOLEAN CmSelfHeal;
-extern BOOLEAN CmpSelfHeal;
extern ULONG CmpBootType;
+extern ULONG CmSelfHeal;
+extern BOOLEAN CmpSelfHeal;
extern HANDLE CmpRegistryRootHandle;
extern BOOLEAN ExpInTextModeSetup;
extern BOOLEAN InitIsWinPEMode;