From 08736e1e8d7019baa229da80488474da056f4f04 Mon Sep 17 00:00:00 2001 From: ho Date: Mon, 29 Jan 2001 14:48:05 +0000 Subject: [PATCH] BIND 8.2.3 --- net/bind8/Makefile | 6 +- net/bind8/files/md5 | 6 +- net/bind8/patches/patch-822-P7 | 360 --------------------------- net/bind8/patches/patch-aa | 24 -- net/bind8/patches/patch-ndc_Makefile | 15 ++ 5 files changed, 21 insertions(+), 390 deletions(-) delete mode 100644 net/bind8/patches/patch-822-P7 delete mode 100644 net/bind8/patches/patch-aa create mode 100644 net/bind8/patches/patch-ndc_Makefile diff --git a/net/bind8/Makefile b/net/bind8/Makefile index ddf65c0e2db..082b711944a 100644 --- a/net/bind8/Makefile +++ b/net/bind8/Makefile @@ -1,7 +1,7 @@ -# $OpenBSD: Makefile,v 1.20 2000/11/11 13:22:23 ho Exp $ +# $OpenBSD: Makefile,v 1.21 2001/01/29 14:48:05 ho Exp $ -DISTNAME= bind-openbsd-8.2.2-P6-19991217 -PKGNAME= bind-8.2.2-P7 +DISTNAME= bind-openbsd-8.2.3-20010129 +PKGNAME= bind-8.2.3 CATEGORIES= net NEED_VERSION= 1.317 MASTER_SITES= ftp://ftp.gsnig.org/pub/openbsd-bind/ \ diff --git a/net/bind8/files/md5 b/net/bind8/files/md5 index 45e411390f9..9a9c384b35d 100644 --- a/net/bind8/files/md5 +++ b/net/bind8/files/md5 @@ -1,3 +1,3 @@ -SHA1 (bind-openbsd-8.2.2-P6-19991217.tar.gz) = 57f77d2922006d652eaa3047bc7634cc1a06e486 -MD5 (bind-openbsd-8.2.2-P6-19991217.tar.gz) = c2a14edacc1686bfafe2d12cb07ef405 -RMD160 (bind-openbsd-8.2.2-P6-19991217.tar.gz) = 2b1793f2d3d5b67da8d65a25ac1b410495aa888d +SHA1 (bind-openbsd-8.2.3-20010129.tar.gz) = 34353ca41fd5c3909d0fe35b8c9706dbdbb914fa +MD5 (bind-openbsd-8.2.3-20010129.tar.gz) = cd1138b35612248125eee6fd0c315f0b +RMD160 (bind-openbsd-8.2.3-20010129.tar.gz) = 9c55ac584968e7b5e965e188c57afbc01e0b5b66 diff --git a/net/bind8/patches/patch-822-P7 b/net/bind8/patches/patch-822-P7 deleted file mode 100644 index 0c7b5aad283..00000000000 --- a/net/bind8/patches/patch-822-P7 +++ /dev/null @@ -1,360 +0,0 @@ ---- Version 1999/12/06 21:52:47 1.7 -+++ Version 2000/11/11 12:38:26 -@@ -1 +1 @@ --8.2.2-P6 -+8.2.2-P7 ---- include/arpa/nameser.h 1999/10/17 17:52:23 1.9 -+++ include/arpa/nameser.h 2000/11/11 12:38:27 -@@ -51,7 +51,7 @@ - */ - - /* -- * $ISC: nameser.h,v 8.36 1999/10/15 19:49:08 vixie Exp $ -+ * $ISC: nameser.h,v 8.36.2.1 2000/11/09 23:15:31 vixie Exp $ - */ - - #ifndef _ARPA_NAMESER_H_ -@@ -493,6 +493,7 @@ - #define ns_name_compress __ns_name_compress - #define ns_name_uncompress __ns_name_uncompress - #define ns_name_skip __ns_name_skip -+#define ns_name_rollback __ns_name_rollback - #define ns_sign __ns_sign - #define ns_sign_tcp __ns_sign_tcp - #define ns_sign_tcp_init __ns_sign_tcp_init -@@ -534,6 +535,8 @@ - int ns_name_compress __P((const char *, u_char *, size_t, - const u_char **, const u_char **)); - int ns_name_skip __P((const u_char **, const u_char *)); -+void ns_name_rollback __P((const u_char *, const u_char **, -+ const u_char **)); - int ns_sign __P((u_char *, int *, int, int, void *, - const u_char *, int, u_char *, int *, time_t)); - int ns_sign_tcp __P((u_char *, int *, int, int, ---- libbind/nameser/ns_name.c 1999/10/13 23:14:00 1.7 -+++ libbind/nameser/ns_name.c 2000/11/11 12:38:27 -@@ -18,7 +18,7 @@ - */ - - #ifndef lint --static const char rcsid[] = "$ISC: ns_name.c,v 8.12 1999/10/13 17:11:23 vixie Exp $"; -+static const char rcsid[] = "$ISC: ns_name.c,v 8.12.2.1 2000/11/09 23:15:32 vixie Exp $"; - #endif - - #include "port_before.h" -@@ -502,6 +502,23 @@ - if (ns_name_pton(src, tmp, sizeof tmp) == -1) - return (-1); - return (ns_name_pack(tmp, dst, dstsiz, dnptrs, lastdnptr)); -+} -+ -+/* -+ * Reset dnptrs so that there are no active references to pointers at or -+ * after src. -+ */ -+void -+ns_name_rollback(const u_char *src, const u_char **dnptrs, -+ const u_char **lastdnptr) -+{ -+ while (dnptrs < lastdnptr && *dnptrs != NULL) { -+ if (*dnptrs >= src) { -+ *dnptrs = NULL; -+ break; -+ } -+ dnptrs++; -+ } - } - - /* ---- named/ns_ctl.c 1999/10/13 23:14:05 1.14 -+++ named/ns_ctl.c 2000/11/11 12:38:28 -@@ -1,6 +1,6 @@ - /* $OpenBSD: patch-822-P7,v 1.1 2000/11/11 13:22:24 ho Exp $ */ - #if !defined(lint) && !defined(SABER) --static const char rcsid[] = "$ISC: ns_ctl.c,v 8.28 1999/10/13 16:39:04 vixie Exp $"; -+static const char rcsid[] = "$ISC: ns_ctl.c,v 8.28.2.1 2000/11/09 23:15:28 vixie Exp $"; - #endif /* not lint */ - - /* -@@ -246,6 +246,7 @@ - /* Add any new controls which were found. */ - for (ctl = HEAD(*new); ctl != NULL; ctl = next) { - next = NEXT(ctl, link); -+ UNLINK(*new, ctl, link); - APPEND(server_controls, ctl, link); - install(ctl); - if (ctl->sctx == NULL) ---- named/ns_defs.h 1999/10/10 22:51:52 1.12 -+++ named/ns_defs.h 2000/11/11 12:38:28 -@@ -1,7 +1,7 @@ - /* $OpenBSD: patch-822-P7,v 1.1 2000/11/11 13:22:24 ho Exp $ */ - /* - * from ns.h 4.33 (Berkeley) 8/23/90 -- * $ISC: ns_defs.h,v 8.89 1999/10/07 08:24:08 vixie Exp $ -+ * $ISC: ns_defs.h,v 8.89.2.1 2000/11/09 04:01:21 marka Exp $ - */ - - /* -@@ -603,7 +603,7 @@ - #define STREAM_CONNECT_EV 0x08 - #define STREAM_DONE_CLOSE 0x10 - #define STREAM_AXFR 0x20 --#define STREAM_AXFRIXFR 0x22 -+#define STREAM_AXFRIXFR 0x40 - - #define ALLOW_NETS 0x0001 - #define ALLOW_HOSTS 0x0002 ---- named/ns_req.c 1999/10/17 17:52:28 1.17 -+++ named/ns_req.c 2000/11/11 12:38:29 -@@ -1,7 +1,7 @@ - /* $OpenBSD: patch-822-P7,v 1.1 2000/11/11 13:22:24 ho Exp $ */ - #if !defined(lint) && !defined(SABER) - static const char sccsid[] = "@(#)ns_req.c 4.47 (Berkeley) 7/1/91"; --static const char rcsid[] = "$ISC: ns_req.c,v 8.104 1999/10/15 19:49:04 vixie Exp $"; -+static const char rcsid[] = "$ISC: ns_req.c,v 8.104.2.2 2000/11/09 23:15:29 vixie Exp $"; - #endif /* not lint */ - - /* -@@ -1115,7 +1115,7 @@ - if (qsp == NULL) - return (Finish); - else { -- if (!ixfr_found) { -+ if (!ixfr_found && type == ns_t_ixfr) { - qsp->flags |= STREAM_AXFRIXFR; - hp->qdcount = htons(1); - } -@@ -1593,11 +1593,11 @@ - } - #endif - if ((n = dn_comp(name, buf, buflen, comp_ptrs, edp)) < 0) -- return (-1); -+ goto cleanup; - cp = buf + n; - buflen -= n; - if (buflen < 0) -- return (-1); -+ goto cleanup; - PUTSHORT((u_int16_t)type, cp); - PUTSHORT((u_int16_t)dp->d_class, cp); - PUTLONG(ttl, cp); -@@ -1610,7 +1610,7 @@ - case T_PTR: - n = dn_comp((char *)dp->d_data, cp, buflen, comp_ptrs, edp); - if (n < 0) -- return (-1); -+ goto cleanup; - PUTSHORT((u_int16_t)n, sp); - cp += n; - break; -@@ -1620,7 +1620,7 @@ - /* Store domain name in answer */ - n = dn_comp((char *)dp->d_data, cp, buflen, comp_ptrs, edp); - if (n < 0) -- return (-1); -+ goto cleanup; - PUTSHORT((u_int16_t)n, sp); - cp += n; - if (doadd) { -@@ -1636,15 +1636,15 @@ - cp1 = dp->d_data; - n = dn_comp((char *)cp1, cp, buflen, comp_ptrs, edp); - if (n < 0) -- return (-1); -+ goto cleanup; - cp += n; - buflen -= type == T_SOA ? n + 5 * INT32SZ : n; - if (buflen < 0) -- return (-1); -+ goto cleanup; - cp1 += strlen((char *)cp1) + 1; - n = dn_comp((char *)cp1, cp, buflen, comp_ptrs, edp); - if (n < 0) -- return (-1); -+ goto cleanup; - cp += n; - if (type == T_SOA) { - cp1 += strlen((char *)cp1) + 1; -@@ -1672,7 +1672,7 @@ - /* copy order */ - buflen -= INT16SZ; - if (buflen < 0) -- return (-1); -+ goto cleanup; - memcpy(cp, cp1, INT16SZ); - cp += INT16SZ; - cp1 += INT16SZ; -@@ -1682,7 +1682,7 @@ - /* copy preference */ - buflen -= INT16SZ; - if (buflen < 0) -- return (-1); -+ goto cleanup; - memcpy(cp, cp1, INT16SZ); - cp += INT16SZ; - cp1 += INT16SZ; -@@ -1694,7 +1694,7 @@ - ns_debug(ns_log_default, 1, "size of n at flags = %d", n); - buflen -= n + 1; - if (buflen < 0) -- return (-1); -+ goto cleanup; - *cp++ = n; - memcpy(cp, cp1, n); - cp += n; -@@ -1706,7 +1706,7 @@ - n = *cp1++; - buflen -= n + 1; - if (buflen < 0) -- return (-1); -+ goto cleanup; - *cp++ = n; - memcpy(cp, cp1, n); - cp += n; -@@ -1718,7 +1718,7 @@ - n = *cp1++; - buflen -= n + 1; - if (buflen < 0) -- return (-1); -+ goto cleanup; - *cp++ = n; - memcpy(cp, cp1, n); - cp += n; -@@ -1731,7 +1731,7 @@ - n = dn_comp((char *)cp1, cp, buflen, dnptrs, edp); - ns_debug(ns_log_default, 1, "dn_comp's n = %u", n); - if (n < 0) -- return (-1); -+ goto cleanup; - cp += n; - - /* save data length */ -@@ -1749,7 +1749,7 @@ - cp1 = dp->d_data; - - if ((buflen -= INT16SZ) < 0) -- return (-1); -+ goto cleanup; - - /* copy preference */ - memcpy(cp, cp1, INT16SZ); -@@ -1759,7 +1759,7 @@ - if (type == T_SRV) { - buflen -= INT16SZ*2; - if (buflen < 0) -- return (-1); -+ goto cleanup; - memcpy(cp, cp1, INT16SZ*2); - cp += INT16SZ*2; - cp1 += INT16SZ*2; -@@ -1769,7 +1769,7 @@ - (type == ns_t_mx) ? comp_ptrs : NULL, - (type == ns_t_mx) ? edp : NULL); - if (n < 0) -- return (-1); -+ goto cleanup; - cp += n; - - /* save data length */ -@@ -1783,7 +1783,7 @@ - cp1 = dp->d_data; - - if ((buflen -= INT16SZ) < 0) -- return (-1); -+ goto cleanup; - - /* copy preference */ - memcpy(cp, cp1, INT16SZ); -@@ -1792,13 +1792,13 @@ - - n = dn_comp((char *)cp1, cp, buflen, comp_ptrs, edp); - if (n < 0) -- return (-1); -+ goto cleanup; - cp += n; - buflen -= n; - cp1 += strlen((char *)cp1) + 1; - n = dn_comp((char *)cp1, cp, buflen, comp_ptrs, edp); - if (n < 0) -- return (-1); -+ goto cleanup; - cp += n; - - /* save data length */ -@@ -1813,7 +1813,7 @@ - /* first just copy over the type_covered, algorithm, */ - /* labels, orig ttl, two timestamps, and the footprint */ - if ((dp->d_size - 18) > buflen) -- return (-1); /* out of room! */ -+ goto cleanup; /* out of room! */ - memcpy(cp, cp1, 18); - cp += 18; - cp1 += 18; -@@ -1822,7 +1822,7 @@ - /* then the signer's name */ - n = dn_comp((char *)cp1, cp, buflen, NULL, NULL); - if (n < 0) -- return (-1); -+ goto cleanup; - cp += n; - buflen -= n; - cp1 += strlen((char*)cp1)+1; -@@ -1830,7 +1830,7 @@ - /* finally, we copy over the variable-length signature */ - n = dp->d_size - (u_int16_t)((cp1 - dp->d_data)); - if (n > buflen) -- return (-1); /* out of room! */ -+ goto cleanup; /* out of room! */ - memcpy(cp, cp1, n); - cp += n; - -@@ -1843,7 +1843,7 @@ - cp1 = dp->d_data; - n = dn_comp((char *)cp1, cp, buflen, NULL, NULL); - if (n < 0) -- return (-1); -+ goto cleanup; - - cp += n; - buflen -=n; -@@ -1852,7 +1852,7 @@ - /* copy nxt bit map */ - n = dp->d_size - (u_int16_t)((cp1 - dp->d_data)); - if (n > buflen) -- return (-1); /* out of room! */ -+ goto cleanup; /* out of room! */ - memcpy(cp, cp1, n); - cp += n; - buflen -= n; -@@ -1866,12 +1866,18 @@ - if ((type == T_A || type == T_AAAA) && doadd) - addname(name, name, type, T_KEY, dp->d_class); - if (dp->d_size > buflen) -- return (-1); -+ goto cleanup; - memcpy(cp, dp->d_data, dp->d_size); - PUTSHORT((u_int16_t)dp->d_size, sp); - cp += dp->d_size; - } - return (cp - buf); -+ -+cleanup: -+ /* Rollback RR. */ -+ ns_name_rollback(buf, (const u_char **)comp_ptrs, -+ (const u_char **)edp); -+ return (-1); - } - - static void -@@ -1995,6 +2001,10 @@ - ns_debug(ns_log_default, 5, - "addinfo: not enough room, remaining msglen = %d", - save_msglen); -+ /* Rollback RRset. */ -+ ns_name_rollback(save_cp, -+ (const u_char **)dnptrs, -+ (const u_char **)dnptrs_end); - cp = save_cp; - msglen = save_msglen; - count = save_count; - diff --git a/net/bind8/patches/patch-aa b/net/bind8/patches/patch-aa deleted file mode 100644 index 3d7a7f51ca4..00000000000 --- a/net/bind8/patches/patch-aa +++ /dev/null @@ -1,24 +0,0 @@ ---- ndc/Makefile.orig Sat Mar 25 10:48:11 2000 -+++ ndc/Makefile Sat Mar 25 10:48:40 2000 -@@ -3,7 +3,7 @@ - TOP= ${.CURDIR}/.. - - PROG= ndc --BINDIR= ${DESTDIR}/usr/libexec/named -+BINDIR= /usr/libexec/named - - MAN= ndc.8 - -@@ -16,12 +16,6 @@ - CLEANFILES+= pathnames.h - - beforedepend: pathnames.h -- --beforeinstall: -- if [ -f ${BINDIR} ]; then \ -- rm -f ${BINDIR}; \ -- fi -- mkdir -p -m 755 ${BINDIR} - - ndc.o: pathnames.h - diff --git a/net/bind8/patches/patch-ndc_Makefile b/net/bind8/patches/patch-ndc_Makefile new file mode 100644 index 00000000000..566d0da683f --- /dev/null +++ b/net/bind8/patches/patch-ndc_Makefile @@ -0,0 +1,15 @@ +--- ndc/Makefile.orig Mon Jan 29 15:35:27 2001 ++++ ndc/Makefile Mon Jan 29 15:35:37 2001 +@@ -17,12 +17,6 @@ + + beforedepend: pathnames.h + +-beforeinstall: +- if [ -f ${DESTDIR}/${BINDIR} ]; then \ +- rm -f ${DESTDIR}/${BINDIR}; \ +- fi +- mkdir -p -m 755 ${DESTDIR}/${BINDIR} +- + ndc.o: pathnames.h + + pathnames.h: Makefile ${TOP}/named/pathtemplate.h