mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 04:13:34 +00:00
[PORTCLS]
* Initializes object attributes with correct handle attributes. * Use the provided access rights and create options. See issue #5934 for more details. svn path=/trunk/; revision=54969
This commit is contained in:
@@ -156,8 +156,8 @@ CRegistryKey::NewSubKey(
|
||||
return STATUS_INVALID_HANDLE;
|
||||
}
|
||||
|
||||
InitializeObjectAttributes(&Attributes, SubKeyName, 0, m_hKey, NULL);
|
||||
Status = ZwCreateKey(&hKey, KEY_READ | KEY_WRITE, &Attributes, 0, NULL, 0, Disposition);
|
||||
InitializeObjectAttributes(&Attributes, SubKeyName, OBJ_INHERIT | OBJ_CASE_INSENSITIVE | OBJ_OPENIF | OBJ_KERNEL_HANDLE, m_hKey, NULL);
|
||||
Status = ZwCreateKey(&hKey, DesiredAccess, &Attributes, 0, NULL, CreateOptions, Disposition);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT("CRegistryKey::NewSubKey failed with %x\n", Status);
|
||||
@@ -177,8 +177,6 @@ CRegistryKey::NewSubKey(
|
||||
return Status;
|
||||
}
|
||||
|
||||
*RegistrySubKey = (PREGISTRYKEY)RegistryKey;
|
||||
|
||||
DPRINT("CRegistryKey::NewSubKey RESULT %p\n", *RegistrySubKey);
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user