Author: ekohl
Date: Thu May 30 08:51:32 2013
New Revision: 59114
URL:
http://svn.reactos.org/svn/reactos?rev=59114&view=rev
Log:
[SAMSRV]
Get rid of SampOpenSamKey. Use SampRegOpenKey instead.
Modified:
trunk/reactos/dll/win32/samsrv/database.c
Modified: trunk/reactos/dll/win32/samsrv/database.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/samsrv/database.…
==============================================================================
--- trunk/reactos/dll/win32/samsrv/database.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/samsrv/database.c [iso-8859-1] Thu May 30 08:51:32 2013
@@ -20,39 +20,17 @@
/* FUNCTIONS ***************************************************************/
-static NTSTATUS
-SampOpenSamKey(VOID)
-{
- OBJECT_ATTRIBUTES ObjectAttributes;
- UNICODE_STRING KeyName;
+NTSTATUS
+SampInitDatabase(VOID)
+{
NTSTATUS Status;
- RtlInitUnicodeString(&KeyName,
- L"\\Registry\\Machine\\SAM");
-
- InitializeObjectAttributes(&ObjectAttributes,
- &KeyName,
- OBJ_CASE_INSENSITIVE,
- NULL,
- NULL);
-
- Status = RtlpNtOpenKey(&SamKeyHandle,
- KEY_READ | KEY_CREATE_SUB_KEY | KEY_ENUMERATE_SUB_KEYS,
- &ObjectAttributes,
- 0);
-
- return Status;
-}
-
-
-NTSTATUS
-SampInitDatabase(VOID)
-{
- NTSTATUS Status;
-
TRACE("SampInitDatabase()\n");
- Status = SampOpenSamKey();
+ Status = SampRegOpenKey(NULL,
+ L"\\Registry\\Machine\\SAM",
+ KEY_READ | KEY_CREATE_SUB_KEY | KEY_ENUMERATE_SUB_KEYS,
+ &SamKeyHandle);
if (!NT_SUCCESS(Status))
{
ERR("Failed to open the SAM key (Status: 0x%08lx)\n", Status);