mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2026-06-10 06:46:59 -05:00
Windows: allow cancelling long mount operations
Add a root-driver abort IOCTL that bypasses the mount control mutex and sets cooperative KDF abort flags for the active mount. Restrict abort requests to privileged callers or to the user that initiated the pending mount, and retry early wait-dialog cancel requests until the driver has registered the cancellable mount context. Wire the wait dialog Cancel button to send the abort request through a fresh driver handle, and propagate ERR_USER_ABORT through header/cache processing. Add a /cancelmount command-line switch that sends the same abort request without displaying UI, so users can cancel hidden-wait-dialog mount operations from another process.
This commit is contained in:
@@ -129,6 +129,8 @@
|
||||
|
||||
#define VC_IOCTL_ENCRYPTION_QUEUE_PARAMS TC_IOCTL (43)
|
||||
|
||||
#define TC_IOCTL_ABORT_MOUNT_VOLUME TC_IOCTL (44)
|
||||
|
||||
// Undocumented IOCTL sent by Windows 10 when handling EFS data on volumes
|
||||
#define IOCTL_UNKNOWN_WINDOWS10_EFS_ACCESS 0x455610D8
|
||||
|
||||
@@ -180,6 +182,12 @@ typedef struct
|
||||
BOOL VolumeMasterKeyVulnerable;
|
||||
} MOUNT_STRUCT;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int nDosDriveNo; /* Drive number whose pending mount should be aborted; -1 aborts any pending mount */
|
||||
int nReturnCode; /* Return code back from driver */
|
||||
} MOUNT_ABORT_STRUCT;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int nDosDriveNo; /* Drive letter to unmount */
|
||||
|
||||
Reference in New Issue
Block a user