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:
mimoex authored and GitHub committed 2026-09-25 15:46:52 +02:00
1 parent b111be60d2
commit d7bc65bed0
3 files changed
+224

No files matched your search

+17
View File
@@ -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();