Files not in 8.2.2.p5

This commit is contained in:
peter 1999-11-30 03:44:02 +00:00
parent fd08e75766
commit 5241689f0d
3 changed files with 0 additions and 390 deletions

View File

@ -1,83 +0,0 @@
#!/bin/sh
USAGE='echo \
"usage: $0 \
(status|dumpdb|reload|stats|trace|notrace|querylog|start|stop|restart) \
... \
"; exit 1'
PATH=/bin:/usr/bin:/usr/ucb:$PATH; export PATH
PIDFILE=%PIDFILE%
if [ -f $PIDFILE ]
then
PID=`cat $PIDFILE`
PS=`%PS% $PID | tail -1 | grep $PID`
RUNNING=1
[ `echo $PS | wc -w` -ne 0 ] || {
PS="named (pid $PID?) not running"
RUNNING=0
}
else
PS="named (no pid file) not running"
RUNNING=0
fi
for ARG
do
case $ARG in
start|stop|restart)
;;
*)
[ $RUNNING -eq 0 ] && {
echo $PS
exit 1
}
esac
case $ARG in
status) echo "$PS";;
dumpdb) kill -INT $PID && echo Dumping Database;;
reload) kill -HUP $PID && echo Reloading Database;;
stats) kill -ILL $PID && echo Dumping Statistics;;
trace) kill -USR1 $PID && echo Trace Level Incremented;;
notrace) kill -USR2 $PID && echo Tracing Cleared;;
querylog|qrylog) kill -WINCH $PID && echo Query Logging Toggled;;
start)
[ $RUNNING -eq 1 ] && {
echo "$0: start: named (pid $PID) already running"
continue
}
rm -f $PIDFILE
%NAMED% && {
sleep 5
echo Name Server Started
}
;;
stop)
[ $RUNNING -eq 0 ] && {
echo "$0: stop: named not running"
continue
}
kill $PID && {
sleep 5
rm -f $PIDFILE
echo Name Server Stopped
}
;;
restart)
[ $RUNNING -eq 1 ] && {
kill $PID && sleep 5
}
rm -f $PIDFILE
%NAMED% && {
sleep 5
echo Name Server Restarted
}
;;
*) eval "$USAGE";;
esac
done
test -z "$ARG" && eval "$USAGE"
exit 0

View File

@ -1,213 +0,0 @@
.\" Copyright (c) 1996 by Internet Software Consortium
.\"
.\" 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.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
.\" ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
.\" OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
.\" CONSORTIUM 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.
.\"
.\" $Id: dnssigner.1,v 8.2 1997/03/14 02:29:42 vixie Exp $
.\"
.Dd October 25, 1996
.Dt DNSSIGNER @CMD_EXT_U@
.Os BSD 4
.Sh NAME
.Nm dnssigner
.Nd add signatures to DNS zone files
.Sh SYNOPSIS
.Nm dnssigner
.Op Cm signer-name Ar default_signer
.Op Cm boot-file Ar file
.Op Cm debug-file Ar file
.Op Cm out-dir Ar directory
.Op Cm seq-no Ar number
.Oo
.Cm expiration-time
.Oo Po Cm +
.Ns \&|
.Ns Cm =
.Pc Oc
.Ns Ar time
.Oc
.Op Cm hide
.Op Cm noaxfr
.Op Cm nosign
.Op Cm verify
.Op Cm update-zonekey
.Op Fl d Ns Ar level
.Sh DESCRIPTION
.Ic Dnssigner
(Sign DNS zone database) is a tool to generate signatures
for DNS (Domain Name System) resource records. It also generates
NXT records for each zone.
.Pp
.Bl -tag -width Fl
.It Cm signer-name Ar default_signer
Specifies a name of the key to use if no signer is defined using the
.Em Li $SIGNER
directive in the boot files.
.It Cm boot-file Ar file
Specifies the control file for
.Ic dnssigner ,
which is in the same format as the BIND-4
.Pa named.boot
file.
.It Cm debug-file Ar file
Redirect debug output to the specified
.Ar file ;
default is
.Pa signer_out
in the current directory.
.It Cm out-dir Ar directory
Write signed files to thie specified
.Ar directory ;
default is to use
.Pa /tmp .
.Pp
.Sy NOTE :
Specify the full path to this directory; relative paths may not work.
.It Xo Cm expiration-time
.Oo Po Cm +
.Ns \&|
.Ns Cm =
.Pc Oc
.Ns Ar time
.Xc
Time when the signature records are to
expire. Using either
.Dq Cm =
or
.Em no
sign before the
.Ar time
argument
.Po i.e.,
.Do Op Cm =
.Ns Ar time
.Dc
.Pc ,
the
.Ar time
is interpreted as an absolute time in seconds when the records will expire.
.Po Sy NOTE :
All such times are interpreted as Universal Times.
.Pc
With
.Dq Cm +
specified
.Pq i.e., Dq Cm + Ns Ar time ,
the
.Ar time
time is interpreted as an offset into the future.
.Pp
If not specified on the command line, the default
.Cm expiration-time
is 3600*24*30 sec (30 days).
.It Cm seq-no Ar number
Force the serial number in the SOA records to the specified value.
If this parameter is not set, the serial number will be set to a value
based on the current time.
.It Cm hide
This flag will cause NXT records in zones with wildcard
records to point to
.Li *.<zone>
as the next host. The purpose of this
flag is to hide all information about valid names in a zone.
.It Cm noaxfr
Turn of generation of zone transfer signature records,
which validate the transfer of an entire zone.
.It Cm nosign
When this flag is specified, the boot files are read, NXT
records are generated and zone file is written to the output
directory. No SIG records are generated. This flag is useful for
quickly checking the format of the data in the boot files, and to
have boot files sorted into DNSSEC order.
.It Cm verify
When this flag is present,
.Ic dnssigner
will verify all
signed records and print out a confirmation message for each SIG
verified. The main use of this flag is to see how long it takes to
generate each signature.
.It Cm update-zonekey
If this flag is specified, then the zonekeys used
to sign files will be updated with new records. Specify this flag if
one or more of the keys have been updated. If there are no zonekeys
specified in the boot files, this flag will insert them. Omitting
zonekeys will cause primary nameservers to reject the zone.
.It Fl d Ns Ar level
Debug level to use for running
.Ic dnssigner ;
these levels are the same as those used by
.Xr @INDOT_U@NAMED @SYS_OPS_EXT_U@
.El
.Ss DETAILS
.Ic Dnssigner
reads BIND-4
.Pa named.boot
and zone files, adds SIG and NXT
records and writes out the records (to one file per zone, regardless of
how many include files the original zone was in). The files generated by
.Ic dnssigner
are ordinary textual zone files and are then normally
loaded by
.Xr @INDOT_U@NAMED @SYS_OPS_EXT_U@
to serve the zone.
.Ic Dnssigner
\fBrequires that the PRIVATE key(s) reside in the input directory\fP.
.Pp
Making manual changes to the output files is hazardous, because most
changes will invalidate one or more signatures contained therein. This
will cause the zone to fail to load into
.Xr @INDOT_U@NAMED @SYS_OPS_EXT_U@ ,
or will cause subsequent
failures in retrieving records from the zone. It is far better to make
changes in
.Ic dnssigner's
input files, and rerun
.Ic dnssigner .
.Pp
When
.Ic dnssigner
detects a delegation point, it creates a special file
.Pa <zone_name>.PARENT
which contains the RR's the parent zone signs for the
child zone (NS, KEY, NXT). The intent is that the child will include this
file when loading primary nameservers. Similarly, each zone file ends
with the
.Dq Li #include <zone_name>.PARENT
command. The records
in the
.Pa .PARENT
files are omitted from the SIG(AXFR) calculations as these
records usualy are on a different signing cycle.
.Pp
The
.Em Li Dq $SIGNER Op Ar keyname
directive can be used to change signers in a
zone. If
.Ar keyname
is omitted, signing is turned off. Keys are loaded the
first time the keys are accessed. Only records that are signed by the
zone signer (the key that signs the SOA) are included in the SIG(AXFR)
calculation. It is not generally recommended that multiple keys sign
records in the same zone, unless this is useful for dynamic updates.
.Sh ENVIRONMENT
No environmental variables are used.
.Sh SEE ALSO
.Xr @INDOT_U@NAMED @SYS_OPS_EXT_U@ ,
RSAREF documentation,
Internet-Draft
.Em draft-ietf-dnssec-secext-10.txt
on Secure DNS, or its successor.
.Sh AUTHOR
Olafur Gudmundsson (ogud@tis.com)
.Sh ACKNOWLEDGMENTS
The underlying crypto math is done by the RSAREF or BSAFE libraries.

View File

@ -1,94 +0,0 @@
/*
* ++Copyright++ 1995
* -
* Copyright (c) 1995
* 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--
*/
#if defined(LIBC_SCCS) && !defined(lint)
static char rcsid[] = "$Id: hostnamelen.c,v 8.2 1995/08/22 05:01:47 vixie Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/nameser.h>
#include <resolv.h>
#if defined(BSD) && (BSD >= 199103)
# include <string.h>
#else
# include "../conf/portability.h"
#endif
#if defined(USE_OPTIONS_H)
# include <../conf/options.h>
#endif
#ifndef ultrix
int __local_hostname_length_unneeded;
#else
int
local_hostname_length(hostname)
const char *hostname;
{
int len_host, len_domain;
if (!*_res.defdname)
res_init();
len_host = strlen(hostname);
len_domain = strlen(_res.defdname);
if (len_host > len_domain &&
!strcasecmp(hostname + len_host - len_domain, _res.defdname) &&
hostname[len_host - len_domain - 1] == '.')
return (len_host - len_domain - 1);
return (0);
}
#endif