VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Main/UserInterface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Main/UserInterface.cpp')
-rw-r--r--src/Main/UserInterface.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/Main/UserInterface.cpp b/src/Main/UserInterface.cpp
index 5798cb31..8da77f5b 100644
--- a/src/Main/UserInterface.cpp
+++ b/src/Main/UserInterface.cpp
@@ -541,6 +541,9 @@ namespace VeraCrypt
EX2MSG (HigherFuseVersionRequired, LangString["LINUX_EX2MSG_HIGHERFUSEVERSIONREQUIRED"]);
#endif
+ EX2MSG (MountPointBlocked, LangString["MOUNTPOINT_BLOCKED"]);
+ EX2MSG (MountPointNotAllowed, LangString["MOUNTPOINT_NOTALLOWED"]);
+
#undef EX2MSG
return L"";
}
@@ -560,6 +563,7 @@ namespace VeraCrypt
SetPreferences (CmdLine->Preferences);
Core->SetApplicationExecutablePath (Application::GetExecutablePath());
+ Core->SetUserEnvPATH (getenv ("PATH"));
if (!Preferences.NonInteractive)
{
@@ -572,6 +576,10 @@ namespace VeraCrypt
Core->ForceUseDummySudoPassword (CmdLine->ArgUseDummySudoPassword);
+#if defined(TC_UNIX)
+ Core->SetAllowInsecureMount (CmdLine->ArgAllowInsecureMount);
+#endif
+
Core->WarningEvent.Connect (EventConnector <UserInterface> (this, &UserInterface::OnWarning));
Core->VolumeMountedEvent.Connect (EventConnector <UserInterface> (this, &UserInterface::OnVolumeMounted));
@@ -1646,6 +1654,13 @@ const FileManager fileManagers[] = {
return sResult;
}
+#ifdef TC_UNIX
+ bool UserInterface::InsecureMountAllowed () const
+ {
+ return CmdLine->ArgAllowInsecureMount;
+ }
+#endif
+
#define VC_CONVERT_EXCEPTION(NAME) if (dynamic_cast<NAME*> (ex)) throw (NAME&) *ex;
void UserInterface::ThrowException (Exception* ex)
@@ -1734,6 +1749,9 @@ const FileManager fileManagers[] = {
VC_CONVERT_EXCEPTION (EMVKeyfileDataNotFound);
VC_CONVERT_EXCEPTION (EMVPANNotFound);
+ VC_CONVERT_EXCEPTION (MountPointBlocked);
+ VC_CONVERT_EXCEPTION (MountPointNotAllowed);
+
throw *ex;
}
}