VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Driver/Ntdriver.c
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2018-12-19 00:38:56 +0100
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2018-12-19 00:41:37 +0100
commit1967bd862eaa5130260a7d7beea9657778718c31 (patch)
treee451e2d899e2b6f0ffb7ca3beaa795d42de9497e /src/Driver/Ntdriver.c
parent6abc59acd204ce59f53b218cafc01ced955695cd (diff)
downloadVeraCrypt-1967bd862eaa5130260a7d7beea9657778718c31.tar.gz
VeraCrypt-1967bd862eaa5130260a7d7beea9657778718c31.zip
Windows: Add mount option that allows mounting a volume without attaching it to the specified drive letter. This is useful in situation where Windows has issue with the filesystem (e.g. ReFS on Windows 10 1809) and we need to use third party software to be able to use the filesystem under Windows through low level VeraCrypt virtual device (e.g. \Device\VeraCryptVolumeX).
Diffstat (limited to 'src/Driver/Ntdriver.c')
-rw-r--r--src/Driver/Ntdriver.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/Driver/Ntdriver.c b/src/Driver/Ntdriver.c
index 582df290..e4e39bc0 100644
--- a/src/Driver/Ntdriver.c
+++ b/src/Driver/Ntdriver.c
@@ -1090,8 +1090,8 @@ NTSTATUS ProcessVolumeDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION
}
}
}
- }
- }
+ }
+ }
break;
@@ -1701,9 +1701,9 @@ NTSTATUS ProcessVolumeDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION
Irp->IoStatus.Information = 0;
break;
default:
- Dump ("ProcessVolumeDeviceControlIrp (unknown code 0x%.8X)\n", irpSp->Parameters.DeviceIoControl.IoControlCode);
- return TCCompleteIrp (Irp, STATUS_INVALID_DEVICE_REQUEST, 0);
- }
+ Dump ("ProcessVolumeDeviceControlIrp (unknown code 0x%.8X)\n", irpSp->Parameters.DeviceIoControl.IoControlCode);
+ return TCCompleteIrp (Irp, STATUS_INVALID_DEVICE_REQUEST, 0);
+ }
#if defined(DEBUG) || defined (DEBG_TRACE)
if (!NT_SUCCESS (Irp->IoStatus.Status))
@@ -2209,6 +2209,7 @@ NTSTATUS ProcessMainDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION Ex
prop->volumeHeaderFlags = ListExtension->cryptoInfo->HeaderFlags;
prop->readOnly = ListExtension->bReadOnly;
prop->removable = ListExtension->bRemovable;
+ prop->mountDisabled = ListExtension->bMountManager? FALSE : TRUE;
prop->partitionInInactiveSysEncScope = ListExtension->PartitionInInactiveSysEncScope;
prop->hiddenVolume = ListExtension->cryptoInfo->hiddenVolume;
@@ -3782,14 +3783,15 @@ NTSTATUS MountDevice (PDEVICE_OBJECT DeviceObject, MOUNT_STRUCT *mount)
}
if (mount->bMountManager)
+ {
MountManagerMount (mount);
+ // We create symbolic link even if mount manager is notified of
+ // arriving volume as it apparently sometimes fails to create the link
+ CreateDriveLink (mount->nDosDriveNo);
+ }
NewExtension->bMountManager = mount->bMountManager;
- // We create symbolic link even if mount manager is notified of
- // arriving volume as it apparently sometimes fails to create the link
- CreateDriveLink (mount->nDosDriveNo);
-
mount->FilesystemDirty = FALSE;
if (NT_SUCCESS (TCOpenFsVolume (NewExtension, &volumeHandle, &volumeFileObject)))