VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Core/Unix
diff options
context:
space:
mode:
Diffstat (limited to 'src/Core/Unix')
-rw-r--r--src/Core/Unix/MacOSX/CoreMacOSX.cpp32
1 files changed, 10 insertions, 22 deletions
diff --git a/src/Core/Unix/MacOSX/CoreMacOSX.cpp b/src/Core/Unix/MacOSX/CoreMacOSX.cpp
index e7572e68..de801106 100644
--- a/src/Core/Unix/MacOSX/CoreMacOSX.cpp
+++ b/src/Core/Unix/MacOSX/CoreMacOSX.cpp
@@ -119,27 +119,20 @@ namespace VeraCrypt
int status;
bool bIsOSXFuse = false;
- if ((status = sysctlbyname ("macfuse.version.number", fuseVersionString, &fuseVersionStringLength, NULL, 0)) != 0)
+ if ((status = sysctlbyname ("osxfuse.version.number", fuseVersionString, &fuseVersionStringLength, NULL, 0)) != 0)
{
fuseVersionStringLength = MAXHOSTNAMELEN;
- if ((status = sysctlbyname ("osxfuse.version.number", fuseVersionString, &fuseVersionStringLength, NULL, 0)) != 0)
+ if ((status = sysctlbyname ("vfs.generic.osxfuse.version.number", fuseVersionString, &fuseVersionStringLength, NULL, 0)) != 0)
{
- fuseVersionStringLength = MAXHOSTNAMELEN;
- if ((status = sysctlbyname ("vfs.generic.osxfuse.version.number", fuseVersionString, &fuseVersionStringLength, NULL, 0)) != 0)
- {
- throw HigherFuseVersionRequired (SRC_POS);
- }
- }
-
- // look for compatibility mode
- struct stat sb;
- if ((0 == stat("/usr/local/lib/libfuse.dylib", &sb)) && (0 == stat("/Library/Frameworks/MacFUSE.framework/MacFUSE", &sb)))
- {
- bIsOSXFuse = true;
- }
- else
throw HigherFuseVersionRequired (SRC_POS);
+ }
+ }
+ // look for OSXFuse dynamic library
+ struct stat sb;
+ if (0 != stat("/usr/local/lib/libosxfuse_i64.2.dylib", &sb))
+ {
+ throw HigherFuseVersionRequired (SRC_POS);
}
vector <string> fuseVersion = StringConverter::Split (string (fuseVersionString), ".");
@@ -149,12 +142,7 @@ namespace VeraCrypt
uint32 fuseVersionMajor = StringConverter::ToUInt32 (fuseVersion[0]);
uint32 fuseVersionMinor = StringConverter::ToUInt32 (fuseVersion[1]);
- if (bIsOSXFuse)
- {
- if (fuseVersionMajor < 2 || (fuseVersionMajor == 2 && fuseVersionMinor < 5))
- throw HigherFuseVersionRequired (SRC_POS);
- }
- else if (fuseVersionMajor < 1 || (fuseVersionMajor == 1 && fuseVersionMinor < 3))
+ if (fuseVersionMajor < 2 || (fuseVersionMajor == 2 && fuseVersionMinor < 5))
throw HigherFuseVersionRequired (SRC_POS);
// Mount volume image