Blame SOURCES/glibc-rh1000923.patch

147e83
commit 595aba70a4c676f7efaf6a012f54cd22aa189c5b
147e83
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
147e83
Date:   Mon Aug 26 15:42:29 2013 +0530
147e83
147e83
    Initialize res_hconf in nscd
147e83
    
147e83
    Fixes BZ #15890.
147e83
147e83
diff -pruN glibc-2.17-c758a686/nscd/aicache.c glibc-2.17-c758a686/nscd/aicache.c
147e83
--- glibc-2.17-c758a686/nscd/aicache.c	2013-08-11 04:22:55.000000000 +0530
147e83
+++ glibc-2.17-c758a686/nscd/aicache.c	2013-08-26 11:10:25.843470413 +0530
147e83
@@ -25,6 +25,7 @@
147e83
 #include <time.h>
147e83
 #include <unistd.h>
147e83
 #include <sys/mman.h>
147e83
+#include <resolv/res_hconf.h>
147e83
 
147e83
 #include "dbg_log.h"
147e83
 #include "nscd.h"
147e83
@@ -100,8 +101,11 @@ addhstaiX (struct database_dyn *db, int
147e83
     no_more = __nss_database_lookup ("hosts", NULL,
147e83
 				     "dns [!UNAVAIL=return] files", &nip;;
147e83
 
147e83
+  /* Initialize configurations.  */
147e83
+  if (__builtin_expect (!_res_hconf.initialized, 0))
147e83
+    _res_hconf_init ();
147e83
   if (__res_maybe_init (&_res, 0) == -1)
147e83
-	    no_more = 1;
147e83
+    no_more = 1;
147e83
 
147e83
   /* If we are looking for both IPv4 and IPv6 address we don't want
147e83
      the lookup functions to automatically promote IPv4 addresses to