aboutsummaryrefslogtreecommitdiff
path: root/nscd/aicache.c
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@redhat.com>2013-08-26 15:42:29 +0530
committerSiddhesh Poyarekar <siddhesh@redhat.com>2013-08-26 15:42:29 +0530
commit595aba70a4c676f7efaf6a012f54cd22aa189c5b (patch)
treec804e71e90eeb7c3f9908fcedf76b094d5148dd5 /nscd/aicache.c
parentffabd3937aea799d2779e8b1b0a5385eebadd452 (diff)
downloadglibc-595aba70a4c676f7efaf6a012f54cd22aa189c5b.tar
glibc-595aba70a4c676f7efaf6a012f54cd22aa189c5b.tar.gz
glibc-595aba70a4c676f7efaf6a012f54cd22aa189c5b.tar.bz2
glibc-595aba70a4c676f7efaf6a012f54cd22aa189c5b.zip
Initialize res_hconf in nscd
Fixes BZ #15890.
Diffstat (limited to 'nscd/aicache.c')
-rw-r--r--nscd/aicache.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/nscd/aicache.c b/nscd/aicache.c
index 0461b83079..dceb4d679e 100644
--- a/nscd/aicache.c
+++ b/nscd/aicache.c
@@ -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;