summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/nsd/configure20
-rw-r--r--usr.sbin/nsd/configure.ac4
-rw-r--r--usr.sbin/nsd/nsd-checkconf.8.in2
-rw-r--r--usr.sbin/nsd/nsd-notify.8.in2
-rw-r--r--usr.sbin/nsd/nsd-patch.8.in4
-rw-r--r--usr.sbin/nsd/nsd-xfer.8.in2
-rw-r--r--usr.sbin/nsd/nsd.8.in4
-rw-r--r--usr.sbin/nsd/nsd.c20
-rw-r--r--usr.sbin/nsd/nsd.conf.5.in2
-rw-r--r--usr.sbin/nsd/nsdc.8.in2
-rw-r--r--usr.sbin/nsd/nsec3.c6
-rw-r--r--usr.sbin/nsd/region-allocator.c8
-rw-r--r--usr.sbin/nsd/zonec.8.in4
13 files changed, 43 insertions, 37 deletions
diff --git a/usr.sbin/nsd/configure b/usr.sbin/nsd/configure
index 10dd42e6a19..fc6a8672d5c 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.68 for NSD 3.2.9.
+# Generated by GNU Autoconf 2.68 for NSD 3.2.10.
#
# Report bugs to <nsd-bugs@nlnetlabs.nl>.
#
@@ -560,8 +560,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='NSD'
PACKAGE_TARNAME='nsd'
-PACKAGE_VERSION='3.2.9'
-PACKAGE_STRING='NSD 3.2.9'
+PACKAGE_VERSION='3.2.10'
+PACKAGE_STRING='NSD 3.2.10'
PACKAGE_BUGREPORT='nsd-bugs@nlnetlabs.nl'
PACKAGE_URL=''
@@ -1256,7 +1256,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 3.2.9 to adapt to many kinds of systems.
+\`configure' configures NSD 3.2.10 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1317,7 +1317,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of NSD 3.2.9:";;
+ short | recursive ) echo "Configuration of NSD 3.2.10:";;
esac
cat <<\_ACEOF
@@ -1443,7 +1443,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-NSD configure 3.2.9
+NSD configure 3.2.10
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1923,7 +1923,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 3.2.9, which was
+It was created by NSD $as_me 3.2.10, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -5264,7 +5264,7 @@ else
cat >conftest.c <<EOF
#include <time.h>
-void testing (void) { struct tm t; char *timestr; strptime(timestr, "%Y%m", &t); }
+int testing (void) { struct tm t; const char *timestr="201201"; return strptime(timestr, "%Y%m", &t)!=0; }
EOF
if test -z "`$CC -Wall -Werror -c conftest.c 2>&1`"; then
eval "ac_cv_c_strptime_needs_defs=no"
@@ -8119,7 +8119,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 3.2.9, which was
+This file was extended by NSD $as_me 3.2.10, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -8181,7 +8181,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 3.2.9
+NSD config.status 3.2.10
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/usr.sbin/nsd/configure.ac b/usr.sbin/nsd/configure.ac
index 79087e654bc..d0bc1711f13 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,3.2.9,nsd-bugs@nlnetlabs.nl)
+AC_INIT(NSD,3.2.10,nsd-bugs@nlnetlabs.nl)
AC_CONFIG_HEADER([config.h])
AC_AIX
@@ -350,7 +350,7 @@ AC_CACHE_VAL(ac_cv_c_strptime_needs_defs,
[
cat >conftest.c <<EOF
#include <time.h>
-void testing (void) { struct tm t; char *timestr; strptime(timestr, "%Y%m", &t); }
+int testing (void) { struct tm t; const char *timestr="201201"; return strptime(timestr, "%Y%m", &t)!=0; }
EOF
if test -z "`$CC -Wall -Werror -c conftest.c 2>&1`"; then
eval "ac_cv_c_strptime_needs_defs=no"
diff --git a/usr.sbin/nsd/nsd-checkconf.8.in b/usr.sbin/nsd/nsd-checkconf.8.in
index b769bd63678..e939b69bd14 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" "Nov 23, 2011" "NLnet Labs" "nsd 3.2.9"
+.TH "nsd\-checkconf" "8" "Feb 15, 2012" "NLnet Labs" "nsd 3.2.10"
.\" Copyright (c) 2001\-2011, NLnet Labs. All rights reserved.
.\" See LICENSE for the license.
.SH "NAME"
diff --git a/usr.sbin/nsd/nsd-notify.8.in b/usr.sbin/nsd/nsd-notify.8.in
index c60e751457a..7b331013045 100644
--- a/usr.sbin/nsd/nsd-notify.8.in
+++ b/usr.sbin/nsd/nsd-notify.8.in
@@ -1,4 +1,4 @@
-.TH "nsd\-notify" "8" "Nov 23, 2011" "NLnet Labs" "nsd 3.2.9"
+.TH "nsd\-notify" "8" "Feb 15, 2012" "NLnet Labs" "nsd 3.2.10"
.\" Copyright (c) 2001\-2011, NLnet Labs. All rights reserved.
.\" See LICENSE for the license.
.SH "NAME"
diff --git a/usr.sbin/nsd/nsd-patch.8.in b/usr.sbin/nsd/nsd-patch.8.in
index 4237c4bbf9d..1e05e01f3aa 100644
--- a/usr.sbin/nsd/nsd-patch.8.in
+++ b/usr.sbin/nsd/nsd-patch.8.in
@@ -1,10 +1,10 @@
-.TH "nsd\-patch" "8" "Nov 23, 2011" "NLnet Labs" "nsd 3.2.9"
+.TH "nsd\-patch" "8" "Feb 15, 2012" "NLnet Labs" "nsd 3.2.10"
.\" Copyright (c) 2001\-2011, NLnet Labs. All rights reserved.
.\" See LICENSE for the license.
.SH "NAME"
.LP
.B nsd\-patch
-\- NSD zone patcher version 3.2.9.
+\- NSD zone patcher version 3.2.10.
.SH "SYNOPSIS"
.B nsd\-patch
.RB [ \-c
diff --git a/usr.sbin/nsd/nsd-xfer.8.in b/usr.sbin/nsd/nsd-xfer.8.in
index 5fe0757c0df..f87a1ea8ae0 100644
--- a/usr.sbin/nsd/nsd-xfer.8.in
+++ b/usr.sbin/nsd/nsd-xfer.8.in
@@ -1,4 +1,4 @@
-.TH "nsd\-xfer" "8" "Nov 23, 2011" "NLnet Labs" "nsd 3.2.9"
+.TH "nsd\-xfer" "8" "Feb 15, 2012" "NLnet Labs" "nsd 3.2.10"
.\" Copyright (c) 2001\-2011, 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 71088291df2..c84118aa2b5 100644
--- a/usr.sbin/nsd/nsd.8.in
+++ b/usr.sbin/nsd/nsd.8.in
@@ -1,10 +1,10 @@
-.TH "NSD" "8" "Nov 23, 2011" "NLnet Labs" "NSD 3.2.9"
+.TH "NSD" "8" "Feb 15, 2012" "NLnet Labs" "NSD 3.2.10"
.\" Copyright (c) 2001\-2011, NLnet Labs. All rights reserved.
.\" See LICENSE for the license.
.SH "NAME"
.LP
.B nsd
-\- Name Server Daemon (NSD) version 3.2.9.
+\- Name Server Daemon (NSD) version 3.2.10.
.SH "SYNOPSIS"
.LP
.B nsd
diff --git a/usr.sbin/nsd/nsd.c b/usr.sbin/nsd/nsd.c
index 9b1f5eeff48..333f897e4ad 100644
--- a/usr.sbin/nsd/nsd.c
+++ b/usr.sbin/nsd/nsd.c
@@ -235,9 +235,18 @@ writepid(struct nsd *nsd)
void
unlinkpid(const char* file)
{
- if (file && unlink(file) == -1)
- log_msg(LOG_ERR, "failed to unlink pidfile %s: %s",
- file, strerror(errno));
+ int fd = -1;
+
+ if (file) {
+ /* truncate pidfile */
+ fd = open(file, O_WRONLY | O_TRUNC, 0644);
+ if (fd != -1)
+ close(fd);
+ /* unlink pidfile */
+ if (unlink(file) == -1)
+ log_msg(LOG_WARNING, "failed to unlink pidfile %s: %s",
+ file, strerror(errno));
+ }
}
/*
@@ -384,8 +393,9 @@ main(int argc, char *argv[])
#endif /* HAVE_GETPWNAM */
/* For initialising the address info structures */
- struct addrinfo hints[MAX_INTERFACES];
- const char *nodes[MAX_INTERFACES];
+ /* static so it can get very big without overflowing the stack */
+ static struct addrinfo hints[MAX_INTERFACES];
+ static const char *nodes[MAX_INTERFACES];
const char *udp_port = 0;
const char *tcp_port = 0;
diff --git a/usr.sbin/nsd/nsd.conf.5.in b/usr.sbin/nsd/nsd.conf.5.in
index b062ff4ace6..7bce9976ce3 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" "Nov 23, 2011" "NLnet Labs" "nsd 3.2.9"
+.TH "nsd.conf" "5" "Feb 15, 2012" "NLnet Labs" "nsd 3.2.10"
.\" Copyright (c) 2001\-2011, NLnet Labs. All rights reserved.
.\" See LICENSE for the license.
.SH "NAME"
diff --git a/usr.sbin/nsd/nsdc.8.in b/usr.sbin/nsd/nsdc.8.in
index 9b6d6a0015a..7845d27ab7d 100644
--- a/usr.sbin/nsd/nsdc.8.in
+++ b/usr.sbin/nsd/nsdc.8.in
@@ -1,4 +1,4 @@
-.TH "NSDC" "8" "Nov 23, 2011" "NLnet Labs" "NSDC 3.2.9"
+.TH "NSDC" "8" "Feb 15, 2012" "NLnet Labs" "NSDC 3.2.10"
.\" Copyright (c) 2001\-2011, NLnet Labs. All rights reserved.
.\" See LICENSE for the license.
.SH "NAME"
diff --git a/usr.sbin/nsd/nsec3.c b/usr.sbin/nsd/nsec3.c
index dc1feadb430..f4e0cbc0c93 100644
--- a/usr.sbin/nsd/nsec3.c
+++ b/usr.sbin/nsd/nsec3.c
@@ -953,16 +953,14 @@ domain_has_only_NSEC3(struct domain* domain, struct zone* zone)
{
/* check for only NSEC3/RRSIG */
rrset_type* rrset = domain->rrsets;
- int nsec3_seen = 0, rrsig_seen = 0;
+ int nsec3_seen = 0;
while(rrset)
{
if(!zone || rrset->zone == zone)
{
if(rrset->rrs[0].type == TYPE_NSEC3)
nsec3_seen = 1;
- else if(rrset->rrs[0].type == TYPE_RRSIG)
- rrsig_seen = 1;
- else
+ else if(rrset->rrs[0].type != TYPE_RRSIG)
return 0;
}
rrset = rrset->next;
diff --git a/usr.sbin/nsd/region-allocator.c b/usr.sbin/nsd/region-allocator.c
index 950cc076a02..3deed554f82 100644
--- a/usr.sbin/nsd/region-allocator.c
+++ b/usr.sbin/nsd/region-allocator.c
@@ -443,7 +443,7 @@ region_log_stats(region_type *region)
char buf[10240], *str=buf;
int strl = sizeof(buf);
int len=0;
- snprintf(str, strl, "%lu objects (%lu small/%lu large), %lu bytes allocated (%lu wasted) in %lu chunks, %lu cleanups, %lu in recyclebin%n",
+ len=snprintf(str, strl, "%lu objects (%lu small/%lu large), %lu bytes allocated (%lu wasted) in %lu chunks, %lu cleanups, %lu in recyclebin",
(unsigned long) (region->small_objects + region->large_objects),
(unsigned long) region->small_objects,
(unsigned long) region->large_objects,
@@ -451,8 +451,7 @@ region_log_stats(region_type *region)
(unsigned long) region->unused_space,
(unsigned long) region->chunk_count,
(unsigned long) region->cleanup_count,
- (unsigned long) region->recycle_size,
- &len);
+ (unsigned long) region->recycle_size);
str+=len;
strl-=len;
if(1 && region->recycle_bin) {
@@ -466,8 +465,7 @@ region_log_stats(region_type *region)
el = el->next;
}
if(i%ALIGNMENT == 0 && i!=0) {
- snprintf(str, strl, " %lu%n", (unsigned long)count,
- &len);
+ len=snprintf(str, strl, " %lu", (unsigned long)count);
str+=len;
strl-=len;
}
diff --git a/usr.sbin/nsd/zonec.8.in b/usr.sbin/nsd/zonec.8.in
index b394af02639..9c38be395c5 100644
--- a/usr.sbin/nsd/zonec.8.in
+++ b/usr.sbin/nsd/zonec.8.in
@@ -1,10 +1,10 @@
-.TH "nsd\-zonec" "8" "Nov 23, 2011" "NLnet Labs" "nsd 3.2.9"
+.TH "nsd\-zonec" "8" "Feb 15, 2012" "NLnet Labs" "nsd 3.2.10"
.\" Copyright (c) 2001\-2011, NLnet Labs. All rights reserved.
.\" See LICENSE for the license.
.SH "NAME"
.LP
.B nsd\-zonec
-\- NSD zone compiler version 3.2.9.
+\- NSD zone compiler version 3.2.10.
.SH "SYNOPSIS"
.LP
.B nsd\-zonec