linux-sgx/0105-Look-for-PCKRetrievalTool-config-file-in-etc.patch
Daniel P. Berrangé bc5efa9502 Update to SGX 2.26 / DCAP 1.23, adding PCCS service
Resolves: https://issues.redhat.com/browse/RHEL-121612
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-11-18 18:29:56 +00:00

44 lines
1.9 KiB
Diff

From 1d85ecfb88b08772efdaeb241b09502383e1123c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= <berrange@redhat.com>
Date: Thu, 29 Feb 2024 14:21:36 +0000
Subject: [PATCH 105/120] Look for PCKRetrievalTool config file in /etc/
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Looking for config files in the same directory as the binary is
inappropriate.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
tools/PCKRetrievalTool/App/linux/network_wrapper.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tools/PCKRetrievalTool/App/linux/network_wrapper.cpp b/tools/PCKRetrievalTool/App/linux/network_wrapper.cpp
index e423f38..36f219b 100644
--- a/tools/PCKRetrievalTool/App/linux/network_wrapper.cpp
+++ b/tools/PCKRetrievalTool/App/linux/network_wrapper.cpp
@@ -219,7 +219,8 @@ static void network_configuration(string &url, string &proxy_type, string &proxy
{
//firstly read local configuration File
char local_configuration_file_path[MAX_PATH] = "";
- bool ret = get_program_path(local_configuration_file_path, MAX_PATH -1);
+ bool ret = true;
+ strcpy(local_configuration_file_path, "/etc/PCKIDRetrievalTool/");
if (ret) {
if(strnlen(local_configuration_file_path ,MAX_PATH)+strnlen(LOCAL_NETWORK_SETTING,MAX_PATH)+sizeof(char) > MAX_PATH) {
ret = false;
@@ -378,7 +379,8 @@ network_post_error_t network_https_post(const uint8_t* raw_data, const uint32_t
bool is_server_url_available() {
char local_configuration_file_path[MAX_PATH] = "";
- bool ret = get_program_path(local_configuration_file_path, MAX_PATH -1);
+ bool ret = true;
+ strcpy(local_configuration_file_path, "/etc/PCKIDRetrievalTool/");
if (ret) {
if(strnlen(local_configuration_file_path ,MAX_PATH)+strnlen(LOCAL_NETWORK_SETTING,MAX_PATH)+sizeof(char) > MAX_PATH) {
return false;
--
2.49.0