Author: akhaldi Date: Sun Jan 15 10:10:54 2012 New Revision: 54969
URL: http://svn.reactos.org/svn/reactos?rev=54969&view=rev Log: [PORTCLS] * Initializes object attributes with correct handle attributes. * Use the provided access rights and create options. See issue #5934 for more details.
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/registry.cpp
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/registry.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/p... ============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/registry.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/registry.cpp [iso-8859-1] Sun Jan 15 10:10:54 2012 @@ -156,8 +156,8 @@ 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); @@ -176,8 +176,6 @@ delete RegistryKey; return Status; } - - *RegistrySubKey = (PREGISTRYKEY)RegistryKey;
DPRINT("CRegistryKey::NewSubKey RESULT %p\n", *RegistrySubKey); return STATUS_SUCCESS;