VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Core/Unix
diff options
context:
space:
mode:
Diffstat (limited to 'src/Core/Unix')
-rw-r--r--src/Core/Unix/CoreService.cpp97
-rw-r--r--src/Core/Unix/CoreService.h2
-rw-r--r--src/Core/Unix/CoreServiceProxy.h2
-rw-r--r--src/Core/Unix/CoreServiceRequest.cpp8
-rw-r--r--src/Core/Unix/CoreServiceRequest.h7
-rw-r--r--src/Core/Unix/CoreServiceResponse.cpp2
-rw-r--r--src/Core/Unix/CoreServiceResponse.h2
-rw-r--r--src/Core/Unix/CoreUnix.cpp237
-rw-r--r--src/Core/Unix/CoreUnix.h4
-rw-r--r--src/Core/Unix/FreeBSD/CoreFreeBSD.cpp6
-rw-r--r--src/Core/Unix/FreeBSD/CoreFreeBSD.h2
-rw-r--r--src/Core/Unix/FreeBSD/System.h2
-rw-r--r--src/Core/Unix/Linux/CoreLinux.cpp2
-rw-r--r--src/Core/Unix/Linux/CoreLinux.h2
-rw-r--r--src/Core/Unix/Linux/System.h2
-rw-r--r--src/Core/Unix/MacOSX/CoreMacOSX.cpp12
-rw-r--r--src/Core/Unix/MacOSX/CoreMacOSX.h2
-rw-r--r--src/Core/Unix/MacOSX/System.h2
-rw-r--r--src/Core/Unix/MountedFilesystem.h2
-rw-r--r--src/Core/Unix/OpenBSD/CoreOpenBSD.cpp6
-rw-r--r--src/Core/Unix/OpenBSD/CoreOpenBSD.h2
-rw-r--r--src/Core/Unix/OpenBSD/System.h2
-rw-r--r--src/Core/Unix/Solaris/CoreSolaris.cpp6
-rw-r--r--src/Core/Unix/Solaris/CoreSolaris.h2
-rw-r--r--src/Core/Unix/Solaris/System.h2
-rw-r--r--src/Core/Unix/System.h2
26 files changed, 294 insertions, 123 deletions
diff --git a/src/Core/Unix/CoreService.cpp b/src/Core/Unix/CoreService.cpp
index 6d0f05e5..dc2f4e6b 100644
--- a/src/Core/Unix/CoreService.cpp
+++ b/src/Core/Unix/CoreService.cpp
@@ -6,3 +6,3 @@
Modifications and additions to the original source code (contained in this file)
- and all other portions of this file are Copyright (c) 2013-2017 IDRIX
+ and all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
@@ -101,2 +101,7 @@ namespace VeraCrypt
+ // Update Core properties based on the received request
+ Core->SetUserEnvPATH (request->UserEnvPATH);
+ Core->ForceUseDummySudoPassword(request->UseDummySudoPassword);
+ Core->SetAllowInsecureMount(request->AllowInsecureMount);
+
try
@@ -285,2 +290,8 @@ namespace VeraCrypt
+ // Copy Core properties to the request so that they can be transferred to the elevated process
+ request.ApplicationExecutablePath = Core->GetApplicationExecutablePath();
+ request.UserEnvPATH = Core->GetUserEnvPATH();
+ request.UseDummySudoPassword = Core->GetUseDummySudoPassword();
+ request.AllowInsecureMount = Core->GetAllowInsecureMount();
+
if (request.RequiresElevation())
@@ -289,4 +300,3 @@ namespace VeraCrypt
request.FastElevation = !ElevatedServiceAvailable;
- request.ApplicationExecutablePath = Core->GetApplicationExecutablePath();
-
+
while (!ElevatedServiceAvailable)
@@ -294,37 +304,34 @@ namespace VeraCrypt
// Test if the user has an active "sudo" session.
- // This is only done under Linux / FreeBSD by executing the command 'sudo -n uptime'.
- // In case a "sudo" session is active, the result of the command contains the string 'load average'.
- // Otherwise, the result contains "sudo: a password is required".
- // This may not work on all OSX versions because of a bug in sudo in its version 1.7.10,
- // therefore we keep the old behaviour of sending a 'dummy' password under OSX.
- // See : https://superuser.com/questions/902826/why-does-sudo-n-on-mac-os-x-always-return-0
- //
- // If for some reason we are getting empty output from pipe, we revert to old behavior
- // We also use the old way if the user is forcing the use of dummy password for sudo
-
-#if defined(TC_LINUX ) || defined (TC_FREEBSD)
bool authCheckDone = false;
if (!Core->GetUseDummySudoPassword ())
- {
- std::vector<char> buffer(128, 0);
- std::string result;
-
- FILE* pipe = popen("sudo -n uptime 2>&1 | grep 'load average' | wc -l | tr -d '[:blank:]'", "r"); // We redirect stderr to stdout (2>&1) to be able to catch the result of the command
+ {
+ // We are using -n to avoid prompting the user for a password.
+ // We are redirecting stderr to stdout and discarding both to avoid any output.
+ // This approach also works on newer macOS versions (12.0 and later).
+ std::string errorMsg;
+
+ string sudoAbsolutePath = Process::FindSystemBinary("sudo", errorMsg);
+ if (sudoAbsolutePath.empty())
+ throw SystemException(SRC_POS, errorMsg);
+
+ std::string popenCommand = sudoAbsolutePath + " -n true > /dev/null 2>&1"; // We redirect stderr to stdout (2>&1) to be able to catch the result of the command
+ FILE* pipe = popen(popenCommand.c_str(), "r");
if (pipe)
{
- while (!feof(pipe))
- {
- if (fgets(buffer.data(), 128, pipe) != nullptr)
- result += buffer.data();
- }
-
- fflush(pipe);
- pclose(pipe);
+ // We only care about the exit code
+ char buf[128];
+ while (!feof(pipe))
+ {
+ if (fgets(buf, sizeof(buf), pipe) == NULL)
+ break;
+ }
+ int status = pclose(pipe);
pipe = NULL;
- if (!result.empty() && strlen(result.c_str()) != 0)
- {
- authCheckDone = true;
- if (result[0] == '0') // no line found with "load average" text, rerquest admin password
- (*AdminPasswordCallback) (request.AdminPassword);
+ authCheckDone = true;
+
+ // If exit code != 0, user does NOT have an active session => request password
+ if (status != 0)
+ {
+ (*AdminPasswordCallback)(request.AdminPassword);
}
@@ -338,3 +345,3 @@ namespace VeraCrypt
}
-#endif
+
try
@@ -355,5 +362,4 @@ namespace VeraCrypt
request.FastElevation = false;
-#if defined(TC_LINUX ) || defined (TC_FREEBSD)
+
if(!authCheckDone)
-#endif
(*AdminPasswordCallback) (request.AdminPassword);
@@ -407,2 +413,17 @@ namespace VeraCrypt
{
+ // Throw exception if sudo is not found in secure locations
+ std::string errorMsg;
+ string sudoPath = Process::FindSystemBinary("sudo", errorMsg);
+ if (sudoPath.empty())
+ throw SystemException(SRC_POS, errorMsg);
+
+ string appPath = request.ApplicationExecutablePath;
+ // if appPath is empty or not absolute, use FindSystemBinary to get the full path of veracrpyt executable
+ if (appPath.empty() || appPath[0] != '/')
+ {
+ appPath = Process::FindSystemBinary("veracrypt", errorMsg);
+ if (appPath.empty())
+ throw SystemException(SRC_POS, errorMsg);
+ }
+
throw_sys_if (dup2 (inPipe->GetReadFD(), STDIN_FILENO) == -1);
@@ -411,7 +432,3 @@ namespace VeraCrypt
- string appPath = request.ApplicationExecutablePath;
- if (appPath.empty())
- appPath = "veracrypt";
-
- const char *args[] = { "sudo", "-S", "-p", "", appPath.c_str(), TC_CORE_SERVICE_CMDLINE_OPTION, nullptr };
+ const char *args[] = { sudoPath.c_str(), "-S", "-p", "", appPath.c_str(), TC_CORE_SERVICE_CMDLINE_OPTION, nullptr };
execvp (args[0], ((char* const*) args));
diff --git a/src/Core/Unix/CoreService.h b/src/Core/Unix/CoreService.h
index dfb8b350..5c43f0ed 100644
--- a/src/Core/Unix/CoreService.h
+++ b/src/Core/Unix/CoreService.h
@@ -6,3 +6,3 @@
Modifications and additions to the original source code (contained in this file)
- and all other portions of this file are Copyright (c) 2013-2017 IDRIX
+ and all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
diff --git a/src/Core/Unix/CoreServiceProxy.h b/src/Core/Unix/CoreServiceProxy.h
index d57d8163..896df3e6 100644
--- a/src/Core/Unix/CoreServiceProxy.h
+++ b/src/Core/Unix/CoreServiceProxy.h
@@ -6,3 +6,3 @@
Modifications and additions to the original source code (contained in this file)
- and all other portions of this file are Copyright (c) 2013-2017 IDRIX
+ and all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
diff --git a/src/Core/Unix/CoreServiceRequest.cpp b/src/Core/Unix/CoreServiceRequest.cpp
index 98101ba4..14e2ec28 100644
--- a/src/Core/Unix/CoreServiceRequest.cpp
+++ b/src/Core/Unix/CoreServiceRequest.cpp
@@ -6,3 +6,3 @@
Modifications and additions to the original source code (contained in this file)
- and all other portions of this file are Copyright (c) 2013-2017 IDRIX
+ and all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
@@ -25,2 +25,5 @@ namespace VeraCrypt
sr.Deserialize ("FastElevation", FastElevation);
+ sr.Deserialize ("UserEnvPATH", UserEnvPATH);
+ sr.Deserialize ("UseDummySudoPassword", UseDummySudoPassword);
+ sr.Deserialize ("AllowInsecureMount", AllowInsecureMount);
}
@@ -35,2 +38,5 @@ namespace VeraCrypt
sr.Serialize ("FastElevation", FastElevation);
+ sr.Serialize ("UserEnvPATH", UserEnvPATH);
+ sr.Serialize ("UseDummySudoPassword", UseDummySudoPassword);
+ sr.Serialize ("AllowInsecureMount", AllowInsecureMount);
}
diff --git a/src/Core/Unix/CoreServiceRequest.h b/src/Core/Unix/CoreServiceRequest.h
index 5b12cc11..77778ca2 100644
--- a/src/Core/Unix/CoreServiceRequest.h
+++ b/src/Core/Unix/CoreServiceRequest.h
@@ -6,3 +6,3 @@
Modifications and additions to the original source code (contained in this file)
- and all other portions of this file are Copyright (c) 2013-2017 IDRIX
+ and all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
@@ -22,3 +22,3 @@ namespace VeraCrypt
{
- CoreServiceRequest () : ElevateUserPrivileges (false), FastElevation (false) { }
+ CoreServiceRequest () : ElevateUserPrivileges (false), FastElevation (false), UseDummySudoPassword (false), AllowInsecureMount (false) { }
TC_SERIALIZABLE (CoreServiceRequest);
@@ -31,2 +31,5 @@ namespace VeraCrypt
bool FastElevation;
+ string UserEnvPATH;
+ bool UseDummySudoPassword;
+ bool AllowInsecureMount;
};
diff --git a/src/Core/Unix/CoreServiceResponse.cpp b/src/Core/Unix/CoreServiceResponse.cpp
index b53b8a30..1eb0af3f 100644
--- a/src/Core/Unix/CoreServiceResponse.cpp
+++ b/src/Core/Unix/CoreServiceResponse.cpp
@@ -6,3 +6,3 @@
Modifications and additions to the original source code (contained in this file)
- and all other portions of this file are Copyright (c) 2013-2017 IDRIX
+ and all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
diff --git a/src/Core/Unix/CoreServiceResponse.h b/src/Core/Unix/CoreServiceResponse.h
index 1f4c675e..91a2483b 100644
--- a/src/Core/Unix/CoreServiceResponse.h
+++ b/src/Core/Unix/CoreServiceResponse.h
@@ -6,3 +6,3 @@
Modifications and additions to the original source code (contained in this file)
- and all other portions of this file are Copyright (c) 2013-2017 IDRIX
+ and all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
diff --git a/src/Core/Unix/CoreUnix.cpp b/src/Core/Unix/CoreUnix.cpp
index 1868eb6d..1f2d3125 100644
--- a/src/Core/Unix/CoreUnix.cpp
+++ b/src/Core/Unix/CoreUnix.cpp
@@ -6,3 +6,3 @@
Modifications and additions to the original source code (contained in this file)
- and all other portions of this file are Copyright (c) 2013-2017 IDRIX
+ and all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
@@ -31,2 +31,37 @@ namespace VeraCrypt
+ // Struct to hold terminal emulator information
+ struct TerminalInfo {
+ const char* name;
+ const char** args;
+ const char** dependency_path;
+ };
+
+ // Popular terminal emulators data and arguments
+ static const char* xterm_args[] = {"-T", "fsck", "-e", NULL};
+
+ static const char* gnome_args[] = {"--title", "fsck", "--", "sh", "-c", NULL};
+ static const char* gnome_deps[] = {"dbus-launch", NULL};
+
+ static const char* konsole_args[] = {"--hold", "-p", "tabtitle=fsck", "-e", "sh", "-c", NULL};
+ static const char* xfce4_args[] = {"--title=fsck", "-x", "sh", "-c", NULL};
+ static const char* mate_args[] = {"--title", "fsck", "--", "sh", "-c", NULL};
+ static const char* lxterminal_args[] = {"--title=fsck", "-e", "sh", "-c", NULL};
+ static const char* terminator_args[] = {"-T", "fsck", "-x", "sh", "-c", NULL};
+ static const char* urxvt_args[] = {"-title", "fsck", "-e", "sh", "-c", NULL};
+ static const char* st_args[] = {"-t", "fsck", "-e", "sh", "-c", NULL};
+
+ // List of popular terminal emulators
+ static const TerminalInfo TERMINALS[] = {
+ {"xterm", xterm_args, NULL},
+ {"gnome-terminal", gnome_args, gnome_deps},
+ {"konsole", konsole_args, NULL},
+ {"xfce4-terminal", xfce4_args, NULL},
+ {"mate-terminal", mate_args, NULL},
+ {"lxterminal", lxterminal_args, NULL},
+ {"terminator", terminator_args, NULL},
+ {"urxvt", urxvt_args, NULL},
+ {"st", st_args, NULL},
+ {NULL, NULL, NULL}
+ };
+
CoreUnix::CoreUnix ()
@@ -49,10 +84,12 @@ namespace VeraCrypt
- list <string> args;
-
- args.push_back ("-T");
- args.push_back ("fsck");
+ // Find system fsck first
+ std::string errorMsg;
+ std::string fsckPath = Process::FindSystemBinary("fsck", errorMsg);
+ if (fsckPath.empty()) {
+ throw SystemException(SRC_POS, errorMsg);
+ }
- args.push_back ("-e");
+ list <string> args;
- string xargs = "fsck ";
+ string xargs = fsckPath + " "; // Use absolute fsck path
@@ -66,45 +103,44 @@ namespace VeraCrypt
xargs += string (mountedVolume->VirtualDevice) + "; echo '[Done]'; read W";
- args.push_back (xargs);
+ // Try each terminal
+ for (const TerminalInfo* term = TERMINALS; term->name != NULL; ++term) {
+ errno = 0;
+ std::string termPath = Process::FindSystemBinary(term->name, errorMsg);
+ if (termPath.length() > 0) {
+ // check dependencies
+ if (term->dependency_path) {
+ bool depFound = true;
+ for (const char** dep = term->dependency_path; *dep != NULL; ++dep) {
+ string depPath = Process::FindSystemBinary(*dep, errorMsg);
+ if (depPath.empty()) {
+ depFound = false;
+ break;
+ }
+ }
- try
- {
- Process::Execute ("xterm", args, 1000);
- } catch (TimeOut&) { }
-#ifdef TC_LINUX
- catch (SystemException&)
- {
- // xterm not available. Try with KDE konsole if it exists
- struct stat sb;
- if (stat("/usr/bin/konsole", &sb) == 0)
- {
- args.clear ();
- args.push_back ("-p");
- args.push_back ("tabtitle=fsck");
- args.push_back ("-e");
- args.push_back ("sh");
- args.push_back ("-c");
- args.push_back (xargs);
- try
- {
- Process::Execute ("konsole", args, 1000);
- } catch (TimeOut&) { }
- }
- else if (stat("/usr/bin/gnome-terminal", &sb) == 0 && stat("/usr/bin/dbus-launch", &sb) == 0)
- {
- args.clear ();
- args.push_back ("--title");
- args.push_back ("fsck");
- args.push_back ("--");
- args.push_back ("sh");
- args.push_back ("-c");
- args.push_back (xargs);
- try
- {
- Process::Execute ("gnome-terminal", args, 1000);
- } catch (TimeOut&) { }
+ if (!depFound) {
+ continue; // dependency not found, skip
+ }
+ }
+
+ // Build args
+ std::list<std::string> args;
+ for (const char** arg = term->args; *arg != NULL; ++arg) {
+ args.push_back(*arg);
+ }
+ args.push_back(xargs);
+
+ try {
+ Process::Execute (termPath, args, 1000);
+ return;
+ }
+ catch (TimeOut&) {
+ return;
+ }
+ catch (SystemException&) {
+ // Continue to next terminal
+ }
}
- else
- throw TerminalNotFound();
}
-#endif
+
+ throw TerminalNotFound();
}
@@ -562,2 +598,13 @@ namespace VeraCrypt
+ if (options.MountPoint && !options.MountPoint->IsEmpty())
+ {
+ // Reject if the mount point is a system directory
+ if (IsProtectedSystemDirectory(*options.MountPoint))
+ throw MountPointBlocked (SRC_POS);
+
+ // Reject if the mount point is in the user's PATH and the user has not explicitly allowed insecure mount points
+ if (!GetAllowInsecureMount() && IsDirectoryOnUserPath(*options.MountPoint))
+ throw MountPointNotAllowed (SRC_POS);
+ }
+
Cipher::EnableHwSupport (!options.NoHardwareCrypto);
@@ -794,2 +841,98 @@ namespace VeraCrypt
}
+
+ bool CoreUnix::IsProtectedSystemDirectory (const DirectoryPath &directory) const
+ {
+ static const char* systemDirs[] = {
+ "/usr",
+ "/bin",
+ "/sbin",
+ "/lib",
+#ifdef TC_LINUX
+ "/lib32",
+ "/lib64",
+ "/libx32",
+#endif
+ "/etc",
+ "/boot",
+ "/root",
+ "/proc",
+ "/sys",
+ "/dev",
+ NULL
+ };
+
+ // Resolve any symlinks in the path
+ string path(directory);
+ char* resolvedPathCStr = realpath(path.c_str(), NULL);
+ if (resolvedPathCStr)
+ {
+ path = resolvedPathCStr;
+ free(resolvedPathCStr); // Free the allocated memory
+ }
+
+ // reject of the path is the root directory "/"
+ if (path == "/")
+ return true;
+
+ // Check if resolved path matches any system directory
+ for (int i = 0; systemDirs[i] != NULL; ++i)
+ {
+ if (path == systemDirs[i] || path.find(string(systemDirs[i]) + "/") == 0)
+ return true;
+ }
+
+ return false;
+ }
+
+ bool CoreUnix::IsDirectoryOnUserPath(const DirectoryPath &directory) const
+ {
+ // Obtain the PATH environment variable
+ const char* pathEnv = UserEnvPATH.c_str();
+ if (!pathEnv[0])
+ return false;
+
+ // Resolve the given directory
+ string dirPath(directory);
+ char* resolvedDir = realpath(dirPath.c_str(), NULL);
+ if (resolvedDir)
+ {
+ dirPath = resolvedDir;
+ free(resolvedDir);
+ }
+
+ // Split PATH and compare each entry
+ stringstream ss(pathEnv);
+ string token;
+ while (getline(ss, token, ':'))
+ {
+ // remove any trailing slashes from the token
+ while (!token.empty() && token.back() == '/')
+ token.pop_back();
+
+ if (token.empty())
+ continue;
+
+ // check if the directory is the same as the entry or a subdirectory
+ if (dirPath == token || dirPath.find(token + "/") == 0)
+ return true;
+
+ // handle the case where the PATH entry is a symlink
+ char* resolvedEntry = realpath(token.c_str(), NULL);
+ if (!resolvedEntry)
+ continue; // skip to the next entry since the path does not exist
+
+ string entryPath(resolvedEntry);
+ free(resolvedEntry);
+
+ // remove any trailing slashes from the token
+ while (!entryPath.empty() && entryPath.back() == '/')
+ entryPath.pop_back();
+
+ // perform check again if the resolved path is different from the original (symlink)
+ if (dirPath == entryPath || dirPath.find(entryPath + "/") == 0)
+ return true;
+ }
+
+ return false;
+ }
}
diff --git a/src/Core/Unix/CoreUnix.h b/src/Core/Unix/CoreUnix.h
index 586d4df3..ae26bf0a 100644
--- a/src/Core/Unix/CoreUnix.h
+++ b/src/Core/Unix/CoreUnix.h
@@ -6,3 +6,3 @@
Modifications and additions to the original source code (contained in this file)
- and all other portions of this file are Copyright (c) 2013-2017 IDRIX
+ and all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
@@ -50,2 +50,4 @@ namespace VeraCrypt
virtual void WipePasswordCache () const { throw NotApplicable (SRC_POS); }
+ virtual bool IsProtectedSystemDirectory (const DirectoryPath &directory) const;
+ virtual bool IsDirectoryOnUserPath(const DirectoryPath &directory) const;
diff --git a/src/Core/Unix/FreeBSD/CoreFreeBSD.cpp b/src/Core/Unix/FreeBSD/CoreFreeBSD.cpp
index 05520274..8f5b8048 100644
--- a/src/Core/Unix/FreeBSD/CoreFreeBSD.cpp
+++ b/src/Core/Unix/FreeBSD/CoreFreeBSD.cpp
@@ -6,3 +6,3 @@
Modifications and additions to the original source code (contained in this file)
- and all other portions of this file are Copyright (c) 2013-2017 IDRIX
+ and all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
@@ -48,3 +48,3 @@ namespace VeraCrypt
- string dev = StringConverter::Trim (Process::Execute ("mdconfig", args));
+ string dev = StringConverter::Trim (Process::Execute ("/sbin/mdconfig", args));
@@ -67,3 +67,3 @@ namespace VeraCrypt
{
- Process::Execute ("mdconfig", args);
+ Process::Execute ("/sbin/mdconfig", args);
break;
diff --git a/src/Core/Unix/FreeBSD/CoreFreeBSD.h b/src/Core/Unix/FreeBSD/CoreFreeBSD.h
index 453f6440..5510aa2c 100644
--- a/src/Core/Unix/FreeBSD/CoreFreeBSD.h
+++ b/src/Core/Unix/FreeBSD/CoreFreeBSD.h
@@ -6,3 +6,3 @@
Modifications and additions to the original source code (contained in this file)
- and all other portions of this file are Copyright (c) 2013-2017 IDRIX
+ and all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
diff --git a/src/Core/Unix/FreeBSD/System.h b/src/Core/Unix/FreeBSD/System.h
index b5e28f31..63f68aae 100644
--- a/src/Core/Unix/FreeBSD/System.h
+++ b/src/Core/Unix/FreeBSD/System.h
@@ -6,3 +6,3 @@
Modifications and additions to the original source code (contained in this file)
- and all other portions of this file are Copyright (c) 2013-2017 IDRIX
+ and all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
diff --git a/src/Core/Unix/Linux/CoreLinux.cpp b/src/Core/Unix/Linux/CoreLinux.cpp
index cd4be80f..77ec874a 100644
--- a/src/Core/Unix/Linux/CoreLinux.cpp
+++ b/src/Core/Unix/Linux/CoreLinux.cpp
@@ -6,3 +6,3 @@
Modifications and additions to the original source code (contained in this file)
- and all other portions of this file are Copyright (c) 2013-2017 IDRIX
+ and all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
diff --git a/src/Core/Unix/Linux/CoreLinux.h b/src/Core/Unix/Linux/CoreLinux.h
index 9af801ec..b851fc27 100644
--- a/src/Core/Unix/Linux/CoreLinux.h
+++ b/src/Core/Unix/Linux/CoreLinux.h
@@ -6,3 +6,3 @@
Modifications and additions to the original source code (contained in this file)
- and all other portions of this file are Copyright (c) 2013-2017 IDRIX
+ and all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
diff --git a/src/Core/Unix/Linux/System.h b/src/Core/Unix/Linux/System.h
index 0ec1daf0..c98bfd0a 100644
--- a/src/Core/Unix/Linux/System.h
+++ b/src/Core/Unix/Linux/System.h
@@ -6,3 +6,3 @@
Modifications and additions to the original source code (contained in this file)
- and all other portions of this file are Copyright (c) 2013-2017 IDRIX
+ and all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
diff --git a/src/Core/Unix/MacOSX/CoreMacOSX.cpp b/src/Core/Unix/MacOSX/CoreMacOSX.cpp
index cfd34072..df8a40e2 100644
--- a/src/Core/Unix/MacOSX/CoreMacOSX.cpp
+++ b/src/Core/Unix/MacOSX/CoreMacOSX.cpp
@@ -6,3 +6,3 @@
Modifications and additions to the original source code (contained in this file)
- and all other portions of this file are Copyright (c) 2013-2017 IDRIX
+ and all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
@@ -49,3 +49,3 @@ namespace VeraCrypt
{
- Process::Execute ("hdiutil", args);
+ Process::Execute ("/usr/bin/hdiutil", args);
}
@@ -86,3 +86,3 @@ namespace VeraCrypt
{
- Process::Execute ("umount", args);
+ Process::Execute ("/sbin/umount", args);
break;
@@ -116,3 +116,3 @@ namespace VeraCrypt
- Process::Execute ("open", args);
+ Process::Execute ("/usr/bin/open", args);
}
@@ -192,3 +192,3 @@ namespace VeraCrypt
{
- xml = Process::Execute ("hdiutil", args);
+ xml = Process::Execute ("/usr/bin/hdiutil", args);
break;
@@ -235,3 +235,3 @@ namespace VeraCrypt
- Process::Execute ("hdiutil", args);
+ Process::Execute ("/usr/bin/hdiutil", args);
}
diff --git a/src/Core/Unix/MacOSX/CoreMacOSX.h b/src/Core/Unix/MacOSX/CoreMacOSX.h
index d2c70a87..da905708 100644
--- a/src/Core/Unix/MacOSX/CoreMacOSX.h
+++ b/src/Core/Unix/MacOSX/CoreMacOSX.h
@@ -6,3 +6,3 @@
Modifications and additions to the original source code (contained in this file)
- and all other portions of this file are Copyright (c) 2013-2017 IDRIX
+ and all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
diff --git a/src/Core/Unix/MacOSX/System.h b/src/Core/Unix/MacOSX/System.h
index d187877f..af286829 100644
--- a/src/Core/Unix/MacOSX/System.h
+++ b/src/Core/Unix/MacOSX/System.h
@@ -6,3 +6,3 @@
Modifications and additions to the original source code (contained in this file)
- and all other portions of this file are Copyright (c) 2013-2017 IDRIX
+ and all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
diff --git a/src/Core/Unix/MountedFilesystem.h b/src/Core/Unix/MountedFilesystem.h
index 3f6bd3e2..de9bc138 100644
--- a/src/Core/Unix/MountedFilesystem.h
+++ b/src/Core/Unix/MountedFilesystem.h
@@ -6,3 +6,3 @@
Modifications and additions to the original source code (contained in this file)
- and all other portions of this file are Copyright (c) 2013-2017 IDRIX
+ and all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
diff --git a/src/Core/Unix/OpenBSD/CoreOpenBSD.cpp b/src/Core/Unix/OpenBSD/CoreOpenBSD.cpp
index 3064103b..161d4a79 100644
--- a/src/Core/Unix/OpenBSD/CoreOpenBSD.cpp
+++ b/src/Core/Unix/OpenBSD/CoreOpenBSD.cpp
@@ -9,3 +9,3 @@
Modifications and additions to the original source code (contained in this file)
- and all other portions of this file are Copyright (c) 2013-2017 IDRIX
+ and all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
@@ -77,3 +77,3 @@ namespace VeraCrypt
- Process::Execute ("vnconfig", args);
+ Process::Execute ("/sbin/vnconfig", args);
@@ -92,3 +92,3 @@ namespace VeraCrypt
{
- Process::Execute ("vnconfig", args);
+ Process::Execute ("/sbin/vnconfig", args);
break;
diff --git a/src/Core/Unix/OpenBSD/CoreOpenBSD.h b/src/Core/Unix/OpenBSD/CoreOpenBSD.h
index 3f6c48b5..32129534 100644
--- a/src/Core/Unix/OpenBSD/CoreOpenBSD.h
+++ b/src/Core/Unix/OpenBSD/CoreOpenBSD.h
@@ -9,3 +9,3 @@
Modifications and additions to the original source code (contained in this file)
- and all other portions of this file are Copyright (c) 2013-2017 IDRIX
+ and all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
diff --git a/src/Core/Unix/OpenBSD/System.h b/src/Core/Unix/OpenBSD/System.h
index 90b24b2a..9c155a40 100644
--- a/src/Core/Unix/OpenBSD/System.h
+++ b/src/Core/Unix/OpenBSD/System.h
@@ -9,3 +9,3 @@
Modifications and additions to the original source code (contained in this file)
- and all other portions of this file are Copyright (c) 2013-2017 IDRIX
+ and all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
diff --git a/src/Core/Unix/Solaris/CoreSolaris.cpp b/src/Core/Unix/Solaris/CoreSolaris.cpp
index 15a79c49..c436be8f 100644
--- a/src/Core/Unix/Solaris/CoreSolaris.cpp
+++ b/src/Core/Unix/Solaris/CoreSolaris.cpp
@@ -6,3 +6,3 @@
Modifications and additions to the original source code (contained in this file)
- and all other portions of this file are Copyright (c) 2013-2017 IDRIX
+ and all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
@@ -37,3 +37,3 @@ namespace VeraCrypt
- return StringConverter::Trim (Process::Execute ("lofiadm", args));
+ return StringConverter::Trim (Process::Execute ("/usr/sbin/lofiadm", args));
}
@@ -50,3 +50,3 @@ namespace VeraCrypt
{
- Process::Execute ("lofiadm", args);
+ Process::Execute ("/usr/sbin/lofiadm", args);
break;
diff --git a/src/Core/Unix/Solaris/CoreSolaris.h b/src/Core/Unix/Solaris/CoreSolaris.h
index d36f03f9..6a55583a 100644
--- a/src/Core/Unix/Solaris/CoreSolaris.h
+++ b/src/Core/Unix/Solaris/CoreSolaris.h
@@ -6,3 +6,3 @@
Modifications and additions to the original source code (contained in this file)
- and all other portions of this file are Copyright (c) 2013-2017 IDRIX
+ and all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
diff --git a/src/Core/Unix/Solaris/System.h b/src/Core/Unix/Solaris/System.h
index 73513467..7ee71da4 100644
--- a/src/Core/Unix/Solaris/System.h
+++ b/src/Core/Unix/Solaris/System.h
@@ -6,3 +6,3 @@
Modifications and additions to the original source code (contained in this file)
- and all other portions of this file are Copyright (c) 2013-2017 IDRIX
+ and all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
diff --git a/src/Core/Unix/System.h b/src/Core/Unix/System.h
index 7225dae2..b6a6f092 100644
--- a/src/Core/Unix/System.h
+++ b/src/Core/Unix/System.h
@@ -6,3 +6,3 @@
Modifications and additions to the original source code (contained in this file)
- and all other portions of this file are Copyright (c) 2013-2017 IDRIX
+ and all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is