From 90887e8f5bdae690c1ceca0ae12853e5e66c5282 Mon Sep 17 00:00:00 2001 From: asmodai Date: Tue, 31 Oct 2000 12:35:45 +0000 Subject: [PATCH] Virgin import of BIND v8.2.3-T6B --- contrib/bind/CHANGES | 58 +++++++++- contrib/bind/INSTALL | 8 +- contrib/bind/LICENSE | 4 +- contrib/bind/Version | 2 +- contrib/bind/bin/Makefile | 7 +- contrib/bind/bin/addr/Makefile | 5 +- contrib/bind/bin/dig/Makefile | 5 +- contrib/bind/bin/dig/dig.c | 9 +- contrib/bind/bin/dnskeygen/Makefile | 5 +- contrib/bind/bin/dnsquery/Makefile | 5 +- contrib/bind/bin/dnsquery/dnsquery.c | 14 +-- contrib/bind/bin/host/Makefile | 5 +- contrib/bind/bin/host/host.c | 4 +- contrib/bind/bin/irpd/Makefile | 7 +- contrib/bind/bin/mkservdb/Makefile | 5 +- contrib/bind/bin/named-bootconf/Makefile | 5 +- contrib/bind/bin/named-xfer/Makefile | 5 +- contrib/bind/bin/named-xfer/named-xfer.c | 7 +- contrib/bind/bin/named/Makefile | 5 +- contrib/bind/bin/named/db_load.c | 4 +- contrib/bind/bin/named/ns_glob.h | 3 +- contrib/bind/bin/named/ns_glue.c | 3 +- contrib/bind/bin/named/ns_main.c | 63 ++++++----- contrib/bind/bin/named/ns_maint.c | 14 ++- contrib/bind/bin/named/ns_req.c | 26 +++-- contrib/bind/bin/named/ns_resp.c | 6 +- contrib/bind/bin/named/ns_signal.c | 5 +- contrib/bind/bin/named/ns_update.c | 134 +++++++++++++---------- contrib/bind/bin/ndc/Makefile | 5 +- contrib/bind/bin/nslookup/Makefile | 7 +- contrib/bind/bin/nslookup/debug.c | 11 +- contrib/bind/bin/nslookup/getinfo.c | 10 +- contrib/bind/bin/nsupdate/Makefile | 5 +- contrib/bind/bin/nsupdate/nsupdate.c | 6 +- contrib/bind/include/isc/assertions.h | 18 +-- contrib/bind/lib/Makefile | 4 +- contrib/bind/lib/dst/Makefile | 5 +- contrib/bind/lib/dst/prandom.c | 4 +- contrib/bind/lib/dst/rsaref_link.c | 3 +- contrib/bind/lib/inet/Makefile | 5 +- contrib/bind/lib/irs/Makefile | 5 +- contrib/bind/lib/irs/gen_gr.c | 10 +- contrib/bind/lib/irs/gethostent_r.c | 3 +- contrib/bind/lib/isc/Makefile | 5 +- contrib/bind/lib/isc/ev_timers.c | 4 +- contrib/bind/lib/isc/ev_waits.c | 9 +- contrib/bind/lib/nameser/Makefile | 5 +- contrib/bind/lib/resolv/Makefile | 5 +- 48 files changed, 342 insertions(+), 210 deletions(-) diff --git a/contrib/bind/CHANGES b/contrib/bind/CHANGES index d7c11445510..ef04e52bfe2 100644 --- a/contrib/bind/CHANGES +++ b/contrib/bind/CHANGES @@ -1,3 +1,59 @@ + --- 8.2.3-T6B released --- + +1029. [bug] incredibly busy systems could starve handle_needs(). + +1028. [protocol] unrecognized TSIG was returning NOERROR (now NOTAUTH). + +1027. [support] INSIST(), ENSURE(), et al, now always have sideeffects. + +1026. [port] some kernels bogusly return tv_usec>1000000 from + gettimeofday(). panic and dump core when this happens. + +1025. [proto] NOTIFY messages should have AA. + +1024. [bug] we were unwilling to use the last 10 octets of a + response buffer in certain transaction types. + +1023. [port] HP-UX 10.20 was looping inside contrib/dnssigner. + +1022. [port] ensure that all handled signals are unblocked. + +1021. [bug] the "host" command wasn't properly printing SRV RR's. + +1020. [contrib] new "updatehosts" (V1.1.0) contributed by author. + +1019. [port] separate CFLAGS and CPPFLAGS for unusual builds. + +1018. [bug] When maintain_ixfr_base is set to "no" a zones IXFR + file was still being written too. + +1017. [doc] resolver(3) was out of date with respect to recent API + changes. + +1016. [bug] nslookup wasn't properly printing SIG RR's. + +1015. [bug] when merging group information gr_name and gr_passwd + could be left pointing at freed memory. + +1014. [bug] iquery: DoS (potential), information leak. + +1013. [bug] mangled hostent structures returned by + gethostbyname_r() and friends. + +1012. [doc] add named-bootconf example to INSTALL. + +1011. [bug] if spawnxfer() fails we should return immediately. + +1010. [bug] bad responses to the initial IXFR/SOA query could + result in using an uninitalised variable. + +1009. [port] Add support for darwin / Mac OS X + +1008. [doc] specify allow-query default in named.conf. + +1007. [bug] only set STREAM_AXFRIXFR if the original query is + an IXFR. + --- 8.2.3-T5B (RC3) released --- 1006. [port] Windows/NT does not have fchown(). @@ -38,7 +94,7 @@ 991. [protocol] send A6 glue records in xfr. - 990. [bug] we could loose track of a bottom of zone cut is the + 990. [bug] we could loose track of a bottom of zone cut if the write buffer filled up at just the correct moment. 989. [bug] apply to "fetch-glue no;" to notify processing. need diff --git a/contrib/bind/INSTALL b/contrib/bind/INSTALL index 6307f2b7af9..7ba751d03d6 100644 --- a/contrib/bind/INSTALL +++ b/contrib/bind/INSTALL @@ -6,6 +6,7 @@ Systems it is known to compile and run on: Debian GNU/Linux 2.2.9 ("unreleased") Digital UNIX 3.2C, 4.0, 5.0 NetBSD/i386 1.3.2, 1.4 + Darwin 1.x (Mac OS X) SunOS 5.6 (Solaris 2.6), SunOS 5.7 (Solaris 7) SCO UnixWare 7.0, 7.0.1, 7.1 IRIX 6.5 @@ -265,8 +266,11 @@ Using the Server there are lots of {curly braces} and it takes some getting used to. You may get a lot more help from the example file (which is bin/named/named.conf) than from the documentation (see ../doc/html). - You can convert your named.boot file to a named.conf file if you have - Perl; see bin/named/named-bootconf.pl. + You can convert your named.boot file to a named.conf file using + bin/named-bootconf/named-bootconf. + + e.g. + named-bootconf < /etc/named.boot > /etc/named.conf All the files that used to be created in /var/tmp, e.g. named.run, will now be created in the directory specified in the options diff --git a/contrib/bind/LICENSE b/contrib/bind/LICENSE index 36174cd66f4..cddcb43b3ea 100644 --- a/contrib/bind/LICENSE +++ b/contrib/bind/LICENSE @@ -1,4 +1,4 @@ -## Copyright (c) 1993-1999 by Internet Software Consortium. +## Copyright (c) 1993-2000 by Internet Software Consortium, Inc. ## ## Permission to use, copy, modify, and distribute this software for any ## purpose with or without fee is hereby granted, provided that the above @@ -19,4 +19,4 @@ Tel: 1-888-868-1001 (toll free in U.S.) Tel: 1-650-779-7091 Fax: 1-650-779-7055 - Email: info@isc.org + Email: diff --git a/contrib/bind/Version b/contrib/bind/Version index f8403c5ec22..69ea4e2282b 100644 --- a/contrib/bind/Version +++ b/contrib/bind/Version @@ -1 +1 @@ -8.2.3-T5B +8.2.3-T6B diff --git a/contrib/bind/bin/Makefile b/contrib/bind/bin/Makefile index ffe01a30daf..57fcc58f690 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 18dd281c77e..98b7a9197b5 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 250df9643b7..ca7775d7536 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 8d5f5be4f47..de192e03047 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 +#include #include #include #include @@ -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 bea85117a76..232a20623c1 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 a6437029836..511cb664d75 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 31d5d62fb24..218c8a8a4e8 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 f121ab7730e..b4f07ad1570 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 1a66b8b754d..77e5329224a 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 4d2c0fca3f4..9eaf4cc9393 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 47af23627ab..300505d3b93 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 4c1a0df4170..35403e9b436 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 76d9684905a..b85a4d54e4a 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 59fff9f980a..3747526756a 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 03f533d51eb..fb504279660 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 2d6a6e5a652..305944c6e4d 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 ) 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 af0ea30270b..e9f70e76856 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 9c40ddee19e..8360ad51c60 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 199190fef32..14618072ddb 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 @@ -2550,11 +2546,6 @@ deallocate_everything(void) { } } -static void -ns_exit(void) { - main_needs_exit++; -} - static void ns_restart(void) { ns_info(ns_log_default, "named restarting"); @@ -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 9b9e16e6a40..952774febe1 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 5e1459c3906..d6add307a2b 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 064661857fb..36e3626bcba 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 8cc715b7171..f5a6e24a00d 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 c7d8ad3e832..da0c5a91092 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 d2b9feb2f1e..332e3d6610b 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 0f6db20b0d1..332b973abe6 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 2448381dea7..a5f85e6b997 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 6f4ecff68c6..8d5c8df9738 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 b3b07c048c0..d8bd2b18e72 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 31496b3b945..d164bb1f62c 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: diff --git a/contrib/bind/include/isc/assertions.h b/contrib/bind/include/isc/assertions.h index 44089d15cbc..fdce8829025 100644 --- a/contrib/bind/include/isc/assertions.h +++ b/contrib/bind/include/isc/assertions.h @@ -16,7 +16,7 @@ */ /* - * $Id: assertions.h,v 8.2 1999/01/08 19:23:01 vixie Exp $ + * $Id: assertions.h,v 8.3 2000/07/17 07:53:59 vixie Exp $ */ #ifndef ASSERTIONS_H @@ -73,8 +73,8 @@ char *assertion_type_to_text(assertion_type type); ((__assertion_failed)(__FILE__, __LINE__, assert_require, \ #cond, 1), 0))) #else -#define REQUIRE(cond) ((void) 0) -#define REQUIRE_ERR(cond) ((void) 0) +#define REQUIRE(cond) ((void) (cond)) +#define REQUIRE_ERR(cond) ((void) (cond)) #endif /* CHECK_REQUIRE */ #if CHECK_ENSURE != 0 @@ -87,8 +87,8 @@ char *assertion_type_to_text(assertion_type type); ((__assertion_failed)(__FILE__, __LINE__, assert_ensure, \ #cond, 1), 0))) #else -#define ENSURE(cond) ((void) 0) -#define ENSURE_ERR(cond) ((void) 0) +#define ENSURE(cond) ((void) (cond)) +#define ENSURE_ERR(cond) ((void) (cond)) #endif /* CHECK_ENSURE */ #if CHECK_INSIST != 0 @@ -101,8 +101,8 @@ char *assertion_type_to_text(assertion_type type); ((__assertion_failed)(__FILE__, __LINE__, assert_insist, \ #cond, 1), 0))) #else -#define INSIST(cond) ((void) 0) -#define INSIST_ERR(cond) ((void) 0) +#define INSIST(cond) ((void) (cond)) +#define INSIST_ERR(cond) ((void) (cond)) #endif /* CHECK_INSIST */ #if CHECK_INVARIANT != 0 @@ -115,8 +115,8 @@ char *assertion_type_to_text(assertion_type type); ((__assertion_failed)(__FILE__, __LINE__, assert_invariant, \ #cond, 1), 0))) #else -#define INVARIANT(cond) ((void) 0) -#define INVARIANT_ERR(cond) ((void) 0) +#define INVARIANT(cond) ((void) (cond)) +#define INVARIANT_ERR(cond) ((void) (cond)) #endif /* CHECK_INVARIANT */ #endif /* ASSERTIONS_H */ diff --git a/contrib/bind/lib/Makefile b/contrib/bind/lib/Makefile index 15aa6558acf..d06e543a7f1 100644 --- a/contrib/bind/lib/Makefile +++ b/contrib/bind/lib/Makefile @@ -13,7 +13,7 @@ # ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS # SOFTWARE. -# $Id: Makefile,v 8.22 1999/06/08 01:42:57 vixie Exp $ +# $Id: Makefile,v 8.23 2000/07/11 06:41:36 vixie Exp $ SUBDIRS = resolv irs isc bsd inet nameser dst cylink dnssafe @@ -51,7 +51,7 @@ MARGS = "SYSTYPE=${SYSTYPE}" "SHELL=${SHELL}" "A=${A}" "O=${O}" \ "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}" \ "REENTRANT=${REENTRANT}" "INSTALL_LIB=${INSTALL_LIB}" \ "INSTALL_EXEC=${INSTALL_EXEC}" "BOUNDS=${BOUNDS}" diff --git a/contrib/bind/lib/dst/Makefile b/contrib/bind/lib/dst/Makefile index 28befe83b73..ffd9b17f8b0 100644 --- a/contrib/bind/lib/dst/Makefile +++ b/contrib/bind/lib/dst/Makefile @@ -13,7 +13,7 @@ # ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS # SOFTWARE. -# $Id: Makefile,v 1.16 2000/02/29 03:38:21 vixie Exp $ +# $Id: Makefile,v 1.17 2000/07/11 06:41:39 vixie Exp $ # these are only appropriate for BSD 4.4 or derivatives, and are used in # development. normal builds will be done in the top level directory and @@ -32,7 +32,8 @@ INCL = ${TOP}/include PORTINCL = ${TOP}/port/${SYSTYPE}/include LIBBIND = ${TOP}/lib/libbind.${A} LIBBINDR = ../${TOP}/lib/libbind_r.${A} -CFLAGS= ${CDEBUG} -I${PORTINCL} -I${INCL} +CFLAGS= ${CDEBUG} +CPPFLAGS= -I${PORTINCL} -I${INCL} LD_LIBFLAGS= -x -r AR= ar cru RANLIB= ranlib diff --git a/contrib/bind/lib/dst/prandom.c b/contrib/bind/lib/dst/prandom.c index 0a66e61512e..dcd53435f0e 100644 --- a/contrib/bind/lib/dst/prandom.c +++ b/contrib/bind/lib/dst/prandom.c @@ -1,5 +1,5 @@ #ifndef LINT -static const char rcsid[] = "$Header: /proj/cvs/isc/bind/src/lib/dst/prandom.c,v 1.8 1999/10/13 16:39:24 vixie Exp $"; +static const char rcsid[] = "$Header: /proj/cvs/isc/bind/src/lib/dst/prandom.c,v 1.9 2000/07/17 07:36:53 vixie Exp $"; #endif /* * Portions Copyright (c) 1995-1998 by Trusted Information Systems, Inc. @@ -20,6 +20,7 @@ static const char rcsid[] = "$Header: /proj/cvs/isc/bind/src/lib/dst/prandom.c,v #include "port_before.h" +#include #include #include #include @@ -203,6 +204,7 @@ do_time(dst_work *work) zone = (struct timezone *) tmp; mtime = (struct timeval *)(tmp + sizeof(struct timezone)); gettimeofday(mtime, zone); + assert(mtime->tv_usec >= 0 && mtime->tv_usec < 1000000); cnt = sizeof(tmp); my_digest(work, tmp, sizeof(tmp)); diff --git a/contrib/bind/lib/dst/rsaref_link.c b/contrib/bind/lib/dst/rsaref_link.c index 19c9a6703e9..2ccd96ec36b 100644 --- a/contrib/bind/lib/dst/rsaref_link.c +++ b/contrib/bind/lib/dst/rsaref_link.c @@ -1,5 +1,5 @@ #ifdef RSAREF -static const char rcsid[] = "$Header: /proj/cvs/isc/bind/src/lib/dst/rsaref_link.c,v 1.6 1999/10/13 16:39:24 vixie Exp $"; +static const char rcsid[] = "$Header: /proj/cvs/isc/bind/src/lib/dst/rsaref_link.c,v 1.7 2000/07/17 07:36:53 vixie Exp $"; /* * Portions Copyright (c) 1995-1998 by Trusted Information Systems, Inc. @@ -706,6 +706,7 @@ dst_rsaref_init_random_struct(R_RANDOM_STRUCT * randomstruct) * This must be the FIRST CALL */ gettimeofday(&tv, 0); + assert(tv.tv_usec >= 0 && tv.tv_usec < 1000000); R_RandomUpdate(randomstruct, (u_char *) &tv, sizeof(struct timeval)); diff --git a/contrib/bind/lib/inet/Makefile b/contrib/bind/lib/inet/Makefile index b00741206a8..2be32bde0f1 100644 --- a/contrib/bind/lib/inet/Makefile +++ b/contrib/bind/lib/inet/Makefile @@ -13,7 +13,7 @@ # ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS # SOFTWARE. -# $Id: Makefile,v 8.19 2000/02/29 03:38:22 vixie Exp $ +# $Id: Makefile,v 8.20 2000/07/11 06:41:40 vixie Exp $ # these are only appropriate for BSD 4.4 or derivatives, and are used in # development. normal builds will be done in the top level directory and @@ -32,7 +32,8 @@ INCL = ${TOP}/include PORTINCL = ${TOP}/port/${SYSTYPE}/include LIBBIND = ${TOP}/lib/libbind.${A} LIBBINDR = ../${TOP}/lib/libbind_r.${A} -CFLAGS= ${CDEBUG} -I${PORTINCL} -I${INCL} +CFLAGS= ${CDEBUG} +CPPFLAGS= -I${PORTINCL} -I${INCL} LD_LIBFLAGS= -x -r AR= ar cru RANLIB= ranlib diff --git a/contrib/bind/lib/irs/Makefile b/contrib/bind/lib/irs/Makefile index 2c50e6257cb..a17f252ef6e 100644 --- a/contrib/bind/lib/irs/Makefile +++ b/contrib/bind/lib/irs/Makefile @@ -13,7 +13,7 @@ # ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS # SOFTWARE. -# $Id: Makefile,v 8.19 2000/02/29 03:38:22 vixie Exp $ +# $Id: Makefile,v 8.20 2000/07/11 06:41:40 vixie Exp $ # these are only appropriate for BSD 4.4 or derivatives, and are used in # development. normal builds will be done in the top level directory and @@ -32,7 +32,8 @@ INCL = ${TOP}/include PORTINCL = ${TOP}/port/${SYSTYPE}/include LIBBIND = ${TOP}/lib/libbind.${A} LIBBINDR = ../${TOP}/lib/libbind_r.${A} -CFLAGS= ${CDEBUG} -I${PORTINCL} -I${INCL} +CFLAGS= ${CDEBUG} +CPPFLAGS= -I${PORTINCL} -I${INCL} # -D__BIND_NOSTATIC -Wimplicit LD_LIBFLAGS= -x -r AR= ar cru diff --git a/contrib/bind/lib/irs/gen_gr.c b/contrib/bind/lib/irs/gen_gr.c index ae23d2c0563..14dfa2d4ae3 100644 --- a/contrib/bind/lib/irs/gen_gr.c +++ b/contrib/bind/lib/irs/gen_gr.c @@ -16,7 +16,7 @@ */ #if !defined(LINT) && !defined(CODECENTER) -static const char rcsid[] = "$Id: gen_gr.c,v 1.21 1999/10/13 16:39:29 vixie Exp $"; +static const char rcsid[] = "$Id: gen_gr.c,v 1.22 2000/07/11 05:51:56 vixie Exp $"; #endif /* Imports */ @@ -325,7 +325,7 @@ static void grmerge(struct irs_gr *this, const struct group *src, int preserve) { struct pvt *pvt = (struct pvt *)this->private; char *cp, **m, **p; - int n, ndst, nnew; + int n, ndst, nnew, memadj; if (!preserve) { pvt->group.gr_gid = src->gr_gid; @@ -377,6 +377,7 @@ grmerge(struct irs_gr *this, const struct group *src, int preserve) { /* No harm done, no work done. */ return; } + memadj = cp - pvt->membuf; pvt->membuf = cp; cp += pvt->membufsize; pvt->membufsize += n; @@ -391,7 +392,10 @@ grmerge(struct irs_gr *this, const struct group *src, int preserve) { strcpy(cp, *m); cp += strlen(cp) + 1; } - if (!preserve) { + if (preserve) { + pvt->group.gr_name += memadj; + pvt->group.gr_passwd += memadj; + } else { pvt->group.gr_name = cp; strcpy(cp, src->gr_name); cp += strlen(src->gr_name) + 1; diff --git a/contrib/bind/lib/irs/gethostent_r.c b/contrib/bind/lib/irs/gethostent_r.c index 5da1a9629e3..dab8639c8f3 100644 --- a/contrib/bind/lib/irs/gethostent_r.c +++ b/contrib/bind/lib/irs/gethostent_r.c @@ -16,7 +16,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static const char rcsid[] = "$Id: gethostent_r.c,v 8.4 1999/01/18 07:46:52 vixie Exp $"; +static const char rcsid[] = "$Id: gethostent_r.c,v 8.5 2000/07/11 05:46:35 vixie Exp $"; #endif /* LIBC_SCCS and not lint */ #include @@ -143,7 +143,6 @@ copy_hostent(struct hostent *he, struct hostent *hptr, HOST_R_COPY_ARGS) { memcpy(cp, he->h_addr_list[i], n); hptr->h_addr_list[i] = cp; cp += n; - i++; } hptr->h_addr_list[i] = NULL; ptr++; diff --git a/contrib/bind/lib/isc/Makefile b/contrib/bind/lib/isc/Makefile index 364c442bb39..5485ec7fdf6 100644 --- a/contrib/bind/lib/isc/Makefile +++ b/contrib/bind/lib/isc/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 2000/02/29 03:38:23 vixie Exp $ +# $Id: Makefile,v 8.26 2000/07/11 06:41:41 vixie Exp $ # these are only appropriate for BSD 4.4 or derivatives, and are used in # development. normal builds will be done in the top level directory and @@ -32,7 +32,8 @@ INCL = ${TOP}/include PORTINCL = ${TOP}/port/${SYSTYPE}/include LIBBIND = ${TOP}/lib/libbind.${A} LIBBINDR = ../${TOP}/lib/libbind_r.${A} -CFLAGS= ${CDEBUG} -I${PORTINCL} -I${INCL} +CFLAGS= ${CDEBUG} +CPPFLAGS= -I${PORTINCL} -I${INCL} # -Wimplicit LD_LIBFLAGS= -x -r AR= ar cru diff --git a/contrib/bind/lib/isc/ev_timers.c b/contrib/bind/lib/isc/ev_timers.c index 0db770c4daa..ff44e4964a1 100644 --- a/contrib/bind/lib/isc/ev_timers.c +++ b/contrib/bind/lib/isc/ev_timers.c @@ -20,7 +20,7 @@ */ #if !defined(LINT) && !defined(CODECENTER) -static const char rcsid[] = "$Id: ev_timers.c,v 1.25 1999/10/07 20:44:04 vixie Exp $"; +static const char rcsid[] = "$Id: ev_timers.c,v 1.26 2000/07/17 07:36:54 vixie Exp $"; #endif /* Import. */ @@ -30,6 +30,7 @@ static const char rcsid[] = "$Id: ev_timers.c,v 1.25 1999/10/07 20:44:04 vixie E #include +#include #include #include "eventlib_p.h" @@ -110,6 +111,7 @@ evNowTime() { if (gettimeofday(&now, NULL) < 0) return (evConsTime(0, 0)); + INSIST(now.tv_usec >= 0 && now.tv_usec < 1000000); return (evTimeSpec(now)); } diff --git a/contrib/bind/lib/isc/ev_waits.c b/contrib/bind/lib/isc/ev_waits.c index e7bfbf77133..9608424014f 100644 --- a/contrib/bind/lib/isc/ev_waits.c +++ b/contrib/bind/lib/isc/ev_waits.c @@ -20,7 +20,7 @@ */ #if !defined(LINT) && !defined(CODECENTER) -static const char rcsid[] = "$Id: ev_waits.c,v 8.10 2000/02/04 07:25:50 vixie Exp $"; +static const char rcsid[] = "$Id: ev_waits.c,v 8.11 2000/07/20 18:17:52 vixie Exp $"; #endif #include "port_before.h" @@ -49,7 +49,7 @@ static evWaitList * evGetWaitList(evContext_p *, const void *, int); */ int evWaitFor(evContext opaqueCtx, const void *tag, - evWaitFunc func, void *uap, evWaitID *id) + evWaitFunc func, void *uap, evWaitID *id) { evContext_p *ctx = opaqueCtx.opaque; evWait *new; @@ -60,11 +60,10 @@ evWaitFor(evContext opaqueCtx, const void *tag, new->uap = uap; new->tag = tag; new->next = NULL; - if (wl->last != NULL) { + if (wl->last != NULL) wl->last->next = new; - } else { + else wl->first = new; - } wl->last = new; if (id != NULL) id->opaque = new; diff --git a/contrib/bind/lib/nameser/Makefile b/contrib/bind/lib/nameser/Makefile index ed068b1de92..b22179388f4 100644 --- a/contrib/bind/lib/nameser/Makefile +++ b/contrib/bind/lib/nameser/Makefile @@ -15,7 +15,7 @@ # SOFTWARE. # -# $Id: Makefile,v 8.19 2000/02/29 03:38:23 vixie Exp $ +# $Id: Makefile,v 8.20 2000/07/11 06:41:42 vixie Exp $ # these are only appropriate for BSD 4.4 or derivatives, and are used in # development. normal builds will be done in the top level directory and @@ -34,7 +34,8 @@ INCL = ${TOP}/include PORTINCL = ${TOP}/port/${SYSTYPE}/include LIBBIND = ${TOP}/lib/libbind.${A} LIBBINDR = ../${TOP}/lib/libbind_r.${A} -CFLAGS= ${CDEBUG} -I${PORTINCL} -I${INCL} +CFLAGS= ${CDEBUG} +CPPFLAGS= -I${PORTINCL} -I${INCL} LD_LIBFLAGS= -x -r AR= ar cru RANLIB= ranlib diff --git a/contrib/bind/lib/resolv/Makefile b/contrib/bind/lib/resolv/Makefile index 78741be08a3..c460b6e4db7 100644 --- a/contrib/bind/lib/resolv/Makefile +++ b/contrib/bind/lib/resolv/Makefile @@ -13,7 +13,7 @@ # ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS # SOFTWARE. -# $Id: Makefile,v 8.33 2000/02/29 03:38:24 vixie Exp $ +# $Id: Makefile,v 8.34 2000/07/11 06:41:42 vixie Exp $ # these are only appropriate for BSD 4.4 or derivatives, and are used in # development. normal builds will be done in the top level directory and @@ -32,7 +32,8 @@ INCL = ${TOP}/include PORTINCL = ${TOP}/port/${SYSTYPE}/include LIBBIND = ${TOP}/lib/libbind.${A} LIBBINDR = ../${TOP}/lib/libbind_r.${A} -CFLAGS= ${CDEBUG} -I${PORTINCL} -I${INCL} +CFLAGS= ${CDEBUG} +CPPFLAGS= -I${PORTINCL} -I${INCL} # -D__BIND_NOSTATIC LD_LIBFLAGS= -x -r AR= ar cru -- 2.45.2