sys, dll: IRP_MJ_DIRECTORY_CONTROL: implementation

This commit is contained in:
Bill Zissimopoulos
2016-03-19 13:16:01 -07:00
parent 8870ebc7f0
commit 6fc43c6ca2
11 changed files with 618 additions and 12 deletions

View File

@ -17,9 +17,9 @@ NTSTATUS FspWqCreateAndPostIrpWorkItem(PIRP Irp,
if (0 == RequestWorkItem)
{
NTSTATUS Result;
/* probe and lock the user buffer (if not an MDL request) */
PIO_STACK_LOCATION IrpSp = IoGetCurrentIrpStackLocation(Irp);
/* lock/buffer the user buffer */
if ((IRP_MJ_READ == IrpSp->MajorFunction || IRP_MJ_WRITE == IrpSp->MajorFunction) &&
!FlagOn(IrpSp->MinorFunction, IRP_MN_MDL))
{
@ -30,6 +30,13 @@ NTSTATUS FspWqCreateAndPostIrpWorkItem(PIRP Irp,
if (!NT_SUCCESS(Result))
return Result;
}
else if (IRP_MJ_DIRECTORY_CONTROL == IrpSp->MajorFunction &&
IRP_MN_QUERY_DIRECTORY == IrpSp->MinorFunction)
{
Result = FspBufferUserBuffer(Irp, IrpSp->Parameters.QueryDirectory.Length, IoWriteAccess);
if (!NT_SUCCESS(Result))
return Result;
}
Result = FspIopCreateRequestWorkItem(Irp, sizeof(WORK_QUEUE_ITEM),
RequestFini, &RequestWorkItem);