VeraCrypt
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/xmlvalidate.yml2
-rw-r--r--src/Core/Unix/CoreService.cpp6
2 files changed, 6 insertions, 2 deletions
diff --git a/.github/workflows/xmlvalidate.yml b/.github/workflows/xmlvalidate.yml
index 951a934e..7d3cbaa2 100644
--- a/.github/workflows/xmlvalidate.yml
+++ b/.github/workflows/xmlvalidate.yml
@@ -31,6 +31,6 @@ jobs:
31 with: 31 with:
32 node-version: 'latest' 32 node-version: 'latest'
33 - name: Install fast-xml-parser 33 - name: Install fast-xml-parser
34 run: npm install fast-xml-parser -g 34 run: npm install fast-xml-parser@4.5.2 -g
35 - name: Run XML validator script 35 - name: Run XML validator script
36 run: ${{ github.workspace }}/.github/workflows/xmlvalidate.sh "${{ github.workspace }}" 36 run: ${{ github.workspace }}/.github/workflows/xmlvalidate.sh "${{ github.workspace }}"
diff --git a/src/Core/Unix/CoreService.cpp b/src/Core/Unix/CoreService.cpp
index dc2f4e6b..9531069a 100644
--- a/src/Core/Unix/CoreService.cpp
+++ b/src/Core/Unix/CoreService.cpp
@@ -314,7 +314,11 @@ namespace VeraCrypt
314 if (sudoAbsolutePath.empty()) 314 if (sudoAbsolutePath.empty())
315 throw SystemException(SRC_POS, errorMsg); 315 throw SystemException(SRC_POS, errorMsg);
316 316
317 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 317 string trueAbsolutePath = Process::FindSystemBinary("true", errorMsg);
318 if (trueAbsolutePath.empty())
319 throw SystemException(SRC_POS, errorMsg);
320
321 std::string popenCommand = sudoAbsolutePath + " -n " + trueAbsolutePath + " > /dev/null 2>&1"; // We redirect stderr to stdout (2>&1) to be able to catch the result of the command
318 FILE* pipe = popen(popenCommand.c_str(), "r"); 322 FILE* pipe = popen(popenCommand.c_str(), "r");
319 if (pipe) 323 if (pipe)
320 { 324 {