Author: tfaber
Date: Sat Oct 17 16:24:14 2015
New Revision: 69569
URL:
http://svn.reactos.org/svn/reactos?rev=69569&view=rev
Log:
[NDIS]
- ZwDuplicateObject always returns user handles, so don't use it when we want a kernel
handle.
CORE-10207
Modified:
trunk/reactos/drivers/network/ndis/ndis/config.c
Modified: trunk/reactos/drivers/network/ndis/ndis/config.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/ndis/ndis/…
==============================================================================
--- trunk/reactos/drivers/network/ndis/ndis/config.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/ndis/ndis/config.c [iso-8859-1] Sat Oct 17 16:24:14
2015
@@ -215,14 +215,19 @@
PMINIPORT_CONFIGURATION_CONTEXT ConfigurationContext;
PNDIS_WRAPPER_CONTEXT WrapperContext =
(PNDIS_WRAPPER_CONTEXT)WrapperConfigurationContext;
HANDLE RootKeyHandle = WrapperContext->RegistryHandle;
+ OBJECT_ATTRIBUTES ObjectAttributes;
+ UNICODE_STRING NoName = RTL_CONSTANT_STRING(L"");
NDIS_DbgPrint(MAX_TRACE, ("Called\n"));
*ConfigurationHandle = NULL;
- *Status = ZwDuplicateObject(NtCurrentProcess(), RootKeyHandle,
- NtCurrentProcess(), &KeyHandle, 0, 0,
- DUPLICATE_SAME_ACCESS);
+ InitializeObjectAttributes(&ObjectAttributes,
+ &NoName,
+ OBJ_KERNEL_HANDLE,
+ RootKeyHandle,
+ NULL);
+ *Status = ZwOpenKey(&KeyHandle, KEY_ALL_ACCESS, &ObjectAttributes);
if(!NT_SUCCESS(*Status))
{
NDIS_DbgPrint(MIN_TRACE, ("Failed to open registry configuration for this
miniport\n"));