summaryrefslogtreecommitdiffstats
path: root/contrib/bind/bin
diff options
context:
space:
mode:
authorasmodai <asmodai@FreeBSD.org>2000-10-31 12:35:45 +0000
committerasmodai <asmodai@FreeBSD.org>2000-10-31 12:35:45 +0000
commit90887e8f5bdae690c1ceca0ae12853e5e66c5282 (patch)
treeded7434aeb301ad84d14ba3ce978e6cf9daa040d /contrib/bind/bin
parent0cde5af39957d47be39dccb2c23851221c739115 (diff)
downloadFreeBSD-src-90887e8f5bdae690c1ceca0ae12853e5e66c5282.zip
FreeBSD-src-90887e8f5bdae690c1ceca0ae12853e5e66c5282.tar.gz
Virgin import of BIND v8.2.3-T6B
Diffstat (limited to 'contrib/bind/bin')
-rw-r--r--contrib/bind/bin/Makefile7
-rw-r--r--contrib/bind/bin/addr/Makefile5
-rw-r--r--contrib/bind/bin/dig/Makefile5
-rw-r--r--contrib/bind/bin/dig/dig.c9
-rw-r--r--contrib/bind/bin/dnskeygen/Makefile5
-rw-r--r--contrib/bind/bin/dnsquery/Makefile5
-rw-r--r--contrib/bind/bin/dnsquery/dnsquery.c14
-rw-r--r--contrib/bind/bin/host/Makefile5
-rw-r--r--contrib/bind/bin/host/host.c4
-rw-r--r--contrib/bind/bin/irpd/Makefile7
-rw-r--r--contrib/bind/bin/mkservdb/Makefile5
-rw-r--r--contrib/bind/bin/named-bootconf/Makefile5
-rw-r--r--contrib/bind/bin/named-xfer/Makefile5
-rw-r--r--contrib/bind/bin/named-xfer/named-xfer.c7
-rw-r--r--contrib/bind/bin/named/Makefile5
-rw-r--r--contrib/bind/bin/named/db_load.c4
-rw-r--r--contrib/bind/bin/named/ns_glob.h3
-rw-r--r--contrib/bind/bin/named/ns_glue.c3
-rw-r--r--contrib/bind/bin/named/ns_main.c63
-rw-r--r--contrib/bind/bin/named/ns_maint.c14
-rw-r--r--contrib/bind/bin/named/ns_req.c26
-rw-r--r--contrib/bind/bin/named/ns_resp.c6
-rw-r--r--contrib/bind/bin/named/ns_signal.c5
-rw-r--r--contrib/bind/bin/named/ns_update.c134
-rw-r--r--contrib/bind/bin/ndc/Makefile5
-rw-r--r--contrib/bind/bin/nslookup/Makefile7
-rw-r--r--contrib/bind/bin/nslookup/debug.c11
-rw-r--r--contrib/bind/bin/nslookup/getinfo.c10
-rw-r--r--contrib/bind/bin/nsupdate/Makefile5
-rw-r--r--contrib/bind/bin/nsupdate/nsupdate.c6
30 files changed, 227 insertions, 168 deletions
diff --git a/contrib/bind/bin/Makefile b/contrib/bind/bin/Makefile
index ffe01a3..57fcc58 100644
--- a/contrib/bind/bin/Makefile
+++ b/contrib/bind/bin/Makefile
@@ -13,7 +13,7 @@
## ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
## SOFTWARE.
-# $Id: Makefile,v 8.27 1999/08/08 17:13:24 vixie Exp $
+# $Id: Makefile,v 8.28 2000/07/11 06:41:26 vixie Exp $
DESTDIR=
CC= cc
@@ -54,11 +54,12 @@ MARGS = "SYSTYPE=${SYSTYPE}" "SHELL=${SHELL}" "A=${A}" "O=${O}" \
"RANLIB=${RANLIB}" "AR=${AR}" "ARPREF=${ARPREF}" "ARSUFF=${ARSUFF}" \
"INCL=../${INCL}" "PORTINCL=../${PORTINCL}" "EXE=${EXE}" \
"LIBBIND=../${LIBBIND}" "LIBPORT=../${LIBPORT}" \
- "INSTALL=${INSTALL}" "CPPFLAGS=${CPPFLAGS}" "TOP=../${TOP}" \
+ "INSTALL=${INSTALL}" "TOP=../${TOP}" \
"VER=${VER}" "STRIP=${STRIP}" "PS=${PS}" "INSTALL_LIB=${INSTALL_LIB}" \
"INSTALL_EXEC=${INSTALL_EXEC}" "BOUNDS=${BOUNDS}"
-CFLAGS= ${CDEBUG} -I${PORTINCL} -I${INCL}
+CFLAGS= ${CDEBUG}
+CPPFLAGS= -I${PORTINCL} -I${INCL}
SUBDIRS = addr nslookup dig dnsquery host named named-xfer ndc nsupdate \
mkservdb irpd dnskeygen named-bootconf
diff --git a/contrib/bind/bin/addr/Makefile b/contrib/bind/bin/addr/Makefile
index 18dd281..98b7a91 100644
--- a/contrib/bind/bin/addr/Makefile
+++ b/contrib/bind/bin/addr/Makefile
@@ -13,7 +13,7 @@
## ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
## SOFTWARE.
-# $Id: Makefile,v 8.25 1999/08/08 17:51:00 vixie Exp $
+# $Id: Makefile,v 8.26 2000/07/11 06:41:27 vixie Exp $
DESTDIR=
CC= cc
@@ -42,7 +42,8 @@ INSTALL_EXEC=
INSTALL_LIB=-o bin -g bin
LDFLAGS=
-CFLAGS= ${CDEBUG} -I${PORTINCL} -I${INCL}
+CFLAGS= ${CDEBUG}
+CPPFLAGS= -I${PORTINCL} -I${INCL}
PROG= addr
SRCS= ${PROG}.c
diff --git a/contrib/bind/bin/dig/Makefile b/contrib/bind/bin/dig/Makefile
index 250df96..ca7775d 100644
--- a/contrib/bind/bin/dig/Makefile
+++ b/contrib/bind/bin/dig/Makefile
@@ -13,7 +13,7 @@
## ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
## SOFTWARE.
-# $Id: Makefile,v 8.25 1999/08/08 17:51:01 vixie Exp $
+# $Id: Makefile,v 8.26 2000/07/11 06:41:27 vixie Exp $
DESTDIR=
CC= cc
@@ -42,7 +42,8 @@ INSTALL_EXEC=
INSTALL_LIB=-o bin -g bin
LDFLAGS=
-CFLAGS= ${CDEBUG} -I${PORTINCL} -I${INCL}
+CFLAGS= ${CDEBUG}
+CPPFLAGS= -I${PORTINCL} -I${INCL}
NSLOOKUP_OBJS= \
../nslookup/subr.${O} ../nslookup/send.${O} \
diff --git a/contrib/bind/bin/dig/dig.c b/contrib/bind/bin/dig/dig.c
index 8d5f5be..de192e0 100644
--- a/contrib/bind/bin/dig/dig.c
+++ b/contrib/bind/bin/dig/dig.c
@@ -1,5 +1,5 @@
#ifndef lint
-static const char rcsid[] = "$Id: dig.c,v 8.41 2000/04/20 07:36:04 vixie Exp $";
+static const char rcsid[] = "$Id: dig.c,v 8.42 2000/07/17 07:36:52 vixie Exp $";
#endif
/*
@@ -167,6 +167,7 @@ static const char rcsid[] = "$Id: dig.c,v 8.41 2000/04/20 07:36:04 vixie Exp $";
#include <isc/dst.h>
+#include <assert.h>
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
@@ -348,6 +349,7 @@ main(int argc, char **argv) {
res.id = 1;
gettimeofday(&tv1, NULL);
+ assert(tv1.tv_usec >= 0 && tv1.tv_usec < 1000000);
/*
* Main section: once if cmd-line query
@@ -848,6 +850,7 @@ main(int argc, char **argv) {
if (res.pfcode & RES_PRF_HEAD1)
fp_resstat(&res, stdout);
(void) gettimeofday(&start_time, NULL);
+ assert(start_time.tv_usec >= 0 && start_time.tv_usec < 1000000);
if (keyfile)
n = res_nsendsigned(&res, packet, n, &key, answer, sizeof answer);
else
@@ -872,6 +875,7 @@ main(int argc, char **argv) {
}
}
(void) gettimeofday(&end_time, NULL);
+ assert(end_time.tv_usec >= 0 && end_time.tv_usec < 1000000);
if (res.pfcode & RES_PRF_STATS) {
time_t t;
@@ -905,6 +909,7 @@ main(int argc, char **argv) {
* batches started at different sites somewhat synchronized.
*/
gettimeofday(&tv2, NULL);
+ assert(tv2.tv_usec >= 0 && tv2.tv_usec < 1000000);
delay = (int)(tv2.tv_sec - tv1.tv_sec);
if (delay < wait) {
sleep(wait - delay);
@@ -949,7 +954,7 @@ where: server,\n\
fputs("\
notes: defname and search don't work; use fully-qualified names.\n\
this is DiG version " VSTRING "\n\
- $Id: dig.c,v 8.41 2000/04/20 07:36:04 vixie Exp $\n\
+ $Id: dig.c,v 8.42 2000/07/17 07:36:52 vixie Exp $\n\
", stderr);
}
diff --git a/contrib/bind/bin/dnskeygen/Makefile b/contrib/bind/bin/dnskeygen/Makefile
index bea8511..232a206 100644
--- a/contrib/bind/bin/dnskeygen/Makefile
+++ b/contrib/bind/bin/dnskeygen/Makefile
@@ -13,7 +13,7 @@
## ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
## SOFTWARE.
-# $Id: Makefile,v 1.5 1999/08/08 17:51:01 vixie Exp $
+# $Id: Makefile,v 1.6 2000/07/11 06:41:28 vixie Exp $
DESTDIR=
CC= cc
@@ -44,7 +44,8 @@ INSTALL_LIB=-o bin -g bin
PS=ps
LDFLAGS=
-CFLAGS= ${CDEBUG} -I${PORTINCL} -I${INCL}
+CFLAGS= ${CDEBUG}
+CPPFLAGS= -I${PORTINCL} -I${INCL}
PROG= dnskeygen
SRCS= dnskeygen.c
diff --git a/contrib/bind/bin/dnsquery/Makefile b/contrib/bind/bin/dnsquery/Makefile
index a643702..511cb66 100644
--- a/contrib/bind/bin/dnsquery/Makefile
+++ b/contrib/bind/bin/dnsquery/Makefile
@@ -13,7 +13,7 @@
## ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
## SOFTWARE.
-# $Id: Makefile,v 8.24 1999/08/08 17:51:01 vixie Exp $
+# $Id: Makefile,v 8.25 2000/07/11 06:41:29 vixie Exp $
DESTDIR=
CC= cc
@@ -42,7 +42,8 @@ INSTALL_EXEC=
INSTALL_LIB=-o bin -g bin
LDFLAGS=
-CFLAGS= ${CDEBUG} -I${PORTINCL} -I${INCL}
+CFLAGS= ${CDEBUG}
+CPPFLAGS= -I${PORTINCL} -I${INCL}
PROG= dnsquery
SRCS= ${PROG}.c
diff --git a/contrib/bind/bin/dnsquery/dnsquery.c b/contrib/bind/bin/dnsquery/dnsquery.c
index 31d5d62..218c8a8 100644
--- a/contrib/bind/bin/dnsquery/dnsquery.c
+++ b/contrib/bind/bin/dnsquery/dnsquery.c
@@ -80,12 +80,7 @@ main(int argc, char *argv[]) {
case 'p' : res.retrans = atoi(optarg);
break;
- case 'h' : if (strlen(optarg) >= sizeof(name)) {
- fprintf(stderr,
- "Domain name too long (%s)\n", optarg);
- exit(-1);
- } else
- strcpy(name, optarg);
+ case 'h' : strcpy(name, optarg);
break;
case 'c' : {
@@ -163,12 +158,7 @@ main(int argc, char *argv[]) {
}
}
if (optind < argc)
- if (strlen(argv[optind]) >= sizeof(name)) {
- fprintf(stderr,
- "Domain name too long (%s)\n", argv[optind]);
- exit(-1);
- } else
- strcpy(name, argv[optind]);
+ strcpy(name, argv[optind]);
len = sizeof(answer);
diff --git a/contrib/bind/bin/host/Makefile b/contrib/bind/bin/host/Makefile
index f121ab7..b4f07ad 100644
--- a/contrib/bind/bin/host/Makefile
+++ b/contrib/bind/bin/host/Makefile
@@ -13,7 +13,7 @@
## ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
## SOFTWARE.
-# $Id: Makefile,v 8.24 1999/08/08 17:51:01 vixie Exp $
+# $Id: Makefile,v 8.25 2000/07/11 06:41:29 vixie Exp $
DESTDIR=
CC= cc
@@ -42,7 +42,8 @@ INSTALL_EXEC=
INSTALL_LIB=-o bin -g bin
LDFLAGS=
-CFLAGS= ${CDEBUG} -I${PORTINCL} -I${INCL}
+CFLAGS= ${CDEBUG}
+CPPFLAGS= -I${PORTINCL} -I${INCL}
PROG= host
SRCS= ${PROG}.c
diff --git a/contrib/bind/bin/host/host.c b/contrib/bind/bin/host/host.c
index 1a66b8b..77e5329 100644
--- a/contrib/bind/bin/host/host.c
+++ b/contrib/bind/bin/host/host.c
@@ -1,5 +1,5 @@
#ifndef lint
-static const char rcsid[] = "$Id: host.c,v 8.36 2000/01/25 00:20:21 cyarnell Exp $";
+static const char rcsid[] = "$Id: host.c,v 8.37 2000/07/11 07:06:14 vixie Exp $";
#endif /* not lint */
/*
@@ -1043,7 +1043,7 @@ pr_rr(const u_char *cp, const u_char *msg, FILE *file, int filter) {
cp += sizeof(u_short);
cp = (u_char *)pr_cdname(cp, msg, name, sizeof(name));
if (doprint)
- fprintf(file,"%s",name);
+ fprintf(file, " %s", name);
break;
case ns_t_naptr:
diff --git a/contrib/bind/bin/irpd/Makefile b/contrib/bind/bin/irpd/Makefile
index 4d2c0fc..9eaf4cc 100644
--- a/contrib/bind/bin/irpd/Makefile
+++ b/contrib/bind/bin/irpd/Makefile
@@ -13,7 +13,7 @@
## ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
## SOFTWARE.
-# $Id: Makefile,v 1.4 2000/05/09 07:02:22 vixie Exp $
+# $Id: Makefile,v 1.6 2000/07/17 07:15:08 vixie Exp $
DESTDIR=
CC= cc
@@ -46,7 +46,8 @@ STRIP=-s
PS=ps
LDFLAGS=
-CFLAGS= ${CDEBUG} -I${PORTINCL} -I${INCL} -I${TOP}/lib/irs ${DEFS}
+CFLAGS= ${CDEBUG}
+CPPFLAGS= -I${PORTINCL} -I${INCL} -I${TOP}/lib/irs ${DEFS}
VER= LOCAL-`date +%y%m%d.%H%M%S`
HOSTNAMECMD= hostname || uname -n
@@ -61,6 +62,8 @@ all: ${PROG}${EXE}
${PROG}${EXE}: irpd.${O} tmp_version.${O} ${LIBBIND}
${CC} ${CDEBUG} ${LDFLAGS} -o ${PROG}${EXE} ${OBJS} tmp_version.${O} \
${LIBBIND} ${SYSLIBS}
+.c.${O}:
+ ${CC} ${CPPFLAGS} ${CFLAGS} ${BOUNDS} -c $*.c
tmp_version.${O}: tmp_version.c
diff --git a/contrib/bind/bin/mkservdb/Makefile b/contrib/bind/bin/mkservdb/Makefile
index 47af236..300505d 100644
--- a/contrib/bind/bin/mkservdb/Makefile
+++ b/contrib/bind/bin/mkservdb/Makefile
@@ -13,7 +13,7 @@
## ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
## SOFTWARE.
-# $Id: Makefile,v 1.6 1999/08/08 17:51:01 vixie Exp $
+# $Id: Makefile,v 1.7 2000/07/11 06:41:30 vixie Exp $
DESTDIR=
CC= cc
@@ -41,7 +41,8 @@ INSTALL_EXEC=
INSTALL_LIB=-o bin -g bin
LDFLAGS=
-CFLAGS= ${CDEBUG} -I${PORTINCL} -I${INCL}
+CFLAGS= ${CDEBUG}
+CPPFLAGS= -I${PORTINCL} -I${INCL}
PROG= mkservdb
SRCS= ${PROG}.c
diff --git a/contrib/bind/bin/named-bootconf/Makefile b/contrib/bind/bin/named-bootconf/Makefile
index 4c1a0df..35403e9 100644
--- a/contrib/bind/bin/named-bootconf/Makefile
+++ b/contrib/bind/bin/named-bootconf/Makefile
@@ -13,7 +13,7 @@
## ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
## SOFTWARE.
-# $Id: Makefile,v 1.1 1999/01/07 02:09:37 vixie Exp $
+# $Id: Makefile,v 1.2 2000/07/11 06:41:33 vixie Exp $
DESTDIR=
CC= cc
@@ -41,7 +41,8 @@ INSTALL_EXEC=
INSTALL_LIB=-o bin -g bin
LDFLAGS=
-CFLAGS= ${CDEBUG} -I${PORTINCL} -I${INCL}
+CFLAGS= ${CDEBUG}
+CPPFLAGS= -I${PORTINCL} -I${INCL}
PROG= named-bootconf
diff --git a/contrib/bind/bin/named-xfer/Makefile b/contrib/bind/bin/named-xfer/Makefile
index 76d9684..b85a4d5 100644
--- a/contrib/bind/bin/named-xfer/Makefile
+++ b/contrib/bind/bin/named-xfer/Makefile
@@ -13,7 +13,7 @@
## ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
## SOFTWARE.
-# $Id: Makefile,v 8.29 1999/08/08 17:51:02 vixie Exp $
+# $Id: Makefile,v 8.30 2000/07/11 06:41:34 vixie Exp $
DESTDIR=
CC= cc
@@ -45,7 +45,8 @@ INSTALL_LIB=-o bin -g bin
PS=ps
LDFLAGS=
-CFLAGS= ${CDEBUG} -I${PORTINCL} -I${INCL}
+CFLAGS= ${CDEBUG}
+CPPFLAGS= -I${PORTINCL} -I${INCL}
NAMED_OBJS= \
../named/db_glue.${O} ../named/ns_glue.${O} ../named/tmp_version.${O}
diff --git a/contrib/bind/bin/named-xfer/named-xfer.c b/contrib/bind/bin/named-xfer/named-xfer.c
index 59fff9f..3747526 100644
--- a/contrib/bind/bin/named-xfer/named-xfer.c
+++ b/contrib/bind/bin/named-xfer/named-xfer.c
@@ -130,7 +130,7 @@ char copyright[] =
#if !defined(lint) && !defined(SABER)
static const char sccsid[] = "@(#)named-xfer.c 4.18 (Berkeley) 3/7/91";
-static const char rcsid[] = "$Id: named-xfer.c,v 8.93 2000/04/20 07:33:47 vixie Exp $";
+static const char rcsid[] = "$Id: named-xfer.c,v 8.94 2000/07/11 05:38:27 vixie Exp $";
#endif /* not lint */
#include "port_before.h"
@@ -1215,6 +1215,7 @@ getzone(struct zoneinfo *zp, u_int32_t serial_no, int port) {
* the response.
*/
loop_cnt = 0;
+ bp = NULL;
do {
u_char *cp4;
u_short type, class, dlen;
@@ -1226,6 +1227,9 @@ getzone(struct zoneinfo *zp, u_int32_t serial_no, int port) {
}
tmp += n;
+ if (loop_cnt == 0)
+ bp = tmp;
+
/* Are type, class, and ttl OK? */
cp4 = tmp; /* Leave tmp pointing to type field */
if (eom - cp4 < 3 * INT16SZ + INT32SZ) {
@@ -1246,7 +1250,6 @@ getzone(struct zoneinfo *zp, u_int32_t serial_no, int port) {
break;
}
if ((methode == ISIXFR) && (loop_cnt == 0)) {
- bp = tmp;
soa_cnt++;
badsoa_msg = soa_zinfo(&zp_finish, tmp, eom);
if (badsoa_msg)
diff --git a/contrib/bind/bin/named/Makefile b/contrib/bind/bin/named/Makefile
index 03f533d..fb50427 100644
--- a/contrib/bind/bin/named/Makefile
+++ b/contrib/bind/bin/named/Makefile
@@ -13,7 +13,7 @@
## ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
## SOFTWARE.
-# $Id: Makefile,v 8.49 2000/05/09 07:02:22 vixie Exp $
+# $Id: Makefile,v 8.50 2000/07/11 06:41:32 vixie Exp $
DESTDIR=
CC= cc
@@ -47,7 +47,8 @@ INSTALL_LIB=-o bin -g bin
PS=ps
LDFLAGS=
-CFLAGS= ${CDEBUG} -I${PORTINCL} -I${INCL} ${DEFS}
+CFLAGS= ${CDEBUG}
+CPPFLAGS= -I${PORTINCL} -I${INCL} ${DEFS}
VER= LOCAL-`date +%y%m%d.%H%M%S`
HOSTNAMECMD= hostname || uname -n
diff --git a/contrib/bind/bin/named/db_load.c b/contrib/bind/bin/named/db_load.c
index 2d6a6e5..305944c 100644
--- a/contrib/bind/bin/named/db_load.c
+++ b/contrib/bind/bin/named/db_load.c
@@ -1,6 +1,6 @@
#if !defined(lint) && !defined(SABER)
static const char sccsid[] = "@(#)db_load.c 4.38 (Berkeley) 3/2/91";
-static const char rcsid[] = "$Id: db_load.c,v 8.103 2000/04/21 06:54:02 vixie Exp $";
+static const char rcsid[] = "$Id: db_load.c,v 8.104 2000/07/17 07:48:09 vixie Exp $";
#endif /* not lint */
/*
@@ -530,7 +530,7 @@ db_load(const char *filename, const char *in_origin,
ns_warning(ns_log_load,
"Zone \"%s\" (file %s): %s",
zp->z_origin, filename,
- "No default TTL set using SOA minimum instead");
+ "No default TTL ($TTL <value>) set, using SOA minimum instead");
default_warn = 0;
}
ttl = (u_int32_t)default_ttl;
diff --git a/contrib/bind/bin/named/ns_glob.h b/contrib/bind/bin/named/ns_glob.h
index af0ea30..e9f70e7 100644
--- a/contrib/bind/bin/named/ns_glob.h
+++ b/contrib/bind/bin/named/ns_glob.h
@@ -1,6 +1,6 @@
/*
* from ns.h 4.33 (Berkeley) 8/23/90
- * $Id: ns_glob.h,v 8.54 2000/04/21 06:54:07 vixie Exp $
+ * $Id: ns_glob.h,v 8.55 2000/07/20 22:50:38 vixie Exp $
*/
/*
@@ -209,7 +209,6 @@ DECL options server_options INIT(NULL);
DECL server_info nameserver_info INIT(NULL);
DECL key_info_list secretkey_info INIT(NULL);
-DECL int main_needs_exit INIT(0);
DECL ip_match_list bogus_nameservers INIT(NULL);
DECL log_context log_ctx;
diff --git a/contrib/bind/bin/named/ns_glue.c b/contrib/bind/bin/named/ns_glue.c
index 9c40dde..8360ad5 100644
--- a/contrib/bind/bin/named/ns_glue.c
+++ b/contrib/bind/bin/named/ns_glue.c
@@ -1,5 +1,5 @@
#if !defined(lint) && !defined(SABER)
-static const char rcsid[] = "$Id: ns_glue.c,v 8.16 2000/04/21 06:50:18 vixie Exp $";
+static const char rcsid[] = "$Id: ns_glue.c,v 8.17 2000/07/17 07:36:52 vixie Exp $";
#endif /* not lint */
/*
@@ -252,6 +252,7 @@ void
gettime(struct timeval *ttp) {
if (gettimeofday(ttp, NULL) < 0)
ns_error(ns_log_default, "gettimeofday: %s", strerror(errno));
+ INSIST(ttp->tv_usec >= 0 && ttp->tv_usec < 1000000);
}
/*
diff --git a/contrib/bind/bin/named/ns_main.c b/contrib/bind/bin/named/ns_main.c
index 199190f..1461807 100644
--- a/contrib/bind/bin/named/ns_main.c
+++ b/contrib/bind/bin/named/ns_main.c
@@ -1,6 +1,6 @@
#if !defined(lint) && !defined(SABER)
static const char sccsid[] = "@(#)ns_main.c 4.55 (Berkeley) 7/1/91";
-static const char rcsid[] = "$Id: ns_main.c,v 8.125 2000/04/21 06:54:08 vixie Exp $";
+static const char rcsid[] = "$Id: ns_main.c,v 8.126 2000/07/20 22:50:39 vixie Exp $";
#endif /* not lint */
/*
@@ -163,8 +163,9 @@ static u_int16_t nsid_state2;
static int nsid_algorithm;
typedef void (*handler)(void);
-static int needs = 0;
+static int needs = 0, needs_exit = 0;
static handler handlers[main_need_num];
+static void need_waitfunc(evContext, void *, const void *);
static struct qstream *sq_add(void);
static int opensocket_d(interface *),
@@ -196,7 +197,7 @@ static void stream_send(evContext, void *, int,
static int only_digits(const char *);
static void init_needs(void),
- handle_need(void);
+ handle_needs(void);
#ifndef HAVE_CUSTOM
static void custom_init(void),
@@ -525,21 +526,16 @@ main(int argc, char *argv[], char *envp[]) {
ns_notice(ns_log_default, "Ready to answer queries.");
gettime(&tt);
prime_cache();
- while (!main_needs_exit) {
+ while (!needs_exit) {
evEvent event;
ns_debug(ns_log_default, 15, "main loop");
- if (needs != 0) {
- /* Drain outstanding events; handlers ~block~. */
- while (evGetNext(ev, &event, EV_POLL) != -1)
- INSIST_ERR(evDispatch(ev, event) != -1);
- INSIST_ERR(errno == EINTR || errno == EWOULDBLOCK);
- handle_need();
- } else if (evGetNext(ev, &event, EV_WAIT) != -1) {
+ if (needs != 0)
+ handle_needs();
+ else if (evGetNext(ev, &event, EV_WAIT) != -1)
INSIST_ERR(evDispatch(ev, event) != -1);
- } else {
+ else
INSIST_ERR(errno == EINTR);
- }
}
ns_info(ns_log_default, "named shutting down");
#ifdef BIND_UPDATE
@@ -2551,11 +2547,6 @@ deallocate_everything(void) {
}
static void
-ns_exit(void) {
- main_needs_exit++;
-}
-
-static void
ns_restart(void) {
ns_info(ns_log_default, "named restarting");
#ifdef BIND_UPDATE
@@ -2639,7 +2630,7 @@ init_needs(void) {
handlers[main_need_zoneload] = loadxfer;
handlers[main_need_dump] = doadump;
handlers[main_need_statsdump] = ns_stats;
- handlers[main_need_exit] = ns_exit;
+ handlers[main_need_exit] = wild;
handlers[main_need_qrylog] = toggle_qrylog;
handlers[main_need_debug] = use_desired_debug;
handlers[main_need_restart] = ns_restart;
@@ -2648,20 +2639,32 @@ init_needs(void) {
}
static void
-handle_need(void) {
- int need;
+handle_needs(void) {
+ int need, queued = 0;
- ns_debug(ns_log_default, 15, "handle_need()");
+ ns_debug(ns_log_default, 15, "handle_needs()");
+ block_signals();
for (need = 0; need < main_need_num; need++)
if ((needs & (1 << need)) != 0) {
- /* Turn off flag first, handlers ~turn~ it back on. */
- block_signals();
- needs &= ~(1 << need);
- unblock_signals();
- (handlers[need])();
- return;
+ INSIST_ERR(evWaitFor(ev, handle_needs, need_waitfunc,
+ handlers[need], NULL) != -1);
+ queued++;
}
- ns_panic(ns_log_default, 1, "handle_need() found no needs", NULL);
+ needs = 0;
+ unblock_signals();
+ ns_debug(ns_log_default, 15, "handle_needs(): queued %d", queued);
+ if (queued != 0) {
+ INSIST_ERR(evDo(ev, handle_needs) != -1);
+ return;
+ }
+ ns_panic(ns_log_default, 1, "ns_handle_needs: queued == 0", NULL);
+}
+
+static void
+need_waitfunc(evContext ctx, void *uap, const void *tag) {
+ handler hand = (handler) uap;
+
+ (*hand)();
}
void
@@ -2675,6 +2678,8 @@ ns_need(enum need need) {
void
ns_need_unsafe(enum need need) {
needs |= (1 << need);
+ if (need == main_need_exit)
+ needs_exit = 1;
}
void
diff --git a/contrib/bind/bin/named/ns_maint.c b/contrib/bind/bin/named/ns_maint.c
index 9b9e16e..952774f 100644
--- a/contrib/bind/bin/named/ns_maint.c
+++ b/contrib/bind/bin/named/ns_maint.c
@@ -1,6 +1,6 @@
#if !defined(lint) && !defined(SABER)
static const char sccsid[] = "@(#)ns_maint.c 4.39 (Berkeley) 3/2/91";
-static const char rcsid[] = "$Id: ns_maint.c,v 8.103 2000/04/23 02:18:58 vixie Exp $";
+static const char rcsid[] = "$Id: ns_maint.c,v 8.105 2000/07/17 07:25:00 vixie Exp $";
#endif /* not lint */
/*
@@ -586,12 +586,12 @@ qserial_answer(struct qinfo *qp) {
if (qs->serial != zp->z_serial)
ns_notice(ns_log_xfer_in,
- "Zone \"%s\" (%s) SOA serial# (%lu) rcvd from [%s] is < ours (%lu)%s",
+ "Zone \"%s\" (%s) SOA serial# (%lu) rcvd from [%s] is < ours (%lu)%s",
zp->z_origin, p_class(zp->z_class),
- qs->serial,
+ (u_long) qs->serial,
inet_ntoa(qs->ns_addr.sin_addr),
- zp->z_serial, qp->q_naddr != 1 ?
- ": skipping" : "");
+ (u_long) zp->z_serial,
+ qp->q_naddr!=1 ? ": skipping" : "");
qs->serial = 0;
continue;
}
@@ -834,8 +834,10 @@ startxfer(struct zoneinfo *zp) {
return;
}
- if ((pid = spawnxfer(argv, zp)) == -1)
+ if ((pid = spawnxfer(argv, zp)) == -1) {
unlink(tsig_name);
+ return;
+ }
xferstatus[i].xfer_state = XFER_RUNNING;
xferstatus[i].xfer_pid = pid; /* XXX - small race condition here if we
diff --git a/contrib/bind/bin/named/ns_req.c b/contrib/bind/bin/named/ns_req.c
index 5e1459c..d6add30 100644
--- a/contrib/bind/bin/named/ns_req.c
+++ b/contrib/bind/bin/named/ns_req.c
@@ -1,6 +1,6 @@
#if !defined(lint) && !defined(SABER)
static const char sccsid[] = "@(#)ns_req.c 4.47 (Berkeley) 7/1/91";
-static const char rcsid[] = "$Id: ns_req.c,v 8.113 2000/04/21 06:54:11 vixie Exp $";
+static const char rcsid[] = "$Id: ns_req.c,v 8.118 2000/07/17 07:57:56 vixie Exp $";
#endif /* not lint */
/*
@@ -208,6 +208,7 @@ ns_req(u_char *msg, int msglen, int buflen, struct qstream *qsp,
key = find_key(buf, NULL);
if (key == NULL) {
error = ns_r_badkey;
+ hp->rcode = ns_r_notauth;
ns_debug(ns_log_default, 1,
"ns_req: TSIG verify failed - unknown key %s",
buf);
@@ -361,6 +362,7 @@ ns_req(u_char *msg, int msglen, int buflen, struct qstream *qsp,
hp->ancount = htons(0);
hp->nscount = htons(0);
hp->arcount = htons(0);
+ cp = msg + HFIXEDSZ;
}
/*
@@ -466,6 +468,14 @@ req_notify(HEADER *hp, u_char **cpp, u_char *eom, u_char *msg,
return (Finish);
}
+ /* valid notify's are authoritative */
+ if (!hp->aa) {
+ ns_debug(ns_log_notify, 1,
+ "FORMERR Notify request without AA");
+ hp->rcode = ns_r_formerr;
+ return (Finish);
+ }
+
n = dn_expand(msg, eom, *cpp, dnbuf, sizeof dnbuf);
if (n < 0) {
ns_debug(ns_log_notify, 1,
@@ -556,6 +566,7 @@ req_notify(HEADER *hp, u_char **cpp, u_char *eom, u_char *msg,
}
noerror:
hp->rcode = ns_r_noerror;
+ hp->aa = 1;
return (Finish);
refuse:
hp->rcode = ns_r_refused;
@@ -587,9 +598,6 @@ req_query(HEADER *hp, u_char **cpp, u_char *eom, struct qstream *qsp,
struct databuf *dp;
DST_KEY *in_key = (in_tsig != NULL) ? in_tsig->key : NULL;
-
-
-
nameserIncr(from.sin_addr, nssRcvdQ);
nsp[0] = NULL;
@@ -727,7 +735,7 @@ req_query(HEADER *hp, u_char **cpp, u_char *eom, struct qstream *qsp,
nameserIncr(from.sin_addr, nssRcvdAXFR);
hp->rd = 0; /* Recursion not possible. */
}
- *buflenp -= *msglenp;
+ *buflenp -= (*msglenp - HFIXEDSZ);
count = 0;
founddata = 0;
dname = dnbuf;
@@ -1146,7 +1154,7 @@ req_query(HEADER *hp, u_char **cpp, u_char *eom, struct qstream *qsp,
if (qsp == NULL)
return (Finish);
else {
- if (!ixfr_found) {
+ if (!ixfr_found && type == ns_t_ixfr) {
qsp->flags |= STREAM_AXFRIXFR;
hp->qdcount = htons(1);
}
@@ -1409,13 +1417,13 @@ req_iquery(HEADER *hp, u_char **cpp, u_char *eom, int *buflenp,
GETSHORT(class, *cpp);
*cpp += INT32SZ; /* ttl */
GETSHORT(dlen, *cpp);
- *cpp += dlen;
- if (*cpp != eom) {
+ if (*cpp + dlen != eom) {
ns_debug(ns_log_default, 1,
"FORMERR IQuery message length off");
hp->rcode = ns_r_formerr;
return (Finish);
}
+ *cpp += dlen;
/*
* not all inverse queries are handled.
@@ -1760,7 +1768,7 @@ make_rr(const char *name, struct databuf *dp, u_char *buf,
/* Replacement */
ns_debug(ns_log_default, 1, "Replacement = %s", cp1);
- n = dn_comp((char *)cp1, cp, buflen, dnptrs, edp);
+ n = dn_comp((char *)cp1, cp, buflen, comp_ptrs, edp);
ns_debug(ns_log_default, 1, "dn_comp's n = %u", n);
if (n < 0)
goto cleanup;
diff --git a/contrib/bind/bin/named/ns_resp.c b/contrib/bind/bin/named/ns_resp.c
index 0646618..36e3626 100644
--- a/contrib/bind/bin/named/ns_resp.c
+++ b/contrib/bind/bin/named/ns_resp.c
@@ -1,6 +1,6 @@
#if !defined(lint) && !defined(SABER)
static const char sccsid[] = "@(#)ns_resp.c 4.65 (Berkeley) 3/3/91";
-static const char rcsid[] = "$Id: ns_resp.c,v 8.143 2000/05/09 07:38:38 vixie Exp $";
+static const char rcsid[] = "$Id: ns_resp.c,v 8.144 2000/07/11 08:26:09 vixie Exp $";
#endif /* not lint */
/*
@@ -614,7 +614,8 @@ ns_resp(u_char *msg, int msglen, struct sockaddr_in from, struct qstream *qsp)
*/
if (hp->opcode == NS_NOTIFY_OP) {
ns_info(ns_log_notify,
- "Received NOTIFY answer from %s for \"%s %s %s\"",
+ "Received NOTIFY answer (%sAA) from %s for \"%s %s %s\"",
+ hp->aa ? "" : "!",
inet_ntoa(from.sin_addr),
*(qp->q_name) ? qp->q_name : ".",
p_class(qp->q_class), p_type(qp->q_type));
@@ -2367,6 +2368,7 @@ sysquery(const char *dname, int class, int type,
hp = (HEADER *) qp->q_msg;
hp->id = qp->q_nsid = htons(nsid_next());
hp->rd = (qp->q_addr[qp->q_curaddr].forwarder ? 1 : 0);
+ hp->aa = (opcode == NS_NOTIFY_OP);
/* First check for an already pending query for this data. */
for (oqp = nsqhead; oqp != NULL; oqp = oqp->q_link) {
diff --git a/contrib/bind/bin/named/ns_signal.c b/contrib/bind/bin/named/ns_signal.c
index 8cc715b..f5a6e24 100644
--- a/contrib/bind/bin/named/ns_signal.c
+++ b/contrib/bind/bin/named/ns_signal.c
@@ -1,6 +1,6 @@
#if !defined(lint) && !defined(SABER)
static const char sccsid[] = "@(#)ns_main.c 4.55 (Berkeley) 7/1/91";
-static const char rcsid[] = "$Id: ns_signal.c,v 8.12 2000/04/21 06:54:12 vixie Exp $";
+static const char rcsid[] = "$Id: ns_signal.c,v 8.13 2000/07/11 07:10:12 vixie Exp $";
#endif /* not lint */
/*
@@ -245,6 +245,9 @@ init_signals(void) {
"sigaction failed in set_signal_handler(%d): %s",
sighandlers[sh].sig, strerror(errno));
}
+ /* Unblock all signals that we expect to handle. */
+ if (sigprocmask(SIG_UNBLOCK, &mask, NULL) < 0)
+ ns_panic(ns_log_os, 1, "sigblock failed: %s", strerror(errno));
}
void
diff --git a/contrib/bind/bin/named/ns_update.c b/contrib/bind/bin/named/ns_update.c
index c7d8ad3..da0c5a9 100644
--- a/contrib/bind/bin/named/ns_update.c
+++ b/contrib/bind/bin/named/ns_update.c
@@ -1,5 +1,5 @@
#if !defined(lint) && !defined(SABER)
-static const char rcsid[] = "$Id: ns_update.c,v 8.78 2000/04/23 02:19:00 vixie Exp $";
+static const char rcsid[] = "$Id: ns_update.c,v 8.81 2000/07/11 09:25:14 vixie Exp $";
#endif /* not lint */
/*
@@ -286,16 +286,24 @@ printupdatelog(struct sockaddr_in srcaddr,
if (fp == NULL)
return;
- ifp = open_ixfr_log(zp);
- if (ifp == NULL) {
- (void) close_transaction_log(zp, fp);
- return;
+ if (zp->z_maintain_ixfr_base == 1) {
+ ifp = open_ixfr_log(zp);
+ if (ifp == NULL) {
+ (void) close_transaction_log(zp, fp);
+ return;
+ }
}
+ else
+ ifp = NULL;
+
sprintf(time, "at %lu", (u_long)tt.tv_sec);
fprintf(fp, "[DYNAMIC_UPDATE] id %u from %s %s (named pid %ld):\n",
ntohs(hp->id), sin_ntoa(srcaddr), time, (long)getpid());
- fprintf(ifp, "[DYNAMIC_UPDATE] id %u from %s %s (named pid %ld):\n",
- ntohs(hp->id), sin_ntoa(srcaddr), time, (long)getpid());
+ if (ifp)
+ fprintf(ifp,
+ "[DYNAMIC_UPDATE] id %u from %s %s (named pid %ld):\n",
+ ntohs(hp->id), sin_ntoa(srcaddr), time,
+ (long)getpid());
for (rrecp = HEAD(*updlist); rrecp != NULL; rrecp = NEXT(rrecp, r_link)) {
INSIST(zp == &zones[rrecp->r_zone]);
switch (rrecp->r_section) {
@@ -303,9 +311,11 @@ printupdatelog(struct sockaddr_in srcaddr,
fprintf(fp, "zone:\torigin %s class %s serial %u\n",
zp->z_origin, p_class(zp->z_class),
old_serial);
- fprintf(ifp, "zone:\torigin %s class %s serial %u\n",
- zp->z_origin, p_class(zp->z_class),
- old_serial);
+ if (ifp)
+ fprintf(ifp,
+ "zone:\torigin %s class %s serial %u\n",
+ zp->z_origin, p_class(zp->z_class),
+ old_serial);
break;
case S_PREREQ:
opcode = rrecp->r_opcode;
@@ -332,15 +342,17 @@ printupdatelog(struct sockaddr_in srcaddr,
while (dp != NULL) {
if (dp->d_rcode == 0 &&
!was_added(updlist, dp)) {
- fprintf(ifp,
- "update:\t{%s} %s. %u %s %s ",
- "delete",
- rrecp->r_dname,
- dp->d_ttl,
- p_class(dp->d_class),
- p_type(dp->d_type));
- (void) rdata_dump(dp, ifp);
- fprintf(ifp, "\n");
+ if (ifp) {
+ fprintf(ifp,
+ "update:\t{%s} %s. %u %s %s ",
+ "delete",
+ rrecp->r_dname,
+ dp->d_ttl,
+ p_class(dp->d_class),
+ p_type(dp->d_type));
+ (void) rdata_dump(dp, ifp);
+ fprintf(ifp, "\n");
+ }
}
dp = dp->d_next;
}
@@ -353,13 +365,15 @@ printupdatelog(struct sockaddr_in srcaddr,
dp->d_type != T_SOA &&
(dp->d_mark & D_MARK_ADDED) != 0 &&
!was_deleted(updlist, dp)) {
- fprintf(ifp, "update:\t{%s} %s. ",
- opcodes[opcode], rrecp->r_dname);
- fprintf(ifp, "%u ", rrecp->r_ttl);
- fprintf(ifp, "%s ", p_class(zp->z_class));
- fprintf(ifp, "%s ", p_type(rrecp->r_type));
- (void) rdata_dump(dp, ifp);
- fprintf(ifp, "\n");
+ if (ifp) {
+ fprintf(ifp, "update:\t{%s} %s. ",
+ opcodes[opcode], rrecp->r_dname);
+ fprintf(ifp, "%u ", rrecp->r_ttl);
+ fprintf(ifp, "%s ", p_class(zp->z_class));
+ fprintf(ifp, "%s ", p_type(rrecp->r_type));
+ (void) rdata_dump(dp, ifp);
+ fprintf(ifp, "\n");
+ }
}
/* Update log. */
fprintf(fp, "update:\t{%s} %s. ",
@@ -398,13 +412,15 @@ printupdatelog(struct sockaddr_in srcaddr,
dp->d_type == T_SOA &&
(dp->d_mark & D_MARK_ADDED) != 0 &&
!was_deleted(updlist, dp)) {
- fprintf(ifp, "update:\t{%s} %s. ",
- opcodes[opcode], rrecp->r_dname);
- fprintf(ifp, "%u ", rrecp->r_ttl);
- fprintf(ifp, "%s ", p_class(zp->z_class));
- fprintf(ifp, "%s ", p_type(rrecp->r_type));
- (void) rdata_dump(dp, ifp);
- fprintf(ifp, "\n[END_DELTA]\n");
+ if (ifp) {
+ fprintf(ifp, "update:\t{%s} %s. ",
+ opcodes[opcode], rrecp->r_dname);
+ fprintf(ifp, "%u ", rrecp->r_ttl);
+ fprintf(ifp, "%s ", p_class(zp->z_class));
+ fprintf(ifp, "%s ", p_type(rrecp->r_type));
+ (void) rdata_dump(dp, ifp);
+ fprintf(ifp, "\n[END_DELTA]\n");
+ }
}
break;
default:
@@ -413,7 +429,8 @@ printupdatelog(struct sockaddr_in srcaddr,
}
fprintf(fp, "\n");
(void) close_transaction_log(zp, fp);
- (void) close_ixfr_log(zp, ifp);
+ if (ifp)
+ (void) close_ixfr_log(zp, ifp);
}
static void
@@ -547,7 +564,7 @@ process_prereq(ns_updrec *ur, int *rcodep, u_int16_t zclass) {
*/
if (rdp && (rdp->d_mark & D_MARK_FOUND) != 0) {
/* Already processed. */
- return (1);
+ return (1);
}
if (ttl != 0) {
ns_debug(ns_log_update, 1,
@@ -2962,32 +2979,35 @@ incr_serial(struct zoneinfo *zp) {
old_serial, serial, checked_ctime(&t));
if (close_transaction_log(zp, fp)<0)
return (-1);
- ifp = open_ixfr_log(zp);
- if (ifp == NULL)
- return (-1);
- dp = findzonesoa(zp);
- if (dp) {
- olddp = memget(DATASIZE(dp->d_size));
- if (olddp != NULL) {
- memcpy(olddp, dp, DATASIZE(dp->d_size));
- cp = findsoaserial(olddp->d_data);
- PUTLONG(old_serial, cp);
- fprintf(ifp, "update: {delete} %s. %u %s %s ",
+ if (zp->z_maintain_ixfr_base) {
+ ifp = open_ixfr_log(zp);
+ if (ifp == NULL)
+ return (-1);
+ dp = findzonesoa(zp);
+ if (dp) {
+ olddp = memget(DATASIZE(dp->d_size));
+ if (olddp != NULL) {
+ memcpy(olddp, dp, DATASIZE(dp->d_size));
+ cp = findsoaserial(olddp->d_data);
+ PUTLONG(old_serial, cp);
+ fprintf(ifp, "update: {delete} %s. %u %s %s ",
+ zp->z_origin, dp->d_ttl,
+ p_class(dp->d_class),
+ p_type(dp->d_type));
+ (void) rdata_dump(olddp, ifp);
+ fprintf(ifp, "\n");
+ memput(olddp, DATASIZE(dp->d_size));
+ }
+ fprintf(ifp, "update: {add} %s. %u %s %s ",
zp->z_origin, dp->d_ttl,
- p_class(dp->d_class), p_type(dp->d_type));
- (void) rdata_dump(olddp, ifp);
+ p_class(dp->d_class), p_type(dp->d_type));
+ (void) rdata_dump(dp, ifp);
fprintf(ifp, "\n");
- memput(olddp, DATASIZE(dp->d_size));
}
- fprintf(ifp, "update: {add} %s. %u %s %s ",
- zp->z_origin, dp->d_ttl,
- p_class(dp->d_class), p_type(dp->d_type));
- (void) rdata_dump(dp, ifp);
- fprintf(ifp, "\n");
+ fprintf(ifp, "[END_DELTA]\n");
+ if (close_ixfr_log(zp, ifp) < 0)
+ return (-1);
}
- fprintf(ifp, "[END_DELTA]\n");
- if (close_ixfr_log(zp, ifp)<0)
- return (-1);
/*
* This shouldn't happen, but we check to be sure.
diff --git a/contrib/bind/bin/ndc/Makefile b/contrib/bind/bin/ndc/Makefile
index d2b9feb..332e3d6 100644
--- a/contrib/bind/bin/ndc/Makefile
+++ b/contrib/bind/bin/ndc/Makefile
@@ -13,7 +13,7 @@
## ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
## SOFTWARE.
-# $Id: Makefile,v 1.15 1999/08/08 17:51:02 vixie Exp $
+# $Id: Makefile,v 1.16 2000/07/11 06:41:34 vixie Exp $
DESTDIR=
CC= cc
@@ -44,7 +44,8 @@ INSTALL_LIB=-o bin -g bin
PS=ps
LDFLAGS=
-CFLAGS= ${CDEBUG} -I${PORTINCL} -I${INCL} ${DEFS}
+CFLAGS= ${CDEBUG}
+CPPFLAGS= -I${PORTINCL} -I${INCL} ${DEFS}
PROG= ndc
SRCS= ${PROG}.c
diff --git a/contrib/bind/bin/nslookup/Makefile b/contrib/bind/bin/nslookup/Makefile
index 0f6db20..332b973 100644
--- a/contrib/bind/bin/nslookup/Makefile
+++ b/contrib/bind/bin/nslookup/Makefile
@@ -13,7 +13,7 @@
## ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
## SOFTWARE.
-# $Id: Makefile,v 8.24 1999/10/13 01:14:46 vixie Exp $
+# $Id: Makefile,v 8.25 2000/07/11 06:41:35 vixie Exp $
DESTDIR=
CC= cc
@@ -42,8 +42,9 @@ INSTALL_EXEC=
INSTALL_LIB=-o bin -g bin
LDFLAGS=
-DEFS= -D_PATH_HELPFILE=\"${DESTHELP}/nslookup.help\"
-CFLAGS= ${CDEBUG} -I${PORTINCL} -I${INCL} ${DEFS}
+DEFS= -D_PATH_HELPFILE=\"${DESTDIR}${DESTHELP}/nslookup.help\"
+CFLAGS= ${CDEBUG}
+CPPFLAGS= -I${PORTINCL} -I${INCL} ${DEFS}
PROG= nslookup
CSRCS= main.c getinfo.c debug.c send.c skip.c list.c subr.c
diff --git a/contrib/bind/bin/nslookup/debug.c b/contrib/bind/bin/nslookup/debug.c
index 2448381..a5f85e6 100644
--- a/contrib/bind/bin/nslookup/debug.c
+++ b/contrib/bind/bin/nslookup/debug.c
@@ -53,7 +53,7 @@
#ifndef lint
static const char sccsid[] = "@(#)debug.c 5.26 (Berkeley) 3/21/91";
-static const char rcsid[] = "$Id: debug.c,v 8.15 1999/10/13 16:39:16 vixie Exp $";
+static const char rcsid[] = "$Id: debug.c,v 8.16 2000/07/11 05:59:32 vixie Exp $";
#endif /* not lint */
/*
@@ -620,8 +620,15 @@ Print_rr(const u_char *ocp, const u_char *msg, const u_char *eom, FILE *file) {
case T_KEY:
default: {
char buf[2048]; /* XXX need to malloc/realloc. */
+ char rrname[NS_MAXDNAME];
- if (ns_sprintrrf(msg, eom - msg, "?", (ns_class)class,
+ cp2 = p_fqnname(ocp, msg, NS_MAXCDNAME, rrname, sizeof rrname);
+ if (cp2 == NULL) {
+ fprintf(file, "(name truncated?)\n");
+ return (NULL); /* compression error */
+ }
+
+ if (ns_sprintrrf(msg, eom - msg, rrname, (ns_class)class,
(ns_type)type, rrttl, cp1, dlen, NULL, NULL,
buf, sizeof buf) < 0) {
perror("ns_sprintrrf");
diff --git a/contrib/bind/bin/nslookup/getinfo.c b/contrib/bind/bin/nslookup/getinfo.c
index 6f4ecff..8d5c8df 100644
--- a/contrib/bind/bin/nslookup/getinfo.c
+++ b/contrib/bind/bin/nslookup/getinfo.c
@@ -53,7 +53,7 @@
#ifndef lint
static const char sccsid[] = "@(#)getinfo.c 5.26 (Berkeley) 3/21/91";
-static const char rcsid[] = "$Id: getinfo.c,v 8.15 1999/10/13 16:39:16 vixie Exp $";
+static const char rcsid[] = "$Id: getinfo.c,v 8.16 2000/07/11 04:36:26 vixie Exp $";
#endif /* not lint */
/*
@@ -650,11 +650,11 @@ GetHostInfoByName(nsAddrPtr, queryClass, queryType, name, hostPtr, isServer)
* - there is at least one dot, there is no trailing dot,
* and RES_DNSRCH is set.
*/
- if ((n == 0 && res.options & RES_DEFNAMES) ||
- (n != 0 && *--cp != '.' && res.options & RES_DNSRCH))
- for (domain = res.dnsrch; *domain; domain++) {
+ if ((n == 0 && (res.options & RES_DEFNAMES) != 0) ||
+ (n != 0 && *--cp != '.' && (res.options & RES_DNSRCH) != 0))
+ for (domain = res.dnsrch; *domain != NULL; domain++) {
result = GetHostDomain(nsAddrPtr, queryClass, queryType,
- name, *domain, hostPtr, isServer);
+ name, *domain, hostPtr, isServer);
/*
* If no server present, give up.
* If name isn't found in this domain,
diff --git a/contrib/bind/bin/nsupdate/Makefile b/contrib/bind/bin/nsupdate/Makefile
index b3b07c0..d8bd2b1 100644
--- a/contrib/bind/bin/nsupdate/Makefile
+++ b/contrib/bind/bin/nsupdate/Makefile
@@ -13,7 +13,7 @@
## ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
## SOFTWARE.
-# $Id: Makefile,v 8.24 1999/08/08 17:51:02 vixie Exp $
+# $Id: Makefile,v 8.25 2000/07/11 06:41:35 vixie Exp $
DESTDIR=
CC= cc
@@ -42,7 +42,8 @@ INSTALL_EXEC=
INSTALL_LIB=-o bin -g bin
LDFLAGS=
-CFLAGS= ${CDEBUG} -I${PORTINCL} -I${INCL}
+CFLAGS= ${CDEBUG}
+CPPFLAGS= -I${PORTINCL} -I${INCL}
PROG= nsupdate
SRCS= ${PROG}.c
diff --git a/contrib/bind/bin/nsupdate/nsupdate.c b/contrib/bind/bin/nsupdate/nsupdate.c
index 31496b3..d164bb1 100644
--- a/contrib/bind/bin/nsupdate/nsupdate.c
+++ b/contrib/bind/bin/nsupdate/nsupdate.c
@@ -1,5 +1,5 @@
#if !defined(lint) && !defined(SABER)
-static const char rcsid[] = "$Id: nsupdate.c,v 8.23 2000/02/04 07:51:04 vixie Exp $";
+static const char rcsid[] = "$Id: nsupdate.c,v 8.24 2000/07/11 06:32:01 vixie Exp $";
#endif /* not lint */
/*
@@ -168,8 +168,6 @@ main(argc, argv)
char *keyfile=NULL, *keyname=NULL, *p, *pp;
int file_major, file_minor, alg;
-
-
progname = argv[0];
while ((c = getopt(argc, argv, "dsvk:n:")) != -1) {
@@ -196,7 +194,7 @@ main(argc, argv)
*colon='\0';
break;
}
- case 'n':
+ case 'n':
keyname=optarg;
break;
default:
OpenPOWER on IntegriCloud