Sprout from master 2004-08-25 05:00:32 UTC ankry <ankry@pld-linux.org> '- rel. 9, cosmetics'
Delete:
bind-chroot-ndc.patch
bind-fds.patch
bind-host.patch
bind-mkdep.patch
bind-nonlist.patch
bind-pidfile.patch
bind-probe_ipv6.patch
bind-pselect.patch
bind-res_randomid.patch
bind9-openssl.patch
host_991529+.diff
named-chroot.init
named.conf
resolver.5
utils-holelogd-linux.patch
+++ /dev/null
---- bind-8.2.3/src/bin/ndc/pathnames.h Mon Jan 29 19:39:52 2001
-+++ bind-8.2.3-p/src/bin/ndc/pathnames.h Mon Jan 29 19:36:34 2001
-@@ -21,58 +21,62 @@
-
- #include <paths.h>
-
-+#ifndef _CHROOTDIR
-+#define _CHROOTDIR "/var/lib/named/chroot"
-+#endif
-+
- #ifndef _PATH_CONF
--#define _PATH_CONF "/etc/named.conf"
-+#define _PATH_CONF _CHROOTDIR "/etc/named.conf"
- #endif
-
- #ifndef _PATH_DEBUG
--#define _PATH_DEBUG "named.run"
-+#define _PATH_DEBUG _CHROOTDIR "/var/tmp/named.run"
- #endif
-
- #ifndef _PATH_DUMPFILE
--#define _PATH_DUMPFILE "named_dump.db"
-+#define _PATH_DUMPFILE _CHROOTDIR "/var/tmp/named_dump.db"
- #endif
-
- #ifndef _PATH_NAMED
--#define _PATH_NAMED "/usr/sbin/named"
-+#define _PATH_NAMED _CHROOTDIR "/usr/sbin/named"
- #endif
-
- #ifndef _PATH_PIDFILE
--#define _PATH_PIDFILE "/var/run/named.pid"
-+#define _PATH_PIDFILE _CHROOTDIR "/var/run/named.pid"
- #endif
-
- #ifndef _PATH_NDCSOCK
- #ifdef NEED_SECURE_DIRECTORY
--#define _PATH_NDCSOCK "/var/run/ndc.d/ndc"
-+#define _PATH_NDCSOCK _CHROOTDIR "/var/run/ndc.d/ndc"
- #else
--#define _PATH_NDCSOCK "/var/run/ndc"
-+#define _PATH_NDCSOCK _CHROOTDIR "/var/run/ndc"
- #endif
- #endif
-
- #ifndef _PATH_STATS
--#define _PATH_STATS "named.stats"
-+#define _PATH_STATS _CHROOTDIR "/var/tmp/named.stats"
- #endif
-
- #ifndef _PATH_MEMSTATS
--#define _PATH_MEMSTATS "named.memstats"
-+#define _PATH_MEMSTATS _CHROOTDIR "/var/tmp/named.memstats"
- #endif
-
- #ifndef _PATH_TMPXFER
--#define _PATH_TMPXFER "xfer.ddt.XXXXXX"
-+#define _PATH_TMPXFER _CHROOTDIR "/var/tmp/xfer.ddt.XXXXXX"
- #endif
-
- #ifndef _PATH_XFER
--#define _PATH_XFER "/usr/sbin/named-xfer"
-+#define _PATH_XFER _CHROOTDIR "/usr/sbin/named-xfer"
- #endif
-
- #ifndef _PATH_XFERTRACE
--#define _PATH_XFERTRACE "xfer.trace"
-+#define _PATH_XFERTRACE _CHROOTDIR "/var/tmp/xfer.trace"
- #endif
-
- #ifndef _PATH_XFERDDT
--#define _PATH_XFERDDT "xfer.ddt"
-+#define _PATH_XFERDDT _CHROOTDIR "/var/tmp/xfer.ddt"
- #endif
-
- #ifndef _PATH_DEVNULL
--#define _PATH_DEVNULL "/dev/null"
-+#define _PATH_DEVNULL _CHROOTDIR "/dev/null"
- #endif
+++ /dev/null
---- bind-8.1.2/src/lib/isc/eventlib.c~ Fri Mar 20 18:26:24 1998
-+++ bind-8.1.2/src/lib/isc/eventlib.c Wed Jan 6 17:44:03 1999
-@@ -290,9 +290,9 @@
- evPrintf(ctx, 4,
- "pselect(%d, 0x%lx, 0x%lx, 0x%lx, %d.%09ld)\n",
- ctx->fdMax+1,
-- (u_long)ctx->rdLast.fds_bits[0],
-- (u_long)ctx->wrLast.fds_bits[0],
-- (u_long)ctx->exLast.fds_bits[0],
-+ __FDS_BITS(&ctx->rdLast)[0],
-+ __FDS_BITS(&ctx->wrLast)[0],
-+ __FDS_BITS(&ctx->exLast)[0],
- tp ? tp->tv_sec : -1,
- tp ? tp->tv_nsec : -1);
-
---- bind-8.1.2/src/lib/isc/ev_files.c~ Thu Feb 5 20:53:52 1998
-+++ bind-8.1.2/src/lib/isc/ev_files.c Wed Jan 6 17:46:18 1999
-@@ -139,9 +139,9 @@
- evPrintf(ctx, 5,
- "evSelectFD(fd %d, mask 0x%x): new masks: 0x%lx 0x%lx 0x%lx\n",
- fd, eventmask,
-- (u_long)ctx->rdNext.fds_bits[0],
-- (u_long)ctx->wrNext.fds_bits[0],
-- (u_long)ctx->exNext.fds_bits[0]);
-+ __FDS_BITS(&ctx->rdNext)[0],
-+ __FDS_BITS(&ctx->wrNext)[0],
-+ __FDS_BITS(&ctx->exNext)[0]);
-
- return (0);
- }
-@@ -250,9 +250,9 @@
- evPrintf(ctx, 5,
- "evDeselectFD(fd %d, mask 0x%x): new masks: 0x%lx 0x%lx 0x%lx\n",
- del->fd, eventmask,
-- (u_long)ctx->rdNext.fds_bits[0],
-- (u_long)ctx->wrNext.fds_bits[0],
-- (u_long)ctx->exNext.fds_bits[0]);
-+ __FDS_BITS(&ctx->rdNext)[0],
-+ __FDS_BITS(&ctx->wrNext)[0],
-+ __FDS_BITS(&ctx->exNext)[0]);
-
- /* Couldn't free it before now since we were using fields out of it. */
- FREE(del);
+++ /dev/null
---- bind-8.2/src/bin/host/host.c.host Mon Jan 11 16:15:38 1999
-+++ bind-8.2/src/bin/host/host.c Wed Mar 31 10:51:54 1999
-@@ -1310,6 +1310,7 @@
-
- amtToRead = len;
- cp = buf.qb2;
-+ if (amtToRead > NS_PACKETSZ) amtToRead=NS_PACKETSZ;
- while (amtToRead > 0 &&
- (numRead = read(sockFD, cp, amtToRead)) > 0) {
- cp += numRead;
+++ /dev/null
-diff -ur src.old/lib/bsd/Makefile src/lib/bsd/Makefile
---- src.old/lib/bsd/Makefile Mon Feb 22 03:47:57 1999
-+++ src/lib/bsd/Makefile Mon May 24 15:24:40 1999
-@@ -79,7 +79,7 @@
- -rmdir ${THREADED}
-
- depend: FRC
-- mkdep -I${INCL} -I${PORTINCL} ${CPPFLAGS} ${SRCS}
-+ ../../port/linux/bin/mkdep -I${INCL} -I${PORTINCL} ${CPPFLAGS} ${SRCS}
-
- links: FRC
- @set -e; ln -s SRC/*.[ch] .
-diff -ur src.old/lib/cylink/Makefile src/lib/cylink/Makefile
---- src.old/lib/cylink/Makefile Mon Feb 22 03:47:57 1999
-+++ src/lib/cylink/Makefile Mon May 24 15:24:58 1999
-@@ -81,7 +81,7 @@
- -rmdir ${THREADED}
-
- depend: FRC
-- mkdep -I${INCL} -I${PORTINCL} ${CPPFLAGS} ${SRCS}
-+ ../../port/linux/bin/mkdep -I${INCL} -I${PORTINCL} ${CPPFLAGS} ${SRCS}
-
- links: FRC
- @set -e; ln -s SRC/*.[ch] .
-diff -ur src.old/lib/dnssafe/Makefile src/lib/dnssafe/Makefile
---- src.old/lib/dnssafe/Makefile Tue Feb 23 06:26:59 1999
-+++ src/lib/dnssafe/Makefile Mon May 24 15:24:13 1999
-@@ -98,7 +98,7 @@
- -rmdir ${THREADED}
-
- depend: FRC
-- mkdep -I${INCL} -I${PORTINCL} ${CPPFLAGS} ${SRCS}
-+ ../../port/linux/bin/mkdep -I${INCL} -I${PORTINCL} ${CPPFLAGS} ${SRCS}
-
- links: FRC
- @set -e; ln -s SRC/*.[ch] .
-diff -ur src.old/lib/dst/Makefile src/lib/dst/Makefile
---- src.old/lib/dst/Makefile Sun Mar 7 10:33:47 1999
-+++ src/lib/dst/Makefile Mon May 24 15:25:19 1999
-@@ -83,7 +83,7 @@
- -rmdir ${THREADED}
-
- depend: FRC
-- mkdep -I${INCL} -I${PORTINCL} ${CPPFLAGS} ${SRCS}
-+ ../../port/linux/bin/mkdep -I${INCL} -I${PORTINCL} ${CPPFLAGS} ${SRCS}
-
- links: FRC
- @set -e; ln -s SRC/*.[ch] SRC/*.pl .
-diff -ur src.old/lib/inet/Makefile src/lib/inet/Makefile
---- src.old/lib/inet/Makefile Wed Mar 3 09:07:16 1999
-+++ src/lib/inet/Makefile Mon May 24 15:27:19 1999
-@@ -80,7 +80,7 @@
-
-
- depend: FRC
-- mkdep -I${INCL} -I${PORTINCL} ${CPPFLAGS} ${SRCS}
-+ ../../port/linux/bin/mkdep -I${INCL} -I${PORTINCL} ${CPPFLAGS} ${SRCS}
-
- links: FRC
- @set -e; ln -s SRC/*.[ch] .
-diff -ur src.old/lib/irs/Makefile src/lib/irs/Makefile
---- src.old/lib/irs/Makefile Mon Feb 22 03:47:58 1999
-+++ src/lib/irs/Makefile Mon May 24 15:27:48 1999
-@@ -100,7 +100,7 @@
- -rmdir ${THREADED}
-
- depend: FRC
-- mkdep -I${INCL} -I${PORTINCL} ${CPPFLAGS} ${SRCS}
-+ ../../port/linux/bin/mkdep -I${INCL} -I${PORTINCL} ${CPPFLAGS} ${SRCS}
-
- links: FRC
- @set -e; ln -s SRC/*.[ch] .
-diff -ur src.old/lib/isc/Makefile src/lib/isc/Makefile
---- src.old/lib/isc/Makefile Mon Feb 22 03:47:58 1999
-+++ src/lib/isc/Makefile Mon May 24 15:28:15 1999
-@@ -82,7 +82,7 @@
- -rmdir ${THREADED}
-
- depend: FRC
-- mkdep -I${INCL} -I${PORTINCL} ${CPPFLAGS} ${SRCS}
-+ ../../port/linux/bin/mkdep -I${INCL} -I${PORTINCL} ${CPPFLAGS} ${SRCS}
-
- links: FRC
- @set -e; ln -s SRC/*.[ch] .
-diff -ur src.old/lib/nameser/Makefile src/lib/nameser/Makefile
---- src.old/lib/nameser/Makefile Mon Feb 22 03:47:59 1999
-+++ src/lib/nameser/Makefile Mon May 24 15:28:32 1999
-@@ -75,7 +75,7 @@
- -rmdir ${THREADED}
-
- depend: FRC
-- mkdep -I${INCL} -I${PORTINCL} ${CPPFLAGS} ${SRCS}
-+ ../../port/linux/bin/mkdep -I${INCL} -I${PORTINCL} ${CPPFLAGS} ${SRCS}
-
- links: FRC
- @set -e; ln -s SRC/*.[ch] .
-diff -ur src.old/lib/resolv/Makefile src/lib/resolv/Makefile
---- src.old/lib/resolv/Makefile Mon Feb 22 03:47:59 1999
-+++ src/lib/resolv/Makefile Mon May 24 15:28:50 1999
-@@ -79,7 +79,7 @@
- -rmdir ${THREADED}
-
- depend: FRC
-- mkdep -I${INCL} -I${PORTINCL} ${CPPFLAGS} ${SRCS}
-+ ../../port/linux/bin/mkdep -I${INCL} -I${PORTINCL} ${CPPFLAGS} ${SRCS}
-
- links: FRC
- @set -e; ln -s SRC/*.[ch] .
-diff -ur src.old/port/linux/Makefile src/port/linux/Makefile
---- src.old/port/linux/Makefile Mon Feb 22 03:48:02 1999
-+++ src/port/linux/Makefile Mon May 24 15:22:43 1999
-@@ -67,7 +67,7 @@
- rm -f *.${O} *.BAK *.CKP *~
-
- depend:: FRC
-- mkdep -I${INCL} -I${PORTINCL} ${CPPFLAGS} ${SRCS}
-+ bin/mkdep -I${INCL} -I${PORTINCL} ${CPPFLAGS} ${SRCS}
-
- links: FRC
- @set -e; ln -s SRC/*.[ch] SRC/bin SRC/Makefile.set SRC/probe .
+++ /dev/null
---- src/bin/named/ns_udp.c.nonlist Wed Jun 10 03:54:37 1998
-+++ src/bin/named/ns_udp.c Wed Jun 10 03:57:14 1998
-@@ -34,7 +34,11 @@
- #include <ctype.h>
- #include <errno.h>
- #include <netdb.h>
--#include <nlist.h>
-+
-+#if defined(CHECK_UDP_SUM) || defined(FIX_UDP_SUM)
-+#include <libelf/nlist.h>
-+#endif
-+
- #include <resolv.h>
- #include <stdio.h>
- #include <syslog.h>
+++ /dev/null
-diff -urN bind-8.2.2_P5.org/src/bin/named/ns_config.c bind-8.2.2_P5/src/bin/named/ns_config.c
---- bind-8.2.2_P5.org/src/bin/named/ns_config.c Tue Nov 9 00:09:42 1999
-+++ bind-8.2.2_P5/src/bin/named/ns_config.c Wed Feb 2 17:30:14 2000
-@@ -1445,8 +1445,10 @@
- return (NULL);
- }
-
-+ /* If file isn't our or named is running as root */
-+ if ((geteuid() == 0) || (geteuid() != sb.st_uid))
- (void)unlink(filename);
-- fd = open(filename, O_WRONLY|O_CREAT|O_EXCL,
-+ fd = open(filename, O_WRONLY|O_CREAT|O_TRUNC,
- S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
- if (fd < 0)
- return (NULL);
+++ /dev/null
-diff -urN src.orig/port/linux/include/Makefile src/port/linux/include/Makefile
---- src.orig/port/linux/include/Makefile Tue May 18 08:42:52 1999
-+++ src/port/linux/include/Makefile Mon Aug 2 18:32:26 1999
-@@ -68,7 +68,7 @@
- all depend:: port_ipv6.h
-
- port_ipv6.h: FRC
-- probe_ipv6
-+ ../bin/probe_ipv6
-
- distclean:: clean
-
+++ /dev/null
---- src/lib/isc/eventlib.c Sat Mar 21 00:26:24 1998
-+++ src.orig/lib/isc/eventlib.c Sat Dec 5 17:43:14 1998
-@@ -42,7 +42,11 @@
- #include "port_after.h"
-
- /* Forward. */
--
-+#if ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 1))
-+#include <sys/select.h> /* Another piece of shit from glibc guys ...;(( */
-+#undef NEED_PSELECT
-+#endif /* glibc-2.1 */
-+
- #ifdef NEED_PSELECT
- static int pselect(int, void *, void *, void *, struct timespec*);
- #endif
+++ /dev/null
---- bind-chroot-8.2.2_P5/src/lib/resolv/res_init.c.orig Sun Jan 9 12:47:08 2000
-+++ bind-chroot-8.2.2_P5/src/lib/resolv/res_init.c Sun Jan 9 12:55:35 2000
-@@ -92,6 +92,7 @@
- #include <unistd.h>
-
- #include "port_after.h"
-+#undef res_randomid
-
- /* Options. Should all be left alone. */
- #define RESOLVSORT
+++ /dev/null
-diff -urN bind-9.0.1rc2.org/configure.in bind-9.0.1rc2/configure.in
---- bind-9.0.1rc2.org/configure.in Tue Nov 7 11:04:02 2000
-+++ bind-9.0.1rc2/configure.in Wed Nov 8 11:15:29 2000
-@@ -184,12 +184,13 @@
- #
- AC_MSG_CHECKING(for compatible OpenSSL library)
-
--DST_PRIVATEOPENSSL='-DDST_USE_PRIVATE_OPENSSL'
--dst_privateopenssl='openssl'
--DST_OPENSSL_INC='-I${srcdir}/../openssl/include'
-+DNS_OPENSSL_LIBS="-lssl -lcrypto"
-+DST_PRIVATEOPENSSL=''
-+dst_privateopenssl=''
-+DST_OPENSSL_INC=''
- DST_OPENSSL_LIB=''
--DST_OPENSSL_OBJS='${OPENSSLOBJS}'
--AC_MSG_RESULT(using private library)
-+DST_OPENSSL_OBJS=''
-+AC_MSG_RESULT(using shared library)
-
- AC_SUBST(DST_PRIVATEOPENSSL)
- AC_SUBST(dst_privateopenssl)
-@@ -202,7 +203,6 @@
- # it as needed) if it is found.
- #
-
--DNS_OPENSSL_LIBS=""
- AC_SUBST(DNS_OPENSSL_LIBS)
-
- #
+++ /dev/null
-diff -Nru host/Makefile host+/Makefile
---- host/Makefile Wed Mar 15 22:51:39 2000
-+++ host+/Makefile Wed Jun 14 01:01:09 2000
-@@ -60,6 +60,8 @@
- # This is the default in either case if you compile stand-alone.
- CONFIGDEFS = -DHOST_RES_SEND
-
-+CONFIGDEFS = -DHOST_RES_SEND -DIPV6
-+
- # ----------------------------------------------------------------------
- # Include file directories.
- # This program must be compiled with the same include files that
-diff -Nru host/README.ip6.int host+/README.ip6.int
---- host/README.ip6.int Thu Jan 1 01:00:00 1970
-+++ host+/README.ip6.int Wed Jun 14 01:05:05 2000
-@@ -0,0 +1,17 @@
-+Use -DIPV6 in the Makefile to turn IPv6 addresses recognition. This
-+version of host recognizes IPv6 addresses in the following formats:
-+
-+3ffe:8010:: normal format of a host (mask 128) address
-+3ffe:8010::1 normal format of a host (mask 128) address
-+3ffe:8010::/28 with mask
-+3ffe:8010:2::/28 with mask; :2: will be masked
-+3ffe:8010:2 relaxed format; default mask will be 48 in this case
-+3ffe:8010/28 default mask 32 but shorten explicitely to 28
-+
-+All of the above addresses will be transformed into ip6.int domain form,
-+e.g. 3ffe:8010/28 -> 1.0.8.E.F.F.3.ip6.int. ::/0 can be used to ask
-+about just ip6.int.
-+
-+There no IPv6 communication support yet.
-+
-+rzm@icm.edu.pl
-diff -Nru host/defs.h host+/defs.h
---- host/defs.h Wed Mar 29 20:19:00 2000
-+++ host+/defs.h Tue Jun 13 18:39:39 2000
-@@ -87,6 +87,7 @@
- int parse_type PROTO((char *));
- int parse_class PROTO((char *));
- char *in_addr_arpa PROTO((char *));
-+char *ip6_int PROTO((char *));
- char *nsap_int PROTO((char *));
- void print_host PROTO((char *, struct hostent *));
- void show_res PROTO((void));
-diff -Nru host/info.c host+/info.c
---- host/info.c Mon Mar 27 12:59:11 2000
-+++ host+/info.c Tue Jun 13 21:06:15 2000
-@@ -63,6 +63,7 @@
- int nodata = 0; /* NO_DATA status during DNSRCH */
- int nquery = 0; /* number of extra search queries */
-
-+ if (name==NULL) return FALSE;
- /*
- * Single dot means root zone.
- */
-diff -Nru host/main.c host+/main.c
---- host/main.c Wed Mar 29 22:38:09 2000
-+++ host+/main.c Wed Jun 14 00:55:58 2000
-@@ -1273,6 +1273,7 @@
- input char *name; /* command line argument */
- {
- bool result; /* result status of action taken */
-+ bool rev6 = FALSE;
-
- /* check for nonsense input name */
- if (strlength(name) > MAXDNAME)
-@@ -1297,6 +1298,13 @@
- else
- queryaddr = inet_addr(queryname);
-
-+#ifdef IPV6
-+ if (index(queryname,':')) {
-+ rev6 = TRUE;
-+ queryname = ip6_int(queryname);
-+ }
-+#endif
-+
- /*
- * Generate reverse in-addr.arpa query if so requested.
- * The input name must be a dotted quad, and be convertible.
-@@ -1304,7 +1312,11 @@
- if (reverse)
- {
- if (queryaddr == NOT_DOTTED_QUAD)
-- name = NULL;
-+ if (rev6) {
-+ name = ip6_int(queryname);
-+ } else {
-+ name = NULL;
-+ }
- else
- name = in_addr_arpa(queryname);
-
-@@ -1323,18 +1335,18 @@
- * Heuristic to check whether we are processing a reverse mapping domain.
- * Normalize to not have trailing dot, unless it is the root zone.
- */
-- if ((queryaddr == NOT_DOTTED_QUAD) && !reverse)
-+ if ((queryaddr == NOT_DOTTED_QUAD) && !rev6 && !reverse)
- {
- char namebuf[MAXDNAME+1];
- register int n;
-
-- name = strcpy(namebuf, queryname);
-+ name = strncpy(namebuf, queryname, sizeof(namebuf));
-
- n = strlength(name);
- if (n > 1 && name[n-1] == '.')
- name[n-1] = '\0';
-
-- reverse = indomain(name, ARPA_ROOT, FALSE);
-+ reverse = indomain(name, ARPA_ROOT, FALSE) || indomain(name, IPNG_ROOT, FALSE);
- }
-
- /*
-@@ -1370,7 +1382,7 @@
- /* set querytype for regular mode if unspecified */
- if ((querytype == T_NONE) && !listmode)
- {
-- if ((queryaddr != NOT_DOTTED_QUAD) || reverse)
-+ if ((queryaddr != NOT_DOTTED_QUAD) || rev6 || reverse)
- querytype = T_PTR;
- else
- querytype = T_A;
-diff -Nru host/util.c host+/util.c
---- host/util.c Mon Mar 27 13:34:15 2000
-+++ host+/util.c Wed Jun 14 01:00:08 2000
-@@ -209,6 +209,78 @@
- }
-
- \f/*
-+** IP6_INT -- Convert IPv6 string to reverse ip6.int
-+** ------------------------------------------------------------------
-+**
-+** Returns:
-+** Pointer to appropriate reverse ip6.int name with
-+** trailing dot to force absolute domain name. NULL
-+** in case of invalid IPv6 input string.
-+*/
-+
-+char *
-+ip6_int(ipv6)
-+input char *ipv6; /* input string with IPv6 */
-+{
-+ static char dombuf[ 128/4*3 + sizeof(IPNG_ROOT) + 2];
-+#ifdef IPV6
-+ char ipv6addr [8*4 + 7 + 1 + 3 + 2], *mask, *p, buf2[5];
-+ struct in6_addr ip6buf;
-+ int nmask = -1, err, i, colons = 0;
-+
-+ strncpy(ipv6addr, ipv6, sizeof(ipv6addr));
-+
-+ mask = index(ipv6addr, '/');
-+ if (mask) {
-+ *mask = '\0';
-+ mask++;
-+ nmask = atoi(mask);
-+ }
-+
-+ p = ipv6addr; while(*p) if (*p++==':') colons++;
-+/* printf("addr: %s, colons: %d, last: %c\n", ipv6addr, colons, p[-1]); */
-+
-+ /* relaxing address format: remove last : */
-+ if ( (p-ipv6addr>=2) && (p[-1]==':') && (p[-2]!=':') ) p[-1] = '\0';
-+
-+ /* mask not set, derived from non-standard formatted address */
-+ if ( (colons<7) && (p[-1]!=':') && (strstr(ipv6addr,"::")==0) ) {
-+ strcat(ipv6addr, "::");
-+ if (nmask==-1) nmask = (colons+1)*16;
-+ }
-+
-+ if (nmask==-1) nmask = 128;
-+
-+ err = inet_pton(AF_INET6, ipv6addr, &ip6buf);
-+ if (err == -1) {
-+ errmsg("Address (%s) format error: %s", ipv6, strerror(errno));
-+ return ipv6;
-+ }
-+ if (err == 0) {
-+ errmsg("Address `%s' not valid");
-+ return ipv6;
-+ }
-+
-+/* for (i=0; i<16; i++) printf("%02X ", ip6buf.s6_addr[i]); printf("/%d\n", nmask); */
-+
-+ nmask -= nmask%4;
-+ dombuf[0] = '\0';
-+ while (nmask>0) {
-+ if (nmask%8==0) {
-+ sprintf(buf2, "%X.", ip6buf.s6_addr[(nmask-1)/8] % 16);
-+ } else {
-+ sprintf(buf2, "%X.", ip6buf.s6_addr[(nmask-1)/8] / 16);
-+ }
-+ strcat(dombuf, buf2);
-+ nmask -= 4; /* 8 bits at a time */
-+ }
-+ strcat(dombuf, IPNG_ROOT);
-+ strcat(dombuf, ".");
-+#endif
-+ return dombuf;
-+}
-+
-+\f/*
- ** NSAP_INT -- Convert dotted nsap address string to reverse nsap.int
- ** ------------------------------------------------------------------
- **
+++ /dev/null
-#!/bin/sh
-#
-# named This shell script takes care of starting and stopping
-# named (BIND DNS server).
-#
-# chkconfig: 345 55 45
-# description: named (BIND) is a Domain Name Server (DNS) \
-# that is used to resolve host names to IP addresses.
-
-# Source function library
-. /etc/rc.d/init.d/functions
-
-# Source networking configuration
-. /etc/sysconfig/network
-
-# Try get config..
-[ -f /etc/sysconfig/named ] && . /etc/sysconfig/named
-
-# Check that networking is up.
-if is_yes "${NETWORKING}"; then
- if [ ! -f /var/lock/subsys/network ]; then
- msg_network_down "Named"
- exit 1
- fi
-else
- exit 0
-fi
-
-# Sanity check
-[ -f /etc/named.conf ] || exit 0
-
-RETVAL=0
-# See how we were called.
-case "$1" in
- start)
- # Check if the service is already running?
- if [ ! -f /var/lock/subsys/named ]; then
- msg_starting "holelogd.named"
- daemon holelogd.named /var/lib/named/chroot/dev/log
- RETVAL=$?
- [ $RETVAL -eq 0 ] || exit 1
- msg_starting "Named"
- touch /var/log/named && chown named.named /var/log/named
- daemon /var/lib/named/chroot/usr/sbin/named \
- -u named -g named -t /var/lib/named/chroot
- RETVAL=$?
- if [ $RETVAL -eq 0 ]; then
- touch /var/lock/subsys/named
- chown named.named /var/lib/named/chroot/var/run/named.pid
- ln -sf /var/lib/named/chroot/var/run/named.pid /var/run/named.pid
- fi
- else
- msg_already_running "Named"
- fi
- ;;
- stop)
- if [ -f /var/lock/subsys/named ]; then
- msg_stopping "Named"
- killproc named
- msg_stopping "holelogd.named"
- killproc holelogd.named
- rm -f /var/lock/subsys/named >/dev/null 2>&1
- else
- msg_not_running "Named"
- fi
- ;;
- status)
- /usr/sbin/ndc.chroot status
- exit $?
- ;;
- reload|force-reload)
- if [ -f /var/lock/subsys/named ]; then
- msg_reloading "Named"
- killproc named -HUP
- RETVAL=$?
- else
- msg_not_running "Named" >&2
- exit 7
- fi
-
- ;;
- restart)
- $0 stop
- $0 start
- exit $?
- ;;
- *)
- msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
- exit 3
-esac
-
-exit $RETVAL
+++ /dev/null
-// This is an exaple configuration file for named ( /etc/named.conf )
-// Przyk³adowy plik konfiguracyjny /etc/named.conf dla serwera nazw `named'
-
-options {
- directory "/var/lib/named";
- check-names master fail;
-// check-names slave warn;
- check-names response ignore;
- datasize default;
- deallocate-on-exit no;
- host-statistics no;
- fake-iquery no;
-};
-
-controls {
- unix "/var/run/ndc" perm 0600 owner 0 group 0;
-};
-
-
-zone "localhost" IN {
- type master;
- file "M/localhost.zone";
- check-names fail;
- allow-update { none; };
- allow-transfer { any; };
-};
-
-zone "0.0.127.in-addr.arpa" IN {
- type master;
- file "M/127.0.0.zone";
- check-names fail;
- allow-update { none; };
- allow-transfer { any; };
-};
-
-zone "." IN {
- type hint;
- file "root.hint";
-};
-
-//zone "pld-linux.org" IN {
-// type slave;
-// file "S/pld-linux.org.zone";
-// masters {
-// 195.116.211.3;
-// };
-// check-names warn;
-// allow-query { any; };
-// allow-transfer { any; };
-// };
-
-logging {
- channel xfer-log {
- file "/var/log/named";
- print-category yes;
- print-severity yes;
- print-time yes;
- severity info;
- };
- category xfer-in { xfer-log; };
- category xfer-out { xfer-log; };
- category notify { xfer-log; };
- category load { xfer-log; };
-};
-
+++ /dev/null
-.\" Copyright (c) 1986 The Regents of the University of California.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms are permitted
-.\" provided that the above copyright notice and this paragraph are
-.\" duplicated in all such forms and that any documentation,
-.\" advertising materials, and other materials related to such
-.\" distribution and use acknowledge that the software was developed
-.\" by the University of California, Berkeley. The name of the
-.\" University may not be used to endorse or promote products derived
-.\" from this software without specific prior written permission.
-.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
-.\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
-.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-.\"
-.\" @(#)resolver.5 5.9 (Berkeley) 12/14/89
-.\" $Id$
-.\"
-.Dd November 11, 1993
-.Dt RESOLVER 5
-.Os BSD 4
-.Sh NAME
-.Nm resolver
-.Nd resolver configuration file
-.Sh SYNOPSIS
-.Pa /etc/resolv.conf
-.Sh DESCRIPTION
-The
-.Nm resolver
-is a set of routines in the C library
-.Pq Xr resolve 3
-that provide access to the Internet Domain Name System.
-The
-.Nm resolver
-configuration file contains information that is read
-by the
-.Nm resolver
-routines the first time they are invoked by a process.
-The file is designed to be human readable and contains a list of
-keywords with values that provide various types of
-.Nm resolver
-information.
-.Pp
-On a normally configured system, this file should not be necessary.
-The only name server to be queried will be on the local machine,
-the domain name is determined from the host name,
-and the domain search path is constructed from the domain name.
-.Pp
-The different configuration directives are:
-.Bl -tag -width "nameser"
-.It Li nameserver
-Internet address (in dot notation) of a name server that the
-.Nm resolver
-should query. Up to
-.Dv MAXNS
-(see
-.Pa <resolv.h> )
-name servers may be listed, one per keyword.
-If there are multiple servers, the
-.Nm resolver
-library queries them in the order listed.
-If no
-.Li nameserver
-entries are present, the default is to use the name server on the local machine.
-(The algorithm used is to try a name server, and if the query times out,
-try the next, until out of name servers,
-then repeat trying all the name servers
-until a maximum number of retries are made).
-.It Li domain
-Local domain name.
-Most queries for names within this domain can use short names
-relative to the local domain.
-If no
-.Li domain
-entry is present, the domain is determined from the local host name returned by
-.Xr gethostname 2 ;
-the domain part is taken to be everything after the first
-.Sq \&. .
-Finally, if the host name does not contain a domain part, the root
-domain is assumed.
-.It Li search
-Search list for host-name lookup.
-The search list is normally determined from the local domain name;
-by default, it contains only the local domain name.
-This may be changed by listing the desired domain search path
-following the
-.Li search
-keyword with spaces or tabs separating the names.
-Most
-.Nm resolver
-queries will be attempted using each component
-of the search path in turn until a match is found.
-Note that this process may be slow and will generate a lot of network
-traffic if the servers for the listed domains are not local,
-and that queries will time out if no server is available
-for one of the domains.
-.Pp
-The search list is currently limited to six domains
-with a total of 256 characters.
-.It Li sortlist
-Allows addresses returned by gethostbyname to be sorted.
-A
-.Li sortlist
-is specified by IP address netmask pairs. The netmask is
-optional and defaults to the natural netmask of the net. The IP address
-and optional network pairs are separated by slashes. Up to 10 pairs may
-be specified. For example:
-.Bd -literal -offset indent
-sortlist 130.155.160.0/255.255.240.0 130.155.0.0
-.Ed
-.It Li options
-Allows certain internal
-.Nm resolver
-variables to be modified.
-The syntax is
-.D1 Li options Ar option ...
-where
-.Ar option
-is one of the following:
-.Bl -tag -width "ndots:n "
-.It Li debug
-sets
-.Dv RES_DEBUG
-in
-.Ft _res.options .
-.It Li ndots: Ns Ar n
-sets a threshold for the number of dots which
-must appear in a name given to
-.Fn res_query
-(see
-.Xr resolver 3 )
-before an
-.Em initial absolute query
-will be made. The default for
-.Ar n
-is
-.Dq 1 ,
-meaning that if there are
-.Em any
-dots in a name, the name will be tried first as an absolute name before any
-.Em search list
-elements are appended to it.
-.It Li timeout: Ns Ar n
-sets the amount of time the resolver will wait for a response from a remote
-name server before retrying the query via a different name server. Measured in
-seconds, the default is
-.Dv RES_TIMEOUT
-(see
-.Pa <resolv.h> ).
-.It Li attempts: Ns Ar n
-sets the number of times the resolver will send a query to its name servers
-before giving up and returning an error to the calling application. The
-default is
-.Dv RES_DFLRETRY
-(see
-.Pa <resolv.h> ).
-.It Li rotate
-sets
-.Dv RES_ROTATE
-in
-.Ft _res.options ,
-which causes round robin selection of nameservers from among those listed.
-This has the effect of spreading the query load among all listed servers,
-rather than having all clients try the first listed server first every time.
-.It Li no-check-names
-sets
-.Dv RES_NOCHECKNAME
-in
-.Ft _res.options ,
-which disables the modern BIND checking of incoming host names and mail names
-for invalid characters such as underscore (_), non-ASCII, or control characters.
-.It Li inet6
-sets
-.Dv RES_USE_INET6
-in
-.Ft _res.options .
-This has the effect of trying a AAAA query before an A query inside the
-.Ft gethostbyname
-function, and of mapping IPv4 responses in IPv6 ``tunnelled form'' if no
-AAAA records are found but an A record set exists.
-.El
-.El
-.Pp
-The
-.Li domain
-and
-.Li search
-keywords are mutually exclusive.
-If more than one instance of these keywords is present,
-the last instance wins.
-.Pp
-The
-.Li search
-keyword of a system's
-.Pa resolv.conf
-file can be
-overridden on a per-process basis by setting the environment variable
-.Dq Ev LOCALDOMAIN
-to a space-separated list of search domains.
-.Pp
-The
-.Li options
-keyword of a system's
-.Pa resolv.conf
-file can be amended on a per-process basis by setting the environment variable
-.Dq Ev RES_OPTIONS to a space-separated list of
-.Nm resolver
-options as explained above under
-.Li options .
-.Pp
-The keyword and value must appear on a single line, and the keyword
-(e.g.,
-.Li nameserver )
-must start the line. The value follows the keyword, separated by white space.
-.Sh FILES
-.Pa /etc/resolv.conf
-.Pa <resolv.h>
-.Sh SEE ALSO
-.Xr gethostbyname 3 ,
-.Xr hostname 7 ,
-.Xr named 8 ,
-.Xr resolver 3 ,
-.Xr resolver 5 .
-.Dq Name Server Operations Guide for Sy BIND
+++ /dev/null
---- bind-chroot-8.2.2_P5/utils-1.0/holelogd.c.orig Sun Sep 15 22:39:42 1996
-+++ bind-chroot-8.2.2_P5/utils-1.0/holelogd.c Sun Jan 9 18:26:33 2000
-@@ -64,10 +64,10 @@
- (void)unlink(holename);
- unxls.sun_family = AF_UNIX;
- (void) strncpy(unxls.sun_path, holename, sizeof unxls.sun_path);
-- listenfd = socket(AF_UNIX, SOCK_STREAM, 0);
-+ listenfd = socket(AF_UNIX, SOCK_DGRAM, 0);
- if (listenfd < 0 || bind(listenfd, (struct sockaddr *) &unxls,
- sizeof(unxls.sun_family)+strlen(unxls.sun_path)) < 0 ||
-- chmod(holename, 0666) < 0 || listen(listenfd, 5) < 0) {
-+ chmod(holename, 0666) < 0) {
- syslog(LOG_ERR, "Can't create AF_UNIX listen socket %s (%m) - exiting",
- holename);
- exit(1);
-@@ -77,7 +77,7 @@
-
- logaddr.sa_family = AF_UNIX;
- (void) strncpy(logaddr.sa_data, logname, sizeof(logaddr.sa_data));
-- logfd = socket(AF_UNIX, SOCK_STREAM, 0);
-+ logfd = socket(AF_UNIX, SOCK_DGRAM, 0);
- if (logfd < 0) {
- syslog(LOG_ERR, "Can't create AF_UNIX socket (%m) - exiting");
- exit(1);
-@@ -118,14 +118,6 @@
- for (fd = 0; fd < FD_SETSIZE; fd++) {
- if (FD_ISSET(fd, &readfds)) {
- if (fd == listenfd) {
-- int len;
-- len = sizeof(unxs);
-- fd = accept(listenfd, (struct sockaddr *)&unxs, &len);
-- if (fd >= 0) {
-- FD_SET(fd, &cfds);
-- }
-- }
-- else {
- int i;
- char buf[1024];
- i = read(fd, buf, 1024);