X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=meta-stx%2Frecipes-security%2Fgssproxy%2Ffiles%2FFix-segfault-when-no-config-files-are-present.patch;fp=meta-stx%2Frecipes-security%2Fgssproxy%2Ffiles%2FFix-segfault-when-no-config-files-are-present.patch;h=f41fbea6126db554d92e4cbe04ea2956120111ab;hb=57fdea704bd62af847872c40508f00aa1d7cac60;hp=0000000000000000000000000000000000000000;hpb=f23f21bccfb750b9e30141fd9676515215ffbc4e;p=pti%2Frtp.git diff --git a/meta-stx/recipes-security/gssproxy/files/Fix-segfault-when-no-config-files-are-present.patch b/meta-stx/recipes-security/gssproxy/files/Fix-segfault-when-no-config-files-are-present.patch new file mode 100644 index 0000000..f41fbea --- /dev/null +++ b/meta-stx/recipes-security/gssproxy/files/Fix-segfault-when-no-config-files-are-present.patch @@ -0,0 +1,39 @@ +From 76954aa028a897021a9bdcb0a1b5249e2652f7b6 Mon Sep 17 00:00:00 2001 +From: Robbie Harwood +Date: Tue, 16 May 2017 14:16:23 -0400 +Subject: [PATCH] Fix segfault when no config files are present + +Resolves: rhbz#1451255 +Signed-off-by: Robbie Harwood +Reviewed-by: Simo Sorce +Merges: #185 +(cherry picked from commit df434333de34a13440857b511a4c60fbc6a71a5c) +--- + proxy/src/gp_config.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/proxy/src/gp_config.c b/proxy/src/gp_config.c +index b4ab90c..8fd60a3 100644 +--- a/proxy/src/gp_config.c ++++ b/proxy/src/gp_config.c +@@ -844,16 +844,17 @@ int gp_config_init(const char *config_file, const char *config_dir, + + if (config_file) { + ret = gp_config_from_file(config_file, ini_config, collision_flags); +- if (ret == ENOENT) { +- GPDEBUG("Expected config file %s but did not find it.\n", ++ if (ret) { ++ GPDEBUG("Error when trying to read config file %s.\n", + config_file); +- } else if (ret) { + return ret; + } + } + if (config_dir) { + ret = gp_config_from_dir(config_dir, &ini_config, collision_flags); + if (ret) { ++ GPDEBUG("Error when trying to read config directory %s.\n", ++ config_dir); + return ret; + } + }