mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2026-10-05 16:46:35 -05:00
macOS: harden volume discovery and FUSE-T teardown
Run display discovery asynchronously and bound batched disk-image inventory queries. Filter auxiliary mounts by basename, filesystem and owner, and keep unresolved candidates separate from verified volumes. Allow targeted dismounts despite incomplete discovery while requiring complete results for slot allocation and empty-inventory decisions. Use nonthrowing GUI snapshots with monotonic freshness, completion events and safe window lifetimes. Suspend inactivity decisions while the snapshot is stale, without restarting idle timers: activity counters are cumulative per volume instance. Refresh logout targets and retry only failed ones. Show a progress dialog for interactive unmounts, but keep automatic ones synchronous, so a quit or logout request that arrives meanwhile is handled afterwards rather than refused. Guard core operations against reentry and route wait-dialog requests only from worker threads, so a main-thread message cannot wait for itself. Bind teardown to captured mount and service identities, including process start time. Report a service exit that cannot be confirmed after auxiliary mount removal as a distinct error that keeps the original details. Such volumes are not retried, and a multi-volume unmount reports all of them together with any other failure or a declined prompt. Warn about it after automatic unmounts and at quit, and keep the background application until the warning is acknowledged. Keep rollback responsive, and let services remove their auxiliary directories without probing mounted paths. Preserve released /control compatibility and perform best-effort cleanup for older services. Reap bounded subprocesses as soon as their output ends. A child that survives SIGKILL is reaped by a later call, which starts no new child until then. Keep subjects and subprocess command, status and error output when formatting exceptions for wrapping and logs. Clarify discovery and rollback diagnostics. Fix the localization-dependent busy-volume regression assertion and extend discovery, snapshot, process identity, cleanup, GUI lifecycle, inactivity and teardown coverage.
This commit is contained in:
38 files changed
+2551
-311
No files matched your search
@@ -79,6 +79,7 @@ namespace VeraCrypt
|
||||
struct DismountRequest
|
||||
{
|
||||
pid_t ProcessId;
|
||||
uint64 ProcessStartTime;
|
||||
uint64 SerialInstanceNumber;
|
||||
VolumeSlotNumber SlotNumber;
|
||||
bool IgnoreOpenFiles;
|
||||
@@ -92,7 +93,7 @@ namespace VeraCrypt
|
||||
static pid_t RequestDismount (const DismountRequest &request);
|
||||
static bool IsDismountMountPresent (const DismountRequest &request);
|
||||
static void DismountLegacy (const DismountRequest &request);
|
||||
static void WaitForDismount (pid_t processId, const DirectoryPath &fuseMountPoint, VolumeSlotNumber slotNumber, int timeOut = 10000);
|
||||
static void WaitForDismount (pid_t processId, const DirectoryPath &fuseMountPoint, VolumeSlotNumber slotNumber, int timeOut = 10000, uint64 processStartTime = 0);
|
||||
#endif
|
||||
static void WriteVolumeSectors (const ConstBufferPtr &buffer, uint64 byteOffset);
|
||||
|
||||
|
||||
Reference in new issue
Block a user