mirror of
https://github.com/reactos/reactos.git
synced 2024-06-30 09:50:07 +00:00
[NTOS:CM]
- Do not allow the creation of keys in the master hive. Fixes boot with the VMware sound driver from rapps installed (and it works, too). CORE-5381 #resolve svn path=/trunk/; revision=66905
This commit is contained in:
parent
1b8371f95e
commit
d4956b9c39
|
@ -1266,6 +1266,11 @@ CmpParseKey(IN PVOID ParseObject,
|
|||
ParentKcb,
|
||||
Object);
|
||||
}
|
||||
else if (Hive == &CmiVolatileHive->Hive && CmpNoVolatileCreates)
|
||||
{
|
||||
/* Creating keys in the master hive is not allowed */
|
||||
Status = STATUS_INVALID_PARAMETER;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Do the create */
|
||||
|
|
|
@ -29,6 +29,7 @@ BOOLEAN CmpSpecialBootCondition;
|
|||
BOOLEAN CmpNoWrite;
|
||||
BOOLEAN CmpWasSetupBoot;
|
||||
BOOLEAN CmpProfileLoaded;
|
||||
BOOLEAN CmpNoVolatileCreates;
|
||||
ULONG CmpTraceLevel = 0;
|
||||
|
||||
extern LONG CmpFlushStarveWriters;
|
||||
|
@ -1470,8 +1471,10 @@ CmpInitializeHiveList(IN USHORT Flag)
|
|||
L"\\Registry\\Machine\\SAM\\SAM");
|
||||
|
||||
/* Link S-1-5-18 to .Default */
|
||||
CmpNoVolatileCreates = FALSE;
|
||||
CmpLinkKeyToHive(L"\\Registry\\User\\S-1-5-18",
|
||||
L"\\Registry\\User\\.Default");
|
||||
CmpNoVolatileCreates = TRUE;
|
||||
}
|
||||
|
||||
BOOLEAN
|
||||
|
@ -1530,7 +1533,7 @@ CmInitSystem1(VOID)
|
|||
}
|
||||
|
||||
/* Build the master hive */
|
||||
Status = CmpInitializeHive((PCMHIVE*)&CmiVolatileHive,
|
||||
Status = CmpInitializeHive(&CmiVolatileHive,
|
||||
HINIT_CREATE,
|
||||
HIVE_VOLATILE,
|
||||
HFILE_TYPE_PRIMARY,
|
||||
|
@ -1602,6 +1605,9 @@ CmInitSystem1(VOID)
|
|||
/* Close the handle */
|
||||
NtClose(KeyHandle);
|
||||
|
||||
/* After this point, do not allow creating keys in the master hive */
|
||||
CmpNoVolatileCreates = TRUE;
|
||||
|
||||
/* Initialize the system hive */
|
||||
if (!CmpInitializeSystemHive(KeLoaderBlock))
|
||||
{
|
||||
|
|
|
@ -1659,6 +1659,7 @@ extern BOOLEAN CmpSpecialBootCondition;
|
|||
extern BOOLEAN CmpFlushOnLockRelease;
|
||||
extern BOOLEAN CmpShareSystemHives;
|
||||
extern BOOLEAN CmpMiniNTBoot;
|
||||
extern BOOLEAN CmpNoVolatileCreates;
|
||||
extern EX_PUSH_LOCK CmpHiveListHeadLock, CmpLoadHiveLock;
|
||||
extern LIST_ENTRY CmpHiveListHead;
|
||||
extern POBJECT_TYPE CmpKeyObjectType;
|
||||
|
|
Loading…
Reference in a new issue