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
@@ -48,9 +48,14 @@ namespace VeraCrypt
|
||||
static const char *GetAuxDeviceInfoPath () { return "/aux-device-info"; }
|
||||
static const char *GetControlPath () { return "/control"; }
|
||||
static const char *GetVolumeImagePath ();
|
||||
#if defined(TC_MACOSX) && defined(VC_MACOSX_FUSET)
|
||||
static const char *GetShutdownPath () { return "/shutdown"; }
|
||||
#endif
|
||||
static string GetDeviceType () { return "veracrypt"; }
|
||||
static gid_t GetGroupId () { return GroupId; }
|
||||
static uid_t GetUserId () { return UserId; }
|
||||
static uint64 GetSerialInstanceNumber () { return OpenVolumeInfo.SerialInstanceNumber; }
|
||||
static VolumeSlotNumber GetSlotNumber () { return SlotNumber; }
|
||||
static shared_ptr <Buffer> GetAuxDeviceInfo ();
|
||||
static shared_ptr <Buffer> GetVolumeInfo ();
|
||||
static uint64 GetVolumeSize ();
|
||||
@@ -59,6 +64,10 @@ namespace VeraCrypt
|
||||
static void ReadVolumeSectors (const BufferPtr &buffer, uint64 byteOffset);
|
||||
static void ReceiveAuxDeviceInfo (const ConstBufferPtr &buffer);
|
||||
static void SendAuxDeviceInfo (const DirectoryPath &fuseMountPoint, const DevicePath &virtualDevice, const DevicePath &loopDevice = DevicePath());
|
||||
#if defined(TC_MACOSX) && defined(VC_MACOSX_FUSET)
|
||||
static pid_t RequestDismount (const DirectoryPath &fuseMountPoint, uint64 serialInstanceNumber, VolumeSlotNumber slotNumber);
|
||||
static void WaitForDismount (pid_t processId, const DirectoryPath &fuseMountPoint, VolumeSlotNumber slotNumber, int timeOut = 10000);
|
||||
#endif
|
||||
static void WriteVolumeSectors (const ConstBufferPtr &buffer, uint64 byteOffset);
|
||||
|
||||
protected:
|
||||
|
||||
Reference in new issue
Block a user