Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package libeconf for openSUSE:Factory 
checked in at 2023-03-29 23:25:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libeconf (Old)
 and      /work/SRC/openSUSE:Factory/.libeconf.new.31432 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libeconf"

Wed Mar 29 23:25:50 2023 rev:20 rq:1074226 version:0.5.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/libeconf/libeconf.changes        2023-01-21 
19:09:36.948632116 +0100
+++ /work/SRC/openSUSE:Factory/.libeconf.new.31432/libeconf.changes     
2023-03-29 23:25:51.499078125 +0200
@@ -1,0 +2,23 @@
+Fri Mar 24 15:12:18 UTC 2023 - sch...@suse.com
+
+- Update to version 0.5.2:
+  * Fixed build for aarch64 and gcc13.
+  * Making the output verbose when a test fails.
+  * Fixed a stack-buffer-overflow vulnerability in "econf_writeFile"
+    function.
+  * Fixed a stack-buffer-overflow vulnerability in "read_file"
+    function.
+  * Added new feature: econf_set_conf_dirs (const char **dir_postfix_list)
+    Sets a list of directory structures (with order) which describes
+    the directories in which the files have to be parsed.
+    E.G. with the given list: {"/conf.d/", ".d/", "/", NULL} files in following
+       directories will be parsed:
+          "<default_dirs>/<project_name>.<suffix>.d/"
+          "<default_dirs>/<project_name>/conf.d/"
+          "<default_dirs>/<project_name>.d/"
+          "<default_dirs>/<project_name>/"
+       The entry "<default_dirs>/<project_name>.<suffix>.d/" will be added
+       automatically.
+  * General code cleanup.
+    
+-------------------------------------------------------------------

Old:
----
  libeconf-0.5.1.tar.xz

New:
----
  libeconf-0.5.2.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libeconf.spec ++++++
--- /var/tmp/diff_new_pack.FVGJsX/_old  2023-03-29 23:25:52.767084082 +0200
+++ /var/tmp/diff_new_pack.FVGJsX/_new  2023-03-29 23:25:52.771084101 +0200
@@ -18,7 +18,7 @@
 
 %define lname  libeconf0
 Name:           libeconf
-Version:        0.5.1
+Version:        0.5.2
 Release:        0
 Summary:        Enhanced config file parser ala systemd
 License:        LGPL-2.1-or-later

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.FVGJsX/_old  2023-03-29 23:25:52.811084289 +0200
+++ /var/tmp/diff_new_pack.FVGJsX/_new  2023-03-29 23:25:52.815084307 +0200
@@ -1,7 +1,7 @@
 <servicedata>
   <service name="tar_scm">
     <param name="url">https://github.com/openSUSE/libeconf.git</param>
-    <param 
name="changesrevision">77aa2597aa73b56ab1aa824d443ff9fa5667d71e</param>
+    <param 
name="changesrevision">535641ce1131db19d526e0f1d1d43437b87add44</param>
  </service>
 </servicedata>
 (No newline at EOF)

++++++ libeconf-0.5.1.tar.xz -> libeconf-0.5.2.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libeconf-0.5.1/.github/workflows/ccpp.yml 
new/libeconf-0.5.2/.github/workflows/ccpp.yml
--- old/libeconf-0.5.1/.github/workflows/ccpp.yml       2023-01-19 
17:28:02.000000000 +0100
+++ new/libeconf-0.5.2/.github/workflows/ccpp.yml       2023-03-24 
16:08:03.000000000 +0100
@@ -9,9 +9,9 @@
     
     steps:
     - uses: actions/checkout@v2
-    - name: cmake configure with asan checks
-      run: cmake -B build -DCMAKE_BUILD_TYPE=SanitizeAddress
-    - name: make with asan checks
+    - name: cmake configure with ASAN and UBSAN checks
+      run: cmake -B build -DCMAKE_BUILD_TYPE=Sanitize
+    - name: make with ASAN and UBSAN checks
       run: make -C build
     - name: make check
-      run: make -C build check
+      run: CTEST_OUTPUT_ON_FAILURE=1 ASAN_OPTIONS=detect_leaks=0 make -C build 
check
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libeconf-0.5.1/.github/workflows/meson-build.yml 
new/libeconf-0.5.2/.github/workflows/meson-build.yml
--- old/libeconf-0.5.1/.github/workflows/meson-build.yml        2023-01-19 
17:28:02.000000000 +0100
+++ new/libeconf-0.5.2/.github/workflows/meson-build.yml        1970-01-01 
01:00:00.000000000 +0100
@@ -1,15 +0,0 @@
-name: meson build
-
-on: [push, pull_request]
-
-jobs:
-  build:
-
-    runs-on: ubuntu-latest
-    steps:
-    - uses: actions/checkout@v2
-    - uses: actions/setup-python@v1
-    - uses: BSFishy/meson-build@v1.0.1
-      with:
-        action: build
-        options: --verbose
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libeconf-0.5.1/.github/workflows/meson-test.yml 
new/libeconf-0.5.2/.github/workflows/meson-test.yml
--- old/libeconf-0.5.1/.github/workflows/meson-test.yml 2023-01-19 
17:28:02.000000000 +0100
+++ new/libeconf-0.5.2/.github/workflows/meson-test.yml 1970-01-01 
01:00:00.000000000 +0100
@@ -1,15 +0,0 @@
-name: meson test
-
-on: [push, pull_request]
-
-jobs:
-  build:
-
-    runs-on: ubuntu-latest
-    steps:
-    - uses: actions/checkout@v2
-    - uses: actions/setup-python@v1
-    - uses: BSFishy/meson-build@v1.0.1
-      with:
-        action: test
-        options: --verbose
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libeconf-0.5.1/.github/workflows/meson.yml 
new/libeconf-0.5.2/.github/workflows/meson.yml
--- old/libeconf-0.5.1/.github/workflows/meson.yml      1970-01-01 
01:00:00.000000000 +0100
+++ new/libeconf-0.5.2/.github/workflows/meson.yml      2023-03-24 
16:08:03.000000000 +0100
@@ -0,0 +1,19 @@
+name: meson build & test
+
+on: [push, pull_request]
+
+jobs:
+  build:
+
+    runs-on: ubuntu-latest
+    steps:
+    - uses: actions/checkout@v2
+    - uses: actions/setup-python@v1
+    - uses: BSFishy/meson-build@v1.0.1
+      with:
+        action: build
+        options: --verbose
+    - uses: BSFishy/meson-build@v1.0.1
+      with:
+        action: test
+        options: --verbose
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libeconf-0.5.1/CMakeLists.txt 
new/libeconf-0.5.2/CMakeLists.txt
--- old/libeconf-0.5.1/CMakeLists.txt   2023-01-19 17:28:02.000000000 +0100
+++ new/libeconf-0.5.2/CMakeLists.txt   2023-03-24 16:08:03.000000000 +0100
@@ -3,7 +3,7 @@
 # Ensure built-in policies from CMake are used, (e.g. improved policies for 
macOS)
 cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
 
-project(libeconf VERSION 0.5.1
+project(libeconf VERSION 0.5.2
                  DESCRIPTION "Enhanced config file parser, which merges config 
files placed in several locations into one."
                  LANGUAGES C
                  )
@@ -38,20 +38,20 @@
 
 # Build Types
 set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE}
-    CACHE STRING "Choose the type of build, options are: None Debug Release 
RelWithDebInfo MinSizeRel SanitizeAddress RelWithDebInfoStrict"
+    CACHE STRING "Choose the type of build, options are: None Debug Release 
RelWithDebInfo MinSizeRel Sanitize RelWithDebInfoStrict"
     FORCE
     )
 
 # AddressSanitize
-set(CMAKE_C_FLAGS_SANITIZEADDRESS
-    "-O2 -g -Wall -fsanitize=address -fno-optimize-sibling-calls 
-fsanitize-address-use-after-scope -fno-omit-frame-pointer"
-    CACHE STRING "Flags used by the C compiler during AddressSanitizer builds."
+set(CMAKE_C_FLAGS_SANITIZE
+    "-O2 -g -Wall -fsanitize=address,undefined"
+    CACHE STRING "Flags used by the C compiler during Sanitizer builds."
     FORCE
     )
 
-set(CMAKE_LINK_FLAGS_SANITIZEADDRESS
-    "-fsanitize=address"
-    CACHE STRING "Flags used by the linker during AddressSanitizer builds."
+set(CMAKE_LINK_FLAGS_SANITIZE
+    "-fsanitize=address,undefined"
+    CACHE STRING "Flags used by the linker during Sanitizer builds."
     FORCE
     )
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libeconf-0.5.1/NEWS new/libeconf-0.5.2/NEWS
--- old/libeconf-0.5.1/NEWS     2023-01-19 17:28:02.000000000 +0100
+++ new/libeconf-0.5.2/NEWS     2023-03-24 16:08:03.000000000 +0100
@@ -1,3 +1,9 @@
+Version 0.5.2
+* Fixed build for aarch64 and gcc13.
+* Making the output verbose when a test fails.
+* Fixed a stack-buffer-overflow vulnerability in "econf_writeFile" function.
+* Fixed a stack-buffer-overflow vulnerability in "read_file" function.
+
 Version 0.5.1
 * Reading files in /usr/_vendor_/_example_._suffix_.d/* regardless
   there is a /etc/_example_._suffix_ file.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libeconf-0.5.1/doc/man/libeconf.3 
new/libeconf-0.5.2/doc/man/libeconf.3
--- old/libeconf-0.5.1/doc/man/libeconf.3       2023-01-19 17:28:02.000000000 
+0100
+++ new/libeconf-0.5.2/doc/man/libeconf.3       2023-03-24 16:08:03.000000000 
+0100
@@ -300,6 +300,10 @@
 .RI "void \fBeconf_freeExtValue\fP (\fBeconf_ext_value\fP *to_free)"
 .br
 .RI "Free an complete \fBeconf_ext_value\fP struct\&. "
+.ti -1c
+.RI "\fBeconf_err\fP \fBeconf_set_conf_dirs\fP (const char **dir_postfix_list)"
+.br
+.RI "Sets a list of directory structures (with order) which describes the 
directories in which the files have to be parsed\&. "
 .in -1c
 .SH "Detailed Description"
 .PP 
@@ -1525,6 +1529,28 @@
 .RE
 .PP
 
+.SS "econf_err econf_set_conf_dirs (const char **dir_postfix_list)"
+
+.PP
+Sets a list of directory structures (with order) which describes the 
directories
+in which the files have to be parsed\&.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIdir_postfix_list\fP list of directory structures.
+E.G. with the given list: {"/conf.d/", ".d/", "/", NULL} files in following
+directories will be parsed: <default_dirs>/<project_name>.<suffix>.d/
+<default_dirs>/<project_name>/conf.d/, <default_dirs>/<project_name>.d/,
+<default_dirs>/<project_name>/. The entry 
<default_dirs>/<project_name>.<suffix>.d/
+will be added automatically.
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+econf_err ECONF_SUCCESS or error code
+.RE
+.PP
+
 .SH "SEE ALSO"
 .PP 
 econftool\&
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libeconf-0.5.1/include/libeconf.h 
new/libeconf-0.5.2/include/libeconf.h
--- old/libeconf-0.5.1/include/libeconf.h       2023-01-19 17:28:02.000000000 
+0100
+++ new/libeconf-0.5.2/include/libeconf.h       2023-03-24 16:08:03.000000000 
+0100
@@ -874,6 +874,24 @@
 extern void __attribute__ ((deprecated("use one of econf_read*WithCallback 
instead")))
 econf_reset_security_settings(void);
 
+/** @brief Sets a list of directory structures (with order) which describes 
the directories
+ *         in which the files have to be parsed.
+ *
+ * @param dir_postfix_list list of directory structures.
+ *        E.G. with the given list: {"/conf.d/", ".d/", "/", NULL} files in 
following
+ *        directories will be parsed:
+ *           "<default_dirs>/<project_name>.<suffix>.d/"
+ *           "<default_dirs>/<project_name>/conf.d/"
+ *           "<default_dirs>/<project_name>.d/"
+ *           "<default_dirs>/<project_name>/"
+ *        The entry "<default_dirs>/<project_name>.<suffix>.d/" will be added
+ *        automatically.
+ *
+ * @return econf_err ECONF_SUCCESS or error code
+ *
+ */
+extern econf_err econf_set_conf_dirs(const char **dir_postfix_list);
+
 #ifdef __cplusplus
 }
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libeconf-0.5.1/lib/getfilecontents.c 
new/libeconf-0.5.2/lib/getfilecontents.c
--- old/libeconf-0.5.1/lib/getfilecontents.c    2023-01-19 17:28:02.000000000 
+0100
+++ new/libeconf-0.5.2/lib/getfilecontents.c    2023-03-24 16:08:03.000000000 
+0100
@@ -180,7 +180,7 @@
 
   ef->file_entry[ef->length-1].line_number = line_number;
 
-  ef->file_entry[ef->length-1].quotes |= quotes;
+  ef->file_entry[ef->length-1].quotes = quotes;
 
   if (group)
     ef->file_entry[ef->length-1].group = strdup(group);
@@ -265,11 +265,12 @@
   }
   ef->delimiter = *delim;
 
-  while (fgets(buf, sizeof(buf), kf)) {
+  while (fgets(buf, BUFSIZ-1, kf)) {
     char *p, *name, *data = NULL;
     bool quote_seen = false, delim_seen = false;
     char *org_buf __attribute__ ((__cleanup__(free_buffer))) = strdup(buf);
 
+    buf[BUFSIZ-1] = '\0';
     line++;
     last_scanned_line_nr = line;
 
@@ -410,8 +411,6 @@
       if (!found_delim &&
          /* Entry has already been found */
          ef->length > 0 &&
-         /* Value of previous entry is not Null. So delimiter has been found 
in the previous line */
-         ef->file_entry[ef->length-1].value != NULL &&
          /* The Entry must be the next line. Otherwise it is a new one */
          ef->file_entry[ef->length-1].line_number+1 == line)
       {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libeconf-0.5.1/lib/helpers.c 
new/libeconf-0.5.2/lib/helpers.c
--- old/libeconf-0.5.1/lib/helpers.c    2023-01-19 17:28:02.000000000 +0100
+++ new/libeconf-0.5.2/lib/helpers.c    2023-03-24 16:08:03.000000000 +0100
@@ -47,6 +47,7 @@
   key_file->file_entry[num].value = strdup(KEY_FILE_NULL_VALUE);
   key_file->file_entry[num].comment_before_key = NULL;
   key_file->file_entry[num].comment_after_value = NULL;
+  key_file->file_entry[num].quotes = false;
 }
 
 // Remove whitespace from beginning and end, append string terminator
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libeconf-0.5.1/lib/keyfile.c 
new/libeconf-0.5.2/lib/keyfile.c
--- old/libeconf-0.5.1/lib/keyfile.c    2023-01-19 17:28:02.000000000 +0100
+++ new/libeconf-0.5.2/lib/keyfile.c    2023-03-24 16:08:03.000000000 +0100
@@ -150,7 +150,6 @@
 }
 
 econf_err getPath(econf_file key_file, char **path) {
-  /* Fixme: The path sould be set for each value. */
   if (key_file.path)
   {
     *path = strdup(key_file.path);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libeconf-0.5.1/lib/libeconf.c 
new/libeconf-0.5.2/lib/libeconf.c
--- old/libeconf-0.5.1/lib/libeconf.c   2023-01-19 17:28:02.000000000 +0100
+++ new/libeconf-0.5.2/lib/libeconf.c   2023-03-24 16:08:03.000000000 +0100
@@ -44,6 +44,9 @@
 static mode_t file_perms_file;
 static mode_t file_perms_dir;
 bool allow_follow_symlinks = true;
+// configuration directories format
+char **conf_dirs = {NULL}; // see econf_set_conf_dirs
+int conf_count = 0;
 
 void econf_requireOwner(uid_t owner)
 {
@@ -77,6 +80,25 @@
   allow_follow_symlinks = true;
 }
 
+econf_err econf_set_conf_dirs(const char **dir_postfix_list)
+{
+  // free old entry
+  if (conf_dirs) econf_freeArray(conf_dirs);
+  conf_count = 0;
+  const char **tmp = dir_postfix_list;
+  while (*tmp++)
+    conf_count++;
+  conf_dirs = malloc(sizeof(char *) * (conf_count+1));
+  if (!conf_dirs)
+    return ECONF_NOMEM;
+  conf_dirs[conf_count]=NULL;
+  for (int i = 0; i < conf_count; i++)
+  {
+    conf_dirs[i] = strdup(dir_postfix_list[i]);
+  }
+  return ECONF_SUCCESS;
+}
+
 // Create a new econf_file. Allocation is based on
 // KEY_FILE_DEFAULT_LENGTH defined in include/defines.h
 econf_err
@@ -355,32 +377,42 @@
     (*key_files)[0] = key_file;
   }
 
-  int i = 0;
-  /* merge all *.d files in e.g. /usr/etc and /etc */
-  default_dirs[0] = dist_conf_dir;
-  default_dirs[1] = etc_conf_dir;
-  while (default_dirs[i]) {
-    /*
-      Indicate which directories to look for. The order is:
-       "default_dirs/project_name.suffix.d/"
-
-       XXX make this configureable:
+  /*
+    Indicate which directories to look for. The order is:
+    "default_dirs/project_name.suffix.d/"
+    AND all other directories which has been set by
+    econf_set_conf_dirs. E.G.:
        "default_dirs/project_name/conf.d/"
        "default_dirs/project_name.d/"
        "default_dirs/project_name/"
     */
-    const char *conf_dirs[] = {  NULL, /* "/conf.d/", ".d/", "/", */ NULL};
-    char *project_path = combine_strings(default_dirs[i], project_name, '/');
-    char *suffix_d = malloc (strlen(suffix) + 4); /* + strlen(".d/") */
-    if (suffix_d == NULL)
-      return ECONF_NOMEM;
-    cp = stpcpy(suffix_d, suffix);
-    stpcpy(cp, ".d");
-    conf_dirs[0] = suffix_d;
+  char *suffix_d = malloc (strlen(suffix) + 4); /* + strlen(".d/") */
+  if (suffix_d == NULL)
+    return ECONF_NOMEM;
+  cp = stpcpy(suffix_d, suffix);
+  stpcpy(cp, ".d");
 
-    error = traverse_conf_dirs(key_files, conf_dirs, size, project_path,
-                              suffix, delim, comment);
+  char **configure_dirs = malloc(sizeof(char *) * (conf_count + 2));
+  if (configure_dirs == NULL)
+  {
     free(suffix_d);
+    return ECONF_NOMEM;
+  }
+  configure_dirs[0] = suffix_d;
+  for (int i = 0; i < conf_count; i++)
+  {
+    configure_dirs[i+1] = strdup(conf_dirs[i]);
+  }
+  configure_dirs[conf_count+1] = NULL;
+
+  int i = 0;
+  /* merge all files in e.g. /usr/etc and /etc */
+  default_dirs[0] = dist_conf_dir;
+  default_dirs[1] = etc_conf_dir;
+  while (default_dirs[i]) {
+    char *project_path = combine_strings(default_dirs[i], project_name, '/');
+    error = traverse_conf_dirs(key_files, configure_dirs, size, project_path,
+                              suffix, delim, comment);
     free(project_path);
     if (error != ECONF_SUCCESS)
     {
@@ -389,13 +421,14 @@
        econf_freeFile((*key_files)[k]);
       }
       free(*key_files);
+      econf_freeArray(configure_dirs);
       return error;
     }
     i++;
   }
   (*size)--;
   (*key_files)[*size] = NULL;
-
+  econf_freeArray(configure_dirs);
   if (*size <= 0)
     return ECONF_NOFILE;
   else
@@ -509,6 +542,7 @@
       char *value_string = buf;
 
       strncpy(buf,key_file->file_entry[i].comment_before_key,BUFSIZ-1);
+      buf[BUFSIZ-1] = '\0';
       while ((line = strsep(&value_string, "\n")) != NULL) {
        fprintf(kf, "%c%s\n",
                key_file->comment,
@@ -533,6 +567,7 @@
       char *value_string = buf;
 
       strncpy(buf,key_file->file_entry[i].comment_after_value,BUFSIZ-1);
+      buf[BUFSIZ-1] = '\0';
       while ((line = strsep(&value_string, "\n")) != NULL) {
        fprintf(kf, " %c%s\n",
                key_file->comment,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libeconf-0.5.1/lib/libeconf.map 
new/libeconf-0.5.2/lib/libeconf.map
--- old/libeconf-0.5.1/lib/libeconf.map 2023-01-19 17:28:02.000000000 +0100
+++ new/libeconf-0.5.2/lib/libeconf.map 2023-03-24 16:08:03.000000000 +0100
@@ -71,4 +71,5 @@
     econf_readFileWithCallback;
     econf_readDirsWithCallback;
     econf_readDirsHistoryWithCallback;
+    econf_set_conf_dirs;
 } LIBECONF_0.4;
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libeconf-0.5.1/lib/libeconf_ext.c 
new/libeconf-0.5.2/lib/libeconf_ext.c
--- old/libeconf-0.5.1/lib/libeconf_ext.c       2023-01-19 17:28:02.000000000 
+0100
+++ new/libeconf-0.5.2/lib/libeconf_ext.c       2023-03-24 16:08:03.000000000 
+0100
@@ -82,6 +82,7 @@
 
   if (value_string!=NULL) {
     strncpy(buf,value_string,BUFSIZ-1);
+    buf[BUFSIZ-1] = '\0';
     free(value_string);
     value_string = trim(buf);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libeconf-0.5.1/lib/mergefiles.c 
new/libeconf-0.5.2/lib/mergefiles.c
--- old/libeconf-0.5.1/lib/mergefiles.c 2023-01-19 17:28:02.000000000 +0100
+++ new/libeconf-0.5.2/lib/mergefiles.c 2023-03-24 16:08:03.000000000 +0100
@@ -195,7 +195,7 @@
 }
 
 econf_err traverse_conf_dirs(econf_file ***key_files,
-                            const char *config_dirs[],
+                            char *config_dirs[],
                             size_t *size, const char *path,
                             const char *config_suffix,
                             const char *delim, const char *comment) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libeconf-0.5.1/lib/mergefiles.h 
new/libeconf-0.5.2/lib/mergefiles.h
--- old/libeconf-0.5.1/lib/mergefiles.h 2023-01-19 17:28:02.000000000 +0100
+++ new/libeconf-0.5.2/lib/mergefiles.h 2023-03-24 16:08:03.000000000 +0100
@@ -47,7 +47,7 @@
 char **get_default_dirs(const char *usr_conf_dir, const char *etc_conf_dir);
 
 /* Receives a list of config directories to look for and calls 
'check_conf_dir' */
-econf_err traverse_conf_dirs(econf_file ***key_files, const char *conf_dirs[],
+econf_err traverse_conf_dirs(econf_file ***key_files, char *conf_dirs[],
                               size_t *size, const char *path, 
                               const char *config_suffix,
                               const char *delim, const char *comment);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libeconf-0.5.1/meson.build 
new/libeconf-0.5.2/meson.build
--- old/libeconf-0.5.1/meson.build      2023-01-19 17:28:02.000000000 +0100
+++ new/libeconf-0.5.2/meson.build      2023-03-24 16:08:03.000000000 +0100
@@ -7,7 +7,7 @@
                  'b_pie=true',
                  'warning_level=3',],
   license : 'MIT',
-  version : '0.5.1',
+  version : '0.5.2',
 )
 
 cc = meson.get_compiler('c')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libeconf-0.5.1/tests/tst-getconfdirs8-data/etc/getconfdir.d/1-key4.conf 
new/libeconf-0.5.2/tests/tst-getconfdirs8-data/etc/getconfdir.d/1-key4.conf
--- old/libeconf-0.5.1/tests/tst-getconfdirs8-data/etc/getconfdir.d/1-key4.conf 
1970-01-01 01:00:00.000000000 +0100
+++ new/libeconf-0.5.2/tests/tst-getconfdirs8-data/etc/getconfdir.d/1-key4.conf 
2023-03-24 16:08:03.000000000 +0100
@@ -0,0 +1 @@
+KEY4=etcd4
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libeconf-0.5.1/tests/tst-getconfdirs8.c 
new/libeconf-0.5.2/tests/tst-getconfdirs8.c
--- old/libeconf-0.5.1/tests/tst-getconfdirs8.c 2023-01-19 17:28:02.000000000 
+0100
+++ new/libeconf-0.5.2/tests/tst-getconfdirs8.c 2023-03-24 16:08:03.000000000 
+0100
@@ -23,6 +23,7 @@
 {
   char *val = NULL;
   econf_err error = econf_getStringValue (key_file, "", key, &val);
+
   if (expected_val == NULL)
     {
       if (val == NULL)
@@ -55,6 +56,15 @@
   int retval = 0;
   econf_err error;
 
+  const char *dirs[] = {"/conf.d/", ".d/", "/", NULL};
+  error = econf_set_conf_dirs(dirs);
+  if (error)
+  {
+    fprintf (stderr, "ERROR: econf_set_conf_dirs: %s\n",
+      econf_errString(error));
+    return 1;
+  }
+
   error = econf_readDirs (&key_file,
                                    TESTSDIR"tst-getconfdirs8-data/usr/etc",
                                    TESTSDIR"tst-getconfdirs8-data/etc",
@@ -71,11 +81,13 @@
   if (check_key(key_file, "KEY2", "usrconfd") != 0)
     retval = 1;
   if (check_key(key_file, "KEY3", "etcconfd3") != 0)
-    retval = 1;    
+    retval = 1;
   if (check_key(key_file, "USRETC", NULL) != 0)
     retval = 1;
   if (check_key(key_file, "ETC", "true") != 0)
     retval = 1;
+  if (check_key(key_file, "KEY4", "etcd4") != 0)
+    retval = 1;
 
   econf_free (key_file);
 

Reply via email to