VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Core/Unix/MacOSX
diff options
context:
space:
mode:
Diffstat (limited to 'src/Core/Unix/MacOSX')
-rw-r--r--src/Core/Unix/MacOSX/CoreMacOSX.cpp23
-rw-r--r--src/Core/Unix/MacOSX/CoreMacOSX.h2
-rw-r--r--src/Core/Unix/MacOSX/System.h2
3 files changed, 17 insertions, 10 deletions
diff --git a/src/Core/Unix/MacOSX/CoreMacOSX.cpp b/src/Core/Unix/MacOSX/CoreMacOSX.cpp
index b596e6e8..df8a40e2 100644
--- a/src/Core/Unix/MacOSX/CoreMacOSX.cpp
+++ b/src/Core/Unix/MacOSX/CoreMacOSX.cpp
@@ -4,7 +4,7 @@
by the TrueCrypt License 3.0.
Modifications and additions to the original source code (contained in this file)
- and all other portions of this file are Copyright (c) 2013-2017 IDRIX
+ and all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
@@ -47,7 +47,7 @@ namespace VeraCrypt
try
{
- Process::Execute ("hdiutil", args);
+ Process::Execute ("/usr/bin/hdiutil", args);
}
catch (ExecutedProcessFailed &e)
{
@@ -84,7 +84,7 @@ namespace VeraCrypt
{
try
{
- Process::Execute ("umount", args);
+ Process::Execute ("/sbin/umount", args);
break;
}
catch (ExecutedProcessFailed&)
@@ -107,12 +107,19 @@ namespace VeraCrypt
void CoreMacOSX::CheckFilesystem (shared_ptr <VolumeInfo> mountedVolume, bool repair) const
{
list <string> args;
- args.push_back ("/Applications/Utilities/Disk Utility.app");
- Process::Execute ("open", args);
+ struct stat sb;
+
+ if (stat("/Applications/Utilities/Disk Utility.app", &sb) == 0)
+ args.push_back ("/Applications/Utilities/Disk Utility.app");
+ else
+ args.push_back ("/System/Applications/Utilities/Disk Utility.app");
+
+ Process::Execute ("/usr/bin/open", args);
}
void CoreMacOSX::MountAuxVolumeImage (const DirectoryPath &auxMountPoint, const MountOptions &options) const
{
+#ifndef VC_MACOSX_FUSET
// Check FUSE version
char fuseVersionString[MAXHOSTNAMELEN + 1] = { 0 };
size_t fuseVersionStringLength = MAXHOSTNAMELEN;
@@ -147,7 +154,7 @@ namespace VeraCrypt
if (fuseVersionMajor < 2 || (fuseVersionMajor == 2 && fuseVersionMinor < 5))
throw HigherFuseVersionRequired (SRC_POS);
-
+#endif
// Mount volume image
string volImage = string (auxMountPoint) + FuseService::GetVolumeImagePath();
@@ -183,7 +190,7 @@ namespace VeraCrypt
{
try
{
- xml = Process::Execute ("hdiutil", args);
+ xml = Process::Execute ("/usr/bin/hdiutil", args);
break;
}
catch (ExecutedProcessFailed &e)
@@ -226,7 +233,7 @@ namespace VeraCrypt
args.push_back (volImage);
args.push_back ("-force");
- Process::Execute ("hdiutil", args);
+ Process::Execute ("/usr/bin/hdiutil", args);
}
catch (ExecutedProcessFailed&) { }
throw;
diff --git a/src/Core/Unix/MacOSX/CoreMacOSX.h b/src/Core/Unix/MacOSX/CoreMacOSX.h
index d2c70a87..da905708 100644
--- a/src/Core/Unix/MacOSX/CoreMacOSX.h
+++ b/src/Core/Unix/MacOSX/CoreMacOSX.h
@@ -4,7 +4,7 @@
by the TrueCrypt License 3.0.
Modifications and additions to the original source code (contained in this file)
- and all other portions of this file are Copyright (c) 2013-2017 IDRIX
+ and all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
diff --git a/src/Core/Unix/MacOSX/System.h b/src/Core/Unix/MacOSX/System.h
index d187877f..af286829 100644
--- a/src/Core/Unix/MacOSX/System.h
+++ b/src/Core/Unix/MacOSX/System.h
@@ -4,7 +4,7 @@
by the TrueCrypt License 3.0.
Modifications and additions to the original source code (contained in this file)
- and all other portions of this file are Copyright (c) 2013-2017 IDRIX
+ and all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.