mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2026-10-05 16:46:35 -05:00
fix(macos): ensure FUSE-T service exits during dismount (#1866)
Add an authenticated shutdown endpoint to the auxiliary FUSE filesystem and wait for the matching service process to terminate before removing the mount point.
This commit is contained in:
1 parent
b111be60d2
commit
d7bc65bed0
3 files changed
+224
No files matched your search
@@ -317,12 +317,25 @@ namespace VeraCrypt
|
||||
mountedVolume = ml.front();
|
||||
}
|
||||
|
||||
#ifdef VC_MACOSX_FUSET
|
||||
pid_t fuseServiceProcessId = FuseService::RequestDismount (mountedVolume->AuxMountPoint,
|
||||
mountedVolume->SerialInstanceNumber, mountedVolume->SlotNumber);
|
||||
#endif
|
||||
|
||||
list <string> args;
|
||||
args.push_back ("--");
|
||||
args.push_back (mountedVolume->AuxMountPoint);
|
||||
|
||||
for (int t = 0; true; t++)
|
||||
{
|
||||
#ifdef VC_MACOSX_FUSET
|
||||
try
|
||||
{
|
||||
if (GetMountedFilesystems (DevicePath(), mountedVolume->AuxMountPoint).empty())
|
||||
break;
|
||||
}
|
||||
catch (...) { }
|
||||
#endif
|
||||
try
|
||||
{
|
||||
Process::Execute ("/sbin/umount", args);
|
||||
@@ -336,6 +349,10 @@ namespace VeraCrypt
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef VC_MACOSX_FUSET
|
||||
FuseService::WaitForDismount (fuseServiceProcessId, mountedVolume->AuxMountPoint, mountedVolume->SlotNumber);
|
||||
#endif
|
||||
|
||||
try
|
||||
{
|
||||
mountedVolume->AuxMountPoint.Delete();
|
||||
|
||||
Reference in new issue
Block a user