mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2026-10-05 16:46:35 -05:00
macOS: preserve FUSE service identity in fallback metadata
Generate the session serial before forking and reuse it in the service and fallback mount metadata. This keeps PR #1866's shutdown identity check consistent when control metadata cannot be read.
This commit is contained in:
1 parent
dbfd67d4c1
commit
23d4452f5b
3 files changed
+24
-11
No files matched your search
@@ -1169,9 +1169,17 @@ namespace VeraCrypt
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef VC_MACOSX_FUSET
|
||||
uint64 fuseServiceSerialInstanceNumber;
|
||||
#endif
|
||||
|
||||
try
|
||||
{
|
||||
#ifdef VC_MACOSX_FUSET
|
||||
fuseServiceSerialInstanceNumber = FuseService::Mount (volume, options.SlotNumber, fuseMountPoint);
|
||||
#else
|
||||
FuseService::Mount (volume, options.SlotNumber, fuseMountPoint);
|
||||
#endif
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
@@ -1295,9 +1303,7 @@ namespace VeraCrypt
|
||||
mountedVolume->AuxMountPoint = fuseMountPoint;
|
||||
mountedVolume->VirtualDevice = mountedVirtualDevice;
|
||||
|
||||
struct timeval tv;
|
||||
gettimeofday (&tv, NULL);
|
||||
mountedVolume->SerialInstanceNumber = (uint64) tv.tv_sec * 1000000ULL + tv.tv_usec;
|
||||
mountedVolume->SerialInstanceNumber = fuseServiceSerialInstanceNumber;
|
||||
|
||||
if (!options.NoFilesystem)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user