[RTL]
authorThomas Faber <thomas.faber@reactos.org>
Sun, 18 Oct 2015 09:32:52 +0000 (09:32 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Sun, 18 Oct 2015 09:32:52 +0000 (09:32 +0000)
- Add missing OBJ_KERNEL_HANDLE in RtlOpenCurrentUser
CORE-10207

svn path=/trunk/; revision=69590

reactos/lib/rtl/registry.c

index e80e95f..02361ef 100644 (file)
@@ -703,7 +703,7 @@ RtlOpenCurrentUser(IN ACCESS_MASK DesiredAccess,
         /* Initialize the attributes and open it */
         InitializeObjectAttributes(&ObjectAttributes,
                                    &KeyPath,
         /* Initialize the attributes and open it */
         InitializeObjectAttributes(&ObjectAttributes,
                                    &KeyPath,
-                                   OBJ_CASE_INSENSITIVE,
+                                   OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE,
                                    NULL,
                                    NULL);
         Status = ZwOpenKey(KeyHandle, DesiredAccess, &ObjectAttributes);
                                    NULL,
                                    NULL);
         Status = ZwOpenKey(KeyHandle, DesiredAccess, &ObjectAttributes);
@@ -717,7 +717,7 @@ RtlOpenCurrentUser(IN ACCESS_MASK DesiredAccess,
     RtlInitUnicodeString(&KeyPath, RtlpRegPaths[RTL_REGISTRY_USER]);
     InitializeObjectAttributes(&ObjectAttributes,
                                &KeyPath,
     RtlInitUnicodeString(&KeyPath, RtlpRegPaths[RTL_REGISTRY_USER]);
     InitializeObjectAttributes(&ObjectAttributes,
                                &KeyPath,
-                               OBJ_CASE_INSENSITIVE,
+                               OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE,
                                NULL,
                                NULL);
     Status = ZwOpenKey(KeyHandle, DesiredAccess, &ObjectAttributes);
                                NULL,
                                NULL);
     Status = ZwOpenKey(KeyHandle, DesiredAccess, &ObjectAttributes);