mirror of
https://github.com/reactos/reactos.git
synced 2024-12-26 17:14:41 +00:00
[DRIVERS] Add some missing OBJ_KERNEL_HANDLE (#4493)
Match Zw*() uses. CORE-10207
This commit is contained in:
parent
b414e1e4d7
commit
46db6573ab
8 changed files with 9 additions and 14 deletions
|
@ -238,7 +238,7 @@ FsRecRegisterFs(IN PDRIVER_OBJECT DriverObject,
|
|||
RtlInitUnicodeString(&DeviceName, FsName);
|
||||
InitializeObjectAttributes(&ObjectAttributes,
|
||||
&DeviceName,
|
||||
OBJ_CASE_INSENSITIVE,
|
||||
OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE,
|
||||
0,
|
||||
NULL);
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ RegTGetKeyHandle(
|
|||
InitializeObjectAttributes(
|
||||
&ObjectAttributes,
|
||||
&NameString,
|
||||
OBJ_CASE_INSENSITIVE,
|
||||
OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE,
|
||||
hRootKey,
|
||||
NULL
|
||||
);
|
||||
|
@ -276,4 +276,3 @@ RegTGetStringValue(
|
|||
}
|
||||
return retval;
|
||||
} // end RegTGetStringValue()
|
||||
|
||||
|
|
|
@ -649,7 +649,7 @@ UDFDismountDevice(
|
|||
|
||||
InitializeObjectAttributes ( &ObjectAttributes,
|
||||
unicodeCdRomDeviceName,
|
||||
OBJ_CASE_INSENSITIVE,
|
||||
OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE,
|
||||
NULL,
|
||||
NULL );
|
||||
|
||||
|
|
|
@ -265,7 +265,7 @@ KspReadMediaCategory(
|
|||
RtlFreeUnicodeString(&GuidString);
|
||||
|
||||
/* initialize object attributes */
|
||||
InitializeObjectAttributes(&ObjectAttributes, &Path, OBJ_CASE_INSENSITIVE, NULL, NULL);
|
||||
InitializeObjectAttributes(&ObjectAttributes, &Path, OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE, NULL, NULL);
|
||||
|
||||
/* open the key */
|
||||
Status = ZwOpenKey(&hKey, GENERIC_READ, &ObjectAttributes);
|
||||
|
@ -839,4 +839,3 @@ KsHandleSizedListQuery(
|
|||
return STATUS_BUFFER_TOO_SMALL;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -239,7 +239,7 @@ KsMapModuleName(
|
|||
RtlAppendUnicodeStringToString(&SubKeyName, ModuleName);
|
||||
|
||||
/* initialize subkey attributes */
|
||||
InitializeObjectAttributes(&ObjectAttributes, &SubKeyName, OBJ_CASE_INSENSITIVE, hKey, NULL);
|
||||
InitializeObjectAttributes(&ObjectAttributes, &SubKeyName, OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE, hKey, NULL);
|
||||
|
||||
/* now open the subkey */
|
||||
Status = ZwOpenKey(&hSubKey, GENERIC_READ, &ObjectAttributes);
|
||||
|
@ -263,6 +263,3 @@ KsMapModuleName(
|
|||
/* return status */
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -296,7 +296,7 @@ SerialPnpStartDevice(
|
|||
/* Write an entry value under HKLM\HARDWARE\DeviceMap\SERIALCOMM */
|
||||
/* This step is not mandatory, so don't exit in case of error */
|
||||
RtlInitUnicodeString(&KeyName, L"\\Registry\\Machine\\HARDWARE\\DeviceMap\\SERIALCOMM");
|
||||
InitializeObjectAttributes(&objectAttributes, &KeyName, OBJ_CASE_INSENSITIVE, NULL, NULL);
|
||||
InitializeObjectAttributes(&objectAttributes, &KeyName, OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE, NULL, NULL);
|
||||
Status = ZwCreateKey(&hKey, KEY_SET_VALUE, &objectAttributes, 0, NULL, REG_OPTION_VOLATILE, NULL);
|
||||
if (NT_SUCCESS(Status))
|
||||
{
|
||||
|
|
|
@ -129,7 +129,7 @@ OpenKey(
|
|||
RtlInitUnicodeString(&SubKeyName, lpSubKeyName);
|
||||
|
||||
/* initialize key attributes */
|
||||
InitializeObjectAttributes(&ObjectAttributes, &SubKeyName, OBJ_CASE_INSENSITIVE | OBJ_OPENIF, hKey, NULL);
|
||||
InitializeObjectAttributes(&ObjectAttributes, &SubKeyName, OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE | OBJ_OPENIF, hKey, NULL);
|
||||
|
||||
/* open the key */
|
||||
Status = ZwOpenKey(OutKey, DesiredAccess, &ObjectAttributes);
|
||||
|
|
|
@ -274,7 +274,7 @@ FindProductName(
|
|||
|
||||
|
||||
/* initialize key attributes */
|
||||
InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE | OBJ_OPENIF, NULL, NULL);
|
||||
InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE | OBJ_OPENIF, NULL, NULL);
|
||||
|
||||
/* open the key */
|
||||
Status = ZwOpenKey(&hKey, GENERIC_READ, &ObjectAttributes);
|
||||
|
@ -324,7 +324,7 @@ FindProductName(
|
|||
RtlInitUnicodeString(&SubKeyName, SubKey);
|
||||
|
||||
/* initialize key attributes */
|
||||
InitializeObjectAttributes(&ObjectAttributes, &SubKeyName, OBJ_CASE_INSENSITIVE | OBJ_OPENIF, hKey, NULL);
|
||||
InitializeObjectAttributes(&ObjectAttributes, &SubKeyName, OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE | OBJ_OPENIF, hKey, NULL);
|
||||
|
||||
/* open the sub key */
|
||||
Status = ZwOpenKey(&hSubKey, GENERIC_READ, &ObjectAttributes);
|
||||
|
|
Loading…
Reference in a new issue