diff options
Diffstat (limited to 'contrib/bind/conf')
-rwxr-xr-x | contrib/bind/conf/bsdinstall.sh | 251 | ||||
-rw-r--r-- | contrib/bind/conf/copyright | 50 | ||||
-rw-r--r-- | contrib/bind/conf/master/README | 45 | ||||
-rw-r--r-- | contrib/bind/conf/master/named.boot | 18 | ||||
-rw-r--r-- | contrib/bind/conf/master/named.boot.master | 16 | ||||
-rw-r--r-- | contrib/bind/conf/master/named.hosts | 22 | ||||
-rw-r--r-- | contrib/bind/conf/master/named.local | 13 | ||||
-rw-r--r-- | contrib/bind/conf/master/named.rev | 30 | ||||
-rw-r--r-- | contrib/bind/conf/master/root.cache | 63 | ||||
-rw-r--r-- | contrib/bind/conf/options.h | 167 | ||||
-rw-r--r-- | contrib/bind/conf/portability.h | 595 |
11 files changed, 1270 insertions, 0 deletions
diff --git a/contrib/bind/conf/bsdinstall.sh b/contrib/bind/conf/bsdinstall.sh new file mode 100755 index 0000000..58f87de --- /dev/null +++ b/contrib/bind/conf/bsdinstall.sh @@ -0,0 +1,251 @@ +#! /bin/sh + +## (From INN-1.4, written by Rich Salz) +## $Revision: 8.1 $ +## A script to install files and directories. + +PROGNAME=`basename $0` + +## Paths to programs. CHOWN and WHOAMI are checked below. +CHOWN=chown +CHGRP=chgrp +CHMOD=chmod +CP=cp +LN=ln +MKDIR=mkdir +MV=mv +RM=rm +STRIP=strip +WHOAMI=whoami + +## Some systems don't support -x, so we have to use -f. +if [ ${CHOWN} = chown ] ; then + if [ -f /etc/chown ] ; then + CHOWN=/etc/chown + else + if [ -f /usr/etc/chown ] ; then + CHOWN=/usr/etc/chown + fi + fi +fi + +if [ ${WHOAMI} = whoami ] ; then + if [ -f /usr/ucb/whoami ] ; then + WHOAMI=/usr/ucb/whoami + fi +fi + +## Defaults. +CHOWNIT=false +CHGROUPIT=false +CHMODIT=false +STRIPIT=false +BACKIT=false +TOUCHIT=true +SAVESRC=false +ROOT=unknown + +## Process JCL. +MORETODO=true +while ${MORETODO} ; do + case X"$1" in + X-b) + BACKIT=true + BACKUP="$2" + shift + ;; + X-b*) + BACKIT=true + BACKUP=`expr "$1" : '-b\(.*\)'` + ;; + X-c) + SAVESRC=true + ;; + X-g) + GROUP="$2" + CHGROUPIT=true + shift + ;; + X-g*) + GROUP=`expr "$1" : '-g\(.*\)'` + CHGROUPIT=true + ;; + X-G) + case ${ROOT} in + unknown) + case `${WHOAMI}` in + root) + ROOT=true + ;; + *) + ROOT=false + ;; + esac + ;; + esac + GROUP="$2" + shift + ${ROOT} && CHGROUPIT=true + ;; + X-G*) + case ${ROOT} in + unknown) + case `${WHOAMI}` in + root) + ROOT=true + ;; + *) + ROOT=false + ;; + esac + ;; + esac + if ${ROOT} ; then + GROUP=`expr "$1" : '-g\(.*\)'` + CHGROUPIT=true + fi + ;; + X-m) + MODE="$2" + CHMODIT=true + shift + ;; + X-m*) + MODE=`expr "$1" : '-m\(.*\)'` + CHMODIT=true + ;; + X-n) + TOUCHIT=false + ;; + X-o) + OWNER="$2" + CHOWNIT=true + shift + ;; + X-o*) + OWNER=`expr "$1" : '-o\(.*\)'` + CHOWNIT=true + ;; + X-O) + case ${ROOT} in + unknown) + case `${WHOAMI}` in + root) + ROOT=true + ;; + *) + ROOT=false + ;; + esac + ;; + esac + OWNER="$2" + shift + ${ROOT} && CHOWNIT=true + ;; + X-O*) + case ${ROOT} in + unknown) + case `${WHOAMI}` in + root) + ROOT=true + ;; + *) + ROOT=false + ;; + esac + ;; + esac + if ${ROOT} ; then + OWNER=`expr "$1" : '-o\(.*\)'` + CHOWNIT=true + fi + ;; + X-s) + STRIPIT=true + ;; + X--) + shift + MORETODO=false + ;; + X-*) + echo "${PROGNAME}: Unknown flag $1" 1>&2 + exit 1 + ;; + *) + MORETODO=false + ;; + esac + ${MORETODO} && shift +done + +## Process arguments. +if [ $# -ne 2 ] ; then + echo "Usage: ${PROGNAME} [flags] source destination" + exit 1 +fi + +## Making a directory? +if [ X"$1" = X. ] ; then + DEST="$2" + if [ ! -d "${DEST}" ] ; then + ${MKDIR} "${DEST}" || exit 1 + fi + if ${CHOWNIT} ; then + ${CHOWN} "${OWNER}" "${DEST}" || exit 1 + fi + if ${CHGROUPIT} ; then + ${CHGRP} "${GROUP}" "${DEST}" || exit 1 + fi + if ${CHMODIT} ; then + umask 0 + ${CHMOD} "${MODE}" "${DEST}" || exit 1 + fi + exit 0 +fi + +## Get the destination and a temp file in the destination diretory. +if [ -d "$2" ] ; then + DEST="$2/$1" + TEMP="$2/$$.tmp" +else + DEST="$2" + TEMP="`expr "$2" : '\(.*\)/.*'`/$$.tmp" +fi + +## If not given the same name, we must try to copy. +if [ X"$1" != X"$2" -o $SAVESRC ] ; then + if cmp -s "$1" "${DEST}" ; then + ## Files are same; touch or not. + ${TOUCHIT} && touch "${DEST}" + else + ## If destination exists and we wish to backup, link to backup. + if [ -f "${DEST}" ] ; then + if ${BACKIT} ; then + ${RM} -f "${DEST}${BACKUP}" + ${LN} "${DEST}" "${DEST}${BACKUP}" + fi + fi + ## Copy source to the right dir, then move to right spot. + ## Done in two parts so we can hope for atomicity. + ${RM} -f "${TEMP}" || exit 1 + ${CP} "$1" "${TEMP}" || exit 1 + ${MV} -f "${TEMP}" "${DEST}" || exit 1 + fi +fi + +## Strip and set the modes. +if ${STRIPIT} ; then + ${STRIP} "${DEST}" || exit 1 +fi +if ${CHOWNIT} ; then + ${CHOWN} "${OWNER}" "${DEST}" || exit 1 +fi +if ${CHGROUPIT} ; then + ${CHGRP} "${GROUP}" "${DEST}" || exit 1 +fi +if ${CHMODIT} ; then + umask 0 + ${CHMOD} "${MODE}" "${DEST}" || exit 1 +fi +exit 0 diff --git a/contrib/bind/conf/copyright b/contrib/bind/conf/copyright new file mode 100644 index 0000000..a441ff8 --- /dev/null +++ b/contrib/bind/conf/copyright @@ -0,0 +1,50 @@ +- +Copyright (c) XYZZY + The Regents of the University of California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. All advertising materials mentioning features or use of this software + must display the following acknowledgement: + This product includes software developed by the University of + California, Berkeley and its contributors. +4. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. +- +Portions Copyright (c) 1993 by Digital Equipment Corporation. + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies, and that +the name of Digital Equipment Corporation not be used in advertising or +publicity pertaining to distribution of the document or software without +specific, written prior permission. + +THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL +WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT +CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL +DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR +PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. +- diff --git a/contrib/bind/conf/master/README b/contrib/bind/conf/master/README new file mode 100644 index 0000000..4e49af6 --- /dev/null +++ b/contrib/bind/conf/master/README @@ -0,0 +1,45 @@ + +How to add new hosts to the name server data base: + +1) Edit 'named.hosts' file: + + For each machine you need to enter the following information: + machine name, all its network addresses, host information, and common + aliases for it. + + This is the entry for calder. + +CALDER IN A 128.32.130.1 + IN A 128.32.129.3 + IN HINFO VAX-11/750 UNIX +UCBCALDER IN CNAME CALDER + + For the machine you are adding: + 1) replace 'CALDER' with the new machine name + 2) replace '128.32.130.1' with the new machines address + if there is more then one address for the machine + then add lines like the one with '128.32.129.3' + 3) replace 'VAX-11/750' with the machine type + 4) If it doesn't run 'UNIX' then replace UNIX with its + operating system. + +2) Edit 'named.rev' file: + + For each address of a machine you need to enter the reverse + address notation for the machine: + + For calder the lines look as follows: + +12.0 IN PTR CALDER.BERKELEY.EDU. +3.129 IN PTR CALDER.BERKELEY.EDU. + + Calder has two address '128.32.0.12' and '128.32.129.3' + + You take the two numbers after 128.32 and reverse them. + Then replace CALDER with the new machine name. + + *** Note the trailing "." on "EDU." it needs to be there. Otherwise + BIND will add the current $ORIGIN to this name, which won't work. + *** + +3) Increment the serial number on both files. diff --git a/contrib/bind/conf/master/named.boot b/contrib/bind/conf/master/named.boot new file mode 100644 index 0000000..7d467f2 --- /dev/null +++ b/contrib/bind/conf/master/named.boot @@ -0,0 +1,18 @@ +; +; @(#)named.boot.slave 1.13 (Berkeley) 87/07/21 +; +; boot file for secondary name server +; Note that there should be one primary entry for each SOA record. +; +; +sortlist 10.0.0.0 + +directory /usr/local/adm/named + +; type domain source host/file backup file + +cache . root.cache +secondary Berkeley.EDU 128.32.137.8 128.32.137.3 ucbhosts.bak +secondary 32.128.IN-ADDR.ARPA 128.32.137.8 128.32.137.3 ucbhosts.rev.bak +primary 0.0.127.IN-ADDR.ARPA localhost.rev + diff --git a/contrib/bind/conf/master/named.boot.master b/contrib/bind/conf/master/named.boot.master new file mode 100644 index 0000000..702ffcf --- /dev/null +++ b/contrib/bind/conf/master/named.boot.master @@ -0,0 +1,16 @@ +; +; boot file for authoritive master name server for Berkeley.EDU +; Note that there should be one primary entry for each SOA record. +; +; +sortlist 10.0.0.0 + +directory /usr/local/adm/named + +; type domain source host/file backup file + +cache . root.cache +primary Berkeley.EDU berkeley.zone +primary 32.128.IN-ADDR.ARPA berkeley.rev +primary 0.0.127.IN-ADDR.ARPA localhost.rev + diff --git a/contrib/bind/conf/master/named.hosts b/contrib/bind/conf/master/named.hosts new file mode 100644 index 0000000..d31b3bd --- /dev/null +++ b/contrib/bind/conf/master/named.hosts @@ -0,0 +1,22 @@ +; Authoritative data for Berkeley.EDU (ORIGIN assumed Berkeley.EDU) +; +@ IN SOA ucbvax.berkeley.edu kjd.ucbvax.berkeley.edu ( + 1986020501 ; Serial + 10800 ; Refresh 3 hours + 3600 ; Retry 1 hour + 3600000 ; Expire 1000 hours + 86400 ) ; Minimum 24 hours + IN MX 10 ucb-vax + IN NS monet +localhost IN A 127.1 +ucb-arpa IN A 10.0.0.78 + IN A 128.32.0.4 + IN HINFO VAX-11/780 UNIX +arpa IN CNAME ucbarpa +ucb-vax 9999 IN A 10.2.0.78 + IN A 128.32.0.10 + IN HINFO VAX-11/750 UNIX +ucbvax IN CNAME ucb-vax +monet IN A 128.32.0.7 + IN HINFO VAX-11/750 UNIX +ucbmonet IN CNAME monet diff --git a/contrib/bind/conf/master/named.local b/contrib/bind/conf/master/named.local new file mode 100644 index 0000000..e0270ea --- /dev/null +++ b/contrib/bind/conf/master/named.local @@ -0,0 +1,13 @@ +; +; @(#)named.local 1.1 (Berkeley) 86/01/21 +; + +@ IN SOA ucbvax.Berkeley.EDU. kjd.ucbvax.Berkeley.EDU. ( + 1986012101 ; Serial + 3600 ; Refresh + 300 ; Retry + 3600000 ; Expire + 14400 ) ; Minimum + IN NS ucbvax.Berkeley.EDU. +0 IN PTR loopback.ucbvax.Berkeley.EDU. +1 IN PTR localhost. diff --git a/contrib/bind/conf/master/named.rev b/contrib/bind/conf/master/named.rev new file mode 100644 index 0000000..6d1fb58 --- /dev/null +++ b/contrib/bind/conf/master/named.rev @@ -0,0 +1,30 @@ +; +; @(#)named.rev 1.1 (Berkeley) 86/02/05 +; + +@ IN SOA ucbvax.berkeley.edu kjd.ucbvax.berkeley.edu ( + 1986020501 ; Serial + 10800 ; Refresh 3 hours + 3600 ; Retry 1 hour + 3600000 ; Expire 1000 hours + 86400 ) ; Minimum 24 hours + IN NS ucbvax.Berkeley.EDU. +; RFC 1101 stuff +0.0 IN PTR Berkeley-net.Berkeley.EDU. + IN A 255.255.255.0 +; real hosts +0.130 IN PTR csdiv-net.Berkeley.EDU. +2.129 IN PTR monet.Berkeley.EDU. +2.140 IN PTR ucbarpa.Berkeley.EDU. +3.132 IN PTR cad.Berkeley.EDU. +4.0 IN PTR ucbarpa.Berkeley.EDU. +5.0 IN PTR cad.Berkeley.EDU. +6.0 IN PTR ernie.Berkeley.EDU. +6.130 IN PTR monet-cs.Berkeley.EDU. +7.0 IN PTR monet.Berkeley.EDU. +7.130 IN PTR kim.Berkeley.EDU. +9.0 IN PTR esvax.Berkeley.EDU. +10.0 IN PTR ucbvax.Berkeley.EDU. +11.0 IN PTR kim.Berkeley.EDU. +11.156 IN PTR esvax-156.Berkeley.EDU. +38.131 IN PTR monet.Berkeley.EDU. diff --git a/contrib/bind/conf/master/root.cache b/contrib/bind/conf/master/root.cache new file mode 100644 index 0000000..48abd78 --- /dev/null +++ b/contrib/bind/conf/master/root.cache @@ -0,0 +1,63 @@ +; This file holds the information on root name servers needed to +; initialize cache of Internet domain name servers +; (e.g. reference this file in the "cache . <file>" +; configuration file of BIND domain name servers). +; +; This file is made available by InterNIC registration services +; under anonymous FTP as +; file /domain/named.root +; on server FTP.RS.INTERNIC.NET +; -OR- under Gopher at RS.INTERNIC.NET +; under menu InterNIC Registration Services (NSI) +; submenu InterNIC Registration Archives +; file named.root +; +; last update: Nov 8, 1995 +; related version of root zone: 1995110800 +; +; +; formerly NS.INTERNIC.NET +; +. 3600000 IN NS A.ROOT-SERVERS.NET. +A.ROOT-SERVERS.NET. 3600000 A 198.41.0.4 +; +; formerly NS1.ISI.EDU +; +. 3600000 NS B.ROOT-SERVERS.NET. +B.ROOT-SERVERS.NET. 3600000 A 128.9.0.107 +; +; formerly C.PSI.NET +; +. 3600000 NS C.ROOT-SERVERS.NET. +C.ROOT-SERVERS.NET. 3600000 A 192.33.4.12 +; +; formerly TERP.UMD.EDU +; +. 3600000 NS D.ROOT-SERVERS.NET. +D.ROOT-SERVERS.NET. 3600000 A 128.8.10.90 +; +; formerly NS.NASA.GOV +; +. 3600000 NS E.ROOT-SERVERS.NET. +E.ROOT-SERVERS.NET. 3600000 A 192.203.230.10 +; +; formerly NS.ISC.ORG +; +. 3600000 NS F.ROOT-SERVERS.NET. +F.ROOT-SERVERS.NET. 3600000 A 192.5.5.241 +; +; formerly NS.NIC.DDN.MIL +; +. 3600000 NS G.ROOT-SERVERS.NET. +G.ROOT-SERVERS.NET. 3600000 A 192.112.36.4 +; +; formerly AOS.ARL.ARMY.MIL +; +. 3600000 NS H.ROOT-SERVERS.NET. +H.ROOT-SERVERS.NET. 3600000 A 128.63.2.53 +; +; formerly NIC.NORDU.NET +; +. 3600000 NS I.ROOT-SERVERS.NET. +I.ROOT-SERVERS.NET. 3600000 A 192.36.148.17 +; End of File diff --git a/contrib/bind/conf/options.h b/contrib/bind/conf/options.h new file mode 100644 index 0000000..b5548af --- /dev/null +++ b/contrib/bind/conf/options.h @@ -0,0 +1,167 @@ +/* options.h - specify the conditionally-compiled features + * vix 28mar92 [moved out of the Makefile because they were getting too big] + * + * $Id: options.h,v 8.9 1996/05/17 09:10:41 vixie Exp $ + */ + +/* + * ++Copyright++ + * - + * Copyright (c) + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * - + * Portions Copyright (c) 1993 by Digital Equipment Corporation. + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies, and that + * the name of Digital Equipment Corporation not be used in advertising or + * publicity pertaining to distribution of the document or software without + * specific, written prior permission. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL + * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT + * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL + * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR + * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS + * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS + * SOFTWARE. + * - + * --Copyright-- + */ + +/* Key: + * ucb = U C Berkeley 4.8.3 release + * vix = Paul Vixie of Digital + * del = Don Lewis of Harris + * mcsun = Piet Beertema of EUNet + * asp = Andrew Partan of UUNet + * pma = Paul Albitz of Hewlett Packard + * bb = Bryan Beecher of UMich + * mpa = Mark Andrews of CSIRO - DMS + * rossc = Ross Cartlidge of The Univeritsy of Sydney + * mtr = Marshall Rose of TPC.INT + * bg = Benoit Grange of INRIA + * ckd = Christopher Davis of Kapor Enterprises + * gns = Greg Shapiro of WPI + */ + +#define DEBUG /* enable -d flag and SIGUSR[12] support (ucb) */ +/*#define ALLOW_T_UNSPEC /* enable the "unspec" RR type for old athena (ucb) */ +/*#define INVQ /* enable inverse queries (nslookup) (ucb/vix) */ +/*#define DSTORAGE /* debug malloc overruns using storage.o (ucb/vix) */ +/*#define DMALLOC /* trace malloc orphans using dmalloc.o (vix) */ +#define XFRNETS /* enable "xfrnets" command in named.boot (vix) */ +#define PID_FIX /* be careful about overwriting named.pid file (del) */ +#define FWD_LOOP /* try to break out of forwarding loops (del) */ +#define NO_GLUE /* don't accept or send out-of-zone glue (del) */ +#define BOGUSNS /* detect bogus nameservers (mcsun) */ +#define QRYLOG /* enable SIGWINCH for query logging (bb) */ +/*#define YPKLUDGE /* deal effectively with broken "ypserv -i" (mcsun) */ +#define TRACEROOT /* trace bogus root servers and ignore them (pma,bb) */ +/*#define LOCALDOM /* permit "domain" directive in named.boot (ucb) */ +#define FORCED_RELOAD /* refresh secondary zones on SIGHUP (pma) */ +#define SLAVE_FORWARD /* use sensible timeouts on slave forwarders (pma) */ +#define WANT_PIDFILE /* if you want the named.pid file (ucb/arc) */ +#define DOTTED_SERIAL /* if you want to be able to specify dotted serial#s */ +/*#define SENSIBLE_DOTS /* if you want dotted serial#s to make numeric sense */ +#define NCACHE /* negative caching (anant@isi.edu) */ +/*#define VALIDATE /* validation procedure (anant@isi.edu) (BUGGY!) */ +/*#define SHORT_FNAMES /* file names used in named-xfer need to be short */ +#define RESOLVSORT /* allow sorting of addresses in gethostbyname (mpa) */ +#define STUBS /* allow transfers of NS only for a zone (mpa) */ +#ifndef LOGFAC +#define LOGFAC LOG_DAEMON /* what syslog facility should named use? */ +#endif +#define SECURE_ZONES /* if you want to inhibit world access to zones (gns)*/ +#define ROUND_ROBIN /* rotate databuf list after each access (mtr) */ +#define ADDAUTH /* return NS and glue w/ authorative answers (mpa) */ +#define RFC1535 /* use RFC 1535 default for "search" list (vix) */ +#define GEN_AXFR /* distinct zones within each class */ +#define DATUMREFCNT /* use reference counts on datums (mpa) */ +#define LAME_DELEGATION /* lame delegations (original-del,reworked-bb&del)*/ +#define LAME_LOGGING LOG_DEBUG /* log lame delegations, set log level */ +#define GETSER_LOGGING LOG_INFO /* log errors/timeouts getting serial number */ +/*#define RETURNSOA /* good code that the world isn't ready for yet */ +#define CLEANCACHE /* useful and necessary in the face of NCACHE */ +#define PURGE_ZONE /* remove all traces of a zone when reloading (mpa) */ +#define STATS /* keep nameserver statistics; uses more memory */ +#define RENICE /* named-xfer should run at normal priority */ +/*#define XSTATS /* extended statistics, syslogged periodically (bg) */ +/*#define BIND_NOTIFY /* experimental - do not enable in customer products */ +#define LOC_RR /* support for LOC record parsing (ckd/vix) */ +#define SORT_RESPONSE /* should we try to sort responses optimally? (vix) */ + +/*--------------------------------------------* + * no user-servicable parts beyond this point * + *--------------------------------------------*/ + +/* if DSTORAGE is defined, we need to disable DMALLOC and remap + * malloc and free to storage.o's exported names. storage.o also + * includes a calloc and a realloc, but once we drag in its malloc + * and free we'll get the others automatically and so will never + * pull in those routines from libc.a. + */ +#ifdef DSTORAGE +# ifdef DMALLOC +# undef DMALLOC +# endif /*DMALLOC*/ +# define malloc rt_malloc +# define free rt_free +#endif /*DSTORAGE*/ + +/* if DMALLOC is defined, grab the header file which will remap + * all the malloc-style names to those exported by dmalloc.o. note + * that DMALLOC also changes the function signatures of several + * functions in private named source modules, and that this file + * (options.h) must be included before any other private *.h files + * since those *.h files have some conditional remapping to do. + */ +#ifdef DMALLOC +# include "dmalloc.h" +#endif + +/* systems with killall(1M) don't need this + */ +#ifdef __sgi +# ifdef WANT_PIDFILE +# undef WANT_PIDFILE +# endif +#endif + +#ifdef LAME_LOGGING +# define LAME_DELEGATION +#endif + +#if defined(XSTATS) && !defined(STATS) +# define STATS +#endif diff --git a/contrib/bind/conf/portability.h b/contrib/bind/conf/portability.h new file mode 100644 index 0000000..388b5ff --- /dev/null +++ b/contrib/bind/conf/portability.h @@ -0,0 +1,595 @@ +/* portability.h - include or define things that aren't present on all systems + * vixie@decwrl 26dec92 [new] + * + * $Id: portability.h,v 8.14 1996/06/06 20:19:09 vixie Exp $ + */ + +/* + * ++Copyright++ + * - + * Copyright (c) + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * - + * Portions Copyright (c) 1993 by Digital Equipment Corporation. + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies, and that + * the name of Digital Equipment Corporation not be used in advertising or + * publicity pertaining to distribution of the document or software without + * specific, written prior permission. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL + * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT + * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL + * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR + * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS + * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS + * SOFTWARE. + * - + * --Copyright-- + */ + +/* XXX: this file has become a hopeless morass, and will be redone someday. */ + +#include <string.h> +#include <signal.h> +#include <sys/types.h> +#include <sys/param.h> +#ifndef TIME_H_INCLUDED +# include <sys/time.h> +# define TIME_H_INCLUDED +#endif + +#ifdef ISC +# ifndef _POSIX_SOURCE +# define _POSIX_SOURCE +# endif +# define SYSV +# define SVR3 +# define _SYSV3 +# define NEED_STRTOUL +# define NEED_FTRUNCATE +# define USE_POSIX +# include <sys/bsdtypes.h> +# include <sys/sioctl.h> +# include <sys/stream.h> +# include <net/errno.h> +#endif + +#if defined(__convex__) +# if !defined(_POSIX_SOURCE) +# define _POSIX_SOURCE +# endif +# define USE_UTIME +# define NEED_PUTENV +#endif + +#if defined(_CRAY) +# if !defined(_POSIX_SOURCE) +# define _POSIX_SOURCE +# endif +# define writev(a,b,c) __writev(a,b,c) +# define setitimer(a,b,c) __setitimer(a,b,c) +#endif + +/* This is defined in the Makefile for ISC compiles. */ +#if defined(ISC) +# define ftruncate(a,b) __ftruncate(a,b) +# define USE_MEMCPY +# define USE_UTIME +# define HAVE_FCHMOD 0 +#endif + +/* SCO UNIX defines only this unique symbol, apparently. */ +#if defined(M_UNIX) +/* XXX - why is this POSIX_SOURCE instead of _POSIX_SOURCE? */ +# undef POSIX_SOURCE +# define POSIX_SIGNALS +# define HAVE_FCHMOD 0 +# define writev(a,b,c) __writev(a,b,c) +# define ftruncate(a,b) __ftruncate(a,b) +#endif + +#ifdef NeXT +# define NEED_PUTENV +# define NEED_SETENV +# define inet_addr(a) __inet_addr(a) +#endif + +#if defined(__sgi) +# define BSD 43 +# define vfork fork +#endif + +#if defined(SUNOS4) +# define BSD 43 +#endif + +#if defined(__osf__) && defined(__alpha) +# undef BSD +# define BSD 199103 +#endif + +#if defined(_AUX_SOURCE) +# define vfork fork +# define NEED_STRERROR +# define NEED_STRTOUL +# define SIG_FN void +# define USE_MEMCPY +#endif + + +#if defined(SVR4) && !defined(SYSV) +# define SYSV +#endif + +#if defined(_POSIX_SOURCE) || defined(__sgi) || defined(__ultrix) || \ + defined(__hpux) || (defined(BSD) && (BSD >= 199103)) || \ + (defined(sun) && defined(SYSV)) +# define USE_POSIX +#endif + +#if defined(__ultrix) && !defined(BSD) +# define BSD 42 +#endif + +#if defined(host_mips) && defined(SYSTYPE_BSD43) +# define RISCOS_BSD +#endif + +#if defined(SYSV) || defined(__ultrix) || defined(__osf__) \ + || (defined(BSD) && BSD >= 199306) || defined(linux) +# define USE_UTIME +# define HAVE_SETVBUF +#endif + +#if defined(SYSV) && !defined(SVR4) +# define vfork fork +#endif + +#if defined(sun) || defined(SVR4) +# define NETREAD_BROKEN +#endif + +#if defined(BSD) && BSD >= 199006 && !defined(i386) && !defined(RISCOS_BSD) +# define HAVE_DAEMON +#endif + +#if !defined(BSD) || (BSD <= 199006) +# if !defined(NeXT) +# define NEED_INETADDR +# endif +# define NEED_INETATON +#endif + +#if defined(__hpux) +# if defined(__STDC__) +# define select(a,b,c,d,e) select(a, (int *)b, (int *)c, (int *)d, e) +# define ctime(x) ctime((const time_t *)x) +# endif /*__STDC__*/ +# if !defined(SYSV) +# define USE_UTIME +# define setlinebuf(x) setvbuf(x, NULL, _IOLBF, BUFSIZ) +# if !defined(SIGWINCH) /*pre 9.0*/ +# define SIGWINCH SIGWINDOW +# endif +# endif /*SYSV*/ +/* XXX: better autodetection of the need for "struct linger" would be nice */ +# if 0 +struct linger { + int l_onoff; /* option on/off */ + int l_linger; /* linger time */ +}; +# endif +#endif /*__hpux*/ + +#if defined(_SEQUENT_) +# include <netinet/in_systm.h> +# define USE_UTIME +# define USE_POSIX +# define NEED_GETTIMEOFDAY +# define _TIMEZONE timezoneBSD +struct timezoneBSD { + int tz_minuteswest; + int tz_dsttime; +}; +#endif + +#ifndef __P +# if defined(__STDC__) || defined(__GNUC__) +# define __P(x) x +# else +# define __P(x) () +# endif +#endif + +#ifndef _TIMEZONE +# define _TIMEZONE timezone +#endif + +#if defined(USE_POSIX) +# include <stdlib.h> +# include <unistd.h> +# include <limits.h> +# if defined(__ultrix) +# define NEED_STRDUP +# endif + +#else + +# define NEED_STRTOUL +# define NEED_STRDUP + +# define STDIN_FILENO 0 +# define STDOUT_FILENO 1 +# define STDERR_FILENO 2 +# ifndef NeXT +extern char *getenv __P((char *)); +# else +extern char *getenv __P((const char *)); +# endif +extern int errno; + +# if !defined(DMALLOC) && !defined(NeXT) +extern char *malloc(), *realloc(), *calloc(); +# if defined(sun) +extern int free(); +# else +extern void free(); +# endif +# endif + +extern int getdtablesize __P((void)); +# ifdef SHORT_FNAMES +extern long pathconf __P((const char *path, int name)); +# endif + +#endif /*USE_POSIX*/ + +#ifndef UINT_MAX +# ifdef __STDC__ +# define UINT_MAX 4294967295u /* max value of an "u_int" */ +# else +# define UINT_MAX ((unsigned)4294967295) /* max value of an "u_int" */ +# endif +# define ULONG_MAX UINT_MAX /* max decimal value of a "u_long" */ +#endif + +#ifndef INT_MAX +# define INT_MAX 2147483647 /* max decimal value of an "int" */ +#endif + +#ifndef RAND_MAX +# define RAND_MAX 0x7fffffff +#endif + +#ifndef IN_LOOPBACKNET +# define IN_LOOPBACKNET 127 +#endif + +#ifndef INADDR_NONE +# define INADDR_NONE 0xffffffff +#endif + +#if defined(apollo) + /* Defined in /usr/include/netinet/in.h but doesn't work */ +#undef IP_OPTIONS +#endif + +#if !defined(__STDC__) && !defined(const) +# define const /*constant*/ +#endif + +#if !defined(__convex__) && (!defined(BSD) || (BSD < 199103)) +int strcasecmp __P((const char *, const char *)); +#endif + +/* is USE_POSIX the right thing to use here? */ +#if (!defined(BSD) || (BSD <= 43)) && \ + !defined(NeXT) && \ + !defined(__convex__) && \ + !defined(USE_POSIX) +# if !defined(NCR) +extern void syslog(); +# endif +extern char *ctime __P((const time_t *clock)); +extern int close(), setitimer(), recv(), sendto(), sigsetmask(), + atoi(), getpid(), fork(), read(), ioctl(), + setsockopt(), socket(), bind(); +#endif + +#if !defined(bcopy) /* some machines have their own macros for this */ +# if defined(USE_POSIX) || \ + (defined(__STDC__) && !defined(sun) && !defined(sequent) \ + && !defined(M_UNIX)) +/* use ANSI C3.159-1989 (``ANSI C'') functions if possible; + * ideally we would change the code to use them and then + * define them in terms of bcopy et al if !defined(__STDC__) + * but that's more work. + */ +#if defined(USE_MEMCPY) +# define bcopy(a,b,c) memcpy(b,a,c) +#else +# define bcopy(a,b,c) memmove(b,a,c) +#endif +# define bzero(a,b) memset(a,0,b) +# define bcmp(a,b,c) memcmp(a,b,c) +# else +extern void bcopy(); +extern void bzero(); +extern int bcmp(); +# endif /* BSD */ +#endif /* bcopy */ + +#if (!defined(BSD) || (BSD < 43) || defined(RISCOS_BSD)) \ + && !defined(USE_POSIX) && !defined(apollo) && !defined(sequent) \ + && !defined(M_UNIX) +# define NEED_STRERROR +#if !defined(ultrix) && !defined(NCR) +# define NEED_PUTENV +#endif +#endif + +#if defined(SUNOS4) +# define NEED_STRERROR +# if defined(sun386) +# define pid_t int +# define NEED_STRCASECMP +# endif +#endif + +#if (!defined(BSD) || (BSD < 43)) +# define NEED_MKSTEMP +# if !defined(__ultrix) && !defined(apollo) +# define NEED_STRCASECMP +# define NEED_MKTEMP +# if !defined(SVR4) +# define NEED_STRPBRK +# endif +# endif +#endif + +#if defined(USE_POSIX) +# define POSIX_SIGNALS +#endif + +/* + * Attempt to configure for type of function returned by signal-catching + * functions (which signal and sigvec.sv_handler take a pointer to). + * This can guess for BSD; otherwise, define SIG_FN externally. + */ +#ifndef SIG_FN +# ifdef BSD +# if (BSD >= 199006) || defined(NeXT) || defined(__osf__) || defined(sun) \ + || defined(__ultrix) || defined(apollo) || defined(POSIX_SIGNALS) +# define SIG_FN void /* signal-catching functions return void */ +# else +# define SIG_FN int /* signal-catching functions return int */ +# endif +# else /*BSD*/ +# define SIG_FN void /* signal-catching functions return void */ +# endif /*BSD*/ +#endif + +#if !defined(SIGUSR1) && !defined(SIGUSR2) +# define SIGUSR1 SIGEMT +# define SIGUSR2 SIGFPE +#endif +#if !defined(SIGCHLD) +# define SIGCHLD SIGCLD +#endif + +#if !defined(ntohl) && !defined(htonl) && defined(BSD) && (BSD <= 43) +/* if these aren't null macros in netinet/in.h, extern them here. */ +extern u_short htons(), ntohs(); +extern u_long htonl(), ntohl(); +#endif + +#if defined(USE_POSIX) && !defined(sun) && !defined(__sgi) \ + && !defined(__convex__) && !defined(__ultrix) && !defined(_AUX_SOURCE) +# define PORT_NONBLOCK O_NONBLOCK +# define PORT_WOULDBLK EAGAIN +#else +# define PORT_NONBLOCK O_NDELAY +# define PORT_WOULDBLK EWOULDBLOCK +#endif + +#if defined(USE_POSIX) +# define USE_SETSID +#endif + +#if defined(USE_POSIX) || !defined(SYSV) +#define USE_WAITPID +#endif + +#if !defined(USE_POSIX) +#define waitpid(x,y,z) (wait3(y,z,(struct rusage *)NULL)) +#endif + +#if defined(NeXT) || defined(_AIX) || defined(sun386) +# undef WIFEXITED +# undef WEXITSTATUS +# undef WIFSIGNALED +# undef WTERMSIG +#endif /* NeXT */ + +#if defined(sequent) +#define WEXITSTATUS(x) ((x).w_retcode) +#define WTERMSIG(x) ((x).w_termsig) +#endif /* sequent */ + +#if !defined(WIFEXITED) +# define WIFEXITED(x) (!(x & 0177)) +#endif +#if !defined(WEXITSTATUS) +# define WEXITSTATUS(x) (x >> 8) +#endif +#if !defined(WIFSIGNALED) +# define WIFSIGNALED(x) ((x & 0177) && ((x & 0377) != 0177)) +#endif +#if !defined(WTERMSIG) +# define WTERMSIG(x) (x & 0177) +#endif + +#ifndef S_ISDIR +# ifndef S_IFMT +# define S_IFMT 0170000 +# endif +# ifndef S_IFDIR +# define S_IFDIR 0040000 +# endif +# define S_ISDIR(m) ((m & S_IFMT) == S_IFDIR) +#endif + +#ifndef S_ISREG +# ifndef S_IFMT +# define S_IFMT 0170000 +# endif +# ifndef S_IFREG +# define S_IFREG 0100000 +# endif +# define S_ISREG(m) ((m & S_IFMT) == S_IFREG) +#endif + +#ifndef S_ISFIFO +# ifndef S_IFMT +# define S_IFMT 0170000 +# endif +# ifndef S_IFIFO +# define S_IFIFO 0010000 +# endif +# define S_ISFIFO(m) ((m & S_IFMT) == S_IFIFO) +#endif + +#if defined(NEED_STRTOUL) && \ + (defined(__ultrix) || defined(__osf__) || defined(NeXT)) +# undef NEED_STRTOUL +#endif + +#if defined(__ultrix) || defined(__osf__) +# define MAYBE_HESIOD +#endif + +#ifndef FD_SET +#define NFDBITS 32 +#define FD_SETSIZE 32 +#define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS))) +#define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS))) +#define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS))) +#define FD_ZERO(p) bzero((char *)(p), sizeof(*(p))) +#endif + +#ifndef MIN +# define MIN(x, y) ((x > y) ?y :x) +#endif +#ifndef MAX +# define MAX(x, y) ((x > y) ?x :y) +#endif + +#if !defined(PATH_MAX) +# if defined(_POSIX_PATH_MAX) +# define PATH_MAX _POSIX_PATH_MAX +# else +# if defined(MAXPATHLEN) +# define PATH_MAX MAXPATHLEN +# endif +# endif +#endif + +#if defined(BSD) || defined(__osf__) || defined(__convex__) +# define HAVE_GETRUSAGE +#endif + +/* May be set in the Makefile. */ +#if defined(HAVE_GETRUSAGE) +# include <sys/resource.h> +#endif + +/* + * Because Convex has true library function feof() which is + * patently wrong (it test bit _IOREAD) we need feof() as + * a macro. + */ +#if defined(__convex__) && !defined(feof) +# define feof(p) ((p)->_flag&_IOEOF) +#endif + +#if defined(M_UNIX) || defined(linux) +# define SPURIOUS_ECONNREFUSED +#endif + +/* + * Assume that a system has fchmod() unless something above says otherwise. + */ +#if !defined(HAVE_FCHMOD) +# define HAVE_FCHMOD 1 +#endif + + +/* + * Types needed for POSIX but missing on some systems. + */ +#if defined(SUNOS4) +typedef int ssize_t; +#endif + +/* + * We need to know the IPv6 address family number even on IPv4-only systems. + * Note that this is NOT a protocol constant, and that if the system has its + * own AF_INET6, different from ours below, all of BIND's libraries and + * executables will need to be recompiled after the system <sys/socket.h> + * has had this type added. The type number below is correct on most BSD- + * derived systems for which AF_INET6 is defined. + */ +#ifndef AF_INET6 +#define AF_INET6 24 +#endif + +/* + * Prototype the functions we'll be supplying. + */ +#ifdef NEED_PUTENV +extern int putenv __P((char *)); +#endif + +#ifdef NEED_GETTIMEOFDAY +extern int gettimeofday __P((struct timeval *, struct _TIMEZONE *)); +#endif + +#if defined(SVR4) && defined(sun) +extern int gethostname __P((char *, size_t)); +#endif + +#ifdef NEED_STRDUP +extern char *strdup __P((const char *)); +#endif |