summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorStuart Henderson <sthen@cvs.openbsd.org>2014-03-14 16:03:55 +0000
committerStuart Henderson <sthen@cvs.openbsd.org>2014-03-14 16:03:55 +0000
commit095755402f5775cde9e9eac61d031eb78be0e3cd (patch)
treeeaf1600aacb11c79838df324e6855040100fc081 /usr.sbin
parent484d8522231c1b7bacc638b0b84d502e4231886a (diff)
merge conflicts
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/nsd/configure18
-rw-r--r--usr.sbin/nsd/configure.ac2
-rw-r--r--usr.sbin/nsd/nsd-checkconf.8.in2
-rw-r--r--usr.sbin/nsd/nsd.8.in4
-rw-r--r--usr.sbin/nsd/nsd.conf.5.in2
-rw-r--r--usr.sbin/nsd/server.c14
-rw-r--r--usr.sbin/nsd/xfrd.c16
7 files changed, 43 insertions, 15 deletions
diff --git a/usr.sbin/nsd/configure b/usr.sbin/nsd/configure
index fbb22071e7b..d2d28c195d8 100644
--- a/usr.sbin/nsd/configure
+++ b/usr.sbin/nsd/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for NSD 4.0.2.
+# Generated by GNU Autoconf 2.69 for NSD 4.0.3.
#
# Report bugs to <nsd-bugs@nlnetlabs.nl>.
#
@@ -580,8 +580,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='NSD'
PACKAGE_TARNAME='nsd'
-PACKAGE_VERSION='4.0.2'
-PACKAGE_STRING='NSD 4.0.2'
+PACKAGE_VERSION='4.0.3'
+PACKAGE_STRING='NSD 4.0.3'
PACKAGE_BUGREPORT='nsd-bugs@nlnetlabs.nl'
PACKAGE_URL=''
@@ -1279,7 +1279,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures NSD 4.0.2 to adapt to many kinds of systems.
+\`configure' configures NSD 4.0.3 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1340,7 +1340,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of NSD 4.0.2:";;
+ short | recursive ) echo "Configuration of NSD 4.0.3:";;
esac
cat <<\_ACEOF
@@ -1474,7 +1474,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-NSD configure 4.0.2
+NSD configure 4.0.3
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2183,7 +2183,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by NSD $as_me 4.0.2, which was
+It was created by NSD $as_me 4.0.3, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -9372,7 +9372,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by NSD $as_me 4.0.2, which was
+This file was extended by NSD $as_me 4.0.3, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -9434,7 +9434,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-NSD config.status 4.0.2
+NSD config.status 4.0.3
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/usr.sbin/nsd/configure.ac b/usr.sbin/nsd/configure.ac
index ab634fed56e..03fff3d815c 100644
--- a/usr.sbin/nsd/configure.ac
+++ b/usr.sbin/nsd/configure.ac
@@ -4,7 +4,7 @@ dnl
sinclude(acx_nlnetlabs.m4)
-AC_INIT(NSD,4.0.2,nsd-bugs@nlnetlabs.nl)
+AC_INIT(NSD,4.0.3,nsd-bugs@nlnetlabs.nl)
AC_CONFIG_HEADER([config.h])
AC_AIX
diff --git a/usr.sbin/nsd/nsd-checkconf.8.in b/usr.sbin/nsd/nsd-checkconf.8.in
index 3d7622b763c..28019daf0b7 100644
--- a/usr.sbin/nsd/nsd-checkconf.8.in
+++ b/usr.sbin/nsd/nsd-checkconf.8.in
@@ -1,4 +1,4 @@
-.TH "nsd\-checkconf" "8" "Mar 12, 2014" "NLnet Labs" "nsd 4.0.2"
+.TH "nsd\-checkconf" "8" "Mar 14, 2014" "NLnet Labs" "nsd 4.0.3"
.\" Copyright (c) 2001\-2008, NLnet Labs. All rights reserved.
.\" See LICENSE for the license.
.SH "NAME"
diff --git a/usr.sbin/nsd/nsd.8.in b/usr.sbin/nsd/nsd.8.in
index 88de32a4339..739843b56c0 100644
--- a/usr.sbin/nsd/nsd.8.in
+++ b/usr.sbin/nsd/nsd.8.in
@@ -1,10 +1,10 @@
-.TH "NSD" "8" "Mar 12, 2014" "NLnet Labs" "NSD 4.0.2"
+.TH "NSD" "8" "Mar 14, 2014" "NLnet Labs" "NSD 4.0.3"
.\" Copyright (c) 2001\-2008, NLnet Labs. All rights reserved.
.\" See LICENSE for the license.
.SH "NAME"
.LP
.B nsd
-\- Name Server Daemon (NSD) version 4.0.2.
+\- Name Server Daemon (NSD) version 4.0.3.
.SH "SYNOPSIS"
.LP
.B nsd
diff --git a/usr.sbin/nsd/nsd.conf.5.in b/usr.sbin/nsd/nsd.conf.5.in
index d76f2b59a9b..1fe0144382a 100644
--- a/usr.sbin/nsd/nsd.conf.5.in
+++ b/usr.sbin/nsd/nsd.conf.5.in
@@ -1,4 +1,4 @@
-.TH "nsd.conf" "5" "Mar 12, 2014" "NLnet Labs" "nsd 4.0.2"
+.TH "nsd.conf" "5" "Mar 14, 2014" "NLnet Labs" "nsd 4.0.3"
.\" Copyright (c) 2001\-2008, NLnet Labs. All rights reserved.
.\" See LICENSE for the license.
.SH "NAME"
diff --git a/usr.sbin/nsd/server.c b/usr.sbin/nsd/server.c
index f2188257b18..b208f7b1fb8 100644
--- a/usr.sbin/nsd/server.c
+++ b/usr.sbin/nsd/server.c
@@ -1498,6 +1498,16 @@ server_main(struct nsd *nsd)
}
fsync(reload_listener.fd);
close(reload_listener.fd);
+ /* wait for reload to finish processing */
+ while(1) {
+ if(waitpid(reload_pid, NULL, 0) == -1) {
+ if(errno == EINTR) continue;
+ if(errno == ECHILD) break;
+ log_msg(LOG_ERR, "waitpid(reload %d): %s",
+ (int)reload_pid, strerror(errno));
+ }
+ break;
+ }
}
if(nsd->xfrd_listener->fd != -1) {
/* complete quit, stop xfrd */
@@ -1512,11 +1522,13 @@ server_main(struct nsd *nsd)
close(nsd->xfrd_listener->fd);
(void)kill(nsd->pid, SIGTERM);
}
- xfrd_del_tempdir(nsd);
#if 0 /* OS collects memory pages */
region_destroy(server_region);
#endif
+ /* write the nsd.db to disk, wait for it to complete */
+ udb_base_sync(nsd->db->udb, 1);
+ udb_base_close(nsd->db->udb);
server_shutdown(nsd);
}
diff --git a/usr.sbin/nsd/xfrd.c b/usr.sbin/nsd/xfrd.c
index 166f6a9fac3..997b6b8658c 100644
--- a/usr.sbin/nsd/xfrd.c
+++ b/usr.sbin/nsd/xfrd.c
@@ -152,6 +152,7 @@ xfrd_init(int socket, struct nsd* nsd, int shortsoa, int reload_active)
xfrd->reload_timeout.tv_sec = 0;
xfrd->reload_cmd_last_sent = xfrd->xfrd_start_time;
xfrd->can_send_reload = !reload_active;
+ xfrd->reload_pid = -1;
xfrd->ipc_send_blocked = 0;
event_set(&xfrd->ipc_handler, socket, EV_PERSIST|EV_READ,
@@ -301,6 +302,21 @@ xfrd_shutdown()
}
close_notify_fds(xfrd->notify_zones);
+ /* wait for server parent (if necessary) */
+ if(xfrd->reload_pid != -1) {
+ DEBUG(DEBUG_XFRD,1, (LOG_INFO, "xfrd wait for servermain %d",
+ (int)xfrd->reload_pid));
+ while(1) {
+ if(waitpid(xfrd->reload_pid, NULL, 0) == -1) {
+ if(errno == EINTR) continue;
+ if(errno == ECHILD) break;
+ log_msg(LOG_ERR, "xfrd: waitpid(%d): %s",
+ (int)xfrd->reload_pid, strerror(errno));
+ }
+ break;
+ }
+ }
+
/* if we are killed past this point this is not a problem,
* some files left in /tmp are cleaned by the OS, but it is neater
* to clean them out */