[NDIS]
authorThomas Faber <thomas.faber@reactos.org>
Wed, 14 Oct 2015 08:32:00 +0000 (08:32 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Wed, 14 Oct 2015 08:32:00 +0000 (08:32 +0000)
- Add missing OBJ_KERNEL_HANDLE
CORE-10207

svn path=/trunk/; revision=69522

reactos/drivers/network/ndis/ndis/config.c
reactos/drivers/network/ndis/ndis/protocol.c

index 8a27e39..2bc5a07 100644 (file)
@@ -291,7 +291,7 @@ NdisOpenProtocolConfiguration(
 
     RtlCopyUnicodeString(&KeyNameU, ProtocolSection);
     RtlAppendUnicodeToString(&KeyNameU, PARAMETERS_KEY);
-    InitializeObjectAttributes(&KeyAttributes, &KeyNameU, OBJ_CASE_INSENSITIVE, NULL, NULL);
+    InitializeObjectAttributes(&KeyAttributes, &KeyNameU, OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE, NULL, NULL);
 
     *Status = ZwOpenKey(&KeyHandle, KEY_ALL_ACCESS, &KeyAttributes);
 
@@ -908,7 +908,7 @@ NdisOpenConfigurationKeyByIndex(
     wcsncpy(KeyName->Buffer, KeyInformation->Name, KeyName->MaximumLength/sizeof(WCHAR));
     KeyName->Length = (USHORT)min(KeyInformation->NameLength, KeyName->MaximumLength);
 
-    InitializeObjectAttributes(&KeyAttributes, KeyName, OBJ_CASE_INSENSITIVE, ConfigurationHandle, NULL);
+    InitializeObjectAttributes(&KeyAttributes, KeyName, OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE, ConfigurationHandle, NULL);
 
     *Status = ZwOpenKey(&RegKeyHandle, KEY_ALL_ACCESS, &KeyAttributes);
 
@@ -971,7 +971,7 @@ NdisOpenConfigurationKeyByName(
 
     *KeyHandle = NULL;
 
-    InitializeObjectAttributes(&KeyAttributes, KeyName, OBJ_CASE_INSENSITIVE, ConfigurationHandle, 0);
+    InitializeObjectAttributes(&KeyAttributes, KeyName, OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE, ConfigurationHandle, 0);
     *Status = ZwOpenKey(&RegKeyHandle, KEY_ALL_ACCESS, &KeyAttributes);
 
     if(*Status != STATUS_SUCCESS)
index bef9c3c..b68f7ea 100644 (file)
@@ -933,7 +933,7 @@ ndisBindMiniportsToProtocol(OUT PNDIS_STATUS Status, IN PPROTOCOL_BINDING Protoc
     RtlInitUnicodeString(&RegistryPath, RegistryPathStr);
     NDIS_DbgPrint(MAX_TRACE, ("Opening configuration key: %wZ\n", &RegistryPath));
 
-    InitializeObjectAttributes(&ObjectAttributes, &RegistryPath, OBJ_CASE_INSENSITIVE, NULL, NULL);
+    InitializeObjectAttributes(&ObjectAttributes, &RegistryPath, OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE, NULL, NULL);
     NtStatus = ZwOpenKey(&DriverKeyHandle, KEY_READ, &ObjectAttributes);
 
     ExFreePool(RegistryPathStr);