summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjbj <jbj>2017-06-14 01:30:32 +0000
committerjbj <jbj>2017-06-14 01:30:32 +0000
commitac79635a0d6e07d2cbab4331e8805bb16ad0f3af (patch)
tree88739224e33bc888a8746a54e9d4450bfcc89f5c
parent982ce6e8963cca0c84696c310857ba5a30fa178d (diff)
downloadlibpopt-ac79635a0d6e07d2cbab4331e8805bb16ad0f3af.tar.gz
- fix: SYSCONFDIR as prefix, not literal, when globbing (bz#1051685).
-rw-r--r--CHANGES1
-rw-r--r--poptconfig.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/CHANGES b/CHANGES
index 1ca63a8..b779c31 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,5 @@
1.17 -> 2.0:
+ - jbj: fix: SYSCONFDIR as prefix, not literal, when globbing (bz#1051685).
- jbj: i18n: update PO files (Translation Project).
- jbj: fix: free con->os->nextArg when used (memory leaks).
- jbj: enable SUPPORT_GLOBAL_CALCULATOR.
diff --git a/poptconfig.c b/poptconfig.c
index 0bd3c97..ea35088 100644
--- a/poptconfig.c
+++ b/poptconfig.c
@@ -509,11 +509,11 @@ int poptReadDefaultConfig(poptContext con, /*@unused@*/ UNUSED(int useEnv))
#if defined(HAVE_GLOB_H)
{
struct stat sb;
- if (!stat("SYSCONFDIR/popt.d", &sb) && S_ISDIR(sb.st_mode)) {
+ if (!stat(SYSCONFDIR"/popt.d", &sb) && S_ISDIR(sb.st_mode)) {
const char ** av = NULL;
int ac = 0;
- if ((rc = poptGlob(con, "SYSCONFDIR/popt.d/*", &ac, &av)) == 0) {
+ if ((rc = poptGlob(con, SYSCONFDIR"/popt.d/*", &ac, &av)) == 0) {
int i;
for (i = 0; rc == 0 && i < ac; i++) {
const char * fn = av[i];