diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2016-09-29 15:41:19 +0200 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2016-10-17 18:40:21 +0200 |
commit | 7d6347f468050309d8b85089c13dd6d008297801 (patch) | |
tree | 1b723c1396258dfae3ab7bcb1e9f87141e739b79 /src/Core/Unix | |
parent | e362d804b0a9e92b36f3e2d28d08bbbc387ac9a2 (diff) | |
download | VeraCrypt-7d6347f468050309d8b85089c13dd6d008297801.tar.gz VeraCrypt-7d6347f468050309d8b85089c13dd6d008297801.zip |
MacOSX: remove MacFUSE dependency and link against OSXFuse library. Now, only standard OSXFuse install is needed without MacFUSE compatibility option.
Diffstat (limited to 'src/Core/Unix')
-rw-r--r-- | src/Core/Unix/MacOSX/CoreMacOSX.cpp | 32 |
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 |