mirror of
https://github.com/reactos/reactos.git
synced 2025-07-24 19:13:38 +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:
parent
4a76b4fbe8
commit
6c47d1fade
1 changed files with 2 additions and 4 deletions
|
@ -156,8 +156,8 @@ CRegistryKey::NewSubKey(
|
||||||
return STATUS_INVALID_HANDLE;
|
return STATUS_INVALID_HANDLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
InitializeObjectAttributes(&Attributes, SubKeyName, 0, m_hKey, NULL);
|
InitializeObjectAttributes(&Attributes, SubKeyName, OBJ_INHERIT | OBJ_CASE_INSENSITIVE | OBJ_OPENIF | OBJ_KERNEL_HANDLE, m_hKey, NULL);
|
||||||
Status = ZwCreateKey(&hKey, KEY_READ | KEY_WRITE, &Attributes, 0, NULL, 0, Disposition);
|
Status = ZwCreateKey(&hKey, DesiredAccess, &Attributes, 0, NULL, CreateOptions, Disposition);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT("CRegistryKey::NewSubKey failed with %x\n", Status);
|
DPRINT("CRegistryKey::NewSubKey failed with %x\n", Status);
|
||||||
|
@ -177,8 +177,6 @@ CRegistryKey::NewSubKey(
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
*RegistrySubKey = (PREGISTRYKEY)RegistryKey;
|
|
||||||
|
|
||||||
DPRINT("CRegistryKey::NewSubKey RESULT %p\n", *RegistrySubKey);
|
DPRINT("CRegistryKey::NewSubKey RESULT %p\n", *RegistrySubKey);
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue