mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 08:25:03 +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;
|
||||
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"));
|
||||
|
|
Loading…
Reference in a new issue