mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-23 08:53:01 -05:00
sys: FspFsvolFileSystemControlReparsePoint: comments
This commit is contained in:
parent
be8c29114a
commit
ccf58122a2
@ -159,23 +159,29 @@ static NTSTATUS FspFsvolFileSystemControlReparsePoint(
|
|||||||
TargetObjectName.Length = TargetObjectName.MaximumLength = ReparseTargetPathLength;
|
TargetObjectName.Length = TargetObjectName.MaximumLength = ReparseTargetPathLength;
|
||||||
TargetObjectName.Buffer = ReparseTargetPath;
|
TargetObjectName.Buffer = ReparseTargetPath;
|
||||||
|
|
||||||
|
/* get a pointer to the target device */
|
||||||
Result = FspGetDeviceObjectPointer(&TargetObjectName, FILE_READ_DATA,
|
Result = FspGetDeviceObjectPointer(&TargetObjectName, FILE_READ_DATA,
|
||||||
&TargetFileNameIndex, &TargetFileObject, &TargetDeviceObject);
|
&TargetFileNameIndex, &TargetFileObject, &TargetDeviceObject);
|
||||||
if (!NT_SUCCESS(Result))
|
if (!NT_SUCCESS(Result))
|
||||||
goto target_check_exit;
|
goto target_check_exit;
|
||||||
|
|
||||||
|
/* is the target device the same as ours? */
|
||||||
if (TargetFileNameIndex < ReparseTargetPathLength &&
|
if (TargetFileNameIndex < ReparseTargetPathLength &&
|
||||||
IoGetRelatedDeviceObject(FileObject) == TargetDeviceObject)
|
IoGetRelatedDeviceObject(FileObject) == TargetDeviceObject)
|
||||||
{
|
{
|
||||||
if (0 == FsvolDeviceExtension->VolumePrefix.Length)
|
if (0 == FsvolDeviceExtension->VolumePrefix.Length)
|
||||||
|
/* not going thru MUP: DONE! */
|
||||||
TargetOnFileSystem = (UINT16)TargetFileNameIndex;
|
TargetOnFileSystem = (UINT16)TargetFileNameIndex;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
/* going thru MUP cases: \Device\Volume{GUID} and \??\UNC\{VolumePrefix} */
|
||||||
ProviderInfoSize = sizeof ProviderInfo;
|
ProviderInfoSize = sizeof ProviderInfo;
|
||||||
Result = FsRtlMupGetProviderInfoFromFileObject(TargetFileObject, 1,
|
Result = FsRtlMupGetProviderInfoFromFileObject(TargetFileObject, 1,
|
||||||
&ProviderInfo, &ProviderInfoSize);
|
&ProviderInfo, &ProviderInfoSize);
|
||||||
if (NT_SUCCESS(Result))
|
if (NT_SUCCESS(Result))
|
||||||
{
|
{
|
||||||
|
/* case \Device\Volume{GUID}: is the targer provider id same as ours? */
|
||||||
|
|
||||||
TargetProviderId = ProviderInfo.ProviderId;
|
TargetProviderId = ProviderInfo.ProviderId;
|
||||||
|
|
||||||
ProviderInfoSize = sizeof ProviderInfo;
|
ProviderInfoSize = sizeof ProviderInfo;
|
||||||
@ -189,6 +195,8 @@ static NTSTATUS FspFsvolFileSystemControlReparsePoint(
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
/* case \??\UNC\{VolumePrefix}: is the target volume prefix same as ours? */
|
||||||
|
|
||||||
TargetObjectName.Length = TargetObjectName.MaximumLength =
|
TargetObjectName.Length = TargetObjectName.MaximumLength =
|
||||||
FsvolDeviceExtension->VolumePrefix.Length;
|
FsvolDeviceExtension->VolumePrefix.Length;
|
||||||
TargetObjectName.Buffer = ReparseTargetPath +
|
TargetObjectName.Buffer = ReparseTargetPath +
|
||||||
|
Loading…
x
Reference in New Issue
Block a user