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
@@ -540,8 +540,11 @@ namespace VeraCrypt
#ifdef TC_MACOSX
EX2MSG (HigherFuseVersionRequired, LangString["LINUX_EX2MSG_HIGHERFUSEVERSIONREQUIRED"]);
#endif
+ EX2MSG (MountPointBlocked, LangString["MOUNTPOINT_BLOCKED"]);
+ EX2MSG (MountPointNotAllowed, LangString["MOUNTPOINT_NOTALLOWED"]);
+
#undef EX2MSG
return L"";
}
@@ -559,8 +562,9 @@ namespace VeraCrypt
CmdLine.reset (new CommandLineInterface (argc, argv, InterfaceType));
SetPreferences (CmdLine->Preferences);
Core->SetApplicationExecutablePath (Application::GetExecutablePath());
+ Core->SetUserEnvPATH (getenv ("PATH"));
if (!Preferences.NonInteractive)
{
Core->SetAdminPasswordCallback (GetAdminPasswordRequestHandler());
@@ -571,8 +575,12 @@ 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));
if (!CmdLine->Preferences.SecurityTokenModule.IsEmpty() && !SecurityToken::IsInitialized())
@@ -1645,8 +1653,15 @@ 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)
{
@@ -1733,7 +1748,10 @@ const FileManager fileManagers[] = {
VC_CONVERT_EXCEPTION (InvalidEMVPath);
VC_CONVERT_EXCEPTION (EMVKeyfileDataNotFound);
VC_CONVERT_EXCEPTION (EMVPANNotFound);
+ VC_CONVERT_EXCEPTION (MountPointBlocked);
+ VC_CONVERT_EXCEPTION (MountPointNotAllowed);
+
throw *ex;
}
}