summaryrefslogtreecommitdiff
path: root/usr.sbin/ntpd/config.c
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2005-03-09 20:31:12 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2005-03-09 20:31:12 +0000
commit2757e555f2ad5a3fc0b201dd1cacb23b4e2ab9cd (patch)
tree5d0d67d043c8bab0ace61cebade783e1ad69bbd7 /usr.sbin/ntpd/config.c
parentd837fb81d60916f59d4f7fc3b5f1c4f94935a660 (diff)
nasty: host_dns used to run before forking and chrooting etc, so it was
guaranteed that its res_init() call was done once before fork etc... that is no longer the case. call res_init() in main() early.
Diffstat (limited to 'usr.sbin/ntpd/config.c')
-rw-r--r--usr.sbin/ntpd/config.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/usr.sbin/ntpd/config.c b/usr.sbin/ntpd/config.c
index 03849d08618..36f27d42ce3 100644
--- a/usr.sbin/ntpd/config.c
+++ b/usr.sbin/ntpd/config.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: config.c,v 1.16 2005/03/08 14:59:36 henning Exp $ */
+/* $OpenBSD: config.c,v 1.17 2005/03/09 20:31:11 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -121,7 +121,6 @@ host_dns(const char *s, struct ntp_addr **hn)
bzero(&hints, sizeof(hints));
hints.ai_family = PF_UNSPEC;
hints.ai_socktype = SOCK_DGRAM; /* DUMMY */
- res_init(); /* XXX */
error = getaddrinfo(s, NULL, &hints, &res0);
if (error == EAI_AGAIN || error == EAI_NODATA || error == EAI_NONAME)
return (0);