mirror of
https://github.com/winfsp/winfsp.git
synced 2025-06-14 15:52:47 -05:00
sys: WIP
This commit is contained in:
@ -100,10 +100,11 @@ static NTSTATUS FspFsvrtDeleteVolume(
|
||||
PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp)
|
||||
{
|
||||
NTSTATUS Result;
|
||||
FSP_FSVRT_DEVICE_EXTENSION *FsvrtDeviceExtension = FspFsvrtDeviceExtension(DeviceObject);
|
||||
|
||||
/* access check */
|
||||
Result = FspSecuritySubjectContextAccessCheck(
|
||||
FspFsvrtDeviceExtension(DeviceObject)->SecurityDescriptorBuf,
|
||||
FILE_WRITE_DATA, Irp->RequestorMode);
|
||||
FsvrtDeviceExtension->SecurityDescriptorBuf, FILE_WRITE_DATA, Irp->RequestorMode);
|
||||
if (!NT_SUCCESS(Result))
|
||||
return Result;
|
||||
|
||||
@ -113,12 +114,21 @@ static NTSTATUS FspFsvrtDeleteVolume(
|
||||
static NTSTATUS FspFsvrtTransact(
|
||||
PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp)
|
||||
{
|
||||
/* check parameters */
|
||||
ULONG InputBufferLength = IrpSp->Parameters.FileSystemControl.InputBufferLength;
|
||||
ULONG OutputBufferLength = IrpSp->Parameters.FileSystemControl.OutputBufferLength;
|
||||
PVOID SystemBuffer = Irp->AssociatedIrp.SystemBuffer;
|
||||
if (sizeof(FSP_TRANSACT_RSP) > InputBufferLength || 0 == SystemBuffer)
|
||||
return STATUS_INVALID_PARAMETER;
|
||||
if (FSP_FSCTL_TRANSACT_BUFFER_SIZE > OutputBufferLength)
|
||||
return STATUS_BUFFER_TOO_SMALL;
|
||||
|
||||
NTSTATUS Result;
|
||||
FSP_FSVRT_DEVICE_EXTENSION *FsvrtDeviceExtension = FspFsvrtDeviceExtension(DeviceObject);
|
||||
|
||||
/* access check */
|
||||
Result = FspSecuritySubjectContextAccessCheck(
|
||||
FspFsvrtDeviceExtension(DeviceObject)->SecurityDescriptorBuf,
|
||||
FILE_WRITE_DATA, Irp->RequestorMode);
|
||||
FsvrtDeviceExtension->SecurityDescriptorBuf, FILE_WRITE_DATA, Irp->RequestorMode);
|
||||
if (!NT_SUCCESS(Result))
|
||||
return Result;
|
||||
|
||||
|
Reference in New Issue
Block a user