diff options
Diffstat (limited to 'src/Platform')
61 files changed, 128 insertions, 63 deletions
diff --git a/src/Platform/Buffer.cpp b/src/Platform/Buffer.cpp index 5829b1d9..412f06a5 100644 --- a/src/Platform/Buffer.cpp +++ b/src/Platform/Buffer.cpp @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/Buffer.h b/src/Platform/Buffer.h index a1eb0918..53215bf5 100644 --- a/src/Platform/Buffer.h +++ b/src/Platform/Buffer.h @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/Directory.h b/src/Platform/Directory.h index b960db0e..28eae166 100644 --- a/src/Platform/Directory.h +++ b/src/Platform/Directory.h @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/Event.cpp b/src/Platform/Event.cpp index 86dcdde1..d60b6f4a 100644 --- a/src/Platform/Event.cpp +++ b/src/Platform/Event.cpp @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/Event.h b/src/Platform/Event.h index 7d1cc2e4..e440a604 100644 --- a/src/Platform/Event.h +++ b/src/Platform/Event.h @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/Exception.cpp b/src/Platform/Exception.cpp index 7bce461f..b6358683 100644 --- a/src/Platform/Exception.cpp +++ b/src/Platform/Exception.cpp @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/Exception.h b/src/Platform/Exception.h index 36981a74..a768bfda 100644 --- a/src/Platform/Exception.h +++ b/src/Platform/Exception.h @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. @@ -96,7 +96,9 @@ namespace VeraCrypt TC_EXCEPTION (TestFailed); \ TC_EXCEPTION (TimeOut); \ TC_EXCEPTION (UnknownException); \ - TC_EXCEPTION (UserAbort) + TC_EXCEPTION (UserAbort); \ + TC_EXCEPTION (MountPointBlocked); \ + TC_EXCEPTION (MountPointNotAllowed) TC_EXCEPTION_SET; diff --git a/src/Platform/File.h b/src/Platform/File.h index a8befe38..28e5f6c9 100644 --- a/src/Platform/File.h +++ b/src/Platform/File.h @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/FileCommon.cpp b/src/Platform/FileCommon.cpp index 11d23dd2..5f493259 100644 --- a/src/Platform/FileCommon.cpp +++ b/src/Platform/FileCommon.cpp @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/FileStream.h b/src/Platform/FileStream.h index 66df1999..7b1dd212 100644 --- a/src/Platform/FileStream.h +++ b/src/Platform/FileStream.h @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/FilesystemPath.h b/src/Platform/FilesystemPath.h index c92f684e..f4ffadd8 100644 --- a/src/Platform/FilesystemPath.h +++ b/src/Platform/FilesystemPath.h @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/Finally.h b/src/Platform/Finally.h index 63f07109..54c9f27b 100644 --- a/src/Platform/Finally.h +++ b/src/Platform/Finally.h @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/ForEach.h b/src/Platform/ForEach.h index a6131ebb..1f29e196 100644 --- a/src/Platform/ForEach.h +++ b/src/Platform/ForEach.h @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/Functor.h b/src/Platform/Functor.h index e23e12dd..b88af814 100644 --- a/src/Platform/Functor.h +++ b/src/Platform/Functor.h @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/Memory.cpp b/src/Platform/Memory.cpp index c4afed64..05758c14 100644 --- a/src/Platform/Memory.cpp +++ b/src/Platform/Memory.cpp @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/Memory.h b/src/Platform/Memory.h index b124022f..441b1da6 100644 --- a/src/Platform/Memory.h +++ b/src/Platform/Memory.h @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/MemoryStream.cpp b/src/Platform/MemoryStream.cpp index 1bd090b9..f750606f 100644 --- a/src/Platform/MemoryStream.cpp +++ b/src/Platform/MemoryStream.cpp @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/MemoryStream.h b/src/Platform/MemoryStream.h index 068e6d6e..a20b12e0 100644 --- a/src/Platform/MemoryStream.h +++ b/src/Platform/MemoryStream.h @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/Mutex.h b/src/Platform/Mutex.h index 83082825..fc58b8cd 100644 --- a/src/Platform/Mutex.h +++ b/src/Platform/Mutex.h @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/Platform.h b/src/Platform/Platform.h index 6f7f791e..72ee9541 100644 --- a/src/Platform/Platform.h +++ b/src/Platform/Platform.h @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/PlatformBase.h b/src/Platform/PlatformBase.h index e378704c..10f0bb21 100644 --- a/src/Platform/PlatformBase.h +++ b/src/Platform/PlatformBase.h @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/PlatformTest.cpp b/src/Platform/PlatformTest.cpp index 9a3faae2..df7f447b 100644 --- a/src/Platform/PlatformTest.cpp +++ b/src/Platform/PlatformTest.cpp @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/PlatformTest.h b/src/Platform/PlatformTest.h index 64810f85..c17bad7c 100644 --- a/src/Platform/PlatformTest.h +++ b/src/Platform/PlatformTest.h @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/Serializable.cpp b/src/Platform/Serializable.cpp index 4a307e92..ace4a819 100644 --- a/src/Platform/Serializable.cpp +++ b/src/Platform/Serializable.cpp @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/Serializable.h b/src/Platform/Serializable.h index c92bc170..94b385fb 100644 --- a/src/Platform/Serializable.h +++ b/src/Platform/Serializable.h @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/Serializer.cpp b/src/Platform/Serializer.cpp index 6f428b15..ea245436 100644 --- a/src/Platform/Serializer.cpp +++ b/src/Platform/Serializer.cpp @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/Serializer.h b/src/Platform/Serializer.h index 3617a83b..81092fe5 100644 --- a/src/Platform/Serializer.h +++ b/src/Platform/Serializer.h @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/SerializerFactory.cpp b/src/Platform/SerializerFactory.cpp index 4c7f4f7e..87091583 100644 --- a/src/Platform/SerializerFactory.cpp +++ b/src/Platform/SerializerFactory.cpp @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/SerializerFactory.h b/src/Platform/SerializerFactory.h index 9c53d309..a36ffa03 100644 --- a/src/Platform/SerializerFactory.h +++ b/src/Platform/SerializerFactory.h @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/SharedPtr.h b/src/Platform/SharedPtr.h index f80b2167..9b47388a 100644 --- a/src/Platform/SharedPtr.h +++ b/src/Platform/SharedPtr.h @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/SharedVal.h b/src/Platform/SharedVal.h index fc64f3f3..b88ca3e2 100644 --- a/src/Platform/SharedVal.h +++ b/src/Platform/SharedVal.h @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/Stream.h b/src/Platform/Stream.h index b9862a50..e74350f1 100644 --- a/src/Platform/Stream.h +++ b/src/Platform/Stream.h @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/StringConverter.cpp b/src/Platform/StringConverter.cpp index 7b3134ee..6a1f23c8 100644 --- a/src/Platform/StringConverter.cpp +++ b/src/Platform/StringConverter.cpp @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/StringConverter.h b/src/Platform/StringConverter.h index 8756d5ba..8bd27251 100644 --- a/src/Platform/StringConverter.h +++ b/src/Platform/StringConverter.h @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/SyncEvent.h b/src/Platform/SyncEvent.h index fde6380f..bfd9e2d1 100644 --- a/src/Platform/SyncEvent.h +++ b/src/Platform/SyncEvent.h @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/System.h b/src/Platform/System.h index 5024568f..d5fb0e00 100644 --- a/src/Platform/System.h +++ b/src/Platform/System.h @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/SystemException.h b/src/Platform/SystemException.h index ede3c5cf..2c1ab25a 100644 --- a/src/Platform/SystemException.h +++ b/src/Platform/SystemException.h @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/SystemInfo.h b/src/Platform/SystemInfo.h index 5e1f63c2..57890d46 100644 --- a/src/Platform/SystemInfo.h +++ b/src/Platform/SystemInfo.h @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/SystemLog.h b/src/Platform/SystemLog.h index cff3f212..a331e966 100644 --- a/src/Platform/SystemLog.h +++ b/src/Platform/SystemLog.h @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/TextReader.cpp b/src/Platform/TextReader.cpp index bdaf19c2..2dfc7069 100644 --- a/src/Platform/TextReader.cpp +++ b/src/Platform/TextReader.cpp @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/TextReader.h b/src/Platform/TextReader.h index bfeaa524..2b96a8db 100644 --- a/src/Platform/TextReader.h +++ b/src/Platform/TextReader.h @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/Thread.h b/src/Platform/Thread.h index 2f16d2a7..6fca11b3 100644 --- a/src/Platform/Thread.h +++ b/src/Platform/Thread.h @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/Time.h b/src/Platform/Time.h index c85b363c..7f82fbcd 100644 --- a/src/Platform/Time.h +++ b/src/Platform/Time.h @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/Unix/Directory.cpp b/src/Platform/Unix/Directory.cpp index 50de000b..c27af26a 100644 --- a/src/Platform/Unix/Directory.cpp +++ b/src/Platform/Unix/Directory.cpp @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/Unix/File.cpp b/src/Platform/Unix/File.cpp index 207efb4e..9c35a2e5 100644 --- a/src/Platform/Unix/File.cpp +++ b/src/Platform/Unix/File.cpp @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/Unix/FilesystemPath.cpp b/src/Platform/Unix/FilesystemPath.cpp index 1230c2aa..90965448 100644 --- a/src/Platform/Unix/FilesystemPath.cpp +++ b/src/Platform/Unix/FilesystemPath.cpp @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/Unix/Mutex.cpp b/src/Platform/Unix/Mutex.cpp index b69a5c6c..6441ee93 100644 --- a/src/Platform/Unix/Mutex.cpp +++ b/src/Platform/Unix/Mutex.cpp @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/Unix/Pipe.cpp b/src/Platform/Unix/Pipe.cpp index b05acd7c..41ebb506 100644 --- a/src/Platform/Unix/Pipe.cpp +++ b/src/Platform/Unix/Pipe.cpp @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/Unix/Pipe.h b/src/Platform/Unix/Pipe.h index eb79d9dd..b0bf0409 100644 --- a/src/Platform/Unix/Pipe.h +++ b/src/Platform/Unix/Pipe.h @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/Unix/Poller.cpp b/src/Platform/Unix/Poller.cpp index 25d2ba71..66ba0ff5 100644 --- a/src/Platform/Unix/Poller.cpp +++ b/src/Platform/Unix/Poller.cpp @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/Unix/Poller.h b/src/Platform/Unix/Poller.h index a46c0359..8ae6e7ae 100644 --- a/src/Platform/Unix/Poller.h +++ b/src/Platform/Unix/Poller.h @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/Unix/Process.cpp b/src/Platform/Unix/Process.cpp index 46b14a1e..395d4bc9 100644 --- a/src/Platform/Unix/Process.cpp +++ b/src/Platform/Unix/Process.cpp @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. @@ -27,12 +27,73 @@ namespace VeraCrypt { - string Process::Execute (const string &processName, const list <string> &arguments, int timeOut, ProcessExecFunctor *execFunctor, const Buffer *inputData) + + bool Process::IsExecutable(const std::string& path) { + struct stat sb; + if (stat(path.c_str(), &sb) == 0) { + return S_ISREG(sb.st_mode) && (sb.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)); + } + return false; + } + + // Find executable in system paths + std::string Process::FindSystemBinary(const char* name, std::string& errorMsg) { + if (!name) { + errno = EINVAL; // Invalid argument + errorMsg = "Invalid input: name or paths is NULL"; + return ""; + } + + // Default system directories to search for executables +#ifdef TC_MACOSX + const char* defaultDirs[] = {"/usr/local/bin", "/usr/bin", "/bin", "/user/sbin", "/sbin"}; +#elif TC_FREEBSD + const char* defaultDirs[] = {"/sbin", "/bin", "/usr/sbin", "/usr/bin", "/usr/local/sbin", "/usr/local/bin"}; +#elif TC_OPENBSD + const char* defaultDirs[] = {"/sbin", "/bin", "/usr/sbin", "/usr/bin", "/usr/X11R6/bin", "/usr/local/sbin", "/usr/local/bin"}; +#else + const char* defaultDirs[] = {"/usr/local/sbin", "/usr/local/bin", "/usr/sbin", "/usr/bin", "/sbin", "/bin"}; +#endif + const size_t defaultDirCount = sizeof(defaultDirs) / sizeof(defaultDirs[0]); + + std::string currentPath(name); + + // If path doesn't start with '/', prepend default directories + if (currentPath[0] != '/') { + for (size_t i = 0; i < defaultDirCount; ++i) { + std::string combinedPath = std::string(defaultDirs[i]) + "/" + currentPath; + if (IsExecutable(combinedPath)) { + return combinedPath; + } + } + } else if (IsExecutable(currentPath)) { + return currentPath; + } + + // Prepare error message + errno = ENOENT; // No such file or directory + errorMsg = std::string(name) + " not found in system directories"; + return ""; + } + + string Process::Execute (const string &processNameArg, const list <string> &arguments, int timeOut, ProcessExecFunctor *execFunctor, const Buffer *inputData) { char *args[32]; if (array_capacity (args) <= (arguments.size() + 1)) throw ParameterTooLarge (SRC_POS); + // if execFunctor is null and processName is not absolute path, find it in system paths + string processName; + if (!execFunctor && (processNameArg[0] != '/')) + { + std::string errorMsg; + processName = FindSystemBinary(processNameArg.c_str(), errorMsg); + if (processName.empty()) + throw SystemException(SRC_POS, errorMsg); + } + else + processName = processNameArg; + #if 0 stringstream dbg; dbg << "exec " << processName; diff --git a/src/Platform/Unix/Process.h b/src/Platform/Unix/Process.h index bb8482f2..83215956 100644 --- a/src/Platform/Unix/Process.h +++ b/src/Platform/Unix/Process.h @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. @@ -31,6 +31,8 @@ namespace VeraCrypt Process (); virtual ~Process (); + static bool IsExecutable(const std::string& path); + static std::string FindSystemBinary(const char* name, std::string& errorMsg); static string Execute (const string &processName, const list <string> &arguments, int timeOut = -1, ProcessExecFunctor *execFunctor = nullptr, const Buffer *inputData = nullptr); protected: diff --git a/src/Platform/Unix/SyncEvent.cpp b/src/Platform/Unix/SyncEvent.cpp index 0336164b..f186e555 100644 --- a/src/Platform/Unix/SyncEvent.cpp +++ b/src/Platform/Unix/SyncEvent.cpp @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/Unix/System.h b/src/Platform/Unix/System.h index 7225dae2..b6a6f092 100644 --- a/src/Platform/Unix/System.h +++ b/src/Platform/Unix/System.h @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/Unix/SystemException.cpp b/src/Platform/Unix/SystemException.cpp index 428edfe7..b29e0370 100644 --- a/src/Platform/Unix/SystemException.cpp +++ b/src/Platform/Unix/SystemException.cpp @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/Unix/SystemInfo.cpp b/src/Platform/Unix/SystemInfo.cpp index f09674aa..530d3b4b 100644 --- a/src/Platform/Unix/SystemInfo.cpp +++ b/src/Platform/Unix/SystemInfo.cpp @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/Unix/SystemLog.cpp b/src/Platform/Unix/SystemLog.cpp index 72221375..95b20074 100644 --- a/src/Platform/Unix/SystemLog.cpp +++ b/src/Platform/Unix/SystemLog.cpp @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/Unix/Thread.cpp b/src/Platform/Unix/Thread.cpp index 099c4658..febf9ab2 100644 --- a/src/Platform/Unix/Thread.cpp +++ b/src/Platform/Unix/Thread.cpp @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/Unix/Time.cpp b/src/Platform/Unix/Time.cpp index 356dde74..055938f9 100644 --- a/src/Platform/Unix/Time.cpp +++ b/src/Platform/Unix/Time.cpp @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. diff --git a/src/Platform/User.h b/src/Platform/User.h index d5b51aad..6ae91fc3 100644 --- a/src/Platform/User.h +++ b/src/Platform/User.h @@ -4,7 +4,7 @@ by the TrueCrypt License 3.0. 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 contained in the file License.txt included in VeraCrypt binary and source code distribution packages. |