mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2026-10-05 16:46:35 -05:00
Linux: fall back to FUSE when dmsetup is not installed (#1898)
Without dmsetup, MountVolumeNative fails with "dmsetup not found in system directories" instead of using the FUSE path, so on systems that do not ship device-mapper tools (for example OpenWrt) every mount and the filesystem formatting step of --create need an explicit --mount-options=nokernelcrypto. Treat a missing dmsetup like the other cases where kernel crypto cannot be used. Signed-off-by: Ville Takio <ville+git@takio.fi>
This commit is contained in:
1 parent
5c7f60dfcf
commit
d24b82102a
1 file changed
+6
@@ -502,6 +502,12 @@ namespace VeraCrypt
|
||||
if (!SystemInfo::IsVersionAtLeast (2, 6, xts ? 24 : 20))
|
||||
throw NotApplicable (SRC_POS);
|
||||
|
||||
// Without dmsetup, kernel crypto cannot be used: fall back to FUSE
|
||||
// instead of failing, as when nokernelcrypto was given.
|
||||
string dmsetupError;
|
||||
if (Process::FindSystemBinary ("dmsetup", dmsetupError).empty())
|
||||
throw NotApplicable (SRC_POS);
|
||||
|
||||
// Load device mapper kernel module
|
||||
list <string> execArgs;
|
||||
foreach (const string &dmModule, StringConverter::Split ("dm_mod dm-mod dm"))
|
||||
|
||||
Reference in new issue
Block a user