1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2026-05-21 21:30:48 -05:00

macOS: Use SMB backend for FUSE-T auxiliary mounts

This commit is contained in:
Mounir IDRASSI
2026-04-14 14:42:36 +09:00
parent 9877320788
commit 250a488a84
2 changed files with 15 additions and 5 deletions
+4 -5
View File
@@ -342,11 +342,10 @@ namespace VeraCrypt
continue; continue;
shared_ptr <VolumeInfo> mountedVol; shared_ptr <VolumeInfo> mountedVol;
// Introduce a retry mechanism with a timeout for control file access // Introduce a retry mechanism with a timeout for control file access.
// This workaround is limited to FUSE-T mounted volume under macOS for // The list is already filtered to VeraCrypt auxiliary mounts; in
// which md.Device starts with "fuse-t:" // FUSE-T builds, the mount table device name varies by backend.
#ifdef VC_MACOSX_FUSET #ifdef VC_MACOSX_FUSET
bool isFuseT = wstring(mf.Device).find(L"fuse-t:") == 0;
int controlFileRetries = 10; // 10 retries with 500ms sleep each, total 5 seconds int controlFileRetries = 10; // 10 retries with 500ms sleep each, total 5 seconds
while (!mountedVol && (controlFileRetries-- > 0)) while (!mountedVol && (controlFileRetries-- > 0))
#endif #endif
@@ -366,7 +365,7 @@ namespace VeraCrypt
// serialization is not ready yet and we need to wait before retrying // serialization is not ready yet and we need to wait before retrying
// this happens when FUSE-T is used under macOS and if it is the first time // this happens when FUSE-T is used under macOS and if it is the first time
// the volume is mounted // the volume is mounted
if (isFuseT && string (e.what()).find ("VeraCrypt::Serializer::ValidateName") != string::npos) if (string (e.what()).find ("VeraCrypt::Serializer::ValidateName") != string::npos)
{ {
Thread::Sleep(500); // Wait before retrying Thread::Sleep(500); // Wait before retrying
} }
+11
View File
@@ -533,6 +533,17 @@ namespace VeraCrypt
args.push_back ("-o"); args.push_back ("-o");
args.push_back ("nobrowse"); args.push_back ("nobrowse");
#ifdef VC_MACOSX_FUSET
// Use FUSE-T's SMB backend for the auxiliary mount. The default NFS
// backend can be affected by macOS Network Volumes privacy state.
args.push_back ("-o");
args.push_back ("backend=smb");
args.push_back ("-o");
args.push_back ("nonamedattr");
args.push_back ("-o");
args.push_back ("rwsize=262144");
#endif
if (getuid() == 0 || geteuid() == 0) if (getuid() == 0 || geteuid() == 0)
#endif #endif
{ {