Major refactoring: WIP

This commit is contained in:
Bill Zissimopoulos 2015-12-22 18:31:39 -08:00
parent 5bc906bcab
commit dc9d5409a7

View File

@ -362,20 +362,31 @@ NTSTATUS FspVolumeRedirQueryPathEx(
if (sizeof(QUERY_PATH_RESPONSE) > OutputBufferLength) if (sizeof(QUERY_PATH_RESPONSE) > OutputBufferLength)
return STATUS_BUFFER_TOO_SMALL; return STATUS_BUFFER_TOO_SMALL;
NTSTATUS Result;
FSP_FSVOL_DEVICE_EXTENSION *FsvolDeviceExtension = FspFsvolDeviceExtension(FsvolDeviceObject); FSP_FSVOL_DEVICE_EXTENSION *FsvolDeviceExtension = FspFsvolDeviceExtension(FsvolDeviceObject);
UNICODE_STRING Prefix; UNICODE_STRING Prefix;
RtlInitUnicodeString(&Prefix, FsvolDeviceExtension->VolumeParams.Prefix); /* acquire our DeleteResource */
if (Prefix.Length <= QueryPathRequest->PathName.Length && ExAcquireResourceExclusiveLite(&FsvolDeviceExtension->DeleteResource, TRUE);
RtlEqualMemory(Prefix.Buffer, QueryPathRequest->PathName.Buffer, Prefix.Length))
{
QueryPathResponse->LengthAccepted = Prefix.Length;
Irp->IoStatus.Information = 0; Result = STATUS_BAD_NETWORK_PATH;
return STATUS_SUCCESS; if (!FspIoqStopped(&FsvolDeviceExtension->Ioq))
{
RtlInitUnicodeString(&Prefix, FsvolDeviceExtension->VolumeParams.Prefix);
if (Prefix.Length <= QueryPathRequest->PathName.Length &&
RtlEqualMemory(Prefix.Buffer, QueryPathRequest->PathName.Buffer, Prefix.Length))
{
QueryPathResponse->LengthAccepted = Prefix.Length;
Irp->IoStatus.Information = 0;
Result = STATUS_SUCCESS;
}
} }
else
return STATUS_BAD_NETWORK_NAME; /* release the DeleteResource */
ExReleaseResourceLite(&FsvolDeviceExtension->DeleteResource);
return Result;
} }
NTSTATUS FspVolumeGetName( NTSTATUS FspVolumeGetName(