mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 22:56:00 +00:00
[NTOSKRNL]
- Fix a critical bug in IopDeviceFsIoControl which caused all FSCTL requests sent via NtFsControlFile and ZwFsControlFile to fail svn path=/trunk/; revision=52289
This commit is contained in:
parent
7db0732c32
commit
69f2dd5769
1 changed files with 12 additions and 1 deletions
|
@ -370,11 +370,22 @@ IopDeviceFsIoControl(IN HANDLE DeviceHandle,
|
|||
StackPtr->MajorFunction = IsDevIoCtl ?
|
||||
IRP_MJ_DEVICE_CONTROL :
|
||||
IRP_MJ_FILE_SYSTEM_CONTROL;
|
||||
StackPtr->MinorFunction = 0;
|
||||
StackPtr->Control = 0;
|
||||
StackPtr->Flags = 0;
|
||||
StackPtr->Parameters.DeviceIoControl.Type3InputBuffer = NULL;
|
||||
|
||||
/* Check if this is a FS control request */
|
||||
if (StackPtr->MajorFunction == IRP_MJ_FILE_SYSTEM_CONTROL)
|
||||
{
|
||||
/* It is, so we have to set a minor function */
|
||||
StackPtr->MinorFunction = (Irp->RequestorMode == KernelMode) ? IRP_MN_KERNEL_CALL : IRP_MN_USER_FS_REQUEST;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Minor function doesn't matter for regular device control requests */
|
||||
StackPtr->MinorFunction = 0;
|
||||
}
|
||||
|
||||
/* Set the IOCTL Data */
|
||||
StackPtr->Parameters.DeviceIoControl.IoControlCode = IoControlCode;
|
||||
StackPtr->Parameters.DeviceIoControl.InputBufferLength = InputBufferLength;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue