mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 07:13:01 +00:00
[NDIS]
- ZwDuplicateObject always returns user handles, so don't use it when we want a kernel handle. CORE-10207 svn path=/trunk/; revision=69569
This commit is contained in:
parent
7983137edd
commit
4dad975f3f
1 changed files with 8 additions and 3 deletions
|
@ -215,14 +215,19 @@ NdisOpenConfiguration(
|
||||||
PMINIPORT_CONFIGURATION_CONTEXT ConfigurationContext;
|
PMINIPORT_CONFIGURATION_CONTEXT ConfigurationContext;
|
||||||
PNDIS_WRAPPER_CONTEXT WrapperContext = (PNDIS_WRAPPER_CONTEXT)WrapperConfigurationContext;
|
PNDIS_WRAPPER_CONTEXT WrapperContext = (PNDIS_WRAPPER_CONTEXT)WrapperConfigurationContext;
|
||||||
HANDLE RootKeyHandle = WrapperContext->RegistryHandle;
|
HANDLE RootKeyHandle = WrapperContext->RegistryHandle;
|
||||||
|
OBJECT_ATTRIBUTES ObjectAttributes;
|
||||||
|
UNICODE_STRING NoName = RTL_CONSTANT_STRING(L"");
|
||||||
|
|
||||||
NDIS_DbgPrint(MAX_TRACE, ("Called\n"));
|
NDIS_DbgPrint(MAX_TRACE, ("Called\n"));
|
||||||
|
|
||||||
*ConfigurationHandle = NULL;
|
*ConfigurationHandle = NULL;
|
||||||
|
|
||||||
*Status = ZwDuplicateObject(NtCurrentProcess(), RootKeyHandle,
|
InitializeObjectAttributes(&ObjectAttributes,
|
||||||
NtCurrentProcess(), &KeyHandle, 0, 0,
|
&NoName,
|
||||||
DUPLICATE_SAME_ACCESS);
|
OBJ_KERNEL_HANDLE,
|
||||||
|
RootKeyHandle,
|
||||||
|
NULL);
|
||||||
|
*Status = ZwOpenKey(&KeyHandle, KEY_ALL_ACCESS, &ObjectAttributes);
|
||||||
if(!NT_SUCCESS(*Status))
|
if(!NT_SUCCESS(*Status))
|
||||||
{
|
{
|
||||||
NDIS_DbgPrint(MIN_TRACE, ("Failed to open registry configuration for this miniport\n"));
|
NDIS_DbgPrint(MIN_TRACE, ("Failed to open registry configuration for this miniport\n"));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue