Author: aandrejevic
Date: Sat May 31 01:17:00 2014
New Revision: 63508
URL:
http://svn.reactos.org/svn/reactos?rev=63508&view=rev
Log:
[NTOSKRNL]
Don't allow saving keys which are located directly in the master hive.
Modified:
trunk/reactos/ntoskrnl/config/cmapi.c
Modified: trunk/reactos/ntoskrnl/config/cmapi.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmapi.c?re…
==============================================================================
--- trunk/reactos/ntoskrnl/config/cmapi.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/config/cmapi.c [iso-8859-1] Sat May 31 01:17:00 2014
@@ -2307,6 +2307,13 @@
goto Cleanup;
}
+ if (Kcb->KeyHive == &CmiVolatileHive->Hive)
+ {
+ /* Keys that are directly in the master hive can't be saved */
+ Status = STATUS_ACCESS_DENIED;
+ goto Cleanup;
+ }
+
/* Create a new hive that will hold the key */
Status = CmpInitializeHive(&KeyHive,
HINIT_CREATE,