mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-22 08:23:05 -05:00
inc,sys,tst: FSP_FSCTL_VOLUME_PARAMS::RejectIrpPriorToTransact0
This commit is contained in:
parent
51350d5a42
commit
bf6d56ceac
@ -176,7 +176,7 @@ enum
|
||||
UINT32 CasePreservedExtendedAttributes:1; /* preserve case of EA (default is UPPERCASE) */\
|
||||
UINT32 WslFeatures:1; /* support features required for WSLinux */\
|
||||
UINT32 DirectoryMarkerAsNextOffset:1; /* directory marker is next offset instead of last name */\
|
||||
UINT32 RejectIrpPriorToTransact:1; /* reject IRP's prior to first FSP_FSCTL_TRANSACT */\
|
||||
UINT32 RejectIrpPriorToTransact0:1; /* reject IRP's prior to FspFsctlTransact with 0 buffers */\
|
||||
UINT32 KmReservedFlags:3;\
|
||||
WCHAR Prefix[FSP_FSCTL_VOLUME_PREFIX_SIZE / sizeof(WCHAR)]; /* UNC prefix (\Server\Share) */\
|
||||
WCHAR FileSystemName[FSP_FSCTL_VOLUME_FSNAME_SIZE / sizeof(WCHAR)];
|
||||
|
@ -273,6 +273,11 @@ static DWORD WINAPI FspFileSystemDispatcherThread(PVOID FileSystem0)
|
||||
OperationContext.Response = Response;
|
||||
TlsSetValue(FspFileSystemTlsKey, &OperationContext);
|
||||
|
||||
Result = FspFsctlTransact(FileSystem->VolumeHandle, 0, 0, 0, 0, FALSE);
|
||||
/* send a TRANSACT0 to inform the FSD that the dispatcher is ready */
|
||||
if (!NT_SUCCESS(Result))
|
||||
goto exit;
|
||||
|
||||
memset(Response, 0, sizeof *Response);
|
||||
for (;;)
|
||||
{
|
||||
|
@ -1186,7 +1186,7 @@ static inline
|
||||
BOOLEAN FspFsvolDeviceReadyToAcceptIrp(PDEVICE_OBJECT DeviceObject)
|
||||
{
|
||||
FSP_FSVOL_DEVICE_EXTENSION *FsvolDeviceExtension = FspFsvolDeviceExtension(DeviceObject);
|
||||
if (!FsvolDeviceExtension->VolumeParams.RejectIrpPriorToTransact)
|
||||
if (!FsvolDeviceExtension->VolumeParams.RejectIrpPriorToTransact0)
|
||||
return TRUE;
|
||||
return 0 != InterlockedCompareExchange(&FsvolDeviceExtension->ReadyToAcceptIrp, 0, 0);
|
||||
}
|
||||
@ -1194,7 +1194,7 @@ static inline
|
||||
VOID FspFsvolDeviceSetReadyToAcceptIrp(PDEVICE_OBJECT DeviceObject)
|
||||
{
|
||||
FSP_FSVOL_DEVICE_EXTENSION *FsvolDeviceExtension = FspFsvolDeviceExtension(DeviceObject);
|
||||
if (!FsvolDeviceExtension->VolumeParams.RejectIrpPriorToTransact)
|
||||
if (!FsvolDeviceExtension->VolumeParams.RejectIrpPriorToTransact0)
|
||||
return;
|
||||
InterlockedExchange(&FsvolDeviceExtension->ReadyToAcceptIrp, 1);
|
||||
}
|
||||
|
@ -277,7 +277,7 @@ static NTSTATUS FspVolumeCreateNoLock(
|
||||
RtlInitEmptyUnicodeString(&FsvolDeviceExtension->VolumeName,
|
||||
FsvolDeviceExtension->VolumeNameBuf, sizeof FsvolDeviceExtension->VolumeNameBuf);
|
||||
RtlCopyUnicodeString(&FsvolDeviceExtension->VolumeName, &VolumeName);
|
||||
if (!FsvolDeviceExtension->VolumeParams.RejectIrpPriorToTransact)
|
||||
if (!FsvolDeviceExtension->VolumeParams.RejectIrpPriorToTransact0)
|
||||
FsvolDeviceExtension->ReadyToAcceptIrp = 1;
|
||||
Result = FspDeviceInitialize(FsvolDeviceObject);
|
||||
if (NT_SUCCESS(Result))
|
||||
@ -769,7 +769,8 @@ NTSTATUS FspVolumeTransact(
|
||||
if (!FspDeviceReference(FsvolDeviceObject))
|
||||
return STATUS_CANCELLED;
|
||||
|
||||
FspFsvolDeviceSetReadyToAcceptIrp(FsvolDeviceObject);
|
||||
if (0 == InputBufferLength && 0 == OutputBufferLength)
|
||||
FspFsvolDeviceSetReadyToAcceptIrp(FsvolDeviceObject);
|
||||
|
||||
NTSTATUS Result;
|
||||
FSP_FSVOL_DEVICE_EXTENSION *FsvolDeviceExtension = FspFsvolDeviceExtension(FsvolDeviceObject);
|
||||
|
@ -2402,7 +2402,7 @@ NTSTATUS MemfsCreateFunnel(
|
||||
#endif
|
||||
VolumeParams.AllowOpenInKernelMode = 1;
|
||||
#if defined(MEMFS_REJECT_EARLY_IRP)
|
||||
VolumeParams.RejectIrpPriorToTransact = 1;
|
||||
VolumeParams.RejectIrpPriorToTransact0 = 1;
|
||||
#endif
|
||||
if (0 != VolumePrefix)
|
||||
wcscpy_s(VolumeParams.Prefix, sizeof VolumeParams.Prefix / sizeof(WCHAR), VolumePrefix);
|
||||
|
Loading…
x
Reference in New Issue
Block a user