]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Initialize res_hconf in nscd
authorSiddhesh Poyarekar <siddhesh@redhat.com>
Mon, 26 Aug 2013 10:12:29 +0000 (15:42 +0530)
committerSiddhesh Poyarekar <siddhesh@redhat.com>
Mon, 26 Aug 2013 10:12:29 +0000 (15:42 +0530)
Fixes BZ #15890.

ChangeLog
NEWS
nscd/aicache.c

index 7e7e3c5aa23c8ec1ef27a926a97c1a5fcd52c822..9cde90109444478ca314ced7753182d9e7af288e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2013-08-26  Siddhesh Poyarekar  <siddhesh@redhat.com>
+
+       [BZ #15890]
+       * nscd/aicache.c: Include res_hconf.h.
+       (addhstaiX): Initialize res_hconf.
+
 2013-08-26  Andreas Schwab  <schwab@suse.de>
 
        * stdlib/Makefile (LDFLAGS-tst-tls-atexit): Remove.
diff --git a/NEWS b/NEWS
index 8f204d5ce78e2bc1c36f21495daabc1158a0a599..eb26104db1da2548e0c21d7ad49038392b695b99 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -9,7 +9,7 @@ Version 2.19
 
 * The following bugs are resolved with this release:
 
-  14699, 15531, 15532, 15749, 15797, 15867
+  14699, 15531, 15532, 15749, 15797, 15867, 15890
 
 * CVE-2013-4237 The readdir_r function could write more than NAME_MAX bytes
   to the d_name member of struct dirent, or omit the terminating NUL
index 0461b830792330b7ac640db48ff341f9bd9d2f52..dceb4d679e3e0296ef6d8fa4764a3aadfd75631f 100644 (file)
@@ -25,6 +25,7 @@
 #include <time.h>
 #include <unistd.h>
 #include <sys/mman.h>
+#include <resolv/res_hconf.h>
 
 #include "dbg_log.h"
 #include "nscd.h"
@@ -100,6 +101,9 @@ addhstaiX (struct database_dyn *db, int fd, request_header *req,
     no_more = __nss_database_lookup ("hosts", NULL,
                                     "dns [!UNAVAIL=return] files", &nip);
 
+  /* Initialize configurations.  */
+  if (__builtin_expect (!_res_hconf.initialized, 0))
+    _res_hconf_init ();
   if (__res_maybe_init (&_res, 0) == -1)
     no_more = 1;