summaryrefslogtreecommitdiffstats
path: root/usr.sbin/named
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/named')
-rw-r--r--usr.sbin/named/Makefile80
-rw-r--r--usr.sbin/named/db_defs.h10
-rw-r--r--usr.sbin/named/db_dump.c39
-rw-r--r--usr.sbin/named/db_func.h4
-rw-r--r--usr.sbin/named/db_glob.h10
-rw-r--r--usr.sbin/named/db_glue.c20
-rw-r--r--usr.sbin/named/db_load.c43
-rw-r--r--usr.sbin/named/db_lookup.c14
-rw-r--r--usr.sbin/named/db_reload.c10
-rw-r--r--usr.sbin/named/db_save.c12
-rw-r--r--usr.sbin/named/db_secure.c14
-rw-r--r--usr.sbin/named/db_update.c24
-rw-r--r--usr.sbin/named/dmalloc.c12
-rw-r--r--usr.sbin/named/dmalloc.h12
-rw-r--r--usr.sbin/named/named.824
-rw-r--r--usr.sbin/named/named.h6
-rw-r--r--usr.sbin/named/ns_defs.h18
-rw-r--r--usr.sbin/named/ns_forw.c12
-rw-r--r--usr.sbin/named/ns_glob.h12
-rw-r--r--usr.sbin/named/ns_init.c28
-rw-r--r--usr.sbin/named/ns_main.c26
-rw-r--r--usr.sbin/named/ns_maint.c30
-rw-r--r--usr.sbin/named/ns_ncache.c2
-rw-r--r--usr.sbin/named/ns_req.c47
-rw-r--r--usr.sbin/named/ns_resp.c46
-rw-r--r--usr.sbin/named/ns_sort.c10
-rw-r--r--usr.sbin/named/ns_stats.c14
-rw-r--r--usr.sbin/named/ns_validate.c80
-rw-r--r--usr.sbin/named/options.h58
-rw-r--r--usr.sbin/named/pathnames.h10
-rw-r--r--usr.sbin/named/portability.h147
-rw-r--r--usr.sbin/named/storage.c20
-rw-r--r--usr.sbin/named/tools/Makefile5
-rw-r--r--usr.sbin/named/tools/named.reload/Makefile22
-rw-r--r--usr.sbin/named/tools/named.reload/named.reload.88
-rw-r--r--usr.sbin/named/tools/named.reload/named.reload.sh2
-rw-r--r--usr.sbin/named/tools/named.restart/Makefile23
-rw-r--r--usr.sbin/named/tools/named.restart/named.restart.811
-rw-r--r--usr.sbin/named/tools/named.restart/named.restart.sh2
-rw-r--r--usr.sbin/named/tools/ndc/Makefile25
-rw-r--r--usr.sbin/named/tools/nsquery/Makefile7
-rw-r--r--usr.sbin/named/tools/nsquery/nsquery.c12
-rw-r--r--usr.sbin/named/tools/nstest/Makefile7
-rw-r--r--usr.sbin/named/tools/nstest/nstest.c11
-rw-r--r--usr.sbin/named/tree.c2
-rw-r--r--usr.sbin/named/tree.h2
-rw-r--r--usr.sbin/named/xfer/Makefile23
-rw-r--r--usr.sbin/named/xfer/named-xfer.812
-rw-r--r--usr.sbin/named/xfer/named-xfer.c38
49 files changed, 705 insertions, 401 deletions
diff --git a/usr.sbin/named/Makefile b/usr.sbin/named/Makefile
new file mode 100644
index 0000000..d569375
--- /dev/null
+++ b/usr.sbin/named/Makefile
@@ -0,0 +1,80 @@
+#
+# @(#)Makefile 5.8 (Berkeley) 7/28/90
+#
+
+## ++Copyright++ 1985, 1989
+## -
+## Copyright (c) 1985, 1989
+## 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--
+
+PROG= named
+MAN8= named.8
+LDADD= -lutil
+SRCS= db_dump.c db_load.c db_lookup.c db_reload.c db_save.c db_update.c \
+ db_secure.c db_glue.c \
+ ns_forw.c ns_init.c ns_main.c ns_maint.c ns_req.c ns_resp.c \
+ ns_sort.c ns_stats.c ns_validate.c ns_ncache.c \
+ storage.c dmalloc.c tree.c
+OBJS+= version.o
+CLEANFILES+=version.c version.o
+SUBDIR= tools xfer
+
+VER = LOCAL-`date +%y%m%d.%H%M%S`
+
+version.c: ${.CURDIR}/Version.c ${.CURDIR}/Makefile ${SRCS}
+ (u=$${USER-root} d=`pwd |sed -e 's|/obj/|/src/|'` \
+ h=`hostname` t=`date`; \
+ sed -e "s|%WHEN%|$${t}|" -e "s|%VERSION%|"${VER}"|" \
+ -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
+ < ${.CURDIR}/Version.c > version.c)
+
+.include <bsd.prog.mk>
+
diff --git a/usr.sbin/named/db_defs.h b/usr.sbin/named/db_defs.h
index c4c48ed..115615f 100644
--- a/usr.sbin/named/db_defs.h
+++ b/usr.sbin/named/db_defs.h
@@ -1,6 +1,6 @@
/*
* from db.h 4.16 (Berkeley) 6/1/90
- * $Id: db_defs.h,v 8.3 1995/06/19 20:55:40 vixie Exp $
+ * $Id: db_defs.h,v 1.2 1995/05/30 03:48:34 rgrimes Exp $
*/
/*
@@ -8,7 +8,7 @@
* -
* Copyright (c) 1985, 1990
* 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:
@@ -24,7 +24,7 @@
* 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
@@ -38,14 +38,14 @@
* 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
diff --git a/usr.sbin/named/db_dump.c b/usr.sbin/named/db_dump.c
index 99b3b80..d1256ff 100644
--- a/usr.sbin/named/db_dump.c
+++ b/usr.sbin/named/db_dump.c
@@ -1,6 +1,6 @@
#if !defined(lint) && !defined(SABER)
static char sccsid[] = "@(#)db_dump.c 4.33 (Berkeley) 3/3/91";
-static char rcsid[] = "$Id: db_dump.c,v 8.7 1995/06/29 09:26:17 vixie Exp $";
+static char rcsid[] = "$Id: db_dump.c,v 1.3 1995/05/30 03:48:35 rgrimes Exp $";
#endif /* not lint */
/*
@@ -8,7 +8,7 @@ static char rcsid[] = "$Id: db_dump.c,v 8.7 1995/06/29 09:26:17 vixie Exp $";
* -
* Copyright (c) 1986, 1988, 1990
* 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:
@@ -24,7 +24,7 @@ static char rcsid[] = "$Id: db_dump.c,v 8.7 1995/06/29 09:26:17 vixie Exp $";
* 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
@@ -38,14 +38,14 @@ static char rcsid[] = "$Id: db_dump.c,v 8.7 1995/06/29 09:26:17 vixie Exp $";
* 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
@@ -61,6 +61,7 @@ static char rcsid[] = "$Id: db_dump.c,v 8.7 1995/06/29 09:26:17 vixie Exp $";
#include <sys/param.h>
#include <sys/stat.h>
#include <netinet/in.h>
+#include <netiso/iso.h>
#include <arpa/nameser.h>
#include <arpa/inet.h>
#include <netdb.h>
@@ -259,7 +260,7 @@ doadump()
}
#ifdef ALLOW_UPDATES
-/* Create a disk database to back up zones
+/* Create a disk database to back up zones
*/
void
zonedump(zp)
@@ -353,6 +354,7 @@ db_dump(htp, fp, zone, origin)
u_int32_t n;
u_int32_t addr;
int j, i;
+ struct iso_addr isoa;
register u_char *cp;
u_char *end;
char *proto, *sep;
@@ -549,9 +551,12 @@ db_dump(htp, fp, zone, origin)
break;
case T_NSAP:
- (void) fputs(inet_nsap_ntoa(dp->d_size,
- dp->d_data, NULL),
- fp);
+ isoa.isoa_len = dp->d_size;
+ if (isoa.isoa_len > sizeof(isoa.isoa_genaddr))
+ isoa.isoa_len = sizeof(isoa.isoa_genaddr);
+ bcopy(dp->d_data, isoa.isoa_genaddr,
+ isoa.isoa_len);
+ (void) fputs(iso_ntoa(&isoa), fp);
break;
#ifdef LOC_RR
case T_LOC:
@@ -573,11 +578,11 @@ db_dump(htp, fp, zone, origin)
break;
case T_WKS:
- GETLONG(addr, cp);
- addr = htonl(addr);
+ GETLONG(addr, cp);
+ addr = htonl(addr);
fputs(inet_ntoa(*(struct in_addr *)&addr), fp);
proto = protocolname(*cp);
- cp += sizeof(char);
+ cp += sizeof(char);
fprintf(fp, "%s ", proto);
i = 0;
while(cp < (u_char *)dp->d_data + dp->d_size) {
@@ -588,7 +593,7 @@ db_dump(htp, fp, zone, origin)
servicename(i, proto));
j <<= 1;
} while (++i & 07);
- }
+ }
break;
case T_MINFO:
@@ -707,8 +712,8 @@ static int32_t Ceor, Csum, Crot, word, bcount;
#define AddToBuf(bufp, c) **bufp = c; (*bufp)++;
#define times85(x) ((((((x<<2)+x)<<2)+x)<<2)+x)
-/* Decode ASCII-encoded byte c into binary representation and
- * place into *bufp, advancing bufp
+/* Decode ASCII-encoded byte c into binary representation and
+ * place into *bufp, advancing bufp
*/
static int
byte_atob(c, bufp)
@@ -836,8 +841,8 @@ byte_btoa(c, bufp)
} else {
register int tmp = 0;
register int32_t tmpword = word;
-
- if (tmpword < 0) {
+
+ if (tmpword < 0) {
/* Because some don't support unsigned long */
tmp = 32;
tmpword -= (int32_t)(85 * 85 * 85 * 85 * 32);
diff --git a/usr.sbin/named/db_func.h b/usr.sbin/named/db_func.h
index 8db6c2f..57a69fe 100644
--- a/usr.sbin/named/db_func.h
+++ b/usr.sbin/named/db_func.h
@@ -1,6 +1,6 @@
/* db_proc.h - prototypes for functions in db_*.c
*
- * $Id: db_func.h,v 8.5 1995/06/19 08:34:49 vixie Exp $
+ * $Id: db_func.h,v 1.2 1995/05/30 03:48:36 rgrimes Exp $
*/
/* ++from db_update.c++ */
@@ -86,7 +86,7 @@ extern int getdtablesize __P((void));
extern struct databuf *rm_datum __P((struct databuf *,
struct namebuf *,
struct databuf *));
-extern struct namebuf *rm_name __P((struct namebuf *,
+extern struct namebuf *rm_name __P((struct namebuf *,
struct namebuf **,
struct namebuf *));
#ifdef INVQ
diff --git a/usr.sbin/named/db_glob.h b/usr.sbin/named/db_glob.h
index 630b824..157e513 100644
--- a/usr.sbin/named/db_glob.h
+++ b/usr.sbin/named/db_glob.h
@@ -1,6 +1,6 @@
/*
* from db.h 4.16 (Berkeley) 6/1/90
- * $Id: db_glob.h,v 8.2 1995/06/20 23:58:50 vixie Exp $
+ * $Id: db_glob.h,v 1.1.1.1 1994/09/22 19:46:14 pst Exp $
*/
/*
@@ -8,7 +8,7 @@
* -
* Copyright (c) 1985, 1990
* 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:
@@ -24,7 +24,7 @@
* 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
@@ -38,14 +38,14 @@
* 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
diff --git a/usr.sbin/named/db_glue.c b/usr.sbin/named/db_glue.c
index 310c495..17d6085 100644
--- a/usr.sbin/named/db_glue.c
+++ b/usr.sbin/named/db_glue.c
@@ -1,6 +1,6 @@
#if !defined(lint) && !defined(SABER)
static char sccsid[] = "@(#)db_glue.c 4.4 (Berkeley) 6/1/90";
-static char rcsid[] = "$Id: db_glue.c,v 8.7 1995/06/29 09:26:17 vixie Exp $";
+static char rcsid[] = "$Id: db_glue.c,v 1.2 1995/05/30 03:48:39 rgrimes Exp $";
#endif /* not lint */
/*
@@ -8,7 +8,7 @@ static char rcsid[] = "$Id: db_glue.c,v 8.7 1995/06/29 09:26:17 vixie Exp $";
* -
* Copyright (c) 1986, 1988
* 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:
@@ -24,7 +24,7 @@ static char rcsid[] = "$Id: db_glue.c,v 8.7 1995/06/29 09:26:17 vixie Exp $";
* 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
@@ -38,14 +38,14 @@ static char rcsid[] = "$Id: db_glue.c,v 8.7 1995/06/29 09:26:17 vixie Exp $";
* 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
@@ -347,7 +347,7 @@ getdtablesize()
{
#if defined(USE_POSIX)
int j = (int) sysconf(_SC_OPEN_MAX);
-
+
if (j >= 0)
return (j);
#endif /* POSIX */
@@ -986,7 +986,7 @@ loc_aton(ascii, binary)
altsign = -1;
cp++;
}
-
+
if (*cp == '+')
cp++;
@@ -1015,7 +1015,7 @@ loc_aton(ascii, binary)
goto defaults;
siz = precsize_aton(&cp);
-
+
while (!isspace(*cp) && (cp < maxcp)) /* if trailing garbage or m */
cp++;
@@ -1048,7 +1048,7 @@ loc_aton(ascii, binary)
PUTLONG(latit,bcp);
PUTLONG(longit,bcp);
PUTLONG(alt,bcp);
-
+
return (16); /* size of RR in octets */
}
@@ -1074,7 +1074,7 @@ loc_ntoa(binary,ascii)
int32_t latval, longval, altval;
u_int32_t templ;
u_int8_t sizeval, hpval, vpval, versionval;
-
+
char *sizestr, *hpstr, *vpstr;
rcp = binary;
diff --git a/usr.sbin/named/db_load.c b/usr.sbin/named/db_load.c
index 5c36196..cbb6ad2 100644
--- a/usr.sbin/named/db_load.c
+++ b/usr.sbin/named/db_load.c
@@ -1,6 +1,6 @@
#if !defined(lint) && !defined(SABER)
static char sccsid[] = "@(#)db_load.c 4.38 (Berkeley) 3/2/91";
-static char rcsid[] = "$Id: db_load.c,v 8.10 1995/07/04 06:35:12 vixie Exp $";
+static char rcsid[] = "$Id: db_load.c,v 1.3 1995/05/30 03:48:39 rgrimes Exp $";
#endif /* not lint */
/*
@@ -8,7 +8,7 @@ static char rcsid[] = "$Id: db_load.c,v 8.10 1995/07/04 06:35:12 vixie Exp $";
* -
* Copyright (c) 1986, 1988, 1990
* 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:
@@ -24,7 +24,7 @@ static char rcsid[] = "$Id: db_load.c,v 8.10 1995/07/04 06:35:12 vixie Exp $";
* 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
@@ -38,14 +38,14 @@ static char rcsid[] = "$Id: db_load.c,v 8.10 1995/07/04 06:35:12 vixie Exp $";
* 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
@@ -65,6 +65,7 @@ static char rcsid[] = "$Id: db_load.c,v 8.10 1995/07/04 06:35:12 vixie Exp $";
#include <sys/param.h>
#include <sys/stat.h>
#include <netinet/in.h>
+#include <netiso/iso.h>
#include <arpa/nameser.h>
#include <arpa/inet.h>
#include <stdio.h>
@@ -179,6 +180,7 @@ db_load(filename, in_origin, zp, def_domain)
const char *cp1, *op;
int c, class, type, ttl, dbflags, dataflags, multiline;
struct databuf *dp;
+ struct iso_addr *isoa;
FILE *fp;
int slineno, i, errs, didinclude, rrcount;
register u_int32_t n;
@@ -292,7 +294,7 @@ db_load(filename, in_origin, zp, def_domain)
n = 0;
do {
if (n > (INT_MAX - (*cp - '0')) / 10) {
- syslog(LOG_INFO,
+ syslog(LOG_INFO,
"%s: line %d: number > %lu\n",
filename, lineno, (u_long)INT_MAX);
n = INT_MAX;
@@ -471,7 +473,7 @@ db_load(filename, in_origin, zp, def_domain)
n = (u_int32_t) zp->z_refresh;
PUTLONG(n, cp);
if (zp->z_type == Z_SECONDARY
-#if defined(STUBS)
+#if defined(STUBS)
|| zp->z_type == Z_STUB
#endif
) {
@@ -661,12 +663,13 @@ db_load(filename, in_origin, zp, def_domain)
break;
case T_NSAP:
- n = inet_nsap_addr(buf, (u_char *)data,
- sizeof data);
- if (n == 0)
- goto err;
- endline(fp);
- break;
+ isoa = iso_addr(buf);
+ if (!isoa)
+ goto err;
+ n = isoa->isoa_len;
+ bcopy(isoa->isoa_genaddr, data, n);
+ endline(fp);
+ break;
#ifdef LOC_RR
case T_LOC:
cp = buf + (n = strlen(buf));
@@ -746,7 +749,7 @@ db_load(filename, in_origin, zp, def_domain)
!= OK) {
#ifdef DEBUG
if (debug && (c != DATAEXISTS))
- fprintf(ddt, "update failed %s %d\n",
+ fprintf(ddt, "update failed %s %d\n",
domain, type);
#endif
free((char*) dp);
@@ -838,7 +841,7 @@ gettoken(fp, src)
return (ORIGIN);
}
syslog(LOG_NOTICE,
- "%s: line %d: Unknown $ option: $%s\n",
+ "%s: line %d: Unknown $ option: $%s\n",
src, lineno, op);
return (ERROR);
@@ -1059,8 +1062,8 @@ getnum(fp, src, opt)
if (getnum_error)
return (0);
if (m > 9999) {
- syslog(LOG_INFO,
- "%s:%d: number after the decimal point exceeds 9999",
+ syslog(LOG_INFO,
+ "%s:%d: number after the decimal point exceeds 9999",
src, lineno);
getnum_error = 1;
return (0);
@@ -1164,7 +1167,7 @@ getprotocol(fp, src)
char b[MAXLEN];
(void) getword(b, sizeof(b), fp);
-
+
k = protocolnumber(b);
if (k == -1)
syslog(LOG_INFO, "%s: line %d: unknown protocol: %s.",
@@ -1269,7 +1272,7 @@ get_netlist(fp, netlistp, allow, print_tag)
if (!inet_aton(buf, &ntp->my_addr)) {
syslog(LOG_INFO, "%s contains bogus element (%s)",
print_tag, buf);
- continue;
+ continue;
}
if (maskp) {
if (!inet_aton(maskp, &ina)) {
@@ -1305,7 +1308,7 @@ get_netlist(fp, netlistp, allow, print_tag)
}
if (ntp)
free((char *)ntp);
-
+
dprintf(1, (ddt, "\n"));
#ifdef DEBUG
if (debug > 2)
diff --git a/usr.sbin/named/db_lookup.c b/usr.sbin/named/db_lookup.c
index db7cd97..c1d047d 100644
--- a/usr.sbin/named/db_lookup.c
+++ b/usr.sbin/named/db_lookup.c
@@ -1,6 +1,6 @@
#if !defined(lint) && !defined(SABER)
static char sccsid[] = "@(#)db_lookup.c 4.18 (Berkeley) 3/21/91";
-static char rcsid[] = "$Id: db_lookup.c,v 8.2 1995/06/29 09:26:17 vixie Exp $";
+static char rcsid[] = "$Id: db_lookup.c,v 1.2 1995/05/30 03:48:40 rgrimes Exp $";
#endif /* not lint */
/*
@@ -8,7 +8,7 @@ static char rcsid[] = "$Id: db_lookup.c,v 8.2 1995/06/29 09:26:17 vixie Exp $";
* -
* Copyright (c) 1986
* 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:
@@ -24,7 +24,7 @@ static char rcsid[] = "$Id: db_lookup.c,v 8.2 1995/06/29 09:26:17 vixie Exp $";
* 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
@@ -38,14 +38,14 @@ static char rcsid[] = "$Id: db_lookup.c,v 8.2 1995/06/29 09:26:17 vixie Exp $";
* 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
@@ -72,7 +72,7 @@ static char rcsid[] = "$Id: db_lookup.c,v 8.2 1995/06/29 09:26:17 vixie Exp $";
#include "named.h"
-/*
+/*
* Lookup 'name' and return a pointer to the namebuf;
* NULL otherwise. If 'insert', insert name into tables.
* Wildcard lookups are handled.
@@ -103,7 +103,7 @@ nlookup(name, htpp, fname, insert)
return (np);
if ((htp = np->n_hash) == NULL) {
if (!insert) {
- if (np->n_dname[0] == '*' &&
+ if (np->n_dname[0] == '*' &&
np->n_dname[1] == '\0')
*fname = name;
return (np);
diff --git a/usr.sbin/named/db_reload.c b/usr.sbin/named/db_reload.c
index ca42008..1145e4a 100644
--- a/usr.sbin/named/db_reload.c
+++ b/usr.sbin/named/db_reload.c
@@ -1,6 +1,6 @@
#if !defined(lint) && !defined(SABER)
static char sccsid[] = "@(#)db_reload.c 4.22 (Berkeley) 3/21/91";
-static char rcsid[] = "$Id: db_reload.c,v 8.1 1994/12/15 06:24:14 vixie Exp $";
+static char rcsid[] = "$Id: db_reload.c,v 1.1.1.1 1994/09/22 19:46:14 pst Exp $";
#endif /* not lint */
/*
@@ -8,7 +8,7 @@ static char rcsid[] = "$Id: db_reload.c,v 8.1 1994/12/15 06:24:14 vixie Exp $";
* -
* Copyright (c) 1986, 1988
* 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:
@@ -24,7 +24,7 @@ static char rcsid[] = "$Id: db_reload.c,v 8.1 1994/12/15 06:24:14 vixie Exp $";
* 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
@@ -38,14 +38,14 @@ static char rcsid[] = "$Id: db_reload.c,v 8.1 1994/12/15 06:24:14 vixie Exp $";
* 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
diff --git a/usr.sbin/named/db_save.c b/usr.sbin/named/db_save.c
index 868ab1f..61471ce 100644
--- a/usr.sbin/named/db_save.c
+++ b/usr.sbin/named/db_save.c
@@ -1,6 +1,6 @@
#if !defined(lint) && !defined(SABER)
static char sccsid[] = "@(#)db_save.c 4.16 (Berkeley) 3/21/91";
-static char rcsid[] = "$Id: db_save.c,v 8.2 1995/06/29 09:26:17 vixie Exp $";
+static char rcsid[] = "$Id: db_save.c,v 1.2 1995/05/30 03:48:42 rgrimes Exp $";
#endif /* not lint */
/*
@@ -8,7 +8,7 @@ static char rcsid[] = "$Id: db_save.c,v 8.2 1995/06/29 09:26:17 vixie Exp $";
* -
* Copyright (c) 1986
* 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:
@@ -24,7 +24,7 @@ static char rcsid[] = "$Id: db_save.c,v 8.2 1995/06/29 09:26:17 vixie Exp $";
* 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
@@ -38,14 +38,14 @@ static char rcsid[] = "$Id: db_save.c,v 8.2 1995/06/29 09:26:17 vixie Exp $";
* 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
@@ -113,7 +113,7 @@ savedata(class, type, ttl, data, size)
register struct databuf *dp;
int bytes = (type == T_NS) ? DATASIZE(size)+INT32SZ : DATASIZE(size);
- dp = (struct databuf *)
+ dp = (struct databuf *)
#ifdef DMALLOC
dmalloc(file, line, bytes)
#else
diff --git a/usr.sbin/named/db_secure.c b/usr.sbin/named/db_secure.c
index 9c418f4..62f2f9a 100644
--- a/usr.sbin/named/db_secure.c
+++ b/usr.sbin/named/db_secure.c
@@ -1,5 +1,5 @@
#ifndef LINT
-static char rcsid[] = "$Id: db_secure.c,v 8.4 1995/06/29 09:26:17 vixie Exp $";
+static char rcsid[] = "$Id: db_secure.c,v 1.2 1995/05/30 03:48:43 rgrimes Exp $";
#endif
/* this file was contributed by Gregory Neil Shapiro of WPI in August 1993 */
@@ -89,10 +89,10 @@ build_secure_netlist(zp)
}
if (!inet_aton(buf, &ntp->my_addr)) {
syslog(LOG_INFO,
- "build_secure_netlist (%s): Bad address: %s",
+ "build_secure_netlist (%s): Bad address: %s",
zp->z_origin, buf);
errs++;
- continue;
+ continue;
}
if (maskptr && *maskptr) {
if (*maskptr == 'h' || *maskptr == 'H') {
@@ -108,13 +108,13 @@ build_secure_netlist(zp)
zp->z_origin, maskptr);
errs++;
continue;
- }
- }
+ }
+ }
} else {
ntp->mask = net_mask(ntp->my_addr);
}
if (ntp->my_addr.s_addr & ~(ntp->mask)) {
- syslog(LOG_INFO,
+ syslog(LOG_INFO,
"build_secure_netlist (%s): addr (%s) is not in mask (%#lx)",
zp->z_origin,
inet_ntoa(ntp->my_addr),
@@ -126,7 +126,7 @@ build_secure_netlist(zp)
/* Check for duplicates */
if (addr_on_netlist(ntp->my_addr, *netlistp)) {
- syslog(LOG_INFO,
+ syslog(LOG_INFO,
"build_secure_netlist (%s): duplicate address %s\n",
zp->z_origin, inet_ntoa(ntp->my_addr));
errs++;
diff --git a/usr.sbin/named/db_update.c b/usr.sbin/named/db_update.c
index 70e7bde..40e88cd 100644
--- a/usr.sbin/named/db_update.c
+++ b/usr.sbin/named/db_update.c
@@ -1,6 +1,6 @@
#if !defined(lint) && !defined(SABER)
static char sccsid[] = "@(#)db_update.c 4.28 (Berkeley) 3/21/91";
-static char rcsid[] = "$Id: db_update.c,v 8.6 1995/06/29 09:26:17 vixie Exp $";
+static char rcsid[] = "$Id: db_update.c,v 1.2 1995/05/30 03:48:44 rgrimes Exp $";
#endif /* not lint */
/*
@@ -8,7 +8,7 @@ static char rcsid[] = "$Id: db_update.c,v 8.6 1995/06/29 09:26:17 vixie Exp $";
* -
* Copyright (c) 1986, 1990
* 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:
@@ -24,7 +24,7 @@ static char rcsid[] = "$Id: db_update.c,v 8.6 1995/06/29 09:26:17 vixie Exp $";
* 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
@@ -38,14 +38,14 @@ static char rcsid[] = "$Id: db_update.c,v 8.6 1995/06/29 09:26:17 vixie Exp $";
* 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
@@ -348,11 +348,11 @@ db_update(name, odp, newdp, flags, htp)
* correctly with glue records. mpa.
*/
- /* if the new data is authorative
+ /* if the new data is authorative
* remove any data for this domain with
* the same class that isn't as credable
*/
- if (newdp->d_cred == DB_C_ZONE &&
+ if (newdp->d_cred == DB_C_ZONE &&
newdp->d_cred > dp->d_cred)
/* better credibility and the old datum
* was not from a zone file. remove
@@ -370,13 +370,13 @@ db_update(name, odp, newdp, flags, htp)
/* if the new data is authoritative but
* but isn't as credible, reject it.
*/
- if (newdp->d_cred == DB_C_ZONE &&
+ if (newdp->d_cred == DB_C_ZONE &&
dp->d_cred == DB_C_ZONE) {
/* Both records are from a zone file.
* If their credibility levels differ,
* we're dealing with a zone cut. The
* record with lower clev is from the
- * upper zone's file and is therefore
+ * upper zone's file and is therefore
* glue.
*/
if (newdp->d_clev < dp->d_clev) {
@@ -451,7 +451,7 @@ db_update(name, odp, newdp, flags, htp)
* If their credibility levels differ,
* we're dealing with a zone cut. The
* record with lower clev is from the
- * upper zone's file and is therefore
+ * upper zone's file and is therefore
* glue.
*/
@@ -703,7 +703,7 @@ db_cmp(dp1, dp2)
cp1 += strlen((char *)cp1) + 1;
cp2 += strlen((char *)cp2) + 1;
return (bcmp(cp1, cp2, INT32SZ * 5));
-
+
case T_MX:
case T_AFSDB:
case T_RT:
@@ -723,7 +723,7 @@ db_cmp(dp1, dp2)
cp1 += strlen((char *)cp1) + 1;
cp2 += strlen((char *)cp2) + 1;
return (strcasecmp((char *)cp1, (char *)cp2));
-
+
case T_TXT:
case T_X25:
if (dp1->d_size != dp2->d_size)
diff --git a/usr.sbin/named/dmalloc.c b/usr.sbin/named/dmalloc.c
index 50db523..6f27adf 100644
--- a/usr.sbin/named/dmalloc.c
+++ b/usr.sbin/named/dmalloc.c
@@ -3,7 +3,7 @@
* vix 24mar92 [added size calcs, improved printout]
* vix 22mar92 [original work]
*
- * $Id: dmalloc.c,v 8.1 1994/12/15 06:24:14 vixie Exp $
+ * $Id: dmalloc.c,v 1.2 1994/09/22 20:45:04 pst Exp $
*/
/*
@@ -11,7 +11,7 @@
* -
* Copyright (c) 1993
* 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:
@@ -27,7 +27,7 @@
* 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
@@ -41,14 +41,14 @@
* 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
@@ -63,8 +63,6 @@
#include <stdio.h>
#include <signal.h>
-#include "../conf/portability.h"
-#include "../conf/options.h"
#ifdef DMALLOC
diff --git a/usr.sbin/named/dmalloc.h b/usr.sbin/named/dmalloc.h
index 9d0b44a..6d89ab8 100644
--- a/usr.sbin/named/dmalloc.h
+++ b/usr.sbin/named/dmalloc.h
@@ -1,15 +1,15 @@
/* dmalloc - debugging layer on top of malloc
* vix 22mar92 [written]
*
- * $Id: dmalloc.h,v 8.1 1994/12/15 06:24:14 vixie Exp $
+ * $Id: dmalloc.h,v 1.1.1.1 1994/09/22 19:46:14 pst Exp $
*/
/*
* ++Copyright++
* -
- * Copyright (c)
+ * 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:
@@ -25,7 +25,7 @@
* 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
@@ -39,14 +39,14 @@
* 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
diff --git a/usr.sbin/named/named.8 b/usr.sbin/named/named.8
index 9ab4e49..583a403 100644
--- a/usr.sbin/named/named.8
+++ b/usr.sbin/named/named.8
@@ -53,12 +53,12 @@
.\"
.\" @(#)named.8 6.6 (Berkeley) 2/14/89
.\"
-.TH @INDOT_U@NAMED @SYS_OPS_EXT_U@ "April 17, 1993"
+.TH NAMED 8 "April 17, 1993"
.UC 4
.SH NAME
-@INDOT@named \- Internet domain name server
+named \- Internet domain name server
.SH SYNOPSIS
-.B @INDOT@named
+.B named
[
.B \-d
.I debuglevel
@@ -91,7 +91,7 @@ messages printed.
.TP
.B \-p
Use a different port number. The default is the standard port number
-as returned by getservbyname(@LIB_NETWORK_EXT@) for service ``domain''.
+as returned by getservbyname(3) for service ``domain''.
.TP
.B \-b
Use an alternate boot file. This is optional and allows you to
@@ -123,7 +123,7 @@ directory /usr/local/adm/named
.ta \w'forwarders\ 'u +\w'6.32.128.IN-ADDR.ARPA\ 'u +\w'128.32.137.8 128.32.137.3\ 'u
; type domain source host/file backup file
-cache . root.cache
+cache . named.root
primary Berkeley.EDU berkeley.edu.zone
primary 32.128.IN-ADDR.ARPA ucbhosts.rev
secondary CC.Berkeley.EDU 128.32.137.8 128.32.137.3 cc.zone.bak
@@ -139,12 +139,12 @@ The ``directory'' line causes the server to change its working directory to
the directory specified. This can be important for the correct processing
of \s-1$INCLUDE\s+1 files in primary zone files.
.LP
-The ``cache'' line specifies that data in ``root.cache'' is to be placed in
+The ``cache'' line specifies that data in ``named.root'' is to be placed in
the backup cache. Its main use is to specify data such as locations of root
domain servers. This cache is not used during normal operation, but is used
-as ``hints'' to find the current root servers. The file ``root.cache'' is
+as ``hints'' to find the current root servers. The file ``named.root'' is
in the same format as ``berkeley.edu.zone''. There can be more than one
-``cache'' file specified. The ``root.cache'' file should be retrieved
+``cache'' file specified. The ``named.root'' file should be retrieved
periodically from \s-1FTP.RS.INTERNIC.NET\s+1 since it contains a list of
root servers, and this list changes periodically.
.LP
@@ -334,7 +334,7 @@ nameserver did not have complete information.
.sp
The following signals have the specified effect when sent to the
server process using the
-.IR kill (@CMD_EXT@)
+.IR kill (1)
command.
.IP SIGHUP
Causes server to read named.boot and reload database. If the server
@@ -360,7 +360,7 @@ Turns on debugging; each SIGUSR1 increments debug level.
Turns off debugging completely.
(SIGFPE on older systems without SIGUSR2)
.IP SIGWINCH
-Toggles logging of all incoming queries via syslog(@SYS_OPS_EXT@)
+Toggles logging of all incoming queries via syslog(3)
(requires server to have been built with the QRYLOG option).
.SH FILES
.nf
@@ -372,7 +372,7 @@ Toggles logging of all incoming queries via syslog(@SYS_OPS_EXT@)
/var/tmp/named.stats nameserver statistics data
.fi
.SH "SEE ALSO"
-kill(@CMD_EXT@), gethostbyname(@LIB_NETWORK_EXT@), signal(@SYSCALL_EXT@),
-resolver(@LIB_NETWORK_EXT@), resolver(@FORMAT_EXT@), hostname(@DESC_EXT@),
+kill(1), gethostbyname(3), signal(3),
+resolver(3), resolver(5), hostname(7),
RFC 882, RFC 883, RFC 973, RFC 974, RFC 1033, RFC 1034, RFC 1035, RFC 1123,
\fIName Server Operations Guide for \s-1BIND\s+1\fR
diff --git a/usr.sbin/named/named.h b/usr.sbin/named/named.h
index 0575a5c..e3e795d 100644
--- a/usr.sbin/named/named.h
+++ b/usr.sbin/named/named.h
@@ -1,11 +1,11 @@
/* named.h - include the local definitions in the right order
* vix 28aug93 [original]
*
- * $Id: named.h,v 8.1 1994/12/15 06:24:14 vixie Exp $
+ * $Id: named.h,v 1.1 1993/09/08 04:57:40 vixie Exp $
*/
-#include "../conf/portability.h"
-#include "../conf/options.h"
+#include "options.h"
+#include "portability.h"
#include "pathnames.h"
diff --git a/usr.sbin/named/ns_defs.h b/usr.sbin/named/ns_defs.h
index 0a21a71..e462e44 100644
--- a/usr.sbin/named/ns_defs.h
+++ b/usr.sbin/named/ns_defs.h
@@ -1,6 +1,6 @@
/*
* from ns.h 4.33 (Berkeley) 8/23/90
- * $Id: ns_defs.h,v 8.2 1995/06/19 20:55:40 vixie Exp $
+ * $Id: ns_defs.h,v 1.2 1995/05/30 03:48:47 rgrimes Exp $
*/
/*
@@ -8,7 +8,7 @@
* -
* Copyright (c) 1986
* 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:
@@ -24,7 +24,7 @@
* 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
@@ -38,14 +38,14 @@
* 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
@@ -67,7 +67,7 @@
* larger land on 32-bit boundaries; smaller structure members have been
* deliberately shuffled and smaller integer sizes chosen where possible
* to make sure this happens. This is all meant to avoid structure member
- * padding which can cost a _lot_ of memory when you have hundreds of
+ * padding which can cost a _lot_ of memory when you have hundreds of
* thousands of entries in your cache.
*/
@@ -128,7 +128,7 @@ struct zoneinfo {
int z_class; /* class of zone */
#ifdef SECURE_ZONES
struct netinfo *secure_nets; /* list of secure networks for zone */
-#endif
+#endif
#ifdef BIND_NOTIFY
/* XXX - this will have to move to the name when we do !SOA notify */
struct notify *z_notifylist; /* list of servers we should notify */
@@ -328,11 +328,11 @@ struct nameser {
#endif
u_int8_t xfers; /* #/xfers running right now */
};
-
+
#ifdef NCACHE
#define NOERROR_NODATA 6 /* only used internally by the server, used for
- * -ve $ing non-existence of records. 6 is not
+ * -ve $ing non-existence of records. 6 is not
* a code used as yet anyway. anant@isi.edu
*/
#define NTTL 600 /* ttl for negative data: 10 minutes? */
diff --git a/usr.sbin/named/ns_forw.c b/usr.sbin/named/ns_forw.c
index 02848ca..1d4ffbb 100644
--- a/usr.sbin/named/ns_forw.c
+++ b/usr.sbin/named/ns_forw.c
@@ -1,6 +1,6 @@
#if !defined(lint) && !defined(SABER)
static char sccsid[] = "@(#)ns_forw.c 4.32 (Berkeley) 3/3/91";
-static char rcsid[] = "$Id: ns_forw.c,v 8.5 1995/06/29 09:26:17 vixie Exp $";
+static char rcsid[] = "$Id: ns_forw.c,v 1.2 1995/05/30 03:48:49 rgrimes Exp $";
#endif /* not lint */
/*
@@ -8,7 +8,7 @@ static char rcsid[] = "$Id: ns_forw.c,v 8.5 1995/06/29 09:26:17 vixie Exp $";
* -
* Copyright (c) 1986
* 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:
@@ -24,7 +24,7 @@ static char rcsid[] = "$Id: ns_forw.c,v 8.5 1995/06/29 09:26:17 vixie Exp $";
* 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
@@ -38,14 +38,14 @@ static char rcsid[] = "$Id: ns_forw.c,v 8.5 1995/06/29 09:26:17 vixie Exp $";
* 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
@@ -74,7 +74,7 @@ static char rcsid[] = "$Id: ns_forw.c,v 8.5 1995/06/29 09:26:17 vixie Exp $";
/*
* Forward the query to get the answer since its not in the database.
* Returns FW_OK if a request struct is allocated and the query sent.
- * Returns FW_DUP if this is a duplicate of a pending request.
+ * Returns FW_DUP if this is a duplicate of a pending request.
* Returns FW_NOSERVER if there were no addresses for the nameservers.
* Returns FW_SERVFAIL on malloc error or if asked to do something
* dangerous, such as fwd to ourselves or fwd to the host that asked us.
diff --git a/usr.sbin/named/ns_glob.h b/usr.sbin/named/ns_glob.h
index b404e7e..d229c95 100644
--- a/usr.sbin/named/ns_glob.h
+++ b/usr.sbin/named/ns_glob.h
@@ -1,6 +1,6 @@
/*
* from ns.h 4.33 (Berkeley) 8/23/90
- * $Id: ns_glob.h,v 8.3 1995/06/19 20:55:40 vixie Exp $
+ * $Id: ns_glob.h,v 1.2 1995/05/30 03:48:50 rgrimes Exp $
*/
/*
@@ -8,7 +8,7 @@
* -
* Copyright (c) 1986
* 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:
@@ -24,7 +24,7 @@
* 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
@@ -38,14 +38,14 @@
* 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
@@ -130,7 +130,7 @@ DECL int needStatsDump INIT(0);
DECL int needToExit INIT(0);
#endif /* ALLOW_UPDATES */
#ifdef XSTATS
- /* need to exit
+ /* need to exit
* set by shutdown signal handler
* (onintr)
*/
diff --git a/usr.sbin/named/ns_init.c b/usr.sbin/named/ns_init.c
index 944b9ef..b546e9f 100644
--- a/usr.sbin/named/ns_init.c
+++ b/usr.sbin/named/ns_init.c
@@ -1,6 +1,6 @@
#if !defined(lint) && !defined(SABER)
static char sccsid[] = "@(#)ns_init.c 4.38 (Berkeley) 3/21/91";
-static char rcsid[] = "$Id: ns_init.c,v 8.7 1995/06/29 09:26:17 vixie Exp $";
+static char rcsid[] = "$Id: ns_init.c,v 1.1.1.2 1995/08/18 21:16:00 peter Exp $";
#endif /* not lint */
/*
@@ -8,7 +8,7 @@ static char rcsid[] = "$Id: ns_init.c,v 8.7 1995/06/29 09:26:17 vixie Exp $";
* -
* Copyright (c) 1986, 1990
* 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:
@@ -24,7 +24,7 @@ static char rcsid[] = "$Id: ns_init.c,v 8.7 1995/06/29 09:26:17 vixie Exp $";
* 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
@@ -38,14 +38,14 @@ static char rcsid[] = "$Id: ns_init.c,v 8.7 1995/06/29 09:26:17 vixie Exp $";
* 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
@@ -369,7 +369,7 @@ boot_read(bootfile)
*/
if (!getword(buf, sizeof(buf), fp)) {
syslog(LOG_NOTICE, "%s: line %d: missing %s\n",
- bootfile, lineno,
+ bootfile, lineno,
#ifdef STUBS
(type == Z_SECONDARY || type == Z_STUB)
#else
@@ -455,7 +455,7 @@ boot_read(bootfile)
*/
if (zp->z_source &&
!strcmp(source, zp->z_source) &&
- !(zp->z_flags & Z_INCLUDE) &&
+ !(zp->z_flags & Z_INCLUDE) &&
stat(zp->z_source, &f_time) != -1 &&
zp->z_ftime == f_time.st_mtime) {
dprintf(1, (ddt, "cache is up to date\n"));
@@ -512,7 +512,7 @@ boot_read(bootfile)
*/
if (zp->z_source &&
!strcmp(source, zp->z_source) &&
- !(zp->z_flags & Z_INCLUDE) &&
+ !(zp->z_flags & Z_INCLUDE) &&
stat(zp->z_source, &f_time) != -1 &&
zp->z_ftime == f_time.st_mtime) {
dprintf(1, (ddt, "zone is up to date\n"));
@@ -606,8 +606,8 @@ boot_read(bootfile)
zoneinit(zp);
#ifdef FORCED_RELOAD
else {
- /*
- ** Force secondary to try transfer right away
+ /*
+ ** Force secondary to try transfer right away
** after SIGHUP.
*/
if (reloading) {
@@ -776,7 +776,7 @@ get_forwarders(fp)
} else {
syslog(LOG_NOTICE, "'%s' (ignored, NOT dotted quad)",
buf);
- continue;
+ continue;
}
#ifdef FWD_LOOP
if (aIsUs(ftp->fwdaddr.sin_addr)) {
@@ -800,7 +800,7 @@ get_forwarders(fp)
}
if (ftp)
free((char *)ftp);
-
+
#ifdef SLAVE_FORWARD
/*
** Set the slave retry time to 60 seconds total divided
@@ -839,7 +839,7 @@ free_forwarders()
}
static struct zoneinfo *
-find_zone(name, type, class)
+find_zone(name, type, class)
char *name;
int type, class;
{
@@ -859,7 +859,7 @@ find_zone(name, type, class)
#ifdef DEBUG
/* prints out the content of zones */
static void
-content_zone(end)
+content_zone(end)
int end;
{
int i;
diff --git a/usr.sbin/named/ns_main.c b/usr.sbin/named/ns_main.c
index 597f3de..f1b974f 100644
--- a/usr.sbin/named/ns_main.c
+++ b/usr.sbin/named/ns_main.c
@@ -1,6 +1,6 @@
#if !defined(lint) && !defined(SABER)
static char sccsid[] = "@(#)ns_main.c 4.55 (Berkeley) 7/1/91";
-static char rcsid[] = "$Id: ns_main.c,v 8.8 1995/06/29 09:26:17 vixie Exp $";
+static char rcsid[] = "$Id: ns_main.c,v 1.2 1995/05/30 03:48:52 rgrimes Exp $";
#endif /* not lint */
/*
@@ -8,7 +8,7 @@ static char rcsid[] = "$Id: ns_main.c,v 8.8 1995/06/29 09:26:17 vixie Exp $";
* -
* Copyright (c) 1986, 1989, 1990
* 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:
@@ -24,7 +24,7 @@ static char rcsid[] = "$Id: ns_main.c,v 8.8 1995/06/29 09:26:17 vixie Exp $";
* 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
@@ -38,14 +38,14 @@ static char rcsid[] = "$Id: ns_main.c,v 8.8 1995/06/29 09:26:17 vixie Exp $";
* 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
@@ -295,7 +295,7 @@ main(argc, argv, envp)
fprintf(ddt, "Debug turned ON, Level %d\n",debug);
fprintf(ddt, "Version = %s\n", Version);
fprintf(ddt, "bootfile = %s\n", bootfile);
- }
+ }
#endif
n = 0;
@@ -344,7 +344,7 @@ main(argc, argv, envp)
if ((vs = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
syslog(LOG_ERR, "socket(SOCK_STREAM): %m");
exit(1);
- }
+ }
if (setsockopt(vs, SOL_SOCKET, SO_REUSEADDR, (char *)&on,
sizeof(on)) != 0)
{
@@ -439,7 +439,7 @@ main(argc, argv, envp)
sigemptyset(&sact.sa_mask);
sigaddset(&sact.sa_mask, SIGALRM);
(void) sigaction(SIGCHLD, &sact, (struct sigaction *)NULL);
-#else
+#else
#if defined(SYSV)
(void) signal(SIGCLD, (SIG_FN (*)()) endxfer);
(void) signal(SIGALRM, maint_alarm);
@@ -636,7 +636,7 @@ main(argc, argv, envp)
if (retryqp != NULL) {
gettime(&tt);
/*
- ** The tv_sec field might be unsigned
+ ** The tv_sec field might be unsigned
** and thus cannot be negative.
*/
if ((int32_t) retryqp->q_time <= tt.tv_sec) {
@@ -859,7 +859,7 @@ main(argc, argv, envp)
sp->s_bufsize = sp->s_size;
}
}
- sp->s_bufp = sp->s_buf;
+ sp->s_bufp = sp->s_buf;
}
}
gettime(&tt);
@@ -974,10 +974,10 @@ getnetconf()
inet_ntoa(((struct sockaddr_in *)
&ifreq.ifr_addr)->sin_addr)));
/* build datagram queue */
- /*
+ /*
* look for an already existing source interface address.
* This happens mostly when reinitializing. Also, if
- * the machine has multiple point to point interfaces, then
+ * the machine has multiple point to point interfaces, then
* the local address may appear more than once.
*/
if (dqp = aIsUs(((struct sockaddr_in *)&ifreq.ifr_addr)
@@ -1182,7 +1182,7 @@ opensocket(dqp)
if ((dqp->dq_dfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
syslog(LOG_ERR, "socket(SOCK_DGRAM): %m - exiting");
exit(1);
- }
+ }
dprintf(1, (ddt, "dqp->dq_addr %s d_dfd %d\n",
inet_ntoa(dqp->dq_addr), dqp->dq_dfd));
if (setsockopt(dqp->dq_dfd, SOL_SOCKET, SO_REUSEADDR,
diff --git a/usr.sbin/named/ns_maint.c b/usr.sbin/named/ns_maint.c
index 541ac85..03cbf99 100644
--- a/usr.sbin/named/ns_maint.c
+++ b/usr.sbin/named/ns_maint.c
@@ -1,6 +1,6 @@
#if !defined(lint) && !defined(SABER)
static char sccsid[] = "@(#)ns_maint.c 4.39 (Berkeley) 3/2/91";
-static char rcsid[] = "$Id: ns_maint.c,v 8.8 1995/06/29 09:26:17 vixie Exp $";
+static char rcsid[] = "$Id: ns_maint.c,v 1.2 1995/05/30 03:48:53 rgrimes Exp $";
#endif /* not lint */
/*
@@ -8,7 +8,7 @@ static char rcsid[] = "$Id: ns_maint.c,v 8.8 1995/06/29 09:26:17 vixie Exp $";
* -
* Copyright (c) 1986, 1988
* 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:
@@ -24,7 +24,7 @@ static char rcsid[] = "$Id: ns_maint.c,v 8.8 1995/06/29 09:26:17 vixie Exp $";
* 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
@@ -38,14 +38,14 @@ static char rcsid[] = "$Id: ns_maint.c,v 8.8 1995/06/29 09:26:17 vixie Exp $";
* 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
@@ -400,7 +400,7 @@ startxfer(zp)
}
}
#endif
-
+
if (zp->z_xaddr.s_addr != 0) {
/* address was specified by the qserial logic, use it */
argv[argc++] = strcpy(argv_ns[argc_ns++],
@@ -433,7 +433,7 @@ startxfer(zp)
#ifdef ECHOARGS
if (debug) {
int i;
- for (i = 0; i < argc; i++)
+ for (i = 0; i < argc; i++)
fprintf(ddt, "Arg %d=%s\n", i, argv[i]);
}
#endif /* ECHOARGS */
@@ -624,7 +624,7 @@ purge_zone(dname, htp, class)
np->n_hash = NULL;
}
}
-
+
/* remove entry from cache, if required */
if ((np->n_hash == NULL) && (np->n_data == NULL)) {
struct namebuf **npp, **nppend;
@@ -635,7 +635,7 @@ purge_zone(dname, htp, class)
/* walk parent hashtable looking for ourself */
if (np->n_parent)
phtp = np->n_parent->n_hash;
- else
+ else
phtp = htp; /* top / root zone */
if (phtp) {
@@ -728,7 +728,7 @@ bottom_of_zone(dp, class)
return (0);
}
#endif
-
+
/*
* Handle XFER limit for a nameserver.
*/
@@ -781,7 +781,7 @@ abortxfer(zp)
SIG_FN
endxfer()
{
- register struct zoneinfo *zp;
+ register struct zoneinfo *zp;
int exitstatus, pid, xfers, save_errno;
#if defined(sequent)
union wait status;
@@ -809,7 +809,7 @@ endxfer()
zp->z_xferpid = 0;
zp->z_flags &= ~Z_XFER_RUNNING;
dprintf(1, (ddt,
- "\nendxfer: child %d zone %s returned status=%d termsig=%d\n",
+ "\nendxfer: child %d zone %s returned status=%d termsig=%d\n",
pid, zp->z_origin, exitstatus,
WIFSIGNALED(status) ?WTERMSIG(status) :-1
)
@@ -892,7 +892,7 @@ tryxfer() {
zp = zones;
}
lastnzones = nzones;
-
+
if (zp == zones)
stopzp = &zones[nzones-1];
else
@@ -907,7 +907,7 @@ tryxfer() {
if (!xfers_deferred || xfers_running >= max_xfers_running)
break;
-
+
if ((xfers = nxfers(zp, 0)) != -1 &&
xfers < max_xfers_per_ns &&
(zp->z_flags & Z_NEED_XFER)) {
@@ -939,7 +939,7 @@ tryxfer() {
void
loadxfer()
{
- register struct zoneinfo *zp;
+ register struct zoneinfo *zp;
gettime(&tt);
for (zp = zones; zp < &zones[nzones]; zp++) {
diff --git a/usr.sbin/named/ns_ncache.c b/usr.sbin/named/ns_ncache.c
index bea17c6..367ff87 100644
--- a/usr.sbin/named/ns_ncache.c
+++ b/usr.sbin/named/ns_ncache.c
@@ -38,7 +38,7 @@ cache_n_resp(msg, msglen)
hp = (HEADER *)msg;
cp = msg+HFIXEDSZ;
-
+
n = dn_expand(msg, msg + msglen, cp, dname, sizeof dname);
if (n < 0) {
dprintf(1, (ddt, "Query expand name failed:cache_n_resp\n"));
diff --git a/usr.sbin/named/ns_req.c b/usr.sbin/named/ns_req.c
index 1cfbef9..94d765b 100644
--- a/usr.sbin/named/ns_req.c
+++ b/usr.sbin/named/ns_req.c
@@ -1,6 +1,6 @@
#if !defined(lint) && !defined(SABER)
static char sccsid[] = "@(#)ns_req.c 4.47 (Berkeley) 7/1/91";
-static char rcsid[] = "$Id: ns_req.c,v 8.8 1995/06/29 09:26:17 vixie Exp $";
+static char rcsid[] = "$Id: ns_req.c,v 1.2 1995/05/30 03:48:55 rgrimes Exp $";
#endif /* not lint */
/*
@@ -8,7 +8,7 @@ static char rcsid[] = "$Id: ns_req.c,v 8.8 1995/06/29 09:26:17 vixie Exp $";
* -
* Copyright (c) 1986, 1988, 1990
* 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:
@@ -24,7 +24,7 @@ static char rcsid[] = "$Id: ns_req.c,v 8.8 1995/06/29 09:26:17 vixie Exp $";
* 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
@@ -38,14 +38,14 @@ static char rcsid[] = "$Id: ns_req.c,v 8.8 1995/06/29 09:26:17 vixie Exp $";
* 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
@@ -264,8 +264,8 @@ ns_req(msg, msglen, buflen, qsp, from, dfd)
buflen -= n;
dprintf(1, (ddt, "ns_req: answer -> %s fd=%d id=%d size=%d %s\n",
- sin_ntoa(from),
- (qsp == QSTREAM_NULL) ?dfd :qsp->s_rfd,
+ sin_ntoa(from),
+ (qsp == QSTREAM_NULL) ?dfd :qsp->s_rfd,
ntohs(hp->id), cp - msg, local(from) == NULL ? "Remote" : "Local"));
#ifdef DEBUG
if (debug >= 10)
@@ -284,9 +284,9 @@ ns_req(msg, msglen, buflen, qsp, from, dfd)
}
nameserIncr(from->sin_addr, nssSentAns);
#ifdef XSTATS
- if (hp->rcode == NXDOMAIN)
+ if (hp->rcode == NXDOMAIN)
nameserIncr(from->sin_addr, nssSentNXD);
- if (!hp->aa)
+ if (!hp->aa)
nameserIncr(from->sin_addr, nssSentNaAns);
#endif
} else {
@@ -443,7 +443,7 @@ req_query(hp, cpp, eom, qsp, buflenp, msglenp, msg, dfd, from)
struct databuf *dp;
nameserIncr(from->sin_addr, nssRcvdQ);
-
+
#ifdef XSTATS
/* Statistics for queries coming from port <> 53, suspect some kind of forwarder */
if (from->sin_port != ns_port)
@@ -542,8 +542,8 @@ req_query(hp, cpp, eom, qsp, buflenp, msglenp, msg, dfd, from)
#ifdef QRYLOG
if (qrylog) {
syslog(LOG_INFO, "XX /%s/%s/%s",
- inet_ntoa(from->sin_addr),
- (dname[0] == '\0') ?"." :dname,
+ inet_ntoa(from->sin_addr),
+ (dname[0] == '\0') ?"." :dname,
p_type(type));
}
#endif /*QRYLOG*/
@@ -575,10 +575,10 @@ try_again:
#endif /*LOCALDOM*/
#ifdef YPKLUDGE
- /* Some braindamaged resolver software will not
- recognize internet addresses in dot notation and
- send out address queries for "names" such as
- 128.93.8.1. This kludge will prevent those
+ /* Some braindamaged resolver software will not
+ recognize internet addresses in dot notation and
+ send out address queries for "names" such as
+ 128.93.8.1. This kludge will prevent those
from flooding higher level servers.
We simply claim to be authoritative and that
the domain doesn't exist.
@@ -703,7 +703,7 @@ try_again:
"req: foundname=%d, count=%d, founddata=%d, cname=%d\n",
foundname, count, founddata, cname));
- if ((lp = local(from)) != NULL)
+ if ((lp = local(from)) != NULL)
sort_response(answers, count, lp, *cpp);
#ifdef BIND_NOTIFY
if (type == T_SOA &&
@@ -796,7 +796,7 @@ fetchns:
}
*cpp += n;
*buflenp -= n;
- hp->nscount =
+ hp->nscount =
htons((u_int16_t)
count);
}
@@ -898,15 +898,15 @@ fetchns:
case FW_DUP:
break; /* Duplicate request dropped */
case FW_NOSERVER:
- /*
- ** Don't go into an infinite loop if
+ /*
+ ** Don't go into an infinite loop if
** the admin gave root NS records in the cache
** file without giving address records
** for the root servers.
*/
if (np) {
if (np->n_dname[0] == '\0') {
- syslog(LOG_NOTICE,
+ syslog(LOG_NOTICE,
"ns_req: no address for root server");
hp->rcode = SERVFAIL;
#ifdef DATUMREFCNT
@@ -1014,7 +1014,7 @@ req_iquery(hp, cpp, eom, buflenp, msg, from)
#ifdef QRYLOG
if (qrylog) {
syslog(LOG_INFO, "XX /%s/%s/-%s",
- inet_ntoa(from->sin_addr),
+ inet_ntoa(from->sin_addr),
inet_ntoa(data_inaddr((u_char *)data)),
p_type(type));
}
@@ -1389,6 +1389,7 @@ addname(dname, rname, rtype, class)
if (strcasecmp(ap->a_dname, dname) == 0)
return;
+
/* add domain name to additional section */
if (addcount < NADDRECS) {
addcount++;
@@ -1626,7 +1627,7 @@ doaxfr(np, rfp, top, class)
#ifdef NO_GLUE
if ((np != top) || (top->n_dname[0] == '\0')) {
#endif /*NO_GLUE*/
- /* Glue the sub domains together by sending
+ /* Glue the sub domains together by sending
* the address records for the sub domain
* name servers along if necessary.
* Glue is necessary if the server is in any zone
diff --git a/usr.sbin/named/ns_resp.c b/usr.sbin/named/ns_resp.c
index 012b699..fde341c 100644
--- a/usr.sbin/named/ns_resp.c
+++ b/usr.sbin/named/ns_resp.c
@@ -1,6 +1,6 @@
#if !defined(lint) && !defined(SABER)
static char sccsid[] = "@(#)ns_resp.c 4.65 (Berkeley) 3/3/91";
-static char rcsid[] = "$Id: ns_resp.c,v 8.8 1995/07/07 07:33:52 vixie Exp $";
+static char rcsid[] = "$Id: ns_resp.c,v 1.2 1995/05/30 03:48:56 rgrimes Exp $";
#endif /* not lint */
/*
@@ -8,7 +8,7 @@ static char rcsid[] = "$Id: ns_resp.c,v 8.8 1995/07/07 07:33:52 vixie Exp $";
* -
* Copyright (c) 1986, 1988, 1990
* 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:
@@ -24,7 +24,7 @@ static char rcsid[] = "$Id: ns_resp.c,v 8.8 1995/07/07 07:33:52 vixie Exp $";
* 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
@@ -38,14 +38,14 @@ static char rcsid[] = "$Id: ns_resp.c,v 8.8 1995/07/07 07:33:52 vixie Exp $";
* 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
@@ -102,7 +102,7 @@ learntFrom(qp, server)
char nsbuf[20];
char abuf[20];
int i;
-
+
if (buf) {
free(buf);
buf = NULL;
@@ -149,7 +149,7 @@ learntFrom(qp, server)
if ((a == ns) && (ns == na)) /* all "UNKNOWN" */
return ("");
-
+
#ifdef STATS
# define LEARNTFROM " '%s': learnt (A=%s,NS=%s)"
#else
@@ -363,7 +363,7 @@ ns_resp(msg, msglen)
(char*)nhash(qp->q_domain)))
syslog(LAME_LOGGING,
"Lame server on '%s' (in '%s'?): %s%s\n",
- qname, qp->q_domain,
+ qname, qp->q_domain,
inet_etoa(&from_addr),
learntFrom(qp, &from_addr)
);
@@ -429,7 +429,7 @@ ns_resp(msg, msglen)
"Response from unexpected source (%s)",
inet_etoa(&from_addr));
}
- /*
+ /*
* We don't know who this response came from so it
* gets dropped on the floor.
*/
@@ -467,7 +467,7 @@ ns_resp(msg, msglen)
rtrip = ((tt.tv_sec - stp->tv_sec) * 1000 +
(tt.tv_usec - stp->tv_usec) / 1000);
}
-
+
dprintf(3, (ddt, "stime %lu/%lu now %lu/%lu rtt %ld\n",
(u_long)stp->tv_sec, (u_long)stp->tv_usec,
(u_long)tt.tv_sec, (u_long)tt.tv_usec,
@@ -487,7 +487,7 @@ ns_resp(msg, msglen)
ns->d_nstime = (u_int32_t)rtrip;
else
ns->d_nstime = (u_int32_t)
- (ns->d_nstime * ALPHA
+ (ns->d_nstime * ALPHA
+
(1-ALPHA) * (u_int32_t)rtrip);
/* prevent floating point overflow,
@@ -517,7 +517,7 @@ ns_resp(msg, msglen)
* Watch out for records that may have timed out
* and are no longer the correct type. XXX
*/
-
+
for (n = 0, qs = qp->q_addr; (u_int)n < qp->q_naddr; n++, qs++) {
ns2 = qs->nsdata;
if ((!ns2) || (ns2 == ns))
@@ -836,7 +836,7 @@ ns_resp(msg, msglen)
* If there are addresses and this is a local query,
* sort them appropriately for the local context.
*/
- if (ancount > 1 && (lp = local(&qp->q_from)) != NULL)
+ if (ancount > 1 && (lp = local(&qp->q_from)) != NULL)
sort_response(tp, ancount, lp, eom);
/*
@@ -1140,7 +1140,7 @@ ns_resp(msg, msglen)
#ifdef XSTATS
if (!hp->aa)
nameserIncr(qp->q_from.sin_addr, nssSentNaAns);
- if (hp->rcode == NXDOMAIN)
+ if (hp->rcode == NXDOMAIN)
nameserIncr(qp->q_from.sin_addr, nssSentNXD);
#endif
n = doaddinfo(hp, cp, buflen);
@@ -1383,7 +1383,7 @@ doupdate(msg, msglen, rrp, zone, savens, flags, cred)
if ( (hp->opcode == UPDATED) || (hp->opcode == UPDATEDA) ) {
if (cp != (u_char *)(msg + msglen)) {
dprintf(1,
- (ddt,
+ (ddt,
"FORMERR UPDATE message length off\n"
)
);
@@ -1391,7 +1391,7 @@ doupdate(msg, msglen, rrp, zone, savens, flags, cred)
return (-1);
}
}
- if ((zonenum = findzone(dname, class)) == 0) {
+ if ((zonenum = findzone(dname, class)) == 0) {
hp->rcode = NXDOMAIN;
return (-1);
}
@@ -1471,7 +1471,7 @@ doupdate(msg, msglen, rrp, zone, savens, flags, cred)
hp->rcode = FORMERR;
return (-1);
}
- if ((zonenum = findzone(dname, class)) == 0) {
+ if ((zonenum = findzone(dname, class)) == 0) {
hp->rcode = NXDOMAIN;
return (-1);
}
@@ -1576,7 +1576,7 @@ send_msg(msg, msglen, qp)
#ifdef DEBUG
if (debug) {
fprintf(ddt,"send_msg -> %s (%s %d) id=%d\n",
- inet_etoa(&qp->q_from),
+ inet_etoa(&qp->q_from),
qp->q_stream == QSTREAM_NULL ? "UDP" : "TCP",
qp->q_stream == QSTREAM_NULL ? qp->q_dfd
: qp->q_stream->s_rfd,
@@ -1943,7 +1943,7 @@ sysquery(dname, class, type, nss, nsc, opcode)
dprintf(1, (ddt,
"sysquery: send -> %s dfd=%d nsid=%d id=%d retry=%ld\n",
- inet_etoa(nsa), qp->q_dfd,
+ inet_etoa(nsa), qp->q_dfd,
ntohs(qp->q_nsid), ntohs(qp->q_id),
qp->q_time));
#ifdef DEBUG
@@ -2011,7 +2011,7 @@ check_root()
check_ns();
}
-/*
+/*
* Check the root to make sure that for each NS record we have a A RR
*/
static void
@@ -2095,7 +2095,7 @@ findns(npp, class, nsp, countp, flag)
register struct databuf *dp;
register struct databuf **nspp;
struct hashbuf *htp;
-
+
#ifdef DATUMREFCNT
nsp[0] = NULL;
#endif
@@ -2235,7 +2235,7 @@ finddata(np, class, type, hp, dnamep, lenp, countp)
/* cycle order of RRs, for a load balancing effect... */
register struct databuf **dpp;
-
+
for (dpp = &np->n_data; dp = *dpp; dpp = &dp->d_next) {
if (dp->d_next && wanted(dp, class, type)) {
register struct databuf *lp;
@@ -2253,7 +2253,7 @@ finddata(np, class, type, hp, dnamep, lenp, countp)
}
}
#endif /*ROUND_ROBIN*/
-
+
buflen = *lenp;
#ifdef DEBUG
if (buflen > PACKETSZ)
diff --git a/usr.sbin/named/ns_sort.c b/usr.sbin/named/ns_sort.c
index 499a5b4..70da7fe 100644
--- a/usr.sbin/named/ns_sort.c
+++ b/usr.sbin/named/ns_sort.c
@@ -1,6 +1,6 @@
#if !defined(lint) && !defined(SABER)
static char sccsid[] = "@(#)ns_sort.c 4.10 (Berkeley) 3/3/91";
-static char rcsid[] = "$Id: ns_sort.c,v 8.2 1995/06/29 09:26:17 vixie Exp $";
+static char rcsid[] = "$Id: ns_sort.c,v 1.2 1995/05/30 03:48:59 rgrimes Exp $";
#endif /* not lint */
/*
@@ -8,7 +8,7 @@ static char rcsid[] = "$Id: ns_sort.c,v 8.2 1995/06/29 09:26:17 vixie Exp $";
* -
* Copyright (c) 1986, 1990
* 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:
@@ -24,7 +24,7 @@ static char rcsid[] = "$Id: ns_sort.c,v 8.2 1995/06/29 09:26:17 vixie Exp $";
* 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
@@ -38,14 +38,14 @@ static char rcsid[] = "$Id: ns_sort.c,v 8.2 1995/06/29 09:26:17 vixie Exp $";
* 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
diff --git a/usr.sbin/named/ns_stats.c b/usr.sbin/named/ns_stats.c
index d609edd..b4c8958 100644
--- a/usr.sbin/named/ns_stats.c
+++ b/usr.sbin/named/ns_stats.c
@@ -1,6 +1,6 @@
#if !defined(lint) && !defined(SABER)
static char sccsid[] = "@(#)ns_stats.c 4.10 (Berkeley) 6/27/90";
-static char rcsid[] = "$Id: ns_stats.c,v 8.4 1995/06/29 09:26:17 vixie Exp $";
+static char rcsid[] = "$Id: ns_stats.c,v 1.2 1995/05/30 03:49:00 rgrimes Exp $";
#endif /* not lint */
/*
@@ -8,7 +8,7 @@ static char rcsid[] = "$Id: ns_stats.c,v 8.4 1995/06/29 09:26:17 vixie Exp $";
* -
* Copyright (c) 1986,1994
* 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:
@@ -24,7 +24,7 @@ static char rcsid[] = "$Id: ns_stats.c,v 8.4 1995/06/29 09:26:17 vixie Exp $";
* 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
@@ -38,14 +38,14 @@ static char rcsid[] = "$Id: ns_stats.c,v 8.4 1995/06/29 09:26:17 vixie Exp $";
* 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
@@ -104,7 +104,7 @@ static const char *typenames[T_ANY+1] = {
/* 240 */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* 250 */
- 0, 0, "AXFR", "MAILB", "MAILA", "ANY"
+ 0, 0, "AXFR", "MAILB", "MAILA", "ANY"
};
static void nameserStats __P((FILE *));
@@ -217,7 +217,7 @@ nameserCompar(t1, t2)
else
return (0);
}
-
+
struct nameser *
nameserFind(addr, flags)
struct in_addr addr;
diff --git a/usr.sbin/named/ns_validate.c b/usr.sbin/named/ns_validate.c
index 6978de1..358fcb8 100644
--- a/usr.sbin/named/ns_validate.c
+++ b/usr.sbin/named/ns_validate.c
@@ -40,7 +40,7 @@ static TO_Validate *validateQ, *currentVQ;
static int VQcount;
/*****************************************************************
- * validate() is called from dovalidate(). it takes as parameters,
+ * validate() is called from dovalidate(). it takes as parameters,
* the domain name sought, the class, type etc. of record, the server
* that gave us the answer and the data it gave us
*
@@ -63,8 +63,8 @@ static int VQcount;
* if (data agrees with what we have)
* return VALID_NO_CACHE;
* else return INVALID;
- *
- * if (we are not authoritative) /findns() returned OK;/
+ *
+ * if (we are not authoritative) /findns() returned OK;/
* if (address records for NS's found in cache){
* if ("server" = one of the addresses){
* return VALID_CACHE;
@@ -129,7 +129,7 @@ validate(dname, server, type, class, data, dlen
np = NULL;
else
np = nlookup(dname, &htp, &fname, 0);
-
+
/* we were able to locate namebufs for this domain, or a parent domain,
* or ??? */
@@ -149,7 +149,7 @@ validate(dname, server, type, class, data, dlen
free((char *)fname);
switch (findns(&np, class, nsp, &count, 0)) {
case NXDOMAIN:
- /** we are authoritative for this domain, lookup name
+ /** we are authoritative for this domain, lookup name
* in our zone data, if it matches, return valid.
* in either case, do not cache
**/
@@ -163,7 +163,7 @@ validate(dname, server, type, class, data, dlen
#ifdef NCACHE
if (rcode == NXDOMAIN) {
/* If we had an exactmatch on the name, we found the
- * name in our authority database, so this couldn't
+ * name in our authority database, so this couldn't
* have been a bad name. INVALID data, say so
*/
if (exactmatch)
@@ -177,7 +177,7 @@ validate(dname, server, type, class, data, dlen
}
#endif
if (!strcasecmp(dname, np->n_dname)) {
-
+
/* if the name we seek is the same as that we have ns
* records for, compare the data we have to see if it
* matches. if it does, return valid_no_cache, if it
@@ -188,7 +188,7 @@ validate(dname, server, type, class, data, dlen
else
return (INVALID);
}
-
+
/* we found ns records in a higher level, if we were unable to
* locate the exact name earlier, it means we are
* authoritative for this domain but do not have records for
@@ -196,7 +196,7 @@ validate(dname, server, type, class, data, dlen
*/
if (!exactmatch)
return (INVALID);
-
+
/* we found the exact name earlier and we are obviously
* authoritative so check for data records and see if any
* match.
@@ -205,7 +205,7 @@ validate(dname, server, type, class, data, dlen
return (VALID_NO_CACHE);
else
return (INVALID);
-
+
case SERVFAIL:/* could not find name server records*/
/* stick_in_queue(dname, type, class, data); */
if (needs_prime_cache)
@@ -214,7 +214,7 @@ validate(dname, server, type, class, data, dlen
free_nsp(nsp);
#endif
return (INVALID);
-
+
case OK: /*proceed */
dprintf(5,
(ddt,
@@ -243,7 +243,7 @@ validate(dname, server, type, class, data, dlen
} /*validate*/
/***********************************************************************
- * validate rr returned by somebody against your own database, if you are
+ * validate rr returned by somebody against your own database, if you are
* authoritative for the information. if you have a record that matches,
* return 1, else return 0. validate() above will use this and determine
* if the record should be returned/discarded.
@@ -256,10 +256,10 @@ isvalid(np, type, class, data, dlen)
int dlen;
{
register struct databuf *dp;
-
+
for (dp = np->n_data; dp != NULL; dp = dp->d_next) {
if (!wanted(dp, class, type)) {
- if ((type == T_CNAME) && (class == dp->d_class)) {
+ if ((type == T_CNAME) && (class == dp->d_class)) {
/* if a cname exists, any other will not */
return (0);
/* we come here only for zone info,
@@ -268,9 +268,9 @@ isvalid(np, type, class, data, dlen)
}
continue;
}
- /* type and class match, if i get here
+ /* type and class match, if i get here
* let's now compare the data section, per RR type
- */
+ */
/* unless, of course, the data was negative, in which case
* we should return FAILURE since we should not have found
@@ -278,7 +278,7 @@ isvalid(np, type, class, data, dlen)
*/
if ((data == NULL) || (dlen == 0))
return (0);
-
+
/* XXX: why aren't we just calling db_cmp()? */
switch (type) {
@@ -319,7 +319,7 @@ isvalid(np, type, class, data, dlen)
if (x == 0)
return (1);
else
- break;
+ break;
case T_MINFO:
case T_SOA:
@@ -327,16 +327,16 @@ isvalid(np, type, class, data, dlen)
/* compare first string */
x = strncasecmp((char *)dp->d_data, data,
strlen(data) + 1);
- if (x != 0)
+ if (x != 0)
break;
/* move to second string */
td = data + (strlen(data) + 1);
- tdp = dp->d_data +
+ tdp = dp->d_data +
(strlen((char *)dp->d_data)+1);
/* compare second string */
- x = strncasecmp(td, (char *)tdp,
+ x = strncasecmp(td, (char *)tdp,
strlen((char *)td+1));
if (x != 0)
break;
@@ -355,7 +355,7 @@ isvalid(np, type, class, data, dlen)
if (x != 0)
break;
}
-
+
/* everything was equal, wow!
* so return a success
*/
@@ -370,7 +370,7 @@ isvalid(np, type, class, data, dlen)
break;
td = data + INT16SZ;
tdp = dp->d_data + INT16SZ;
- x = strncasecmp(td, (char *)tdp,
+ x = strncasecmp(td, (char *)tdp,
strlen((char *)td) + 1);
if (x != 0)
break;
@@ -391,7 +391,7 @@ isvalid(np, type, class, data, dlen)
break;
td += (strlen(td) + 1);
tdp += (strlen(tdp) + 1);
-
+
/* compare second string */
x = strncasecmp(td, (char *)tdp,
strlen((char *)td+1));
@@ -412,7 +412,7 @@ isvalid(np, type, class, data, dlen)
if ((data == NULL) || (dlen == 0)) {
/* negative data, report success */
return (1);
- }
+ }
/* positive data, no such RR, validation failed */
return (0);
}
@@ -420,8 +420,8 @@ isvalid(np, type, class, data, dlen)
/******************************************************************
* get a list of databufs that have ns addresses for the closest domain
* you know about, get their addresses and confirm that server indeed
- * is one of them. if yes return 1 else 0.
- * first checks the cache that we build in nslookup() earlier
+ * is one of them. if yes return 1 else 0.
+ * first checks the cache that we build in nslookup() earlier
* when we ns_forw(). if unableto find it there, it checks the entire
* hash table to do address translations.
*******************************************************************/
@@ -437,7 +437,7 @@ check_addr_ns(nsp, server, dname)
struct databuf **nsdp;
dprintf(5, (ddt,
- "check_addr_ns: s:[%s], db:0x%x, d:\"%s\"\n",
+ "check_addr_ns: s:[%s], db:0x%x, d:\"%s\"\n",
inet_ntoa(*saddr), nsp, dname));
for(i = lastNA; i != firstNA; i = (i+1) % MAXNAMECACHE) {
@@ -471,7 +471,7 @@ check_addr_ns(nsp, server, dname)
}
/*************************************************************************
- * checks in hash tables for the address of servers whose name is in the
+ * checks in hash tables for the address of servers whose name is in the
* data section of nsp records. borrows code from nslookup()/ns_forw.c
* largely.
*************************************************************************/
@@ -487,10 +487,10 @@ check_in_tables(nsp, server, syslogdname)
char *dname, *fname;
int class;
int qcomp();
-
+
dprintf(3, (ddt, "check_in_tables(nsp=x%x,qp=x%x,'%s')\n",
nsp, server, syslogdname));
-
+
while ((nsdp = *nsp++) != NULL) {
class = nsdp->d_class;
dname = (char *)nsdp->d_data;
@@ -579,7 +579,7 @@ store_name_addr(servername, serveraddr, syslogdname, sysloginfo)
(char *)malloc((unsigned)strlen(servername)+1);
strcpy(nameaddrlist[i].nsname, servername);
return;
- }
+ }
}
/* we have to add this one to our cache */
@@ -607,9 +607,9 @@ store_name_addr(servername, serveraddr, syslogdname, sysloginfo)
* Decode the resource record 'rrp' and validate the RR.
* Borrows code almost entirely from doupdate(). is a rather
* non-invasive routine since it just goes thru the same motions
- * as doupdate but just marks the array validatelist entry as
+ * as doupdate but just marks the array validatelist entry as
* the return code from validate(). This is later used in doupdate
- * to cache/not cache the entry. also used in update_msg() to
+ * to cache/not cache the entry. also used in update_msg() to
* delete/keep the record from the outgoing message.
*/
int
@@ -758,7 +758,7 @@ dovalidate(msg, msglen, rrp, zone, flags, server, VCode)
cp += n;
cp1 += (n = strlen((char *)cp1) + 1);
n1 = sizeof(data) - n;
-
+
/* get second name */
n = dn_expand(msg, msg + msglen, cp, (char *)cp1, n1);
if (n < 0) {
@@ -921,7 +921,7 @@ update_msg(msg, msglen, Vlist, c)
}
#endif
/* just making sure we do not do all the work for nothing */
- for (i=0; i<c; i++) {
+ for (i=0; i<c; i++) {
if (Vlist[i] == INVALID) {
inv = 1;
break;
@@ -1007,7 +1007,7 @@ update_msg(msg, msglen, Vlist, c)
newlen += (n_new+2*INT16SZ);
rembuflen -= (n_new+2*INT16SZ);
/* have to decode and copy every Valid RR from here */
-
+
cp = msg +HFIXEDSZ +qlen; /*skip header and query section*/
for (i = 0; i < c; i++) {
if (Vlist[i] == INVALID) {
@@ -1021,7 +1021,7 @@ update_msg(msg, msglen, Vlist, c)
hp->rcode = FORMERR;
goto badend;
}
- n_new = dn_comp(dname, newcp, rembuflen, dnptrs, edp);
+ n_new = dn_comp(dname, newcp, rembuflen, dnptrs, edp);
if (n_new < 0)
goto badend;
cp += n;
@@ -1157,7 +1157,7 @@ update_msg(msg, msglen, Vlist, c)
bcopy(cp,newcp,INT16SZ);
cp += INT16SZ;
newcp += INT16SZ;
-
+
/* get name */
n = dn_expand(msg, eom, cp, (char *)data, sizeof data);
if (n < 0) {
@@ -1230,7 +1230,7 @@ update_msg(msg, msglen, Vlist, c)
}
*msglen = newlen;
free((char *)newmsg);
-
+
#ifdef DEBUG
if (debug >= 10)
fp_nquery(msg, *msglen, ddt);
diff --git a/usr.sbin/named/options.h b/usr.sbin/named/options.h
index 8461389..af29ae4 100644
--- a/usr.sbin/named/options.h
+++ b/usr.sbin/named/options.h
@@ -1,15 +1,15 @@
/* options.h - specify the conditionally-compiled features
* vix 28mar92 [moved out of the Makefile because they were getting too big]
*
- * $Id: options.h,v 4.9.1.16 1994/07/22 08:42:30 vixie Exp $
+ * $Id: options.h,v 8.4 1995/06/29 09:25:56 vixie Exp $
*/
/*
* ++Copyright++
* -
- * Copyright (c)
+ * 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:
@@ -25,7 +25,7 @@
* 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
@@ -39,14 +39,14 @@
* 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
@@ -70,47 +70,55 @@
* 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 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 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 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 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 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) */
-/*#define SHORT_FNAMES /* file names used in named-xfer need to be short */
+/*#define VALIDATE*/ /* validation procedure (anant@isi.edu) (DO NOT USE!)*/
+/*#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) (EXP) */
-/*#define SUNSECURITY /* obscure fix for sunos (see below) */
+#define STUBS /* allow transfers of NS only for a zone (mpa) */
+#ifndef LOGFAC
#define LOGFAC LOG_DAEMON /* what syslog facility should named use? */
-/*#define SECURE_ZONES /* if you want to inhibit world access to zone(s) */
+#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 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_WARNING /* 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 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 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 (draft) LOC record parsing (ckd) */
/*--------------------------------------------*
* no user-servicable parts beyond this point *
@@ -149,12 +157,10 @@
# endif
#endif
-#if defined(SUNOS4) || (defined(sun) && defined(SYSV))
-# ifndef SUNSECURITY
-# define SUNSECURITY /* mandatory on suns and rlogin etc. depend on this */
-# endif
-#endif
-
#ifdef LAME_LOGGING
# define LAME_DELEGATION
#endif
+
+#if defined(XSTATS) && !defined(STATS)
+# define STATS
+#endif
diff --git a/usr.sbin/named/pathnames.h b/usr.sbin/named/pathnames.h
index 7ded7d2..5adf1a2 100644
--- a/usr.sbin/named/pathnames.h
+++ b/usr.sbin/named/pathnames.h
@@ -1,6 +1,6 @@
/*
* @(#)pathnames.h 5.4 (Berkeley) 6/1/90
- * $Id: pathnames.h,v 8.1 1994/12/15 06:24:14 vixie Exp $
+ * $Id: pathnames.h,v 1.1.1.1 1994/09/22 19:46:13 pst Exp $
*/
/*
@@ -8,7 +8,7 @@
* -
* Copyright (c) 1989
* 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:
@@ -24,7 +24,7 @@
* 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
@@ -38,14 +38,14 @@
* 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
diff --git a/usr.sbin/named/portability.h b/usr.sbin/named/portability.h
index 1aeb233..942b285 100644
--- a/usr.sbin/named/portability.h
+++ b/usr.sbin/named/portability.h
@@ -1,15 +1,15 @@
-/* defs.h - include or define things that aren't present on all systems
+/* portability.h - include or define things that aren't present on all systems
* vixie@decwrl 26dec92 [new]
*
- * $Id: portability.h,v 4.9.1.24 1994/07/22 08:42:30 vixie Exp $
+ * $Id: portability.h,v 8.8 1995/06/29 09:25:56 vixie Exp $
*/
/*
* ++Copyright++
* -
- * Copyright (c)
+ * 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:
@@ -25,7 +25,7 @@
* 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
@@ -39,14 +39,14 @@
* 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
@@ -69,6 +69,22 @@
# 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
@@ -85,6 +101,14 @@
# 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? */
@@ -109,13 +133,26 @@
# define BSD 43
#endif
-#if defined(_POSIX_SOURCE) || defined(__sgi) || defined(ultrix) || \
+#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)
+#if defined(__ultrix) && !defined(BSD)
# define BSD 42
#endif
@@ -123,28 +160,50 @@
# define RISCOS_BSD
#endif
-#if defined(SVR4) && !defined(SYSV)
-# define SYSV
+#if defined(SYSV) || defined(__ultrix) || defined(__osf__) \
+ || (defined(BSD) && BSD >= 199306) || defined(linux)
+# define USE_UTIME
+# define HAVE_SETVBUF
#endif
-#if defined(SYSV) || defined(ultrix) || (defined(BSD) && BSD >= 199306)
-# define USE_UTIME
+#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__*/
-# ifndef SYSV
-# define USE_UTIME
-# define setlinebuf(x) setvbuf(x, NULL, _IOLBF, BUFSIZ)
-# define SIGWINCH SIGWINDOW
+# 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_)
@@ -219,6 +278,10 @@ extern long pathconf __P((const char *path, int name));
# 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
@@ -245,8 +308,10 @@ int strcasecmp __P((const char *, const char *));
!defined(NeXT) && \
!defined(__convex__) && \
!defined(USE_POSIX)
-extern void syslog();
-extern char *ctime __P((const time_t *clock));
+# 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();
@@ -260,7 +325,11 @@ extern int close(), setitimer(), recv(), sendto(), sigsetmask(),
* 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
@@ -274,19 +343,27 @@ extern int bcmp();
&& !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)
+# if !defined(__ultrix) && !defined(apollo)
# define NEED_STRCASECMP
# define NEED_MKTEMP
-# define NEED_STRPBRK
+# if !defined(SVR4)
+# define NEED_STRPBRK
+# endif
# endif
#endif
@@ -302,7 +379,7 @@ extern int bcmp();
#ifndef SIG_FN
# ifdef BSD
# if (BSD >= 199006) || defined(NeXT) || defined(__osf__) || defined(sun) \
- || defined(ultrix) || defined(apollo) || defined(POSIX_SIGNALS)
+ || 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 */
@@ -319,7 +396,7 @@ extern u_long htonl(), ntohl();
#endif
#if defined(USE_POSIX) && !defined(sun) && !defined(__sgi) \
- && !defined(__convex__) && !defined(ultrix)
+ && !defined(__convex__) && !defined(__ultrix) && !defined(_AUX_SOURCE)
# define PORT_NONBLOCK O_NONBLOCK
# define PORT_WOULDBLK EAGAIN
#else
@@ -339,7 +416,7 @@ extern u_long htonl(), ntohl();
#define waitpid(x,y,z) (wait3(y,z,(struct rusage *)NULL))
#endif
-#if defined(NeXT) || defined(_AIX)
+#if defined(NeXT) || defined(_AIX) || defined(sun386)
# undef WIFEXITED
# undef WEXITSTATUS
# undef WIFSIGNALED
@@ -352,13 +429,13 @@ extern u_long htonl(), ntohl();
#endif /* sequent */
#if !defined(WIFEXITED)
-# define WIFEXITED(x) (!(x & 0200))
+# define WIFEXITED(x) (!(x & 0177))
#endif
#if !defined(WEXITSTATUS)
# define WEXITSTATUS(x) (x >> 8)
#endif
#if !defined(WIFSIGNALED)
-# define WIFSIGNALED(x) ((x & 0200) && ((x & 0200) != 0177))
+# define WIFSIGNALED(x) ((x & 0177) && ((x & 0377) != 0177))
#endif
#if !defined(WTERMSIG)
# define WTERMSIG(x) (x & 0177)
@@ -394,11 +471,12 @@ extern u_long htonl(), ntohl();
# define S_ISFIFO(m) ((m & S_IFMT) == S_IFIFO)
#endif
-#if (defined(ultrix) || defined(__osf__)) && defined(NEED_STRTOUL)
+#if defined(NEED_STRTOUL) && \
+ (defined(__ultrix) || defined(__osf__) || defined(NeXT))
# undef NEED_STRTOUL
#endif
-#if defined(ultrix) || defined(__osf__)
+#if defined(__ultrix) || defined(__osf__)
# define MAYBE_HESIOD
#endif
@@ -428,6 +506,15 @@ extern u_long htonl(), ntohl();
# 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
@@ -437,6 +524,10 @@ extern u_long htonl(), ntohl();
# 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.
*/
diff --git a/usr.sbin/named/storage.c b/usr.sbin/named/storage.c
index 6ae2163..15623f4 100644
--- a/usr.sbin/named/storage.c
+++ b/usr.sbin/named/storage.c
@@ -3,7 +3,7 @@
* -
* Copyright (c) 1985, 1989
* 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:
@@ -19,7 +19,7 @@
* 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
@@ -33,14 +33,14 @@
* 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
@@ -56,8 +56,8 @@
#include <sys/param.h>
#include <syslog.h>
-#include "../conf/portability.h"
-#include "../conf/options.h"
+#include "portability.h"
+#include "options.h"
extern void panic __P((int, const char *));
#ifdef DSTORAGE
@@ -74,18 +74,18 @@ extern void panic __P((int, const char *));
*
* Author -
* Michael John Muuss
- *
+ *
* Source -
* SECAD/VLD Computing Consortium, Bldg 394
* The U. S. Army Ballistic Research Laboratory
* Aberdeen Proving Ground, Maryland 21005-5066
- *
+ *
* Copyright Notice -
* This software is Copyright (C) 1987 by the United States Army.
* All rights reserved.
*/
#ifndef lint
-static char RCSid[] = "$Id: storage.c,v 8.1 1994/12/15 06:24:14 vixie Exp $";
+static char RCSid[] = "$Id: storage.c,v 1.3 1995/05/30 03:49:05 rgrimes Exp $";
#endif
#undef malloc
@@ -159,7 +159,7 @@ char *ptr;
/*
* R T _ P R M E M
- *
+ *
* Print map of memory currently in use.
*/
void
diff --git a/usr.sbin/named/tools/Makefile b/usr.sbin/named/tools/Makefile
new file mode 100644
index 0000000..fa23e68
--- /dev/null
+++ b/usr.sbin/named/tools/Makefile
@@ -0,0 +1,5 @@
+# @(#)Makefile 4.10 (Berkeley) 5/29/90
+
+SUBDIR= named.reload named.restart ndc
+
+.include <bsd.subdir.mk>
diff --git a/usr.sbin/named/tools/named.reload/Makefile b/usr.sbin/named/tools/named.reload/Makefile
new file mode 100644
index 0000000..bb71c64
--- /dev/null
+++ b/usr.sbin/named/tools/named.reload/Makefile
@@ -0,0 +1,22 @@
+# @(#)Makefile 5.1 (Berkeley) 5/28/90
+
+MAN8= named.reload.8
+CLEANFILES+=named.reload
+
+PIDDIR=/var/run
+INDOT=
+DESTSBIN=${DESTDIR}${BINDIR}
+
+beforeinstall:
+ ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 555 \
+ named.reload ${DESTDIR}${BINDIR}
+
+all: named.reload
+
+named.reload: named.reload.sh Makefile
+ sed -e "s|%DESTSBIN%|${DESTSBIN}|" \
+ -e "s|%INDOT%|${INDOT}|" \
+ < ${.CURDIR}/named.reload.sh > named.reload
+
+.include "${.CURDIR}/../../../Makefile.inc"
+.include <bsd.prog.mk>
diff --git a/usr.sbin/named/tools/named.reload/named.reload.8 b/usr.sbin/named/tools/named.reload/named.reload.8
index b838ea0..81cc84d 100644
--- a/usr.sbin/named/tools/named.reload/named.reload.8
+++ b/usr.sbin/named/tools/named.reload/named.reload.8
@@ -53,17 +53,17 @@
.\"
.\" from hostname.7 6.4 (Berkeley) 1/16/90
.\"
-.TH @INDOT_U@NAMED.RELOAD @SYS_OPS_EXT_U@ "June 26, 1993"
+.TH NAMED.RELOAD 8 "June 26, 1993"
.UC 5
.SH NAME
-@INDOT@named.reload \- cause the name server to synchronize its database
+named.reload \- cause the name server to synchronize its database
.SH DESCRIPTION
This command sends a \s-1SIGHUP\s+1 to the running name server. This
signal is documented in
-.IR named (@SYS_OPS_EXT@).
+.IR named (8).
.SH BUGS
Does not check to see if the name server is actually running, and could
use a stale PID cache file which may result in the death of an unrelated
process.
.SH SEE ALSO
-@INDOT@named(@SYS_OPS_EXT@), @INDOT@named.restart(@SYS_OPS_EXT@)
+named(8), named.restart(8)
diff --git a/usr.sbin/named/tools/named.reload/named.reload.sh b/usr.sbin/named/tools/named.reload/named.reload.sh
index 0b6495a..c800023 100644
--- a/usr.sbin/named/tools/named.reload/named.reload.sh
+++ b/usr.sbin/named/tools/named.reload/named.reload.sh
@@ -1,7 +1,7 @@
#!/bin/sh -
#
# from named.reload 5.2 (Berkeley) 6/27/89
-# $Id: named.reload.sh,v 8.1 1994/12/15 06:24:14 vixie Exp $
+# $Id: named.reload.sh,v 1.2 1994/09/22 20:45:23 pst Exp $
#
exec %DESTSBIN%/%INDOT%ndc reload
diff --git a/usr.sbin/named/tools/named.restart/Makefile b/usr.sbin/named/tools/named.restart/Makefile
new file mode 100644
index 0000000..4c3a700
--- /dev/null
+++ b/usr.sbin/named/tools/named.restart/Makefile
@@ -0,0 +1,23 @@
+# @(#)Makefile 5.1 (Berkeley) 5/28/90
+# $Id: Makefile,v 1.4 1995/07/25 00:37:31 bde Exp $
+
+MAN8= named.restart.8
+CLEANFILES+=named.restart
+
+PIDDIR=/var/run
+INDOT=
+DESTSBIN=${DESTDIR}${DESTBIN}
+
+beforeinstall:
+ ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 555 \
+ named.restart ${DESTDIR}${BINDIR}
+
+all: named.restart
+
+named.restart: named.restart.sh Makefile
+ sed -e "s|%INDOT%|${INDOT}|" \
+ -e "s|%DESTSBIN%|${BINDIR}|" \
+ < ${.CURDIR}/named.restart.sh > named.restart
+
+.include "${.CURDIR}/../../../Makefile.inc"
+.include <bsd.prog.mk>
diff --git a/usr.sbin/named/tools/named.restart/named.restart.8 b/usr.sbin/named/tools/named.restart/named.restart.8
index 034bebd..2e66615 100644
--- a/usr.sbin/named/tools/named.restart/named.restart.8
+++ b/usr.sbin/named/tools/named.restart/named.restart.8
@@ -52,14 +52,17 @@
.\" --Copyright--
.\"
.\" from hostname.7 6.4 (Berkeley) 1/16/90
+.\" $Id$
.\"
-.TH @INDOT_U@NAMED.RESTART @SYS_OPS_EXT_U@ "June 26, 1993"
+.TH NAMED.RESTART 8 "May 2, 1995"
.UC 5
.SH NAME
-@INDOT@named.restart \- stop and restart the name server
+named.restart \- stop and restart the name server
.SH DESCRIPTION
This command sends a \s-1SIGKILL\s+1 to the running name server and then
-starts a new one.
+starts a new one if
+.IR /etc/sysconfig
+states that one should be running on this system.
.SH BUGS
Does not check to see if the name server is actually running, and could
use a stale PID cache file which may result in the death of an unrelated
@@ -70,4 +73,4 @@ the server could take some time to die and the new one will experience a
fatal error if the old one isn't gone by the time it starts, you can be left
in a situation where you have no name server at all.
.SH SEE ALSO
-@INDOT@named(@SYS_OPS_EXT@), @INDOT@named.reload(@SYS_OPS_EXT@)
+named(8), named.reload(8)
diff --git a/usr.sbin/named/tools/named.restart/named.restart.sh b/usr.sbin/named/tools/named.restart/named.restart.sh
index 4d073e6..eb4c7ec 100644
--- a/usr.sbin/named/tools/named.restart/named.restart.sh
+++ b/usr.sbin/named/tools/named.restart/named.restart.sh
@@ -1,7 +1,7 @@
#!/bin/sh -
#
# from named.restart 5.4 (Berkeley) 6/27/89
-# $Id: named.restart.sh,v 8.1 1994/12/15 06:24:14 vixie Exp $
+# $Id: named.restart.sh,v 1.3 1995/05/03 03:26:59 rgrimes Exp $
#
exec %DESTSBIN%/%INDOT%ndc restart
diff --git a/usr.sbin/named/tools/ndc/Makefile b/usr.sbin/named/tools/ndc/Makefile
new file mode 100644
index 0000000..043d510
--- /dev/null
+++ b/usr.sbin/named/tools/ndc/Makefile
@@ -0,0 +1,25 @@
+MAN8= ndc.8
+CLEANFILES+=ndc
+
+PIDDIR=/var/run
+INDOT=
+PS=ps
+IOT=IOT
+DESTSBIN=${DESTDIR}${BINDIR}
+
+beforeinstall:
+ ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 555 \
+ ndc ${DESTDIR}${BINDIR}
+
+all: ndc
+
+ndc: ndc.sh Makefile
+ sed -e "s|%DESTSBIN%|${DESTSBIN}|" \
+ -e "s|%INDOT%|${INDOT}|" \
+ -e "s|%PIDDIR%|${PIDDIR}|" \
+ -e "s|%PS%|${PS}|" \
+ -e "s|%IOT%|${IOT}|" \
+ < ${.CURDIR}/ndc.sh > ndc
+
+.include "${.CURDIR}/../../../Makefile.inc"
+.include <bsd.prog.mk>
diff --git a/usr.sbin/named/tools/nsquery/Makefile b/usr.sbin/named/tools/nsquery/Makefile
new file mode 100644
index 0000000..5263aa1
--- /dev/null
+++ b/usr.sbin/named/tools/nsquery/Makefile
@@ -0,0 +1,7 @@
+# @(#)Makefile 5.1 (Berkeley) 5/28/90
+
+PROG= nsquery
+NOMAN= noman
+
+.include "../../../Makefile.inc"
+.include <bsd.prog.mk>
diff --git a/usr.sbin/named/tools/nsquery/nsquery.c b/usr.sbin/named/tools/nsquery/nsquery.c
index c7ff6eb..c1ac28e 100644
--- a/usr.sbin/named/tools/nsquery/nsquery.c
+++ b/usr.sbin/named/tools/nsquery/nsquery.c
@@ -3,7 +3,7 @@
* -
* Copyright (c) 1986
* 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:
@@ -19,7 +19,7 @@
* 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
@@ -33,14 +33,14 @@
* 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
@@ -62,7 +62,7 @@ char copyright[] =
#ifndef lint
static char sccsid[] = "@(#)nsquery.c 4.8 (Berkeley) 6/1/90";
-static char rcsid[] = "$Id: nsquery.c,v 4.9.1.4 1994/06/11 22:05:07 vixie Exp $";
+static char rcsid[] = "$Id: nsquery.c,v 1.2 1994/09/22 20:45:28 pst Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -73,7 +73,7 @@ static char rcsid[] = "$Id: nsquery.c,v 4.9.1.4 1994/06/11 22:05:07 vixie Exp $"
#include <stdio.h>
#include <netdb.h>
#include <resolv.h>
-#include "../conf/portability.h"
+#include <string.h>
main(argc, argv)
int argc;
diff --git a/usr.sbin/named/tools/nstest/Makefile b/usr.sbin/named/tools/nstest/Makefile
new file mode 100644
index 0000000..e976d52
--- /dev/null
+++ b/usr.sbin/named/tools/nstest/Makefile
@@ -0,0 +1,7 @@
+# @(#)Makefile 5.1 (Berkeley) 5/28/90
+
+PROG= nstest
+NOMAN= noman
+
+.include "../../../Makefile.inc"
+.include <bsd.prog.mk>
diff --git a/usr.sbin/named/tools/nstest/nstest.c b/usr.sbin/named/tools/nstest/nstest.c
index f20388d..d40e748 100644
--- a/usr.sbin/named/tools/nstest/nstest.c
+++ b/usr.sbin/named/tools/nstest/nstest.c
@@ -3,7 +3,7 @@
* -
* Copyright (c) 1986
* 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:
@@ -19,7 +19,7 @@
* 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
@@ -33,14 +33,14 @@
* 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
@@ -62,7 +62,7 @@ char copyright[] =
#ifndef lint
static char sccsid[] = "@(#)nstest.c 4.15 (Berkeley) 3/21/91";
-static char rcsid[] = "$Id: nstest.c,v 4.9.1.6 1994/06/01 21:10:11 vixie Exp $";
+static char rcsid[] = "$Id: nstest.c,v 1.2 1994/09/22 20:45:31 pst Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -72,7 +72,6 @@ static char rcsid[] = "$Id: nstest.c,v 4.9.1.6 1994/06/01 21:10:11 vixie Exp $";
#include <arpa/nameser.h>
#include <stdio.h>
#include <resolv.h>
-#include "../conf/portability.h"
char *progname;
FILE *log;
diff --git a/usr.sbin/named/tree.c b/usr.sbin/named/tree.c
index 58607ea..98988e7 100644
--- a/usr.sbin/named/tree.c
+++ b/usr.sbin/named/tree.c
@@ -93,7 +93,7 @@ tree_init(ppr_tree)
*ppr_tree = NULL;
RETV
}
-
+
tree_t
tree_srch(ppr_tree, pfi_compare, p_user)
diff --git a/usr.sbin/named/tree.h b/usr.sbin/named/tree.h
index 7d027b9..030a928 100644
--- a/usr.sbin/named/tree.h
+++ b/usr.sbin/named/tree.h
@@ -3,7 +3,7 @@
* vix 22jan93 [revisited; uses RCS, ANSI, POSIX; has bug fixes]
* vix 27jun86 [broken out of tree.c]
*
- * $Id: tree.h,v 8.1 1994/12/15 06:24:14 vixie Exp $
+ * $Id: tree.h,v 1.1.1.2 1995/08/18 21:16:28 peter Exp $
*/
diff --git a/usr.sbin/named/xfer/Makefile b/usr.sbin/named/xfer/Makefile
new file mode 100644
index 0000000..cbc8c82
--- /dev/null
+++ b/usr.sbin/named/xfer/Makefile
@@ -0,0 +1,23 @@
+# @(#)Makefile 5.1 (Berkeley) 5/28/90
+
+PROG= named-xfer
+SRCS= named-xfer.c db_glue.c
+OBJS+= version.o
+CLEANFILES+=version.c version.o
+CFLAGS+=-I${.CURDIR}/..
+.PATH: ${.CURDIR}/..
+BINDIR= /usr/libexec
+MAN8= named-xfer.8
+
+
+VER = LOCAL-`date +%y%m%d.%H%M%S`
+
+version.c: ${.CURDIR}/../Version.c ${.CURDIR}/Makefile ${SRCS}
+ (u=$${USER-root} d=`pwd |sed -e 's|/obj/|/src/|'` \
+ h=`hostname` t=`date`; \
+ sed -e "s|%WHEN%|$${t}|" -e "s|%VERSION%|"${VER}"|" \
+ -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
+ < ${.CURDIR}/../Version.c > version.c)
+
+.include "../../Makefile.inc"
+.include <bsd.prog.mk>
diff --git a/usr.sbin/named/xfer/named-xfer.8 b/usr.sbin/named/xfer/named-xfer.8
index 54ae2be..6c80185 100644
--- a/usr.sbin/named/xfer/named-xfer.8
+++ b/usr.sbin/named/xfer/named-xfer.8
@@ -53,10 +53,10 @@
.\"
.\" from named.8 6.6 (Berkeley) 2/14/89
.\"
-.TH @XFER_INDOT_U@NAMED-XFER @SYS_OPS_EXT_U@ "June 26, 1993"
+.TH NAMED-XFER 8 "June 26, 1993"
.UC 4
.SH NAME
-@XFER_INDOT@named-xfer \- ancillary agent for inbound zone transfers
+named-xfer \- ancillary agent for inbound zone transfers
.SH SYNOPSIS
.B named-xfer
.B \-z
@@ -85,7 +85,7 @@
.SH DESCRIPTION
.I Named-xfer
is an ancillary program executed by
-.IR @INDOT@named (@SYS_OPS_EXT@)
+.IR named (8)
to perform an inbound zone transfer. It is rarely executed directly, and
only by system administrators who are trying to debug a zone transfer problem.
See RFC's 1033, 1034, and 1035 for more information on the Internet
@@ -127,13 +127,13 @@ server itself.
.TP
.B \-p
Use a different port number. The default is the standard port number
-as returned by getservbyname(@LIB_NETWORK_EXT@) for service ``domain''.
+as returned by getservbyname(3) for service ``domain''.
.TP
.B \-S
Perform a restricted transfer of only the SOA, NS records and glue A records
for the zone. The SOA record will not be loaded by named but will be used to
determine when to verify the NS records. See the ``stubs'' directive in
-.IR @INDOT@named (@SYS_OPS_EXT@)
+.IR named (8)
for more information.
.PP
Additional arguments are taken as name server addresses in so-called
@@ -141,6 +141,6 @@ Additional arguments are taken as name server addresses in so-called
one address must be specified. Any additional addresses will be tried
in order if the first one fails to transfer to us successfully.
.SH "SEE ALSO"
-@INDOT@named(@SYS_OPS_EXT@), resolver(@LIB_NETWORK_EXT@), resolver(@FORMAT_EXT@), hostname(@DESC_EXT@),
+named(8), resolver(3), resolver(5), hostname(7),
RFC 882, RFC 883, RFC 973, RFC 974, RFC 1033, RFC 1034, RFC 1035, RFC 1123,
\fIName Server Operations Guide for \s-1BIND\s+1\fR
diff --git a/usr.sbin/named/xfer/named-xfer.c b/usr.sbin/named/xfer/named-xfer.c
index 679be16..f9533a7 100644
--- a/usr.sbin/named/xfer/named-xfer.c
+++ b/usr.sbin/named/xfer/named-xfer.c
@@ -11,7 +11,7 @@
* -
* Copyright (c) 1988, 1990
* 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:
@@ -27,7 +27,7 @@
* 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
@@ -41,14 +41,14 @@
* 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
@@ -70,7 +70,7 @@ char copyright[] =
#if !defined(lint) && !defined(SABER)
static char sccsid[] = "@(#)named-xfer.c 4.18 (Berkeley) 3/7/91";
-static char rcsid[] = "$Id: named-xfer.c,v 8.9 1995/06/29 09:26:17 vixie Exp $";
+static char rcsid[] = "$Id: named-xfer.c,v 1.3 1995/05/30 03:49:10 rgrimes Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -79,6 +79,7 @@ static char rcsid[] = "$Id: named-xfer.c,v 8.9 1995/06/29 09:26:17 vixie Exp $";
#include <sys/socket.h>
#include <netinet/in.h>
+#include <netiso/iso.h>
#if defined(__osf__)
# include <sys/mbuf.h>
# include <net/route.h>
@@ -211,7 +212,7 @@ main(argc, argv)
case 'z': /* zone == domain */
domain = optarg;
domain_len = strlen(domain);
- while ((domain_len > 0) &&
+ while ((domain_len > 0) &&
(domain[domain_len-1] == '.'))
domain[--domain_len] = '\0';
break;
@@ -348,7 +349,7 @@ main(argc, argv)
buildprotolist();
/* init zone data */
-
+
zp = &zone;
#ifdef STUBS
if (stub_only)
@@ -434,7 +435,7 @@ main(argc, argv)
}
/*NOTREACHED*/
}
-
+
static char *UsageText[] = {
"\t-z zone_to_transfer\n",
"\t-f db_file\n",
@@ -559,7 +560,7 @@ getzone(zp, serial_no, port)
syslog(LOG_INFO, "socket: %m");
error++;
break;
- }
+ }
dprintf(2, (ddt, "connecting to server #%d [%s].%d\n",
cnt+1, inet_ntoa(sin.sin_addr),
ntohs(sin.sin_port)));
@@ -597,7 +598,7 @@ getzone(zp, serial_no, port)
syslog(LOG_INFO, "writemsg: %m");
error++;
(void) my_close(s);
- continue;
+ continue;
}
/*
* Get out your butterfly net and catch the SOA
@@ -756,7 +757,7 @@ getzone(zp, serial_no, port)
type = T_SOA;
else if (!nscnt)
type = T_NS;
- else
+ else
type = T_SOA;
} else
#endif
@@ -798,7 +799,7 @@ getzone(zp, serial_no, port)
"writemsg: %m");
error++;
(void) my_close(s);
- break;
+ break;
}
}
/*
@@ -874,7 +875,7 @@ getzone(zp, serial_no, port)
error++;
break;
}
-
+
} else {
#endif /*STUBS*/
n = print_output(buf, bufsize, cp);
@@ -1027,7 +1028,7 @@ read_alarm()
{
read_interrupted = 1;
}
-
+
static int
netread(fd, buf, len, timeout)
int fd;
@@ -1144,6 +1145,7 @@ print_output(msg, msglen, rrp)
register HEADER *hp = (HEADER *) msg;
u_int32_t addr, ttl;
int i, j, tab, result, class, type, dlen, n1, n;
+ struct iso_addr isoa;
char data[BUFSIZ];
u_char *cp1, *cp2, *temp_ptr;
char *cdata, *origin, *proto, dname[MAXDNAME];
@@ -1350,7 +1352,7 @@ print_output(msg, msglen, rrp)
* that might have been altered by ignored records.
* (This means that we sometimes output unnecessary $ORIGIN
* lines, but that is harmless.)
- *
+ *
* Also update prev_comment now.
*/
if (prev_comment && ignore[0] == '\0') {
@@ -1527,7 +1529,11 @@ print_output(msg, msglen, rrp)
break;
case T_NSAP:
- fprintf(dbfp, "%s\n", inet_nsap_ntoa(n, cp, NULL));
+ isoa.isoa_len = n;
+ if (isoa.isoa_len > sizeof(isoa.isoa_genaddr))
+ isoa.isoa_len = sizeof(isoa.isoa_genaddr);
+ bcopy(cp, isoa.isoa_genaddr, isoa.isoa_len);
+ fprintf(dbfp, "%s\n", iso_ntoa(&isoa));
break;
case T_UINFO:
OpenPOWER on IntegriCloud