mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-29 03:45:02 +01:00
Compare commits
77
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f8d4987d72 | ||
|
|
b9cef19b93 | ||
|
|
fff5c2eb7b | ||
|
|
891921eee7 | ||
|
|
3d85fb0d3f | ||
|
|
80083f9e6f | ||
|
|
aea51f27c2 | ||
|
|
e84dac32d3 | ||
|
|
a554298d88 | ||
|
|
fa859363fe | ||
|
|
63f872fa99 | ||
|
|
69769f91f1 | ||
|
|
82d4c1675e | ||
|
|
ca8592a606 | ||
|
|
a936ce1f0e | ||
|
|
ab74188ed6 | ||
|
|
a90991d829 | ||
|
|
2d32bfc09e | ||
|
|
8ef493b6bc | ||
|
|
2cadbb916e | ||
|
|
2b44df41d5 | ||
|
|
a424f330df | ||
|
|
215cd1e94a | ||
|
|
ae78dbb3d2 | ||
|
|
c19ac7f749 | ||
|
|
1197436f1f | ||
|
|
f1d4b4220a | ||
|
|
8e935883b3 | ||
|
|
09df75ee8e | ||
|
|
49fdbbfb0e | ||
|
|
aeb3936fe4 | ||
|
|
8141e3844b | ||
|
|
ef622a479c | ||
|
|
71b9c515ce | ||
|
|
1666d9d51f | ||
|
|
5ffeeec163 | ||
|
|
fb031efd86 | ||
|
|
2ee36fda29 | ||
|
|
15e3d4c64e | ||
|
|
8730a0b39f | ||
|
|
b2c1163ace | ||
|
|
3be9b7094a | ||
|
|
25a37d4a42 | ||
|
|
c514221a8d | ||
|
|
09369e8c22 | ||
|
|
db3d677568 | ||
|
|
0e07fcb33b | ||
|
|
8972517206 | ||
|
|
5ec0ccb230 | ||
|
|
819c44ef93 | ||
|
|
e59706e664 | ||
|
|
81dbbd4a0c | ||
|
|
3b23b9351e | ||
|
|
492ec059cf | ||
|
|
bd00f0f74e | ||
|
|
9803afcf5c | ||
|
|
56a8ff8f67 | ||
|
|
fc5d102fb2 | ||
|
|
19fd54b49e | ||
|
|
2fed94e845 | ||
|
|
0013210c70 | ||
|
|
e9461d4fe1 | ||
|
|
16bbcfcff1 | ||
|
|
221edcfcad | ||
|
|
689a28d661 | ||
|
|
47a63880ae | ||
|
|
bbdf1d5a08 | ||
|
|
5c5cd6c8e7 | ||
|
|
e06b1220a2 | ||
|
|
38c321d26d | ||
|
|
ff9b961e77 | ||
|
|
e86ddd2dee | ||
|
|
4c0c736c6f | ||
|
|
831d4a7340 | ||
|
|
ebd3ecd4ba | ||
|
|
55de171837 | ||
|
|
33b165b331 |
No files matched your search
@@ -4,7 +4,7 @@
|
||||
The compilation of software known as FreeBSD is distributed under the
|
||||
following terms:
|
||||
|
||||
Copyright (C) 1992-2007 The FreeBSD Project. All rights reserved.
|
||||
Copyright (C) 1992-2004 The FreeBSD Project. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
$FreeBSD$
|
||||
|
||||
This file documents formal review/approval requirements that have been
|
||||
approved by core.
|
||||
|
||||
subsystem login expires notes
|
||||
--------------------------------------
|
||||
|
||||
Special cases:
|
||||
src/* RELENG_4_* Requires Security Officer approval.
|
||||
src/* RELENG_5_* Requires Security Officer approval.
|
||||
src/* RELENG_6_* Requires Security Officer approval.
|
||||
+82
-51
@@ -1,45 +1,37 @@
|
||||
$FreeBSD$
|
||||
|
||||
Please note that the content of this file is strictly advisory.
|
||||
No locks listed here are valid. The only strict review requirements
|
||||
are granted by core. These are documented in src/LOCKS and enforced
|
||||
by CVSROOT/approvers.
|
||||
|
||||
The source tree is a community effort. However, some folks go to the
|
||||
trouble of looking after particular areas of the tree. In return for
|
||||
their active caretaking of the code it is polite to coordinate changes
|
||||
with them. This is a list of people who have expressed an interest in
|
||||
part of the code or listed their active caretaking role so that other
|
||||
committers can easily find somebody who is familiar with it. The notes
|
||||
should specify if there is a 3rd party source tree involved or other
|
||||
things that should be kept in mind.
|
||||
|
||||
However, this is not a 'big stick', it is an offer to help and a source
|
||||
of guidance. It does not override the communal nature of the tree.
|
||||
It is not a registry of 'turf' or private property.
|
||||
|
||||
subsystem login notes
|
||||
-----------------------------
|
||||
kqueue jmg Pre-commit review requested.
|
||||
mergemaster dougb Prefers to pre-approve commits
|
||||
libc/posix1e rwatson Pre-commit review requested.
|
||||
POSIX.1e ACLs rwatson Pre-commit review requested.
|
||||
UFS EAs rwatson Pre-commit review requested.
|
||||
MAC Framework rwatson Pre-commit review requested.
|
||||
MAC Modules rwatson Pre-commit review requested.
|
||||
contrib/openbsm rwatson Pre-commit review requested.
|
||||
sys/security/audit rwatson Pre-commit review requested.
|
||||
ATA/IDE sos Pre-commit review requested.
|
||||
ahc(4) gibbs Pre-commit review requested.
|
||||
ahd(4) gibbs Pre-commit review requested.
|
||||
NEWCARD imp Pre-commit review requested.
|
||||
OLDCARD imp Pre-commit review requested.
|
||||
pci bus imp,jhb Pre-commit review requested.
|
||||
wi imp Pre-commit review requested.
|
||||
telnet markm please ensure that a security-aware person
|
||||
sanity-checks your work.
|
||||
secure/* markm please ensure that a security-aware person
|
||||
sanity-checks your work.
|
||||
kerberos5 nectar Pre-commit review requested.
|
||||
heimdal nectar Pre-commit review requested.
|
||||
cdboot jhb Pre-commit review requested.
|
||||
pxeboot jhb Pre-commit review requested.
|
||||
witness jhb Pre-commit review requested.
|
||||
twe [email protected] Pre-commit review requested
|
||||
twa [email protected] Pre-commit review requested
|
||||
twe vkashyap Pre-commit review requested
|
||||
twa vkashyap Pre-commit review requested
|
||||
aac scottl Pre-commit review requested
|
||||
udf scottl Pre-commit review requested.
|
||||
ips scottl Pre-commit review requested.
|
||||
iir scottl Pre-commit review requested.
|
||||
mlx scottl Pre-commit review requested.
|
||||
mly scottl Pre-commit review requested.
|
||||
maestro3 scottl Pre-commit review requested.
|
||||
CAM gibbs,
|
||||
ken Pre-commit review requested. send to [email protected]
|
||||
devstat(9) ken Pre-commit review requested.
|
||||
@@ -59,6 +51,10 @@ etc/mail gshapiro Pre-commit review requested.
|
||||
Keep in sync with -STABLE.
|
||||
etc/sendmail gshapiro Pre-commit review requested.
|
||||
Keep in sync with -STABLE.
|
||||
dhcp mbr Needs to pre-approve commits to contrib/isc-dhcp, so
|
||||
changes can be made to the isc.org CVS repository.
|
||||
RELENG_4_* security-officer Requires Security Officer approval.
|
||||
RELENG_5_* security-officer Requires Security Officer approval.
|
||||
libfetch des Advance notification requested.
|
||||
fetch des Advance notification requested.
|
||||
libpam des Pre-commit review requested.
|
||||
@@ -69,21 +65,23 @@ linprocfs des Advance notification requested.
|
||||
lpr gad Pre-commit review requested, particularly for
|
||||
lpd/recvjob.c and lpd/printjob.c.
|
||||
newsyslog(8) gad Heads-up appreciated. I'm going thru the PR's for it.
|
||||
pkill gad Heads-up appreciated.
|
||||
ps gad I am working on a number of changes to this. Would
|
||||
like advance notice of major changes planned to it.
|
||||
patch gad I have a WIP which will change the src a lot.
|
||||
vinum grog Recommends pre-commit review.
|
||||
cvs peter Heads-up appreciated, try not to break it.
|
||||
ncurses peter Heads-up appreciated, try not to break it.
|
||||
nvi peter Try not to break it.
|
||||
libz peter Try not to break it.
|
||||
pppd/chat peter Try not to break it.
|
||||
groff ru Recommends pre-commit review.
|
||||
share/mk ru This is a vital component of the build system, so I
|
||||
offer a pre-commit review for anything non-trivial.
|
||||
share/mk ru Recommends pre-commit review.
|
||||
ipfw ipfw Pre-commit review preferred. send to [email protected]
|
||||
drm anholt Just keep me informed of changes, try not to break it.
|
||||
regression jmallett Will help write new tests, etc.
|
||||
libufs jmallett Willing to handle problems, help with work.
|
||||
fdc(4) joerg Just keep me informed of changes, try not to break it.
|
||||
sppp(4) joerg Just keep me informed of changes, try not to break it.
|
||||
libc nectar Opportuntity for pre-commit review appreciated for
|
||||
nsdispatch(3) and its consumers.
|
||||
unifdef(1) fanf Pre-commit review requested.
|
||||
ntp roberto Pre-commit review requested.
|
||||
inetd dwmalone Recommends pre-commit review.
|
||||
@@ -93,37 +91,18 @@ contrib/smbfs bp Open for in-tree committs. In case of functional
|
||||
changes pre-commit review requested.
|
||||
contrib/pf mlaier Pre-commit review requested.
|
||||
binutils obrien Insists on BU blocked from unapproved commits
|
||||
file obrien Insists to keep file blocked from other's unapproved
|
||||
commits
|
||||
contrib/bzip2 obrien Pre-commit review required.
|
||||
lukemftpd obrien Pre-commit review required.
|
||||
geom_concat pjd Pre-commit review preferred.
|
||||
geom_eli pjd Pre-commit review preferred.
|
||||
geom_gate pjd Pre-commit review preferred.
|
||||
geom_label pjd Pre-commit review preferred.
|
||||
geom_mirror pjd Pre-commit review preferred.
|
||||
geom_nop pjd Pre-commit review preferred.
|
||||
geom_raid3 pjd Pre-commit review preferred.
|
||||
geom_shsec pjd Pre-commit review preferred.
|
||||
geom_stripe pjd Pre-commit review preferred.
|
||||
geom_zero pjd Pre-commit review preferred.
|
||||
sbin/geom pjd Pre-commit review preferred.
|
||||
nfs alfred Will be happy to review code, but not mandatory.
|
||||
rpc.lockd alfred Will be happy to review code, but not mandatory.
|
||||
truss alfred Will be happy to review code, but not mandatory.
|
||||
rpc alfred Pre-commit review requested.
|
||||
xfs [email protected],[email protected],[email protected]
|
||||
Pre-commit review preferred.
|
||||
pkg_install krion Pre-commit review or approval from portmgr@ requested.
|
||||
linux emul emulation Please discuss changes here.
|
||||
bs{diff,patch} cperciva Pre-commit review requested.
|
||||
portsnap cperciva Pre-commit review requested.
|
||||
sys/netgraph/bluetooth emax Pre-commit review preferred.
|
||||
lib/libbluetooth emax Pre-commit review preferred.
|
||||
lib/libsdp emax Pre-commit review preferred.
|
||||
usr.bin/bluetooth emax Pre-commit review preferred.
|
||||
usr.sbin/bluetooth emax Pre-commit review preferred.
|
||||
gnu/usr.bin/send-pr bugmaster Pre-commit review requested.
|
||||
|
||||
Following are the entries from the Makefiles, and a few other sources.
|
||||
Please remove stale entries from both their origin, and this file.
|
||||
@@ -131,9 +110,61 @@ Please remove stale entries from both their origin, and this file.
|
||||
Please also consider removing the lines from the files listed below and
|
||||
stating your preferences here instead.
|
||||
|
||||
List below generated with:
|
||||
$ cd /usr/src; find */* -type f|xargs egrep 'MAINTAINER[ <tab>]*='
|
||||
|
||||
bin/dd/Makefile:MAINTAINER= [email protected]
|
||||
contrib/cvs/FREEBSD-upgrade:MAINTAINER= [email protected]
|
||||
games/fortune/datfiles/Makefile:MAINTAINER= [email protected]
|
||||
gnu/usr.bin/cvs/Makefile:MAINTAINER= [email protected]
|
||||
gnu/usr.bin/cvs/contrib/Makefile:MAINTAINER= [email protected]
|
||||
gnu/usr.bin/cvs/cvs/Makefile:MAINTAINER= [email protected]
|
||||
gnu/usr.bin/cvs/cvsbug/Makefile:MAINTAINER= [email protected]
|
||||
gnu/usr.bin/cvs/doc/Makefile:MAINTAINER= [email protected]
|
||||
gnu/usr.bin/cvs/lib/Makefile:MAINTAINER= [email protected]
|
||||
gnu/usr.bin/cvs/libdiff/Makefile:MAINTAINER= [email protected]
|
||||
gnu/usr.bin/man/apropos/Makefile:MAINTAINER= [email protected]
|
||||
lib/libc/posix1e/Makefile.inc:MAINTAINER= [email protected]
|
||||
lib/libusbhid/Makefile:MAINTAINER= [email protected]
|
||||
lib/libz/Makefile:MAINTAINER= [email protected]
|
||||
sbin/dhclient/Makefile.inc:MAINTAINER= [email protected]
|
||||
sbin/ipf/Makefile:MAINTAINER= [email protected]
|
||||
sbin/ipfs/Makefile:MAINTAINER= [email protected]
|
||||
sbin/ipfstat/Makefile:MAINTAINER= [email protected]
|
||||
sbin/ipmon/Makefile:MAINTAINER= [email protected]
|
||||
sbin/ipnat/Makefile:MAINTAINER= [email protected]
|
||||
sys/boot/i386/cdboot/Makefile:MAINTAINER= [email protected]
|
||||
sys/boot/i386/pxeldr/Makefile:MAINTAINER= [email protected]
|
||||
sys/compat/svr4/Makefile:MAINTAINER= [email protected]
|
||||
sys/dev/asr/MAINTAINER:MAINTAINER= [email protected], [email protected], [email protected]
|
||||
sys/dev/bktr/CHANGELOG.TXT:MAINTAINER= Roger Hardiman <[email protected]>
|
||||
sys/dev/ep/if_ep.c:MAINTAINER= Matthew N. Dodd <[email protected]>
|
||||
sys/dev/ex/if_ex.c:MAINTAINER= Matthew N. Dodd <[email protected]>
|
||||
sys/dev/ie/if_ie.c:MAINTAINER= Matthew N. Dodd <[email protected]>
|
||||
sys/dev/sound/pcm/feeder_rate.c:MAINTAINER= Orion Hodson <[email protected]>
|
||||
sys/modules/3dfx/Makefile:MAINTAINER= [email protected]
|
||||
sys/modules/bktr/bktr_mem/Makefile:MAINTAINER= [email protected]
|
||||
sys/modules/cam/Makefile:MAINTAINER= [email protected]
|
||||
sys/modules/linux/Makefile:MAINTAINER= [email protected]
|
||||
sys/modules/osf1/Makefile:MAINTAINER= [email protected]
|
||||
sys/modules/pecoff/Makefile:MAINTAINER= [email protected]
|
||||
sys/modules/streams/Makefile:MAINTAINER= [email protected]
|
||||
sys/modules/svr4/Makefile:MAINTAINER= [email protected]
|
||||
sys/modules/udbp/Makefile:MAINTAINER= [email protected]
|
||||
sys/modules/ugen/Makefile:MAINTAINER= [email protected]
|
||||
sys/modules/uhid/Makefile:MAINTAINER= [email protected]
|
||||
sys/modules/ukbd/Makefile:MAINTAINER= [email protected]
|
||||
sys/modules/ulpt/Makefile:MAINTAINER= [email protected]
|
||||
sys/modules/umass/Makefile:MAINTAINER= [email protected]
|
||||
sys/modules/umodem/Makefile:MAINTAINER= [email protected]
|
||||
sys/modules/ums/Makefile:MAINTAINER= [email protected]
|
||||
sys/modules/urio/Makefile:MAINTAINER= Iwasa Kazmi <[email protected]>
|
||||
sys/modules/usb/Makefile:MAINTAINER= [email protected]
|
||||
sys/modules/uscanner/Makefile:MAINTAINER= [email protected]
|
||||
usr.bin/chat/Makefile:MAINTAINER= [email protected]
|
||||
usr.bin/locate/Makefile:MAINTAINER= [email protected]
|
||||
usr.sbin/ipftest/Makefile:MAINTAINER= [email protected]
|
||||
usr.sbin/ipresend/Makefile:MAINTAINER= [email protected]
|
||||
usr.sbin/ipsend/Makefile:MAINTAINER= [email protected]
|
||||
usr.sbin/iptest/Makefile:MAINTAINER= [email protected]
|
||||
usr.sbin/ntp/doc/Makefile:MAINTAINER= [email protected]
|
||||
usr.sbin/pppd/Makefile:MAINTAINER= [email protected]
|
||||
usr.sbin/pppstats/Makefile:MAINTAINER= [email protected]
|
||||
usr.sbin/zic/Makefile:MAINTAINER= [email protected]
|
||||
@@ -69,8 +69,7 @@ TGTS= all all-man buildkernel buildworld checkdpadd clean \
|
||||
kernel-toolchain libraries lint maninstall \
|
||||
obj objlink regress rerelease tags toolchain update \
|
||||
_worldtmp _legacy _bootstrap-tools _cleanobj _obj \
|
||||
_build-tools _cross-tools _includes _libraries _depend \
|
||||
build32 install32
|
||||
_build-tools _cross-tools _includes _libraries _depend
|
||||
|
||||
BITGTS= files includes
|
||||
BITGTS:=${BITGTS} ${BITGTS:S/^/build/} ${BITGTS:S/^/install/}
|
||||
@@ -86,13 +85,6 @@ TGTS+= ${BITGTS}
|
||||
|
||||
PATH= /sbin:/bin:/usr/sbin:/usr/bin
|
||||
MAKEOBJDIRPREFIX?= /usr/obj
|
||||
_MAKEOBJDIRPREFIX!= /usr/bin/env -i PATH=${PATH} ${MAKE} \
|
||||
${.MAKEFLAGS:MMAKEOBJDIRPREFIX=*} __MAKE_CONF=${__MAKE_CONF} \
|
||||
-f /dev/null -V MAKEOBJDIRPREFIX dummy
|
||||
.if !empty(_MAKEOBJDIRPREFIX)
|
||||
.error MAKEOBJDIRPREFIX can only be set in environment, not as a global\
|
||||
(in make.conf(5)) or command-line variable.
|
||||
.endif
|
||||
MAKEPATH= ${MAKEOBJDIRPREFIX}${.CURDIR}/make.${MACHINE}
|
||||
BINMAKE= \
|
||||
`if [ -x ${MAKEPATH}/make ]; then echo ${MAKEPATH}/make; else echo ${MAKE}; fi` \
|
||||
@@ -152,9 +144,10 @@ ${TGTS}:
|
||||
# Set a reasonable default
|
||||
.MAIN: all
|
||||
|
||||
STARTTIME!= LC_ALL=C date
|
||||
|
||||
.if defined(HISTORICAL_MAKE_WORLD) || defined(DESTDIR)
|
||||
.if make(world)
|
||||
STARTTIME!= LC_ALL=C date
|
||||
.endif
|
||||
#
|
||||
# world
|
||||
#
|
||||
@@ -249,20 +242,16 @@ make: .PHONY
|
||||
# universe
|
||||
#
|
||||
# Attempt to rebuild *everything* for all supported architectures,
|
||||
# with a reasonable chance of success, regardless of how old your
|
||||
# with reasonable chance of success, regardless of how old your
|
||||
# existing system is.
|
||||
#
|
||||
universe: universe_prologue
|
||||
universe_prologue:
|
||||
i386_mach= pc98
|
||||
universe:
|
||||
@echo "--------------------------------------------------------------"
|
||||
@echo ">>> make universe started on ${STARTTIME}"
|
||||
@echo "--------------------------------------------------------------"
|
||||
.for target in i386 i386:pc98 sparc64 alpha ia64 amd64
|
||||
.for arch in ${target:C/:.*$//}
|
||||
.for mach in ${target:C/^.*://}
|
||||
universe: universe_${mach}
|
||||
.ORDER: universe_prologue universe_${mach} universe_epilogue
|
||||
universe_${mach}:
|
||||
.for arch in i386 sparc64 alpha ia64 amd64
|
||||
.for mach in ${arch} ${${arch}_mach}
|
||||
@echo ">> ${mach} started on `LC_ALL=C date`"
|
||||
-cd ${.CURDIR} && ${MAKE} ${JFLAG} buildworld \
|
||||
TARGET_ARCH=${arch} TARGET=${mach} \
|
||||
@@ -273,13 +262,10 @@ universe_${mach}:
|
||||
-cd ${.CURDIR}/sys/${mach}/conf && ${MAKE} LINT \
|
||||
> ${.CURDIR}/_.${mach}.makeLINT 2>&1
|
||||
.endif
|
||||
cd ${.CURDIR} && ${MAKE} buildkernels TARGET_ARCH=${arch} TARGET=${mach}
|
||||
cd ${.CURDIR} && ${MAKE} ${JFLAG} buildkernels TARGET_ARCH=${arch} TARGET=${mach}
|
||||
@echo ">> ${mach} completed on `LC_ALL=C date`"
|
||||
.endfor
|
||||
.endfor
|
||||
.endfor
|
||||
universe: universe_epilogue
|
||||
universe_epilogue:
|
||||
@echo "--------------------------------------------------------------"
|
||||
@echo ">>> make universe completed on `LC_ALL=C date`"
|
||||
@echo " (started ${STARTTIME})"
|
||||
@@ -288,6 +274,8 @@ universe_epilogue:
|
||||
.if make(buildkernels)
|
||||
KERNCONFS!= cd ${.CURDIR}/sys/${TARGET}/conf && \
|
||||
find [A-Z]*[A-Z] -type f -maxdepth 0 ! -name NOTES
|
||||
.endif
|
||||
|
||||
buildkernels:
|
||||
.for kernel in ${KERNCONFS}
|
||||
-cd ${.CURDIR} && ${MAKE} ${JFLAG} buildkernel \
|
||||
@@ -295,4 +283,3 @@ buildkernels:
|
||||
__MAKE_CONF=/dev/null \
|
||||
> _.${TARGET}.${kernel} 2>&1
|
||||
.endfor
|
||||
.endif
|
||||
+28
-134
@@ -27,7 +27,7 @@
|
||||
# The intended user-driven targets are:
|
||||
# buildworld - rebuild *everything*, including glue to help do upgrades
|
||||
# installworld- install everything built by "buildworld"
|
||||
# update - convenient way to update your source tree (eg: cvsup/cvs)
|
||||
# update - convenient way to update your source tree (eg: sup/cvs)
|
||||
#
|
||||
# Standard targets (not defined here) are documented in the makefiles in
|
||||
# /usr/share/mk. These include:
|
||||
@@ -83,7 +83,6 @@ CLEANDIR= cleandir
|
||||
.endif
|
||||
|
||||
CVS?= cvs
|
||||
CVSFLAGS?= -r RELENG_5 -P -d -I!
|
||||
SUP?= /usr/local/bin/cvsup
|
||||
SUPFLAGS?= -g -L 2 -P -
|
||||
.if defined(SUPHOST)
|
||||
@@ -91,6 +90,13 @@ SUPFLAGS+= -h ${SUPHOST}
|
||||
.endif
|
||||
|
||||
MAKEOBJDIRPREFIX?= /usr/obj
|
||||
_MAKEOBJDIRPREFIX!= env -i PATH=${PATH} MAKEFLAGS="${.MAKEFLAGS}" ${MAKE} \
|
||||
-f /dev/null -V MAKEOBJDIRPREFIX dummy
|
||||
.if !empty(_MAKEOBJDIRPREFIX)
|
||||
.error MAKEOBJDIRPREFIX can only be set in environment, not as a global\
|
||||
(in /etc/make.conf) or command-line variable.
|
||||
.endif
|
||||
|
||||
.if !defined(OSRELDATE)
|
||||
.if exists(/usr/include/osreldate.h)
|
||||
OSRELDATE!= awk '/^\#define[[:space:]]*__FreeBSD_version/ { print $$3 }' \
|
||||
@@ -112,8 +118,8 @@ _TARGET_CPUTYPE=${TARGET_CPUTYPE}
|
||||
.else
|
||||
_TARGET_CPUTYPE=dummy
|
||||
.endif
|
||||
_CPUTYPE!= MAKEFLAGS= CPUTYPE=${_TARGET_CPUTYPE} ${MAKE} \
|
||||
-f /dev/null -m ${.CURDIR}/share/mk -V CPUTYPE
|
||||
_CPUTYPE!= MAKEFLAGS= ${MAKE} -f /dev/null -m ${.CURDIR}/share/mk \
|
||||
CPUTYPE=${_TARGET_CPUTYPE} -V CPUTYPE
|
||||
.if ${_CPUTYPE} != ${_TARGET_CPUTYPE}
|
||||
.error CPUTYPE global should be set with ?=.
|
||||
.endif
|
||||
@@ -174,13 +180,13 @@ CROSSENV= MAKEOBJDIRPREFIX=${OBJTREE} \
|
||||
GROFF_TMAC_PATH=${WORLDTMP}/legacy/usr/share/tmac
|
||||
|
||||
# bootstrap-tools stage
|
||||
BMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \
|
||||
BMAKEENV= DESTDIR= \
|
||||
INSTALL="sh ${.CURDIR}/tools/install.sh" \
|
||||
PATH=${BPATH}:${PATH} \
|
||||
WORLDTMP=${WORLDTMP} \
|
||||
MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}"
|
||||
BMAKE= MAKEOBJDIRPREFIX=${WORLDTMP} \
|
||||
${BMAKEENV} ${MAKE} -f Makefile.inc1 \
|
||||
DESTDIR= \
|
||||
BOOTSTRAPPING=${OSRELDATE} \
|
||||
-DNOHTML -DNOINFO -DNOLINT -DNOMAN -DNOPIC -DNOPROFILE \
|
||||
-DNOSHARED -DNO_CPU_CFLAGS -DNO_WARNS
|
||||
@@ -188,7 +194,6 @@ BMAKE= MAKEOBJDIRPREFIX=${WORLDTMP} \
|
||||
# build-tools stage
|
||||
TMAKE= MAKEOBJDIRPREFIX=${OBJTREE} \
|
||||
${BMAKEENV} ${MAKE} -f Makefile.inc1 \
|
||||
DESTDIR= \
|
||||
BOOTSTRAPPING=${OSRELDATE} -DNOLINT -DNO_CPU_CFLAGS -DNO_WARNS
|
||||
|
||||
# cross-tools stage
|
||||
@@ -196,52 +201,11 @@ XMAKE= TOOLS_PREFIX=${WORLDTMP} ${BMAKE} -DNO_FORTRAN -DNO_GDB
|
||||
|
||||
# world stage
|
||||
WMAKEENV= ${CROSSENV} \
|
||||
DESTDIR=${WORLDTMP} \
|
||||
_SHLIBDIRPREFIX=${WORLDTMP} \
|
||||
INSTALL="sh ${.CURDIR}/tools/install.sh" \
|
||||
PATH=${TMPPATH}
|
||||
WMAKE= ${WMAKEENV} ${MAKE} -f Makefile.inc1 DESTDIR=${WORLDTMP}
|
||||
|
||||
.if ${TARGET_ARCH} == "amd64"
|
||||
# 32 bit world
|
||||
LIB32TMP= ${OBJTREE}${.CURDIR}/lib32
|
||||
|
||||
LIB32PREFLAGS= -m32 -march=athlon-xp -msse2 -mfancy-math-387 -DCOMPAT_32BIT
|
||||
LIB32POSTFLAGS= -I${LIB32TMP}/usr/include \
|
||||
-L${LIB32TMP}/usr/lib32 \
|
||||
-B${LIB32TMP}/usr/lib32
|
||||
LIB32CC= ${LIB32PREFLAGS} \
|
||||
${LIB32POSTFLAGS}
|
||||
LIB32CXX= ${LIB32PREFLAGS} -I${LIB32TMP}/usr/include/c++/3.4 \
|
||||
${LIB32POSTFLAGS}
|
||||
LIB32OBJC= ${LIB32PREFLAGS} -I${LIB32TMP}/usr/include/objc \
|
||||
${LIB32POSTFLAGS}
|
||||
|
||||
# Yes, the flags are redundant.
|
||||
LIB32MAKEENV= MAKEOBJDIRPREFIX=${OBJTREE}/lib32 \
|
||||
_SHLIBDIRPREFIX=${LIB32TMP} \
|
||||
MACHINE_ARCH=i386 \
|
||||
INSTALL="sh ${.CURDIR}/tools/install.sh" \
|
||||
PATH=${TMPPATH} \
|
||||
CC="cc ${LIB32CC}" \
|
||||
CXX="c++ ${LIB32CXX}" \
|
||||
OBJC="cc ${LIB32OBJC}" \
|
||||
LD="ld -m elf_i386_fbsd -Y P,${LIB32TMP}/usr/lib32" \
|
||||
AS="as --32" \
|
||||
LIBDIR=/usr/lib32 \
|
||||
SHLIBDIR=/usr/lib32 \
|
||||
LIBCOMPATDIR=/usr/lib32/compat
|
||||
|
||||
LIB32MAKE= ${LIB32MAKEENV} ${MAKE} -DNO_CPU_CFLAGS -DCOMPAT_32BIT \
|
||||
-DNO_BIND -DNOMAN -DNODOC -DNOINFO -DNOHTML \
|
||||
CC="cc ${LIB32CC}" \
|
||||
CXX="c++ ${LIB32CXX}" \
|
||||
OBJC="cc ${LIB32OBJC}" \
|
||||
LD="ld -m elf_i386_fbsd -Y P,${LIB32TMP}/usr/lib32" \
|
||||
AS="as --32" \
|
||||
LIBDIR=/usr/lib32 \
|
||||
SHLIBDIR=/usr/lib32 \
|
||||
LIBCOMPATDIR=/usr/lib32/compat
|
||||
.endif
|
||||
WMAKE= ${WMAKEENV} ${MAKE} -f Makefile.inc1
|
||||
|
||||
# install stage
|
||||
.if empty(.MAKEFLAGS:M-n)
|
||||
@@ -284,7 +248,7 @@ _worldtmp:
|
||||
rm -f ${OBJTREE}${.CURDIR}/usr.bin/truss/ioctl.c
|
||||
.endif
|
||||
.for _dir in \
|
||||
usr/bin usr/games usr/include/c++/3.4 usr/include/sys usr/lib \
|
||||
usr/bin usr/games usr/include/c++/3.3 usr/include/sys usr/lib \
|
||||
usr/libexec usr/sbin usr/share/dict \
|
||||
usr/share/groff_font/devX100 \
|
||||
usr/share/groff_font/devX100-12 \
|
||||
@@ -380,63 +344,6 @@ everything:
|
||||
@echo ">>> stage 4.4: building everything"
|
||||
@echo "--------------------------------------------------------------"
|
||||
${_+_}cd ${.CURDIR}; ${WMAKE} par-all
|
||||
.if ${TARGET_ARCH} == "amd64"
|
||||
build32:
|
||||
@echo
|
||||
@echo "--------------------------------------------------------------"
|
||||
@echo ">>> stage 5.1: building 32 bit shim libraries"
|
||||
@echo "--------------------------------------------------------------"
|
||||
.for _dir in \
|
||||
lib lib32 usr/bin usr/include usr/lib32/compat/aout \
|
||||
usr/libdata/ldscripts usr/libexec usr/sbin usr/share/misc \
|
||||
usr/share/snmp/defs usr/share/snmp/mibs
|
||||
mkdir -p ${LIB32TMP}/${_dir}
|
||||
.endfor
|
||||
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \
|
||||
-p ${LIB32TMP}/usr/include >/dev/null
|
||||
ln -sf ${.CURDIR}/sys ${WORLDTMP}
|
||||
.if !defined(NO_KERBEROS) && !defined(NOCRYPT) && !defined(NO_OPENSSL)
|
||||
.for _t in obj depend all
|
||||
cd ${.CURDIR}/kerberos5/tools; \
|
||||
MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} DESTDIR= ${_t}
|
||||
.endfor
|
||||
.endif
|
||||
.for _t in obj includes
|
||||
cd ${.CURDIR}/include; \
|
||||
${LIB32MAKE} DESTDIR=${LIB32TMP} ${_t}
|
||||
cd ${.CURDIR}/lib; \
|
||||
${LIB32MAKE} DESTDIR=${LIB32TMP} ${_t}
|
||||
cd ${.CURDIR}/gnu/lib; \
|
||||
${LIB32MAKE} DESTDIR=${LIB32TMP} ${_t}
|
||||
.if !defined(NOCRYPT)
|
||||
cd ${.CURDIR}/secure/lib; \
|
||||
${LIB32MAKE} DESTDIR=${LIB32TMP} ${_t}
|
||||
.endif
|
||||
.if !defined(NO_KERBEROS) && !defined(NOCRYPT) && !defined(NO_OPENSSL)
|
||||
cd ${.CURDIR}/kerberos5/lib; \
|
||||
${LIB32MAKE} DESTDIR=${LIB32TMP} ${_t}
|
||||
.endif
|
||||
.endfor
|
||||
.for _dir in lib/libncurses lib/libmagic
|
||||
cd ${.CURDIR}/${_dir}; \
|
||||
MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} DESTDIR= build-tools
|
||||
.endfor
|
||||
cd ${.CURDIR}; \
|
||||
${LIB32MAKE} -f Makefile.inc1 DESTDIR=${LIB32TMP} libraries
|
||||
.for _t in obj depend all
|
||||
cd ${.CURDIR}/libexec/rtld-elf; \
|
||||
PROG=ld-elf32.so.1 ${LIB32MAKE} DESTDIR=${LIB32TMP} ${_t}
|
||||
.endfor
|
||||
|
||||
install32:
|
||||
mkdir -p ${DESTDIR}/usr/lib32/compat # XXX add to mtree
|
||||
cd ${.CURDIR}/lib; ${LIB32MAKE} install
|
||||
cd ${.CURDIR}/gnu/lib; ${LIB32MAKE} install
|
||||
.if !defined(NOCRYPT)
|
||||
cd ${.CURDIR}/secure/lib; ${LIB32MAKE} install
|
||||
.endif
|
||||
cd ${.CURDIR}/libexec/rtld-elf; PROG=ld-elf32.so.1 ${LIB32MAKE} install
|
||||
.endif
|
||||
|
||||
|
||||
WMAKE_TGTS=
|
||||
@@ -448,9 +355,6 @@ WMAKE_TGTS+= _cleanobj _obj _build-tools
|
||||
WMAKE_TGTS+= _cross-tools
|
||||
.endif
|
||||
WMAKE_TGTS+= _includes _libraries _depend everything
|
||||
.if ${TARGET_ARCH} == "amd64" && !defined(NO_LIB32)
|
||||
WMAKE_TGTS+= build32
|
||||
.endif
|
||||
|
||||
buildworld: ${WMAKE_TGTS}
|
||||
.ORDER: ${WMAKE_TGTS}
|
||||
@@ -581,9 +485,6 @@ reinstall: ${SPECIAL_INSTALLCHECKS}
|
||||
@echo ">>> Installing everything"
|
||||
@echo "--------------------------------------------------------------"
|
||||
${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 install
|
||||
.if ${TARGET_ARCH} == "amd64" && !defined(NO_LIB32)
|
||||
${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 install32
|
||||
.endif
|
||||
|
||||
redistribute:
|
||||
@echo "--------------------------------------------------------------"
|
||||
@@ -607,7 +508,7 @@ redistribute:
|
||||
|
||||
.if !defined(KERNCONF) && defined(KERNEL)
|
||||
KERNCONF= ${KERNEL}
|
||||
KERNWARN=
|
||||
KERNWARN= yes
|
||||
.else
|
||||
KERNCONF?= GENERIC
|
||||
.endif
|
||||
@@ -763,9 +664,9 @@ update:
|
||||
.endif
|
||||
.if defined(CVS_UPDATE)
|
||||
@echo "--------------------------------------------------------------"
|
||||
@echo ">>> Updating ${.CURDIR} from CVS repository" ${CVSROOT}
|
||||
@echo ">>> Updating ${.CURDIR} from cvs repository" ${CVSROOT}
|
||||
@echo "--------------------------------------------------------------"
|
||||
cd ${.CURDIR}; ${CVS} -R -q update ${CVSFLAGS}
|
||||
cd ${.CURDIR}; ${CVS} -R -q update -rRELENG_5_3 -P -d
|
||||
.endif
|
||||
|
||||
#
|
||||
@@ -813,14 +714,6 @@ _groff= gnu/usr.bin/groff/tmac
|
||||
_lex= usr.bin/lex
|
||||
.endif
|
||||
|
||||
.if ${BOOTSTRAPPING} >= 600016
|
||||
_mklocale= usr.bin/mklocale
|
||||
.endif
|
||||
|
||||
.if ${BOOTSTRAPPING} >= 600017
|
||||
_gencat= usr.bin/gencat
|
||||
.endif
|
||||
|
||||
.if ${BOOTSTRAPPING} < 450005 || \
|
||||
${BOOTSTRAPPING} >= 500000 && ${BOOTSTRAPPING} < 500034
|
||||
_uudecode= usr.bin/uudecode
|
||||
@@ -856,10 +749,8 @@ bootstrap-tools:
|
||||
${_groff} \
|
||||
gnu/usr.bin/texinfo \
|
||||
usr.bin/colldef \
|
||||
${_gencat} \
|
||||
${_lex} \
|
||||
usr.bin/makewhatis \
|
||||
${_mklocale} \
|
||||
usr.bin/rpcgen \
|
||||
${_uudecode} \
|
||||
${_xargs} \
|
||||
@@ -930,8 +821,7 @@ build-tools:
|
||||
_elf2aout= usr.bin/elf2aout
|
||||
.endif
|
||||
|
||||
.if (${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386") && \
|
||||
${TARGET_ARCH} != ${MACHINE_ARCH}
|
||||
.if ${TARGET_ARCH} == "i386" && ${TARGET_ARCH} != ${MACHINE_ARCH}
|
||||
_btxld= usr.sbin/btxld
|
||||
.endif
|
||||
|
||||
@@ -1015,11 +905,19 @@ _prebuild_libs+= lib/libcom_err lib/libcrypt lib/libexpat \
|
||||
lib/libkvm lib/libmd \
|
||||
lib/libncurses lib/libnetgraph lib/libopie lib/libpam \
|
||||
lib/libradius \
|
||||
lib/libsbuf lib/libtacplus lib/libutil \
|
||||
lib/libsbuf lib/libtacplus lib/libutil lib/libypclnt \
|
||||
lib/libz lib/msun
|
||||
|
||||
lib/libopie__L lib/libtacplus__L: lib/libmd__L
|
||||
|
||||
.if !defined(NO_BIND)
|
||||
.if ${MACHINE_ARCH} == "alpha" || ${MACHINE_ARCH} == "sparc64"
|
||||
_prebuild_libs+= lib/libc_r
|
||||
.else
|
||||
_prebuild_libs+= lib/libpthread
|
||||
.endif
|
||||
.endif
|
||||
|
||||
_generic_libs+= lib
|
||||
|
||||
.if !defined(NOCRYPT)
|
||||
@@ -1044,10 +942,6 @@ _generic_libs+= secure/lib
|
||||
lib/libradius__L: lib/libmd__L
|
||||
.endif
|
||||
|
||||
.if !defined(NO_NIS)
|
||||
_prebuild_libs+= lib/libypclnt
|
||||
.endif
|
||||
|
||||
_generic_libs+= usr.bin/lex/lib
|
||||
|
||||
.if ${MACHINE_ARCH} == "i386"
|
||||
|
||||
@@ -6,137 +6,11 @@ done items, please see the COMMON ITEMS: section later in the file.
|
||||
|
||||
Items affecting the ports and packages system can be found in
|
||||
/usr/ports/UPDATING. Please read that file before running
|
||||
portupgrade.
|
||||
portupgrade. Important recent entries: 20040724 (default X changes).
|
||||
|
||||
20070426:
|
||||
The ABI breakage in sendmail(8)'s libmilter has been repaired
|
||||
so it is no longer necessary to recompile mail filters (aka,
|
||||
milters). If you recompiled mail filters after the 20070411
|
||||
note, it is not necessary to recompile them again.
|
||||
|
||||
20070411:
|
||||
sendmail(8) has been updated to version 8.14.1. Mail filters
|
||||
(aka, milters) compiled against the libmilter included in the
|
||||
base operating system should be recompiled.
|
||||
|
||||
20060525:
|
||||
FreeBSD 5.5-RELEASE
|
||||
|
||||
20060127:
|
||||
The i386 loader(8) now defaults to the serial speed set by the
|
||||
previous boot stage, if the comconsole is already in use. If
|
||||
you've changed BOOT_COMCONSOLE_SPEED in make.conf(5) and
|
||||
installed a new loader, but have not rebuilt and reinstalled the
|
||||
boot blocks, then your loader will leave the console at 9600
|
||||
baud. Either install the new boot blocks, or set
|
||||
comconsole_speed in loader.conf(5). Note that the new boot
|
||||
blocks also support a -S<speed> flag described in boot(8).
|
||||
|
||||
20060111:
|
||||
Bug fixes to the trimdomain(3) function in libutil may result in
|
||||
slight changes to the host names appearing in log files under
|
||||
relatively rare circumstances.
|
||||
|
||||
20051015:
|
||||
The shared library version number of libarchive was accidentally
|
||||
bumped up during an MFC of other changes on October 4, 2005. It
|
||||
was reset to the correct value on October 14, 2005. If you
|
||||
updated a system between those dates you should check to see if
|
||||
/usr/lib/libarchive.so.2 exists and remove it AFTER doing your
|
||||
next update.
|
||||
|
||||
20051004:
|
||||
if_bridge has been merged which provides more advanced Ethernet
|
||||
bridging and 802.1d spanning tree support. See if_bridge(4) for
|
||||
configuration details.
|
||||
|
||||
20050513:
|
||||
Intel Hyper-Threading is now disabled by default due to a
|
||||
security issue, but can be re-enabled by setting the
|
||||
machdep.hyperthreading_allowed tunable in /boot/loader.conf.
|
||||
|
||||
20050509:
|
||||
FreeBSD 5.4-RELEASE
|
||||
|
||||
20050302:
|
||||
The full packet destination manipulation for 'ipfw fwd' is
|
||||
back with the kernel compile time option:
|
||||
|
||||
options IPFIREWALL_FORWARD_EXTENDED
|
||||
|
||||
This option has to be specified in addition to IPFIREWALL_FORWARD.
|
||||
With this option even packets targeted for an IP address local
|
||||
to the host can be redirected. All restrictions to ensure proper
|
||||
behaviour for locally generated packets are turned off. Firewall
|
||||
rules have to be carefully crafted to make sure that things like
|
||||
PMTU discovery do not break.
|
||||
|
||||
20050228:
|
||||
The responsibility of recomputing the file system summary of
|
||||
a SoftUpdates-enabled dirty volume has been transferred to the
|
||||
background fsck. A rebuild of fsck(8) utility is recommended
|
||||
if you have updated the kernel.
|
||||
|
||||
To get the old behavior (recompute file system summary at mount
|
||||
time), you can set vfs.ffs.compute_summary_at_mount=1 before
|
||||
mounting the new volume.
|
||||
|
||||
20050228:
|
||||
The ifi_epoch member of struct if_data has been changed to
|
||||
contain the uptime at which the interface was created or the
|
||||
statistics zeroed rather then the wall clock time because
|
||||
wallclock time may go backwards. This should have no impact
|
||||
unless an snmp implementation is using this value (I know of
|
||||
none at this point.)
|
||||
|
||||
20050227:
|
||||
The default "world" build no longer supports running on an
|
||||
80386 CPU. In order to build a world for an 80386 CPU, one
|
||||
needs to set CPUTYPE=i386 in /etc/make.conf.
|
||||
|
||||
20050225:
|
||||
The cpufreq framework has been merged. As part of this, the sysctls
|
||||
for acpi(4) throttling have been removed. See cpufreq(4) for the
|
||||
new sysctl interface. The power_profile script has also been updated,
|
||||
so you can use performance/economy_cpu_freq in rc.conf(5) to set AC
|
||||
on/offline cpu frequencies. No new cpufreq drivers have been brought
|
||||
in with this import but drivers from -current can now be built and run
|
||||
on -stable.
|
||||
|
||||
20050215: [applicable to sparc64 only]
|
||||
uart(4) is the default serial console now. When using the
|
||||
GENERIC kernel, make sure to start getty(8) processes on
|
||||
ttyu0 and/or ttyu1. Either run mergemaster(8) or edit
|
||||
/etc/ttys manually.
|
||||
|
||||
20050203:
|
||||
ppp(8) no longer reverts to sending ECHO requests if LQR is
|
||||
enabled but fails negotiation. To enable the old behaviour,
|
||||
add ``enable echo'' to your config.
|
||||
Additionally, when RADIUS is enabled, ppp now sends both
|
||||
NAS-IP-Address and NAS-Identifier by default. This behaviour
|
||||
can be modified with the ``enable/disable
|
||||
NAS-IP-Address/NAS-Identifier'' command.
|
||||
|
||||
20041126:
|
||||
The numbers of arguments for ng_timeout() and ng_untimeout()
|
||||
have changed. If netgraph.ko is rebuilt or if netgraph is
|
||||
statically compiled in kernel, then the following modules
|
||||
must also be rebuilt:
|
||||
ng_hci
|
||||
ng_l2cap
|
||||
ng_source
|
||||
ng_sscop
|
||||
ng_uni
|
||||
|
||||
20041024:
|
||||
20041104:
|
||||
FreeBSD 5.3-RELEASE
|
||||
|
||||
20041023:
|
||||
GENERIC kernel config files for amd64 and i386 no longer have
|
||||
"options SMP". That has been moved to a new config file named
|
||||
SMP for users who want an easy way to build an SMP kernel.
|
||||
|
||||
20041010:
|
||||
The FreeBSD keyword is no longer a requirement for a valid
|
||||
rc.d script. The rc(8) and rc.shutdown(8) scripts no longer check
|
||||
@@ -1883,10 +1757,10 @@ COMMON ITEMS:
|
||||
<reboot>
|
||||
|
||||
|
||||
To upgrade in-place from 4.x-stable to 5.x
|
||||
To upgrade in-place from 4.x-stable to current
|
||||
----------------------------------------------
|
||||
# 5.x uses more space than 4.x. Also, the location of kernel
|
||||
# modules has changed. If you are installing 5.x onto a 4.x
|
||||
# modules has changed. If you are installing 5.0 onto a 4.x
|
||||
# system, you'll need about 30MB of free disk space on your /
|
||||
# partition. If you have less than this, you may encounter difficult
|
||||
# to back out of problems with this procedure. If /tmp is on
|
||||
@@ -1895,140 +1769,99 @@ COMMON ITEMS:
|
||||
# space on /.
|
||||
|
||||
<make sure you have good level 0 dumps>
|
||||
<maybe fix /etc/fstab> [1]
|
||||
make buildworld [2]
|
||||
make buildkernel KERNCONF=YOUR_KERNEL_HERE [3]
|
||||
cp sys/${MACHINE}/conf/GENERIC.hints /boot/device.hints [4]
|
||||
<maybe fix /etc/fstab> [7]
|
||||
make buildworld [9]
|
||||
make buildkernel KERNCONF=YOUR_KERNEL_HERE [8]
|
||||
cp sys/${MACHINE}/conf/GENERIC.hints /boot/device.hints [2]
|
||||
make installkernel KERNCONF=YOUR_KERNEL_HERE
|
||||
cd sys/boot ; make STRIP= install [5]
|
||||
[6]
|
||||
<reboot in single user> [7]
|
||||
/usr/src/etc/rc.d/preseedrandom [8]
|
||||
mergemaster -p [9]
|
||||
cd sys/boot ; make STRIP="" install [6]
|
||||
[1]
|
||||
<reboot in single user> [3]
|
||||
/usr/src/etc/rc.d/preseedrandom [10]
|
||||
mergemaster -p [5]
|
||||
rm -rf /usr/include/g++
|
||||
rm -f /sbin/mountd
|
||||
make installworld [11]
|
||||
mergemaster -i [12]
|
||||
make installworld
|
||||
mergemaster -i [4]
|
||||
<reboot>
|
||||
|
||||
Make sure that you've read the UPDATING file to understand the
|
||||
tweaks to various things you need. At this point in the life
|
||||
cycle of stable, things change fairly rarely. However, many
|
||||
changes from 4.x to 5.x are not reflected in this breif section.
|
||||
The defaults can also change, so please read ALL of the UPDATING
|
||||
entries.
|
||||
cycle of current, things change often and you are on your own
|
||||
to cope. The defaults can also change, so please read ALL of
|
||||
the UPDATING entries.
|
||||
|
||||
If you have any ports or packages installed on the system, please
|
||||
see /usr/ports/UPDATING. The following items are known to cause
|
||||
problems with the upgrade:
|
||||
(a) Kerberos upgrades are hard, and evidentally don't work. More
|
||||
on this later.
|
||||
(b) Old ports and packages can sometimes have subtle problems with
|
||||
newer libraries. portupgrade -f is recommended where possible
|
||||
after the upgrade. portupgrade -P will be faster since it uses
|
||||
packages. There are many known issues with running a mix of
|
||||
4.x built packages and 5.x built packages, and this avoids them.
|
||||
(c) Perl based ports may also have the wrong version of perl hard
|
||||
coded into the headers. Spamassassin is one such port.
|
||||
(d) Startup scripts have significantly changed. Make sure that you
|
||||
verify that all expected daemons start. Modifications of /etc/rc*
|
||||
(except rc.conf) may cause problems.
|
||||
(e) Device names have changed and MAKEDEV is gone.
|
||||
(f) The boot loader defaults have changed, which may cause confusion.
|
||||
(g) If the build dies for some reason and you reboot, you'll be booting
|
||||
with new libraries, but old paths. You will need to tell ldconfig
|
||||
about them with
|
||||
ldconfig /lib /usr/lib /usr/local/lib
|
||||
(h) If the system appears to hang, try toggling the scroll lock. Many
|
||||
kvm switches use Scroll Lock to switch screens and on such systems
|
||||
a hang can often just be scroll lock active.
|
||||
(i) named now runs in a chroot unless you disable this. See
|
||||
named_chrootdir in /etc/defaults/rc.conf for details on restoring
|
||||
4.x behavior.
|
||||
(j) Ports that use PAM on 4.x should be recompiled. This is especially
|
||||
true for sudo. know thy root password before the upgrade!
|
||||
Also, if you are tracking -current, you must be subscribed to
|
||||
[email protected]. Make sure that before you update
|
||||
your sources that you have read and understood all the recent
|
||||
messages there. If in doubt, please track -stable which has
|
||||
much fewer pitfalls.
|
||||
|
||||
[1] Before you upgrade, please make sure that you are not using
|
||||
compatibility slices. These are device names of the form, on i386 and
|
||||
other architectures that use MBR slicing, /dev/ad0a without the actual
|
||||
slice name. Chances are excellent that these will break. You
|
||||
generally must update these entries to use the post FreeBSD 2.x form
|
||||
of /dev/ad0s1a.
|
||||
[1] If you have third party modules, such as vmware, you
|
||||
should disable them at this point so they don't crash your
|
||||
system on reboot.
|
||||
|
||||
[2] When checking out sources, you must include the -P flag to have
|
||||
cvs prune empty directories. Also, if CPUTYPE is defined in your
|
||||
/etc/make.conf, make sure to use the "?=" instead of the "="
|
||||
assignment operator, so that buildworld can override the CPUTYPE if it
|
||||
needs to. In case you would like to avoid installing new packages of
|
||||
everything, you might want to uncomment the "COMPAT4X= YES" entry, so
|
||||
that 4.x compatibility libraries are built which should allow you to
|
||||
continue using your existing software for a while.
|
||||
[2] If you have legacy ISA devices, you may need to create
|
||||
your own device.hints to reflect your unique hardware
|
||||
configuration.
|
||||
|
||||
[3] In order to have a kernel that can run the 4.x or earlier binaries
|
||||
needed to do an installworld, you must include the COMPAT_FREEBSD4
|
||||
option in your kernel. Failure to do so may leave you with a system
|
||||
that is hard to boot to recover. If you have a.out binaries, then you
|
||||
need to add COMPAT_AOUT option too. If you are updating a system
|
||||
that's been updated from 2.x and/or 3.x in the past, enable both of
|
||||
these to be safe.
|
||||
|
||||
[4] If you have legacy ISA devices, you may need to create your own
|
||||
device.hints to reflect your unique hardware configuration.
|
||||
|
||||
[5] Since make installkernel also does a make heirarchy, PAM will
|
||||
stop working because /etc/pam.d's existance overrides /etc/pam.conf.
|
||||
If you want to login to your system after the install kernel, or if
|
||||
you have accidentally rebooted a remote system into multi-user, the
|
||||
existance of /etc/pam.d will cause remote logins to fail. It is
|
||||
safe to remove it at this step as it will be recreated later.
|
||||
|
||||
[6] 4.x boot loader can be used to boot a 5.x system, however it is
|
||||
difficult to do that at best. If you wish to try, then you should
|
||||
interrupt the boot and at the ok prompt type:
|
||||
ok unload
|
||||
ok boot /boot/kernel/kernel
|
||||
If this fails to work, you must install a new boot loader as described
|
||||
here.
|
||||
|
||||
[7] If you have third party modules, such as vmware, you should
|
||||
disable them at this point so they don't crash your system on reboot.
|
||||
|
||||
[8] From the bootblocks, boot -s, and then do
|
||||
[3] From the bootblocks, boot -s, and then do
|
||||
fsck -p
|
||||
mount -a -t ufs
|
||||
mount -u /
|
||||
mount -a
|
||||
cd /usr/src
|
||||
adjkerntz -i # if CMOS is wall time
|
||||
Also, when doing a major release upgrade, it is required that you boot
|
||||
into single user mode to do the installworld. For the 4.x -> 5.x
|
||||
upgrade, you will also see many messages about needing to recompile
|
||||
your userland. These are harmless and can be ignored while you
|
||||
proceed to the next step.
|
||||
Also, when doing a major release upgrade, it is required that
|
||||
you boot into single user mode to do the installworld.
|
||||
For the 4.x -> 5.x upgrade, you will also see many messages about
|
||||
needing to recompile your userland. These are harmless and can
|
||||
be ignored while you proceed to the next step.
|
||||
|
||||
[9] In order to create temporary files, /dev/random must be
|
||||
[4] Note: This step is non-optional. Failure to do this step
|
||||
can result in a significant reduction in the functionality of the
|
||||
system. Attempting to do it by hand is not recommended and those
|
||||
that pursue this avenue should read this file carefully, as well
|
||||
as the archives of freebsd-current and freebsd-hackers mailing lists
|
||||
for potential gotchas.
|
||||
|
||||
[5] Usually this step is a noop. However, from time to time
|
||||
you may need to do this if you get unknown user in the following
|
||||
step. It never hurts to do it all the time. You may need to
|
||||
install a new mergemaster (cd src/usr.sbin/mergemaster && make
|
||||
install) after the buildworld before this step if you last updated
|
||||
from current before 20020224 or from -stable before 20020408.
|
||||
|
||||
[6] 4.x boot loader can be used to boot a 5.x system, however
|
||||
it is difficult to do that at best. If you wish to try, then
|
||||
you should interrupt the boot and at the ok prompt type:
|
||||
ok unload
|
||||
ok boot /boot/kernel/kernel
|
||||
If this fails to work, you must install a new boot loader as
|
||||
described here.
|
||||
|
||||
[7] Before you upgrade, please make sure that you are not using
|
||||
compatibility slices. These are device names of the form, on i386
|
||||
and other architectures that use MBR slicing, /dev/ad0a without the
|
||||
actual slice name. Chances are excellent that these will break.
|
||||
You generally must update these entries to use the post FreeBSD
|
||||
2.x form of /dev/ad0s1a.
|
||||
|
||||
[8] In order to have a kernel that can run the 4.x binaries
|
||||
needed to do an installworld, you must include the COMPAT_FREEBSD4
|
||||
option in your kernel. Failure to do so may leave you with a system
|
||||
that is hard to boot to recover.
|
||||
|
||||
[9] When checking out sources, you must include the -P flag to have
|
||||
cvs prune empty directories. Also, if CPUTYPE is defined in your
|
||||
/etc/make.conf, make sure to use the "?=" instead of the "=" assignment
|
||||
operator, so that buildworld can override the CPUTYPE if it needs to.
|
||||
In case you would like to avoid installing new packages of everything,
|
||||
you might want to uncomment the "COMPAT4X= YES" entry, so that 4.x
|
||||
compatibility libraries are built which should allow you to continue
|
||||
using your existing software for a while.
|
||||
|
||||
[10] In order to create temporary files, /dev/random must be
|
||||
initialized by feeding data into it. /usr/src/etc/rc.d/preseedrandom
|
||||
takes care of this.
|
||||
|
||||
[10] Usually this step is a noop. However, from time to time you may
|
||||
need to do this if you get unknown user in the following step. It
|
||||
never hurts to do it all the time. You may need to install a new
|
||||
mergemaster (cd src/usr.sbin/mergemaster && make install) after the
|
||||
buildworld before this step if you last updated from current before
|
||||
20020224 or from -stable before 20020408. If you are installing not
|
||||
from /usr/src, don't forget the -m option.
|
||||
|
||||
[11] If you are using a non-standard /usr/obj, you need to set
|
||||
an appropriate MAKEOBJDIRPREFIX before this step.
|
||||
|
||||
[12] Note: This step is non-optional. Failure to do this step can
|
||||
result in a significant reduction in the functionality of the system.
|
||||
Attempting to do it by hand is not recommended and those that pursue
|
||||
this avenue should read this file carefully, as well as the archives
|
||||
of freebsd-current and freebsd-hackers mailing lists for potential
|
||||
gotchas. Also, if you are installing not from /usr/src, don't
|
||||
forget the -m option. Also note: since many libraries moved into
|
||||
/lib with 5.x, failure to run mergemaster will result in many
|
||||
shared libraries that should be there not being found.
|
||||
|
||||
FORMAT:
|
||||
|
||||
This file contains a list, in reverse chronological order, of major
|
||||
|
||||
+14
-26
@@ -31,7 +31,7 @@
|
||||
.\" @(#)chflags.1 8.4 (Berkeley) 5/2/95
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd February 24, 2005
|
||||
.Dd March 24, 2003
|
||||
.Dt CHFLAGS 1
|
||||
.Os
|
||||
.Sh NAME
|
||||
@@ -78,25 +78,30 @@ The flags are specified as an octal number or a comma separated list
|
||||
of keywords.
|
||||
The following keywords are currently defined:
|
||||
.Pp
|
||||
.Bl -tag -offset indent -width ".Ar opaque"
|
||||
.It Ar arch , archived
|
||||
.Bl -tag -offset indent -width "opaque" -compact
|
||||
.It Ar arch
|
||||
set the archived flag (super-user only)
|
||||
.It Ar opaque
|
||||
set the opaque flag (owner or super-user only)
|
||||
.It Ar nodump
|
||||
set the nodump flag (owner or super-user only)
|
||||
.It Ar sappnd , sappend
|
||||
.It Ar sappnd
|
||||
set the system append-only flag (super-user only)
|
||||
.It Ar schg , schange , simmutable
|
||||
.It Ar schg
|
||||
set the system immutable flag (super-user only)
|
||||
.It Ar sunlnk , sunlink
|
||||
.It Ar sunlnk
|
||||
set the system undeletable flag (super-user only)
|
||||
.It Ar uappnd , uappend
|
||||
.It Ar uappnd
|
||||
set the user append-only flag (owner or super-user only)
|
||||
.It Ar uchg , uchange , uimmutable
|
||||
.It Ar uchg
|
||||
set the user immutable flag (owner or super-user only)
|
||||
.It Ar uunlnk , uunlink
|
||||
.It Ar uunlnk
|
||||
set the user undeletable flag (owner or super-user only)
|
||||
.It Ar archived , sappend , schange , Xo
|
||||
.Ar simmutable , uappend , uchange , uimmutable ,
|
||||
.Ar sunlink , uunlink
|
||||
.Xc
|
||||
aliases for the above
|
||||
.El
|
||||
.Pp
|
||||
Putting the letters
|
||||
@@ -140,23 +145,6 @@ You can use "ls -lo" to see the flags of existing files.
|
||||
.Xr stat 2 ,
|
||||
.Xr fts 3 ,
|
||||
.Xr symlink 7
|
||||
.Sh BUGS
|
||||
Only a limited number of utilities are
|
||||
.Nm
|
||||
aware.
|
||||
Some of these tools include
|
||||
.Xr ls 1 ,
|
||||
.Xr cp 1 ,
|
||||
.Xr find 1 ,
|
||||
.Xr install 1 ,
|
||||
.Xr dump 8 ,
|
||||
and
|
||||
.Xr restore 8 .
|
||||
In particular a tool which is not currently
|
||||
.Nm
|
||||
aware is the
|
||||
.Xr pax 1
|
||||
utility.
|
||||
.Sh HISTORY
|
||||
The
|
||||
.Nm
|
||||
|
||||
+1
-7
@@ -31,7 +31,7 @@
|
||||
.\" @(#)cp.1 8.3 (Berkeley) 4/18/94
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd February 23, 2005
|
||||
.Dd July 23, 2002
|
||||
.Dt CP 1
|
||||
.Os
|
||||
.Sh NAME
|
||||
@@ -93,12 +93,6 @@ If
|
||||
designates a directory,
|
||||
.Nm
|
||||
copies the directory and the entire subtree connected at that point.
|
||||
If the
|
||||
.Ar source_file
|
||||
ends in a
|
||||
.Pa / ,
|
||||
the contents of the directory are copied rather than the
|
||||
directory itself.
|
||||
This option also causes symbolic links to be copied, rather than
|
||||
indirected through, and for
|
||||
.Nm
|
||||
|
||||
@@ -130,8 +130,6 @@
|
||||
/* we want to use the system malloc when we install as /bin/csh */
|
||||
#define SYSMALLOC
|
||||
#define BSD_STYLE_COLORLS
|
||||
/* Use LC_MESSAGES locale category to open the message catalog */
|
||||
#define MCLoadBySet NL_CAT_LOCALE
|
||||
#endif
|
||||
|
||||
#if defined(__NetBSD__)
|
||||
|
||||
+2
-2
@@ -355,9 +355,9 @@ Finally the command:
|
||||
.Pp
|
||||
.Dl "date -j -f ""%a %b %d %T %Z %Y"" ""`date`"" ""+%s"""
|
||||
.Pp
|
||||
can be used to parse the output from
|
||||
can be used to parse the ouput from
|
||||
.Nm
|
||||
and express it in Epoch time.
|
||||
and express it in epoch time.
|
||||
.Sh ENVIRONMENT
|
||||
The following environment variables affect the execution of
|
||||
.Nm :
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
# @(#)Makefile 8.1 (Berkeley) 5/31/93
|
||||
# $FreeBSD$
|
||||
|
||||
MAINTAINER= [email protected]
|
||||
|
||||
PROG= dd
|
||||
SRCS= args.c conv.c conv_tab.c dd.c misc.c position.c
|
||||
|
||||
|
||||
+5
-8
@@ -31,7 +31,7 @@
|
||||
.\" @(#)dd.1 8.2 (Berkeley) 1/13/94
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd August 15, 2004
|
||||
.Dd March 5, 2004
|
||||
.Dt DD 1
|
||||
.Os
|
||||
.Sh NAME
|
||||
@@ -89,10 +89,8 @@ When padding a block in conversion mode or due to use of
|
||||
.Cm noerror
|
||||
and
|
||||
.Cm sync
|
||||
modes, fill with the specified
|
||||
.Tn ASCII
|
||||
character, rather than using a space or
|
||||
.Dv NUL .
|
||||
modes, fill with the specified ASCII character, rather than using a space
|
||||
or nul.
|
||||
.It Cm ibs Ns = Ns Ar n
|
||||
Set the input block size to
|
||||
.Ar n
|
||||
@@ -257,9 +255,8 @@ bytes (or with spaces if a block oriented conversion value was
|
||||
specified) and processed as a normal input buffer.
|
||||
If the
|
||||
.Cm fillchar
|
||||
option is specified, the fill character provided on the command line
|
||||
will override
|
||||
the automatic selection of the fill character.
|
||||
option is specified, the fill char provided on the command line will override
|
||||
the automatic selection of fill character.
|
||||
If the
|
||||
.Cm sync
|
||||
conversion is not specified, the input block is omitted from the output.
|
||||
|
||||
+1
-2
@@ -149,8 +149,7 @@ is set, the block counts will be displayed in units of that size block.
|
||||
.Sh BUGS
|
||||
The
|
||||
.Fl n
|
||||
flag is ignored if a file or file system is specified.
|
||||
Also, if a mount
|
||||
flag is ignored if a file or file system is specified. Also, if a mount
|
||||
point is not accessible by the user, it is possible that the file system
|
||||
information could be stale.
|
||||
.Sh SEE ALSO
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
.\"-
|
||||
.\" Copyright (c) 1983, 1988, 1990, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
.\"
|
||||
@@ -29,7 +28,7 @@
|
||||
.\" @(#)hostname.1 8.2 (Berkeley) 4/28/95
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd May 12, 2005
|
||||
.Dd April 28, 1995
|
||||
.Dt HOSTNAME 1
|
||||
.Os
|
||||
.Sh NAME
|
||||
@@ -46,7 +45,7 @@ utility prints the name of the current host.
|
||||
The super-user can
|
||||
set the hostname by supplying an argument; this is usually done in the
|
||||
network initialization script
|
||||
.Pa /etc/rc.d/hostname ,
|
||||
.Pa /etc/rc.network ,
|
||||
normally run at boot
|
||||
time.
|
||||
This script uses the
|
||||
|
||||
+1
-8
@@ -31,12 +31,10 @@
|
||||
.Nd dump or modify the kernel environment
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
.Op Fl hq
|
||||
.Op Fl h
|
||||
.Nm
|
||||
.Op Fl q
|
||||
.Ar variable Ns Op = Ns Ar value
|
||||
.Nm
|
||||
.Op Fl q
|
||||
.Fl u
|
||||
.Ar variable
|
||||
.Sh DESCRIPTION
|
||||
@@ -61,11 +59,6 @@ If the environment variable is followed by an optional
|
||||
.Ar value ,
|
||||
.Nm
|
||||
will set the environment variable to this value.
|
||||
.Pp
|
||||
If the
|
||||
.Fl q
|
||||
option is set, warnings normally printed as a result of being unable to
|
||||
perform the requested operation will be suppressed.
|
||||
.Sh SEE ALSO
|
||||
.Xr kenv 2 ,
|
||||
.Xr loader 8
|
||||
|
||||
+8
-12
@@ -42,16 +42,15 @@ static int ksetenv(char *, char *);
|
||||
static int kunsetenv(char *);
|
||||
|
||||
static int hflag = 0;
|
||||
static int qflag = 0;
|
||||
static int uflag = 0;
|
||||
|
||||
static void
|
||||
usage(void)
|
||||
{
|
||||
(void)fprintf(stderr, "%s\n%s\n%s\n",
|
||||
"usage: kenv [-hq]",
|
||||
" kenv [-q] variable[=value]",
|
||||
" kenv [-q] -u variable");
|
||||
"usage: kenv [-h]",
|
||||
" kenv variable[=value]",
|
||||
" kenv -u variable");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@@ -64,14 +63,11 @@ main(int argc, char **argv)
|
||||
error = 0;
|
||||
val = NULL;
|
||||
env = NULL;
|
||||
while ((ch = getopt(argc, argv, "hqu")) != -1) {
|
||||
while ((ch = getopt(argc, argv, "hu")) != -1) {
|
||||
switch (ch) {
|
||||
case 'h':
|
||||
hflag++;
|
||||
break;
|
||||
case 'q':
|
||||
qflag++;
|
||||
break;
|
||||
case 'u':
|
||||
uflag++;
|
||||
break;
|
||||
@@ -97,21 +93,21 @@ main(int argc, char **argv)
|
||||
usage();
|
||||
if (env == NULL) {
|
||||
error = kdumpenv();
|
||||
if (error && !qflag)
|
||||
if (error)
|
||||
warn("kdumpenv");
|
||||
} else if (val == NULL) {
|
||||
if (uflag) {
|
||||
error = kunsetenv(env);
|
||||
if (error && !qflag)
|
||||
if (error)
|
||||
warnx("unable to unset %s", env);
|
||||
} else {
|
||||
error = kgetenv(env);
|
||||
if (error && !qflag)
|
||||
if (error)
|
||||
warnx("unable to get %s", env);
|
||||
}
|
||||
} else {
|
||||
error = ksetenv(env, val);
|
||||
if (error && !qflag)
|
||||
if (error)
|
||||
warnx("unable to set %s to %s", env, val);
|
||||
}
|
||||
return (error);
|
||||
|
||||
+51
-49
@@ -31,7 +31,7 @@
|
||||
.\" @(#)ls.1 8.7 (Berkeley) 7/29/94
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd January 11, 2005
|
||||
.Dd May 2, 2004
|
||||
.Dt LS 1
|
||||
.Os
|
||||
.Sh NAME
|
||||
@@ -176,17 +176,27 @@ using base 2 for sizes.
|
||||
.It Fl i
|
||||
For each file, print the file's file serial number (inode number).
|
||||
.It Fl k
|
||||
This has the same effect as setting environment variable
|
||||
.Ev BLOCKSIZE
|
||||
to 1024, except that it also nullifies any
|
||||
.Fl h
|
||||
options to its left.
|
||||
If the
|
||||
.Fl s
|
||||
option is specified, print the file size allocation in kilobytes,
|
||||
not blocks.
|
||||
This option overrides the environment variable
|
||||
.Ev BLOCKSIZE .
|
||||
Note that
|
||||
.Fl k
|
||||
is mutually exclusive to
|
||||
.Fl h ,
|
||||
and later
|
||||
.Fl k
|
||||
will nullify earlier
|
||||
.Fl h .
|
||||
.It Fl l
|
||||
(The lowercase letter
|
||||
.Dq ell . )
|
||||
List files in the long format, as described in the
|
||||
.Sx The Long Format
|
||||
subsection below.
|
||||
List in long format.
|
||||
(See below.)
|
||||
If the output is to a terminal, a total sum for all the file
|
||||
sizes is output on a line before the long listing.
|
||||
.It Fl m
|
||||
Stream output format; list files across the page, separated by commas.
|
||||
.It Fl n
|
||||
@@ -211,12 +221,13 @@ this is the default when output is to a terminal.
|
||||
Reverse the order of the sort to get reverse
|
||||
lexicographical order or the oldest entries first.
|
||||
.It Fl s
|
||||
Display the number of blocks used in the file system by each file.
|
||||
Block sizes and directory totals are handled as described in
|
||||
.Sx The Long Format
|
||||
subsection below, except (if the long format is not also requested)
|
||||
the directory totals are not output when the output is in a
|
||||
single column, even if multi-column output is requested.
|
||||
Display the number of file system blocks actually used by each file, in units
|
||||
of 512 bytes, where partial units are rounded up to the next integer value.
|
||||
If the output is to a terminal, a total sum for all the file
|
||||
sizes is output on a line before the listing.
|
||||
The environment variable
|
||||
.Ev BLOCKSIZE
|
||||
overrides the unit size of 512 bytes.
|
||||
.It Fl t
|
||||
Sort by time modified (most recently modified
|
||||
first) before sorting the operands by lexicographical
|
||||
@@ -302,6 +313,10 @@ number of bytes in the file, abbreviated
|
||||
month, day-of-month file was last modified,
|
||||
hour file last modified, minute file last
|
||||
modified, and the pathname.
|
||||
In addition, for each directory whose contents are displayed, the total
|
||||
number of 512-byte blocks used by the files in the directory is displayed
|
||||
on a line by itself immediately before the information for the files in the
|
||||
directory.
|
||||
.Pp
|
||||
If the modification time of the file is more than 6 months
|
||||
in the past or future, then the year of the last modification
|
||||
@@ -320,24 +335,6 @@ If the file is a symbolic link the pathname of the
|
||||
linked-to file is preceded by
|
||||
.Dq Li -> .
|
||||
.Pp
|
||||
The listing of a directory's contents is preceded
|
||||
by a labeled total number of blocks used in the file system by the files
|
||||
which are listed as the directory's contents
|
||||
(which may or may not include
|
||||
.Pa \&.
|
||||
and
|
||||
.Pa ..
|
||||
and other files which start with a dot, depending on other options).
|
||||
.Pp
|
||||
The default block size is 512 bytes.
|
||||
The block size may be set with option
|
||||
.Fl k
|
||||
or environment variable
|
||||
.Ev BLOCKSIZE .
|
||||
Numbers of blocks in the output will have been rounded up so the
|
||||
numbers of bytes is at least as many as used by the corresponding
|
||||
file system blocks (which might have a different size).
|
||||
.Pp
|
||||
The file mode printed under the
|
||||
.Fl l
|
||||
option consists of the
|
||||
@@ -439,6 +436,21 @@ utility does not show the actual ACL;
|
||||
use
|
||||
.Xr getfacl 1
|
||||
to do this.
|
||||
.Sh EXAMPLES
|
||||
The following is how to do an
|
||||
.Nm
|
||||
listing sorted by size (and shows why
|
||||
.Nm
|
||||
does not need a separate option for this):
|
||||
.Pp
|
||||
.Dl "ls -l | sort -n +4"
|
||||
.Pp
|
||||
Additionally, the
|
||||
.Fl r
|
||||
flag to
|
||||
.Xr sort 1
|
||||
may be used
|
||||
to get the results sorted from largest to smallest (a reverse sort).
|
||||
.Sh DIAGNOSTICS
|
||||
.Ex -std
|
||||
.Sh ENVIRONMENT
|
||||
@@ -446,15 +458,12 @@ The following environment variables affect the execution of
|
||||
.Nm :
|
||||
.Bl -tag -width ".Ev CLICOLOR_FORCE"
|
||||
.It Ev BLOCKSIZE
|
||||
If this is set, its value, rounded up to 512 or down to a
|
||||
multiple of 512, will be used as the block size in bytes by the
|
||||
.Fl l
|
||||
and
|
||||
.Fl s
|
||||
options.
|
||||
See
|
||||
.Sx The Long Format
|
||||
subsection for more information.
|
||||
If the environment variable
|
||||
.Ev BLOCKSIZE
|
||||
is set, the block counts
|
||||
(see
|
||||
.Fl s )
|
||||
will be displayed in units of that size block.
|
||||
.It Ev CLICOLOR
|
||||
Use
|
||||
.Tn ANSI
|
||||
@@ -664,10 +673,3 @@ command appeared in
|
||||
.Sh BUGS
|
||||
To maintain backward compatibility, the relationships between the many
|
||||
options are quite complex.
|
||||
.Pp
|
||||
The exception mentioned in the
|
||||
.Fl s
|
||||
option description might be a feature that was
|
||||
based on the fact that single-column output
|
||||
usually goes to something other than a terminal.
|
||||
It is debatable whether this is a design bug.
|
||||
+1
-1
@@ -147,7 +147,7 @@ build(char *path, mode_t omode)
|
||||
else if (p[0] != '/')
|
||||
continue;
|
||||
*p = '\0';
|
||||
if (!last && p[1] == '\0')
|
||||
if (p[1] == '\0')
|
||||
last = 1;
|
||||
if (first) {
|
||||
/*
|
||||
|
||||
+2
-6
@@ -400,10 +400,8 @@ wr_archive(ARCHD *arcn, int is_app)
|
||||
/*
|
||||
* check if this file meets user specified options match.
|
||||
*/
|
||||
if (sel_chk(arcn) != 0) {
|
||||
ftree_notsel();
|
||||
if (sel_chk(arcn) != 0)
|
||||
continue;
|
||||
}
|
||||
fd = -1;
|
||||
if (uflag) {
|
||||
/*
|
||||
@@ -787,10 +785,8 @@ copy(void)
|
||||
/*
|
||||
* check if this file meets user specified options
|
||||
*/
|
||||
if (sel_chk(arcn) != 0) {
|
||||
ftree_notsel();
|
||||
if (sel_chk(arcn) != 0)
|
||||
continue;
|
||||
}
|
||||
|
||||
/*
|
||||
* if there is already a file in the destination directory with
|
||||
|
||||
@@ -155,7 +155,6 @@ int set_crc(ARCHD *, int);
|
||||
int ftree_start(void);
|
||||
int ftree_add(char *, int);
|
||||
void ftree_sel(ARCHD *);
|
||||
void ftree_notsel(void);
|
||||
void ftree_chk(void);
|
||||
int next_file(ARCHD *);
|
||||
|
||||
|
||||
@@ -213,18 +213,6 @@ ftree_sel(ARCHD *arcn)
|
||||
(void)fts_set(ftsp, ftent, FTS_SKIP);
|
||||
}
|
||||
|
||||
/*
|
||||
* ftree_notsel()
|
||||
* this entry has not been selected by pax.
|
||||
*/
|
||||
|
||||
void
|
||||
ftree_notsel()
|
||||
{
|
||||
if (ftent != NULL)
|
||||
(void)fts_set(ftsp, ftent, FTS_SKIP);
|
||||
}
|
||||
|
||||
/*
|
||||
* ftree_chk()
|
||||
* called at end on pax execution. Prints all those file args that did not
|
||||
|
||||
+18
-30
@@ -387,13 +387,7 @@ tar_rd(ARCHD *arcn, char *buf)
|
||||
* copy out the name and values in the stat buffer
|
||||
*/
|
||||
hd = (HD_TAR *)buf;
|
||||
/*
|
||||
* old tar format specifies the name always be null-terminated,
|
||||
* but let's be robust to broken archives.
|
||||
* the same applies to handling links below.
|
||||
*/
|
||||
arcn->nlen = l_strncpy(arcn->name, hd->name,
|
||||
MIN(sizeof(hd->name), sizeof(arcn->name)) - 1);
|
||||
arcn->nlen = l_strncpy(arcn->name, hd->name, sizeof(arcn->name) - 1);
|
||||
arcn->name[arcn->nlen] = '\0';
|
||||
arcn->sb.st_mode = (mode_t)(asc_ul(hd->mode,sizeof(hd->mode),OCT) &
|
||||
0xfff);
|
||||
@@ -423,7 +417,7 @@ tar_rd(ARCHD *arcn, char *buf)
|
||||
*/
|
||||
arcn->type = PAX_SLK;
|
||||
arcn->ln_nlen = l_strncpy(arcn->ln_name, hd->linkname,
|
||||
MIN(sizeof(hd->linkname), sizeof(arcn->ln_name)) - 1);
|
||||
sizeof(arcn->ln_name) - 1);
|
||||
arcn->ln_name[arcn->ln_nlen] = '\0';
|
||||
arcn->sb.st_mode |= S_IFLNK;
|
||||
break;
|
||||
@@ -435,7 +429,7 @@ tar_rd(ARCHD *arcn, char *buf)
|
||||
arcn->type = PAX_HLK;
|
||||
arcn->sb.st_nlink = 2;
|
||||
arcn->ln_nlen = l_strncpy(arcn->ln_name, hd->linkname,
|
||||
MIN(sizeof(hd->linkname), sizeof(arcn->ln_name)) - 1);
|
||||
sizeof(arcn->ln_name) - 1);
|
||||
arcn->ln_name[arcn->ln_nlen] = '\0';
|
||||
|
||||
/*
|
||||
@@ -539,7 +533,7 @@ tar_wr(ARCHD *arcn)
|
||||
case PAX_SLK:
|
||||
case PAX_HLK:
|
||||
case PAX_HRG:
|
||||
if (arcn->ln_nlen >= (int)sizeof(hd->linkname)) {
|
||||
if (arcn->ln_nlen > (int)sizeof(hd->linkname)) {
|
||||
paxwarn(1,"Link name too long for tar %s", arcn->ln_name);
|
||||
return(1);
|
||||
}
|
||||
@@ -755,19 +749,12 @@ ustar_rd(ARCHD *arcn, char *buf)
|
||||
*/
|
||||
dest = arcn->name;
|
||||
if (*(hd->prefix) != '\0') {
|
||||
cnt = l_strncpy(dest, hd->prefix,
|
||||
MIN(sizeof(hd->prefix), sizeof(arcn->name) - 2));
|
||||
cnt = l_strncpy(dest, hd->prefix, sizeof(arcn->name) - 2);
|
||||
dest += cnt;
|
||||
*dest++ = '/';
|
||||
cnt++;
|
||||
}
|
||||
/*
|
||||
* ustar format specifies the name may be unterminated
|
||||
* if it fills the entire field. this also applies to
|
||||
* the prefix and the linkname.
|
||||
*/
|
||||
arcn->nlen = cnt + l_strncpy(dest, hd->name,
|
||||
MIN(sizeof(hd->name), sizeof(arcn->name) - cnt - 1));
|
||||
arcn->nlen = cnt + l_strncpy(dest, hd->name, sizeof(arcn->name) - cnt);
|
||||
arcn->name[arcn->nlen] = '\0';
|
||||
|
||||
/*
|
||||
@@ -861,7 +848,7 @@ ustar_rd(ARCHD *arcn, char *buf)
|
||||
* copy the link name
|
||||
*/
|
||||
arcn->ln_nlen = l_strncpy(arcn->ln_name, hd->linkname,
|
||||
MIN(sizeof(hd->linkname), sizeof(arcn->ln_name) - 1));
|
||||
sizeof(arcn->ln_name) - 1);
|
||||
arcn->ln_name[arcn->ln_nlen] = '\0';
|
||||
break;
|
||||
case CONTTYPE:
|
||||
@@ -913,7 +900,7 @@ ustar_wr(ARCHD *arcn)
|
||||
*/
|
||||
if (((arcn->type == PAX_SLK) || (arcn->type == PAX_HLK) ||
|
||||
(arcn->type == PAX_HRG)) &&
|
||||
(arcn->ln_nlen > (int)sizeof(hd->linkname))) {
|
||||
(arcn->ln_nlen >= (int)sizeof(hd->linkname))) {
|
||||
paxwarn(1, "Link name too long for ustar %s", arcn->ln_name);
|
||||
return(1);
|
||||
}
|
||||
@@ -938,16 +925,17 @@ ustar_wr(ARCHD *arcn)
|
||||
* occur, we remove the / and copy the first part to the prefix
|
||||
*/
|
||||
*pt = '\0';
|
||||
l_strncpy(hd->prefix, arcn->name, sizeof(hd->prefix));
|
||||
l_strncpy(hd->prefix, arcn->name, sizeof(hd->prefix) - 1);
|
||||
*pt++ = '/';
|
||||
} else
|
||||
memset(hd->prefix, 0, sizeof(hd->prefix));
|
||||
|
||||
/*
|
||||
* copy the name part. this may be the whole path or the part after
|
||||
* the prefix. both the name and prefix may fill the entire field.
|
||||
* the prefix
|
||||
*/
|
||||
l_strncpy(hd->name, pt, sizeof(hd->name));
|
||||
l_strncpy(hd->name, pt, sizeof(hd->name) - 1);
|
||||
hd->name[sizeof(hd->name) - 1] = '\0';
|
||||
|
||||
/*
|
||||
* set the fields in the header that are type dependent
|
||||
@@ -990,8 +978,8 @@ ustar_wr(ARCHD *arcn)
|
||||
hd->typeflag = SYMTYPE;
|
||||
else
|
||||
hd->typeflag = LNKTYPE;
|
||||
/* the link name may occupy the entire field in ustar */
|
||||
l_strncpy(hd->linkname,arcn->ln_name, sizeof(hd->linkname));
|
||||
l_strncpy(hd->linkname,arcn->ln_name, sizeof(hd->linkname) - 1);
|
||||
hd->linkname[sizeof(hd->linkname) - 1] = '\0';
|
||||
memset(hd->devmajor, 0, sizeof(hd->devmajor));
|
||||
memset(hd->devminor, 0, sizeof(hd->devminor));
|
||||
if (ul_oct((u_long)0L, hd->size, sizeof(hd->size), 3))
|
||||
@@ -1084,9 +1072,9 @@ name_split(char *name, int len)
|
||||
* check to see if the file name is small enough to fit in the name
|
||||
* field. if so just return a pointer to the name.
|
||||
*/
|
||||
if (len <= TNMSZ)
|
||||
if (len < TNMSZ)
|
||||
return(name);
|
||||
if (len > (TPFSZ + TNMSZ + 1))
|
||||
if (len > (TPFSZ + TNMSZ))
|
||||
return(NULL);
|
||||
|
||||
/*
|
||||
@@ -1095,7 +1083,7 @@ name_split(char *name, int len)
|
||||
* to find the biggest piece to fit in the name field (or the smallest
|
||||
* prefix we can find)
|
||||
*/
|
||||
start = name + len - TNMSZ - 1;
|
||||
start = name + len - TNMSZ;
|
||||
while ((*start != '\0') && (*start != '/'))
|
||||
++start;
|
||||
|
||||
@@ -1113,7 +1101,7 @@ name_split(char *name, int len)
|
||||
* the file would then expand on extract to //str. The len == 0 below
|
||||
* makes this special case follow the spec to the letter.
|
||||
*/
|
||||
if ((len > TPFSZ) || (len == 0))
|
||||
if ((len >= TPFSZ) || (len == 0))
|
||||
return(NULL);
|
||||
|
||||
/*
|
||||
|
||||
+3
-1
@@ -3,7 +3,7 @@
|
||||
|
||||
PROG= ps
|
||||
SRCS= fmt.c keyword.c nlist.c print.c ps.c
|
||||
|
||||
WARNS?= 5
|
||||
#
|
||||
# To support "lazy" ps for non root/wheel users
|
||||
# add -DLAZY_PS to the cflags. This helps
|
||||
@@ -13,5 +13,7 @@ SRCS= fmt.c keyword.c nlist.c print.c ps.c
|
||||
CFLAGS+=-DLAZY_PS
|
||||
DPADD= ${LIBM} ${LIBKVM}
|
||||
LDADD= -lm -lkvm
|
||||
#BINGRP= kmem
|
||||
#BINMODE=2555
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
+1
-1
@@ -157,7 +157,7 @@ static VAR var[] = {
|
||||
UINT, UIDFMT, 0},
|
||||
{"rgroup", "RGROUP", NULL, LJUST|DSIZ, rgroupname, s_rgroupname,
|
||||
USERLEN, 0, CHAR, NULL, 0},
|
||||
{"rss", "RSS", NULL, 0, kvar, NULL, 5, KOFF(ki_rssize), PGTOK, "ld", 0},
|
||||
{"rss", "RSS", NULL, 0, kvar, NULL, 4, KOFF(ki_rssize), PGTOK, "ld", 0},
|
||||
{"rtprio", "RTPRIO", NULL, 0, priorityr, NULL, 7, KOFF(ki_pri), CHAR,
|
||||
NULL, 0},
|
||||
{"ruid", "RUID", NULL, 0, kvar, NULL, UIDLEN, KOFF(ki_ruid),
|
||||
|
||||
+10
-8
@@ -1,4 +1,3 @@
|
||||
.\"-
|
||||
.\" Copyright (c) 1980, 1990, 1991, 1993, 1994
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
.\"
|
||||
@@ -38,13 +37,14 @@
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
.Op Fl aCcefHhjlmrSTuvwXxZ
|
||||
.Op Fl O Ar fmt | Fl o Ar fmt
|
||||
.Op Fl G Ar gid Ns Op , Ns Ar gid Ns Ar ...
|
||||
.Op Fl M Ar core
|
||||
.Op Fl N Ar system
|
||||
.Op Fl O Ar fmt
|
||||
.Op Fl o Ar fmt
|
||||
.Op Fl p Ar pid Ns Op , Ns Ar pid Ns Ar ...
|
||||
.Op Fl t Ar tty Ns Op , Ns Ar tty Ns Ar ...
|
||||
.Op Fl U Ar user Ns Op , Ns Ar user Ns Ar ...
|
||||
.Op Fl U Ar username Ns Op , Ns Ar username Ns Ar ...
|
||||
.Nm
|
||||
.Op Fl L
|
||||
.Sh DESCRIPTION
|
||||
@@ -103,7 +103,7 @@ The options are as follows:
|
||||
.Bl -tag -width indent
|
||||
.It Fl a
|
||||
Display information about other users' processes as well as your own.
|
||||
This will skip any processes which do not have a controlling terminal,
|
||||
This will skip any processes which do not have a controlling teminal,
|
||||
unless the
|
||||
.Fl x
|
||||
option is also specified.
|
||||
@@ -249,9 +249,7 @@ are specified in the same command, then
|
||||
.Nm
|
||||
will use the one which was specified last.
|
||||
.It Fl Z
|
||||
Add
|
||||
.Xr mac 4
|
||||
label to the list of keywords for which
|
||||
Add label to the list of keywords for which
|
||||
.Nm
|
||||
will display information.
|
||||
.El
|
||||
@@ -603,6 +601,10 @@ attempts to automatically determine the terminal width.
|
||||
.El
|
||||
.Sh FILES
|
||||
.Bl -tag -width ".Pa /boot/kernel/kernel" -compact
|
||||
.It Pa /dev/lomac
|
||||
interface used to query the
|
||||
.Xr lomac 4
|
||||
KLD
|
||||
.It Pa /boot/kernel/kernel
|
||||
default system namelist
|
||||
.It Pa /proc
|
||||
@@ -616,7 +618,7 @@ the mount point of
|
||||
.Xr w 1 ,
|
||||
.Xr kvm 3 ,
|
||||
.Xr strftime 3 ,
|
||||
.Xr mac 4 ,
|
||||
.Xr lomac 4 ,
|
||||
.Xr procfs 5 ,
|
||||
.Xr pstat 8 ,
|
||||
.Xr sysctl 8 ,
|
||||
|
||||
+3
-25
@@ -55,7 +55,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/stat.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/mount.h>
|
||||
|
||||
#include <ctype.h>
|
||||
#include <err.h>
|
||||
@@ -129,7 +128,6 @@ struct listinfo {
|
||||
} l;
|
||||
};
|
||||
|
||||
static int check_procfs(void);
|
||||
static int addelem_gid(struct listinfo *, const char *);
|
||||
static int addelem_pid(struct listinfo *, const char *);
|
||||
static int addelem_tty(struct listinfo *, const char *);
|
||||
@@ -405,14 +403,6 @@ main(int argc, char *argv[])
|
||||
argc -= optind;
|
||||
argv += optind;
|
||||
|
||||
/*
|
||||
* If the user specified ps -e then they want a copy of the process
|
||||
* environment kvm_getenvv(3) attempts to open /proc/<pid>/mem.
|
||||
* Check to make sure that procfs is mounted on /proc, otherwise
|
||||
* print a warning informing the user that output will be incomplete.
|
||||
*/
|
||||
if (needenv == 1 && check_procfs() == 0)
|
||||
warnx("Process environment requires procfs(5)");
|
||||
/*
|
||||
* If there arguments after processing all the options, attempt
|
||||
* to treat them as a list of process ids.
|
||||
@@ -1186,27 +1176,15 @@ kludge_oldps_options(const char *optlist, char *origval, const char *nextarg)
|
||||
return (newopts);
|
||||
}
|
||||
|
||||
static int
|
||||
check_procfs(void)
|
||||
{
|
||||
struct statfs mnt;
|
||||
|
||||
if (statfs("/proc", &mnt) < 0)
|
||||
return (0);
|
||||
if (strcmp(mnt.f_fstypename, "procfs") != 0)
|
||||
return (0);
|
||||
return (1);
|
||||
}
|
||||
|
||||
static void
|
||||
usage(void)
|
||||
{
|
||||
#define SINGLE_OPTS "[-aCce" OPT_LAZY_f "HhjlmrSTuvwXxZ]"
|
||||
#define SINGLE_OPTS "[-aCc" OPT_LAZY_f "HhjlmrSTuvwXxZ]"
|
||||
|
||||
(void)fprintf(stderr, "%s\n%s\n%s\n%s\n",
|
||||
"usage: ps " SINGLE_OPTS " [-O fmt | -o fmt] [-G gid[,gid...]]",
|
||||
"usage: ps " SINGLE_OPTS " [-G gid[,gid]] [-O|o fmt]",
|
||||
" [-p pid[,pid]] [-t tty[,tty]] [-U user[,user]]",
|
||||
" [-M core] [-N system]",
|
||||
" [-p pid[,pid...]] [-t tty[,tty...]] [-U user[,user...]]",
|
||||
" ps [-L]");
|
||||
exit(1);
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PROG= rm
|
||||
SRCS= rm.c
|
||||
|
||||
LINKS= ${BINDIR}/rm ${BINDIR}/unlink
|
||||
MLINKS= rm.1 unlink.1
|
||||
|
||||
+20
-33
@@ -1,4 +1,3 @@
|
||||
.\"-
|
||||
.\" Copyright (c) 1990, 1993, 1994
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
.\"
|
||||
@@ -32,7 +31,7 @@
|
||||
.\" @(#)rm.1 8.5 (Berkeley) 12/5/94
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd September 29, 2005
|
||||
.Dd January 28, 1999
|
||||
.Dt RM 1
|
||||
.Os
|
||||
.Sh NAME
|
||||
@@ -41,8 +40,7 @@
|
||||
.Nd remove directory entries
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
.Op Fl f | i
|
||||
.Op Fl dIPRrvW
|
||||
.Op Fl dfiPRrvW
|
||||
.Ar
|
||||
.Nm unlink
|
||||
.Ar file
|
||||
@@ -78,20 +76,10 @@ The
|
||||
option overrides any previous
|
||||
.Fl f
|
||||
options.
|
||||
.It Fl I
|
||||
Request confirmation once if more than three files are being removed or if a
|
||||
directory is being recursively removed.
|
||||
This is a far less intrusive option than
|
||||
.Fl i
|
||||
yet provides almost the same level of protection against mistakes.
|
||||
.It Fl P
|
||||
Overwrite regular files before deleting them.
|
||||
Files are overwritten three times, first with the byte pattern 0xff,
|
||||
then 0x00, and then 0xff again, before they are deleted.
|
||||
Specifying this flag for a read only file will cause
|
||||
.Nm
|
||||
to generate an error message and exit.
|
||||
The file will not be removed or overwritten.
|
||||
.It Fl R
|
||||
Attempt to remove the file hierarchy rooted in each file argument.
|
||||
The
|
||||
@@ -123,10 +111,9 @@ The
|
||||
utility removes symbolic links, not the files referenced by the links.
|
||||
.Pp
|
||||
It is an error to attempt to remove the files
|
||||
.Pa / ,
|
||||
.Pa .\&
|
||||
.Dq .\&
|
||||
or
|
||||
.Pa .. .
|
||||
.Dq .. .
|
||||
.Pp
|
||||
When the utility is called as
|
||||
.Nm unlink ,
|
||||
@@ -168,6 +155,22 @@ path reference.
|
||||
For example:
|
||||
.Dl rm /home/user/-filename
|
||||
.Dl rm ./-filename
|
||||
.Sh SEE ALSO
|
||||
.Xr chflags 1 ,
|
||||
.Xr rmdir 1 ,
|
||||
.Xr undelete 2 ,
|
||||
.Xr unlink 2 ,
|
||||
.Xr fts 3 ,
|
||||
.Xr getopt 3 ,
|
||||
.Xr symlink 7
|
||||
.Sh BUGS
|
||||
The
|
||||
.Fl P
|
||||
option assumes that the underlying file system is a fixed-block file
|
||||
system.
|
||||
UFS is a fixed-block file system, LFS is not.
|
||||
In addition, only regular files are overwritten, other types of files
|
||||
are not.
|
||||
.Sh COMPATIBILITY
|
||||
The
|
||||
.Nm
|
||||
@@ -183,14 +186,6 @@ Also, historical
|
||||
.Bx
|
||||
implementations prompted on the standard output,
|
||||
not the standard error output.
|
||||
.Sh SEE ALSO
|
||||
.Xr chflags 1 ,
|
||||
.Xr rmdir 1 ,
|
||||
.Xr undelete 2 ,
|
||||
.Xr unlink 2 ,
|
||||
.Xr fts 3 ,
|
||||
.Xr getopt 3 ,
|
||||
.Xr symlink 7
|
||||
.Sh STANDARDS
|
||||
The
|
||||
.Nm
|
||||
@@ -206,11 +201,3 @@ A
|
||||
.Nm
|
||||
command appeared in
|
||||
.At v1 .
|
||||
.Sh BUGS
|
||||
The
|
||||
.Fl P
|
||||
option assumes that the underlying file system is a fixed-block file
|
||||
system.
|
||||
UFS is a fixed-block file system, LFS is not.
|
||||
In addition, only regular files are overwritten, other types of files
|
||||
are not.
|
||||
+12
-100
@@ -58,13 +58,10 @@ __FBSDID("$FreeBSD$");
|
||||
#include <unistd.h>
|
||||
|
||||
int dflag, eval, fflag, iflag, Pflag, vflag, Wflag, stdin_ok;
|
||||
int rflag, Iflag;
|
||||
uid_t uid;
|
||||
|
||||
int check(char *, char *, struct stat *);
|
||||
int check2(char **);
|
||||
void checkdot(char **);
|
||||
void checkslash(char **);
|
||||
void rm_file(char **);
|
||||
int rm_overwrite(char *, struct stat *);
|
||||
void rm_tree(char **);
|
||||
@@ -73,14 +70,14 @@ void usage(void);
|
||||
/*
|
||||
* rm --
|
||||
* This rm is different from historic rm's, but is expected to match
|
||||
* POSIX 1003.2 behavior. The most visible difference is that -f
|
||||
* POSIX 1003.2 behavior. The most visible difference is that -f
|
||||
* has two specific effects now, ignore non-existent files and force
|
||||
* file removal.
|
||||
* file removal.
|
||||
*/
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
int ch;
|
||||
int ch, rflag;
|
||||
char *p;
|
||||
|
||||
/*
|
||||
@@ -104,7 +101,7 @@ main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
Pflag = rflag = 0;
|
||||
while ((ch = getopt(argc, argv, "dfiIPRrvW")) != -1)
|
||||
while ((ch = getopt(argc, argv, "dfiPRrvW")) != -1)
|
||||
switch(ch) {
|
||||
case 'd':
|
||||
dflag = 1;
|
||||
@@ -117,9 +114,6 @@ main(int argc, char *argv[])
|
||||
fflag = 0;
|
||||
iflag = 1;
|
||||
break;
|
||||
case 'I':
|
||||
Iflag = 1;
|
||||
break;
|
||||
case 'P':
|
||||
Pflag = 1;
|
||||
break;
|
||||
@@ -146,17 +140,11 @@ main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
checkdot(argv);
|
||||
if (getenv("POSIXLY_CORRECT") == NULL)
|
||||
checkslash(argv);
|
||||
uid = geteuid();
|
||||
|
||||
if (*argv) {
|
||||
stdin_ok = isatty(STDIN_FILENO);
|
||||
|
||||
if (Iflag) {
|
||||
if (check2(argv) == 0)
|
||||
exit (1);
|
||||
}
|
||||
if (rflag)
|
||||
rm_tree(argv);
|
||||
else
|
||||
@@ -192,11 +180,8 @@ rm_tree(char **argv)
|
||||
flags |= FTS_NOSTAT;
|
||||
if (Wflag)
|
||||
flags |= FTS_WHITEOUT;
|
||||
if (!(fts = fts_open(argv, flags, NULL))) {
|
||||
if (fflag && errno == ENOENT)
|
||||
return;
|
||||
if (!(fts = fts_open(argv, flags, NULL)))
|
||||
err(1, "fts_open");
|
||||
}
|
||||
while ((p = fts_read(fts)) != NULL) {
|
||||
switch (p->fts_info) {
|
||||
case FTS_DNR:
|
||||
@@ -307,7 +292,6 @@ err:
|
||||
}
|
||||
if (errno)
|
||||
err(1, "fts_read");
|
||||
fts_close(fts);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -450,11 +434,14 @@ check(char *path, char *name, struct stat *sp)
|
||||
else {
|
||||
/*
|
||||
* If it's not a symbolic link and it's unwritable and we're
|
||||
* talking to a terminal, ask. Symbolic links are excluded
|
||||
* talking to a terminal, ask. Symbolic links are excluded
|
||||
* because their permissions are meaningless. Check stdin_ok
|
||||
* first because we may not have stat'ed the file.
|
||||
* Also skip this check if the -P option was specified because
|
||||
* we will not be able to overwrite file contents and will
|
||||
* barf later.
|
||||
*/
|
||||
if (!stdin_ok || S_ISLNK(sp->st_mode) ||
|
||||
if (!stdin_ok || S_ISLNK(sp->st_mode) || Pflag ||
|
||||
(!access(name, W_OK) &&
|
||||
!(sp->st_flags & (SF_APPEND|SF_IMMUTABLE)) &&
|
||||
(!(sp->st_flags & (UF_APPEND|UF_IMMUTABLE)) || !uid)))
|
||||
@@ -462,15 +449,11 @@ check(char *path, char *name, struct stat *sp)
|
||||
strmode(sp->st_mode, modep);
|
||||
if ((flagsp = fflagstostr(sp->st_flags)) == NULL)
|
||||
err(1, "fflagstostr");
|
||||
if (Pflag)
|
||||
errx(1,
|
||||
"%s: -P was specified, but file is not writable",
|
||||
path);
|
||||
(void)fprintf(stderr, "override %s%s%s/%s %s%sfor %s? ",
|
||||
modep + 1, modep[9] == ' ' ? "" : " ",
|
||||
user_from_uid(sp->st_uid, 0),
|
||||
group_from_gid(sp->st_gid, 0),
|
||||
*flagsp ? flagsp : "", *flagsp ? " " : "",
|
||||
*flagsp ? flagsp : "", *flagsp ? " " : "",
|
||||
path);
|
||||
free(flagsp);
|
||||
}
|
||||
@@ -482,77 +465,6 @@ check(char *path, char *name, struct stat *sp)
|
||||
return (first == 'y' || first == 'Y');
|
||||
}
|
||||
|
||||
#define ISSLASH(a) ((a)[0] == '/' && (a)[1] == '\0')
|
||||
void
|
||||
checkslash(char **argv)
|
||||
{
|
||||
char **t, **u;
|
||||
int complained;
|
||||
|
||||
complained = 0;
|
||||
for (t = argv; *t;) {
|
||||
if (ISSLASH(*t)) {
|
||||
if (!complained++)
|
||||
warnx("\"/\" may not be removed");
|
||||
eval = 1;
|
||||
for (u = t; u[0] != NULL; ++u)
|
||||
u[0] = u[1];
|
||||
} else {
|
||||
++t;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
check2(char **argv)
|
||||
{
|
||||
struct stat st;
|
||||
int first;
|
||||
int ch;
|
||||
int fcount = 0;
|
||||
int dcount = 0;
|
||||
int i;
|
||||
const char *dname = NULL;
|
||||
|
||||
for (i = 0; argv[i]; ++i) {
|
||||
if (lstat(argv[i], &st) == 0) {
|
||||
if (S_ISDIR(st.st_mode)) {
|
||||
++dcount;
|
||||
dname = argv[i]; /* only used if 1 dir */
|
||||
} else {
|
||||
++fcount;
|
||||
}
|
||||
}
|
||||
}
|
||||
first = 0;
|
||||
while (first != 'n' && first != 'N' && first != 'y' && first != 'Y') {
|
||||
if (dcount && rflag) {
|
||||
fprintf(stderr, "recursively remove");
|
||||
if (dcount == 1)
|
||||
fprintf(stderr, " %s", dname);
|
||||
else
|
||||
fprintf(stderr, " %d dirs", dcount);
|
||||
if (fcount == 1)
|
||||
fprintf(stderr, " and 1 file");
|
||||
else if (fcount > 1)
|
||||
fprintf(stderr, " and %d files", fcount);
|
||||
} else if (dcount + fcount > 3) {
|
||||
fprintf(stderr, "remove %d files", dcount + fcount);
|
||||
} else {
|
||||
return(1);
|
||||
}
|
||||
fprintf(stderr, "? ");
|
||||
fflush(stderr);
|
||||
|
||||
first = ch = getchar();
|
||||
while (ch != '\n' && ch != EOF)
|
||||
ch = getchar();
|
||||
if (ch == EOF)
|
||||
break;
|
||||
}
|
||||
return (first == 'y' || first == 'Y');
|
||||
}
|
||||
|
||||
#define ISDOT(a) ((a)[0] == '.' && (!(a)[1] || ((a)[1] == '.' && !(a)[2])))
|
||||
void
|
||||
checkdot(char **argv)
|
||||
@@ -583,7 +495,7 @@ usage(void)
|
||||
{
|
||||
|
||||
(void)fprintf(stderr, "%s\n%s\n",
|
||||
"usage: rm [-f | -i] [-dIPRrvW] file ...",
|
||||
"usage: rm [-f | -i] [-dPRrvW] file ...",
|
||||
" unlink file");
|
||||
exit(EX_USAGE);
|
||||
}
|
||||
+7
-8
@@ -78,14 +78,15 @@ main(int argc, char *argv[])
|
||||
usage();
|
||||
|
||||
for (errors = 0; *argv; argv++) {
|
||||
if (rmdir(*argv) < 0) {
|
||||
warn("%s", *argv);
|
||||
errors = 1;
|
||||
if (pflag) {
|
||||
errors |= rm_path(*argv);
|
||||
} else {
|
||||
if (rmdir(*argv) < 0) {
|
||||
warn("%s", *argv);
|
||||
errors = 1;
|
||||
}
|
||||
if (vflag)
|
||||
printf("%s\n", *argv);
|
||||
if (pflag)
|
||||
errors |= rm_path(*argv);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,11 +104,9 @@ rm_path(char *path)
|
||||
*++p = '\0';
|
||||
while ((p = strrchr(path, '/')) != NULL) {
|
||||
/* Delete trailing slashes. */
|
||||
while (--p >= path && *p == '/')
|
||||
while (--p > path && *p == '/')
|
||||
;
|
||||
*++p = '\0';
|
||||
if (p == path)
|
||||
break;
|
||||
|
||||
if (rmdir(path) < 0) {
|
||||
warn("%s", path);
|
||||
|
||||
+1
-1
@@ -242,7 +242,7 @@ unaliascmd(int argc __unused, char **argv __unused)
|
||||
}
|
||||
}
|
||||
for (i = 0; *argptr; argptr++)
|
||||
i |= unalias(*argptr);
|
||||
i = unalias(*argptr);
|
||||
|
||||
return (i);
|
||||
}
|
||||
|
||||
@@ -77,7 +77,6 @@ returncmd return
|
||||
setcmd set
|
||||
setvarcmd setvar
|
||||
shiftcmd shift
|
||||
timescmd times
|
||||
trapcmd trap
|
||||
truecmd : true
|
||||
typecmd type
|
||||
|
||||
+13
-55
@@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <signal.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/resource.h>
|
||||
#include <sys/wait.h> /* For WIFSIGNALED(status) */
|
||||
#include <errno.h>
|
||||
|
||||
@@ -91,8 +90,8 @@ int exitstatus; /* exit status of last command */
|
||||
int oexitstatus; /* saved exit status */
|
||||
|
||||
|
||||
STATIC void evalloop(union node *, int);
|
||||
STATIC void evalfor(union node *, int);
|
||||
STATIC void evalloop(union node *);
|
||||
STATIC void evalfor(union node *);
|
||||
STATIC void evalcase(union node *, int);
|
||||
STATIC void evalsubshell(union node *, int);
|
||||
STATIC void expredir(union node *);
|
||||
@@ -183,9 +182,6 @@ evalstring(char *s)
|
||||
void
|
||||
evaltree(union node *n, int flags)
|
||||
{
|
||||
int do_etest;
|
||||
|
||||
do_etest = 0;
|
||||
if (n == NULL) {
|
||||
TRACE(("evaltree(NULL) called\n"));
|
||||
exitstatus = 0;
|
||||
@@ -197,7 +193,7 @@ evaltree(union node *n, int flags)
|
||||
TRACE(("evaltree(0x%lx: %d) called\n", (long)n, n->type));
|
||||
switch (n->type) {
|
||||
case NSEMI:
|
||||
evaltree(n->nbinary.ch1, flags & ~EV_EXIT);
|
||||
evaltree(n->nbinary.ch1, 0);
|
||||
if (evalskip)
|
||||
goto out;
|
||||
evaltree(n->nbinary.ch2, flags);
|
||||
@@ -223,7 +219,6 @@ evaltree(union node *n, int flags)
|
||||
break;
|
||||
case NSUBSHELL:
|
||||
evalsubshell(n, flags);
|
||||
do_etest = !(flags & EV_TESTED);
|
||||
break;
|
||||
case NBACKGND:
|
||||
evalsubshell(n, flags);
|
||||
@@ -242,10 +237,10 @@ evaltree(union node *n, int flags)
|
||||
}
|
||||
case NWHILE:
|
||||
case NUNTIL:
|
||||
evalloop(n, flags & ~EV_EXIT);
|
||||
evalloop(n);
|
||||
break;
|
||||
case NFOR:
|
||||
evalfor(n, flags & ~EV_EXIT);
|
||||
evalfor(n);
|
||||
break;
|
||||
case NCASE:
|
||||
evalcase(n, flags);
|
||||
@@ -261,11 +256,9 @@ evaltree(union node *n, int flags)
|
||||
|
||||
case NPIPE:
|
||||
evalpipe(n);
|
||||
do_etest = !(flags & EV_TESTED);
|
||||
break;
|
||||
case NCMD:
|
||||
evalcommand(n, flags, (struct backcmd *)NULL);
|
||||
do_etest = !(flags & EV_TESTED);
|
||||
break;
|
||||
default:
|
||||
out1fmt("Node type = %d\n", n->type);
|
||||
@@ -275,13 +268,15 @@ evaltree(union node *n, int flags)
|
||||
out:
|
||||
if (pendingsigs)
|
||||
dotrap();
|
||||
if ((flags & EV_EXIT) || (eflag && exitstatus != 0 && do_etest))
|
||||
if ((flags & EV_EXIT) || (eflag && exitstatus
|
||||
&& !(flags & EV_TESTED) && (n->type == NCMD ||
|
||||
n->type == NSUBSHELL)))
|
||||
exitshell(exitstatus);
|
||||
}
|
||||
|
||||
|
||||
STATIC void
|
||||
evalloop(union node *n, int flags)
|
||||
evalloop(union node *n)
|
||||
{
|
||||
int status;
|
||||
|
||||
@@ -305,7 +300,7 @@ skipping: if (evalskip == SKIPCONT && --skipcount <= 0) {
|
||||
if (exitstatus == 0)
|
||||
break;
|
||||
}
|
||||
evaltree(n->nbinary.ch2, flags);
|
||||
evaltree(n->nbinary.ch2, 0);
|
||||
status = exitstatus;
|
||||
if (evalskip)
|
||||
goto skipping;
|
||||
@@ -317,7 +312,7 @@ skipping: if (evalskip == SKIPCONT && --skipcount <= 0) {
|
||||
|
||||
|
||||
STATIC void
|
||||
evalfor(union node *n, int flags)
|
||||
evalfor(union node *n)
|
||||
{
|
||||
struct arglist arglist;
|
||||
union node *argp;
|
||||
@@ -338,7 +333,7 @@ evalfor(union node *n, int flags)
|
||||
loopnest++;
|
||||
for (sp = arglist.list ; sp ; sp = sp->next) {
|
||||
setvar(n->nfor.var, sp->text, 0);
|
||||
evaltree(n->nfor.body, flags);
|
||||
evaltree(n->nfor.body, 0);
|
||||
if (evalskip) {
|
||||
if (evalskip == SKIPCONT && --skipcount <= 0) {
|
||||
evalskip = 0;
|
||||
@@ -977,7 +972,6 @@ commandcmd(int argc, char **argv)
|
||||
struct strlist *sp;
|
||||
char *path;
|
||||
int ch;
|
||||
int cmd = -1;
|
||||
|
||||
for (sp = cmdenviron; sp ; sp = sp->next)
|
||||
setvareq(sp->text, VEXPORT|VSTACK);
|
||||
@@ -985,17 +979,11 @@ commandcmd(int argc, char **argv)
|
||||
|
||||
optind = optreset = 1;
|
||||
opterr = 0;
|
||||
while ((ch = getopt(argc, argv, "pvV")) != -1) {
|
||||
while ((ch = getopt(argc, argv, "p")) != -1) {
|
||||
switch (ch) {
|
||||
case 'p':
|
||||
path = stdpath;
|
||||
break;
|
||||
case 'v':
|
||||
cmd = TYPECMD_SMALLV;
|
||||
break;
|
||||
case 'V':
|
||||
cmd = TYPECMD_BIGV;
|
||||
break;
|
||||
case '?':
|
||||
default:
|
||||
error("unknown option: -%c", optopt);
|
||||
@@ -1004,11 +992,6 @@ commandcmd(int argc, char **argv)
|
||||
argc -= optind;
|
||||
argv += optind;
|
||||
|
||||
if (cmd != -1) {
|
||||
if (argc != 1)
|
||||
error("wrong number of arguments");
|
||||
return typecmd_impl(2, argv - 1, cmd);
|
||||
}
|
||||
if (argc != 0) {
|
||||
old = handler;
|
||||
handler = &loc;
|
||||
@@ -1079,28 +1062,3 @@ execcmd(int argc, char **argv)
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
timescmd(int argc __unused, char **argv __unused)
|
||||
{
|
||||
struct rusage ru;
|
||||
long shumins, shsmins, chumins, chsmins;
|
||||
double shusecs, shssecs, chusecs, chssecs;
|
||||
|
||||
if (getrusage(RUSAGE_SELF, &ru) < 0)
|
||||
return 1;
|
||||
shumins = ru.ru_utime.tv_sec / 60;
|
||||
shusecs = ru.ru_utime.tv_sec % 60 + ru.ru_utime.tv_usec / 1000000.;
|
||||
shsmins = ru.ru_stime.tv_sec / 60;
|
||||
shssecs = ru.ru_stime.tv_sec % 60 + ru.ru_stime.tv_usec / 1000000.;
|
||||
if (getrusage(RUSAGE_CHILDREN, &ru) < 0)
|
||||
return 1;
|
||||
chumins = ru.ru_utime.tv_sec / 60;
|
||||
chusecs = ru.ru_utime.tv_sec % 60 + ru.ru_utime.tv_usec / 1000000.;
|
||||
chsmins = ru.ru_stime.tv_sec / 60;
|
||||
chssecs = ru.ru_stime.tv_sec % 60 + ru.ru_stime.tv_usec / 1000000.;
|
||||
out1fmt("%ldm%.3fs %ldm%.3fs\n%ldm%.3fs %ldm%.3fs\n", shumins,
|
||||
shusecs, shsmins, shssecs, chumins, chusecs, chsmins, chssecs);
|
||||
return 0;
|
||||
}
|
||||
@@ -56,7 +56,6 @@ int returncmd(int, char **);
|
||||
int falsecmd(int, char **);
|
||||
int truecmd(int, char **);
|
||||
int execcmd(int, char **);
|
||||
int timescmd(int, char **);
|
||||
int commandcmd(int, char **);
|
||||
|
||||
/* in_function returns nonzero if we are currently evaluating a function */
|
||||
|
||||
+12
-47
@@ -705,12 +705,11 @@ unsetfunc(char *name)
|
||||
}
|
||||
|
||||
/*
|
||||
* Shared code for the following builtin commands:
|
||||
* type, command -v, command -V
|
||||
* Locate and print what a word is...
|
||||
*/
|
||||
|
||||
int
|
||||
typecmd_impl(int argc, char **argv, int cmd)
|
||||
typecmd(int argc, char **argv)
|
||||
{
|
||||
struct cmdentry entry;
|
||||
struct tblentry *cmdp;
|
||||
@@ -721,28 +720,20 @@ typecmd_impl(int argc, char **argv, int cmd)
|
||||
extern char *const parsekwd[];
|
||||
|
||||
for (i = 1; i < argc; i++) {
|
||||
if (cmd != TYPECMD_SMALLV)
|
||||
out1str(argv[i]);
|
||||
|
||||
out1str(argv[i]);
|
||||
/* First look at the keywords */
|
||||
for (pp = (char **)parsekwd; *pp; pp++)
|
||||
if (**pp == *argv[i] && equal(*pp, argv[i]))
|
||||
break;
|
||||
|
||||
if (*pp) {
|
||||
if (cmd == TYPECMD_SMALLV)
|
||||
out1fmt("%s\n", argv[i]);
|
||||
else
|
||||
out1str(" is a shell keyword\n");
|
||||
out1str(" is a shell keyword\n");
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Then look at the aliases */
|
||||
if ((ap = lookupalias(argv[i], 1)) != NULL) {
|
||||
if (cmd == TYPECMD_SMALLV)
|
||||
out1fmt("alias %s='%s'\n", argv[i], ap->val);
|
||||
else
|
||||
out1fmt(" is an alias for %s\n", ap->val);
|
||||
out1fmt(" is an alias for %s\n", ap->val);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -765,55 +756,29 @@ typecmd_impl(int argc, char **argv, int cmd)
|
||||
name = padvance(&path, argv[i]);
|
||||
stunalloc(name);
|
||||
} while (--j >= 0);
|
||||
if (cmd == TYPECMD_SMALLV)
|
||||
out1fmt("%s\n", name);
|
||||
else
|
||||
out1fmt(" is%s %s\n",
|
||||
(cmdp && cmd == TYPECMD_TYPE) ?
|
||||
" a tracked alias for" : "",
|
||||
name);
|
||||
out1fmt(" is%s %s\n",
|
||||
cmdp ? " a tracked alias for" : "", name);
|
||||
} else {
|
||||
if (access(argv[i], X_OK) == 0) {
|
||||
if (cmd == TYPECMD_SMALLV)
|
||||
out1fmt("%s\n", argv[i]);
|
||||
else
|
||||
out1fmt(" is %s\n", argv[i]);
|
||||
}
|
||||
if (access(argv[i], X_OK) == 0)
|
||||
out1fmt(" is %s\n", argv[i]);
|
||||
else
|
||||
out1fmt(": %s\n", strerror(errno));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case CMDFUNCTION:
|
||||
if (cmd == TYPECMD_SMALLV)
|
||||
out1fmt("%s\n", argv[i]);
|
||||
else
|
||||
out1str(" is a shell function\n");
|
||||
out1str(" is a shell function\n");
|
||||
break;
|
||||
|
||||
case CMDBUILTIN:
|
||||
if (cmd == TYPECMD_SMALLV)
|
||||
out1fmt("%s\n", argv[i]);
|
||||
else
|
||||
out1str(" is a shell builtin\n");
|
||||
out1str(" is a shell builtin\n");
|
||||
break;
|
||||
|
||||
default:
|
||||
if (cmd != TYPECMD_SMALLV)
|
||||
out1str(": not found\n");
|
||||
out1str(": not found\n");
|
||||
error |= 127;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return error;
|
||||
}
|
||||
|
||||
/*
|
||||
* Locate and print what a word is...
|
||||
*/
|
||||
|
||||
int
|
||||
typecmd(int argc, char **argv)
|
||||
{
|
||||
return typecmd_impl(argc, argv, TYPECMD_TYPE);
|
||||
}
|
||||
@@ -39,12 +39,6 @@
|
||||
#define CMDBUILTIN 1 /* command is a shell builtin */
|
||||
#define CMDFUNCTION 2 /* command is a shell function */
|
||||
|
||||
/* values for typecmd_impl's third parameter */
|
||||
enum {
|
||||
TYPECMD_SMALLV, /* command -v */
|
||||
TYPECMD_BIGV, /* command -V */
|
||||
TYPECMD_TYPE /* type */
|
||||
};
|
||||
|
||||
struct cmdentry {
|
||||
int cmdtype;
|
||||
@@ -69,6 +63,5 @@ void deletefuncs(void);
|
||||
void addcmdentry(char *, struct cmdentry *);
|
||||
void defun(char *, union node *);
|
||||
int unsetfunc(char *);
|
||||
int typecmd_impl(int, char **, int);
|
||||
int typecmd(int, char **);
|
||||
void clearcmdentry(int);
|
||||
+1
-1
@@ -1162,7 +1162,7 @@ expmeta(char *enddir, char *name)
|
||||
if (*p == '\0')
|
||||
break;
|
||||
}
|
||||
if (metaflag == 0 || lstat(expdir, &statb) >= 0)
|
||||
if (metaflag == 0 || stat(expdir, &statb) >= 0)
|
||||
addfname(expdir);
|
||||
return;
|
||||
}
|
||||
|
||||
+1
-2
@@ -926,8 +926,7 @@ dowait(int block, struct job *job)
|
||||
in_dowait--;
|
||||
if (breakwaitcmd != 0) {
|
||||
breakwaitcmd = 0;
|
||||
if (pid <= 0)
|
||||
return -1;
|
||||
return -1;
|
||||
}
|
||||
if (pid <= 0)
|
||||
return pid;
|
||||
|
||||
+2
-16
@@ -57,10 +57,7 @@ ckmalloc(int nbytes)
|
||||
{
|
||||
pointer p;
|
||||
|
||||
INTOFF;
|
||||
p = malloc(nbytes);
|
||||
INTON;
|
||||
if (p == NULL)
|
||||
if ((p = malloc(nbytes)) == NULL)
|
||||
error("Out of space");
|
||||
return p;
|
||||
}
|
||||
@@ -73,22 +70,11 @@ ckmalloc(int nbytes)
|
||||
pointer
|
||||
ckrealloc(pointer p, int nbytes)
|
||||
{
|
||||
INTOFF;
|
||||
p = realloc(p, nbytes);
|
||||
INTON;
|
||||
if (p == NULL)
|
||||
if ((p = realloc(p, nbytes)) == NULL)
|
||||
error("Out of space");
|
||||
return p;
|
||||
}
|
||||
|
||||
void
|
||||
ckfree(pointer p)
|
||||
{
|
||||
INTOFF;
|
||||
free(p);
|
||||
INTON;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Make a copy of a string in safe storage.
|
||||
|
||||
+2
-1
@@ -48,7 +48,6 @@ extern int herefd;
|
||||
|
||||
pointer ckmalloc(int);
|
||||
pointer ckrealloc(pointer, int);
|
||||
void ckfree(pointer);
|
||||
char *savestr(char *);
|
||||
pointer stalloc(int);
|
||||
void stunalloc(pointer);
|
||||
@@ -73,3 +72,5 @@ void ungrabstackstr(char *, char *);
|
||||
#define STTOPC(p) p[-1]
|
||||
#define STADJUST(amount, p) (p += (amount), sstrnleft -= (amount))
|
||||
#define grabstackstr(p) stalloc(stackblocksize() - sstrnleft)
|
||||
|
||||
#define ckfree(p) free((pointer)(p))
|
||||
+1
-3
@@ -270,20 +270,18 @@ umaskcmd(int argc __unused, char **argv)
|
||||
mask = 0;
|
||||
do {
|
||||
if (*ap >= '8' || *ap < '0')
|
||||
error("Illegal number: %s", *argptr);
|
||||
error("Illegal number: %s", argv[1]);
|
||||
mask = (mask << 3) + (*ap - '0');
|
||||
} while (*++ap != '\0');
|
||||
umask(mask);
|
||||
} else {
|
||||
void *set;
|
||||
INTOFF;
|
||||
if ((set = setmode (ap)) == 0)
|
||||
error("Illegal number: %s", ap);
|
||||
|
||||
mask = getmode (set, ~mask & 0777);
|
||||
umask(~mask & 0777);
|
||||
free(set);
|
||||
INTON;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
||||
+11
-8
@@ -196,7 +196,7 @@ options(int cmdline)
|
||||
STATIC void
|
||||
minus_o(char *name, int val)
|
||||
{
|
||||
int i;
|
||||
int doneset, i;
|
||||
|
||||
if (name == NULL) {
|
||||
if (val) {
|
||||
@@ -207,13 +207,16 @@ minus_o(char *name, int val)
|
||||
optlist[i].val ? "on" : "off");
|
||||
} else {
|
||||
/* Output suitable for re-input to shell. */
|
||||
for (i = 0; i < NOPTS; i++) {
|
||||
if (i % 6 == 0)
|
||||
out1str(i == 0 ? "set" : "\nset");
|
||||
out1fmt(" %co %s", optlist[i].val ? '-' : '+',
|
||||
optlist[i].name);
|
||||
}
|
||||
out1c('\n');
|
||||
for (doneset = i = 0; i < NOPTS; i++)
|
||||
if (optlist[i].val) {
|
||||
if (!doneset) {
|
||||
out1str("set");
|
||||
doneset = 1;
|
||||
}
|
||||
out1fmt(" -o %s", optlist[i].name);
|
||||
}
|
||||
if (doneset)
|
||||
out1c('\n');
|
||||
}
|
||||
} else {
|
||||
for (i = 0; i < NOPTS; i++)
|
||||
|
||||
@@ -134,10 +134,6 @@ outqstr(const char *p, struct output *file)
|
||||
{
|
||||
char ch;
|
||||
|
||||
if (p[0] == '\0') {
|
||||
outstr("''", file);
|
||||
return;
|
||||
}
|
||||
if (p[strcspn(p, "|&;<>()$`\\\"'")] == '\0' && (!ifsset() ||
|
||||
p[strcspn(p, ifsval())] == '\0')) {
|
||||
outstr(p, file);
|
||||
|
||||
+4
-92
@@ -63,8 +63,7 @@ __FBSDID("$FreeBSD$");
|
||||
* Shell command parser.
|
||||
*/
|
||||
|
||||
#define EOFMARKLEN 79
|
||||
#define PROMPTLEN 128
|
||||
#define EOFMARKLEN 79
|
||||
|
||||
/* values returned by readtoken */
|
||||
#include "token.h"
|
||||
@@ -958,7 +957,6 @@ readtoken1(int firstc, char const *syntax, char *eofmark, int striptabs)
|
||||
USTPUTC('\\', out);
|
||||
pungetc();
|
||||
} else if (c == '\n') {
|
||||
plinno++;
|
||||
if (doprompt)
|
||||
setprompt(2);
|
||||
else
|
||||
@@ -1564,100 +1562,14 @@ setprompt(int which)
|
||||
char *
|
||||
getprompt(void *unused __unused)
|
||||
{
|
||||
static char ps[PROMPTLEN];
|
||||
char *fmt;
|
||||
int i, j, trim;
|
||||
|
||||
/*
|
||||
* Select prompt format.
|
||||
*/
|
||||
switch (whichprompt) {
|
||||
case 0:
|
||||
fmt = "";
|
||||
break;
|
||||
return "";
|
||||
case 1:
|
||||
fmt = ps1val();
|
||||
break;
|
||||
return ps1val();
|
||||
case 2:
|
||||
fmt = ps2val();
|
||||
break;
|
||||
return ps2val();
|
||||
default:
|
||||
return "<internal prompt error>";
|
||||
}
|
||||
|
||||
/*
|
||||
* Format prompt string.
|
||||
*/
|
||||
for (i = 0; (i < 127) && (*fmt != '\0'); i++, fmt++)
|
||||
if (*fmt == '\\')
|
||||
switch (*++fmt) {
|
||||
|
||||
/*
|
||||
* Hostname.
|
||||
*
|
||||
* \h specifies just the local hostname,
|
||||
* \H specifies fully-qualified hostname.
|
||||
*/
|
||||
case 'h':
|
||||
case 'H':
|
||||
ps[i] = '\0';
|
||||
gethostname(&ps[i], PROMPTLEN - i);
|
||||
/* Skip to end of hostname. */
|
||||
trim = (*fmt == 'h') ? '.' : '\0';
|
||||
while ((ps[i+1] != '\0') && (ps[i+1] != trim))
|
||||
i++;
|
||||
break;
|
||||
|
||||
/*
|
||||
* Working directory.
|
||||
*
|
||||
* \W specifies just the final component,
|
||||
* \w specifies the entire path.
|
||||
*/
|
||||
case 'W':
|
||||
case 'w':
|
||||
ps[i] = '\0';
|
||||
getcwd(&ps[i], PROMPTLEN - i);
|
||||
if (*fmt == 'W') {
|
||||
/* Final path component only. */
|
||||
trim = 1;
|
||||
for (j = i; ps[j] != '\0'; j++)
|
||||
if (ps[j] == '/')
|
||||
trim = j + 1;
|
||||
memmove(&ps[i], &ps[trim],
|
||||
j - trim + 1);
|
||||
}
|
||||
/* Skip to end of path. */
|
||||
while (ps[i + 1] != '\0')
|
||||
i++;
|
||||
break;
|
||||
|
||||
/*
|
||||
* Superuser status.
|
||||
*
|
||||
* '$' for normal users, '#' for root.
|
||||
*/
|
||||
case '$':
|
||||
ps[i] = (geteuid() != 0) ? '$' : '#';
|
||||
break;
|
||||
|
||||
/*
|
||||
* A literal \.
|
||||
*/
|
||||
case '\\':
|
||||
ps[i] = '\\';
|
||||
break;
|
||||
|
||||
/*
|
||||
* Emit unrecognized formats verbatim.
|
||||
*/
|
||||
default:
|
||||
ps[i++] = '\\';
|
||||
ps[i] = *fmt;
|
||||
break;
|
||||
}
|
||||
else
|
||||
ps[i] = *fmt;
|
||||
ps[i] = '\0';
|
||||
return (ps);
|
||||
}
|
||||
+60
-234
@@ -1,4 +1,3 @@
|
||||
.\"-
|
||||
.\" Copyright (c) 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
.\"
|
||||
@@ -32,7 +31,7 @@
|
||||
.\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd December 8, 2005
|
||||
.Dd July 3, 2004
|
||||
.Dt SH 1
|
||||
.Os
|
||||
.Sh NAME
|
||||
@@ -98,7 +97,7 @@ generally prompts before each command and handles programming
|
||||
and command errors differently (as described below).
|
||||
When first starting, the shell inspects argument 0, and
|
||||
if it begins with a dash
|
||||
.Pq Ql - ,
|
||||
.Pq Li - ,
|
||||
the shell is also considered a login shell.
|
||||
This is normally done automatically by the system
|
||||
when the user first logs in.
|
||||
@@ -172,15 +171,15 @@ built-in command
|
||||
(described later in the section called
|
||||
.Sx Built-in Commands ) .
|
||||
Introducing an option with a dash
|
||||
.Pq Ql -
|
||||
.Pq Li -
|
||||
enables the option,
|
||||
while using a plus
|
||||
.Pq Ql +
|
||||
.Pq Li +
|
||||
disables the option.
|
||||
A
|
||||
.Dq Li --
|
||||
or plain
|
||||
.Dq Ql -
|
||||
.Dq Li -
|
||||
will stop option processing and will force the remaining
|
||||
words on the command line to be treated as arguments.
|
||||
The
|
||||
@@ -208,22 +207,13 @@ option if it has been set).
|
||||
.It Fl e Li errexit
|
||||
Exit immediately if any untested command fails in non-interactive mode.
|
||||
The exit status of a command is considered to be
|
||||
explicitly tested if the command is part of the list used to control
|
||||
an
|
||||
.Ic if , elif , while ,
|
||||
or
|
||||
.Ic until ;
|
||||
if the command is the left
|
||||
explicitly tested if the command is used to control
|
||||
an if, elif, while, or until; or if the command is the left
|
||||
hand operand of an
|
||||
.Dq Li &&
|
||||
or
|
||||
.Dq Li ||
|
||||
operator; or if the command is a pipeline preceded by the
|
||||
.Ic !\&
|
||||
operator.
|
||||
If a shell function is executed and its exit status is explicitly
|
||||
tested, all commands of the function are considered to be tested as
|
||||
well.
|
||||
.It Fl f Li noglob
|
||||
Disable pathname expansion.
|
||||
.It Fl I Li ignoreeof
|
||||
@@ -279,7 +269,7 @@ When waiting for a child, execute traps immediately.
|
||||
If this option is not set,
|
||||
traps are executed after the child exits,
|
||||
as specified in
|
||||
.St -p1003.2 .
|
||||
.St -p1003.2
|
||||
This nonstandard option is useful for putting guarding shells around
|
||||
children that block signals.
|
||||
The surrounding shell may kill the child
|
||||
@@ -306,16 +296,15 @@ Useful for debugging.
|
||||
.It Fl x Li xtrace
|
||||
Write each command
|
||||
(preceded by
|
||||
.Dq Li "+ " )
|
||||
.Dq Li +\ )
|
||||
to standard error before it is executed.
|
||||
Useful for debugging.
|
||||
.El
|
||||
.Pp
|
||||
The
|
||||
.Fl c
|
||||
option causes the commands to be read from the
|
||||
.Ar string
|
||||
operand instead of from the standard input.
|
||||
option may be used to pass its string argument to the shell
|
||||
to be interpreted as input.
|
||||
Keep in mind that this option only accepts a single string as its
|
||||
argument, hence multi-word strings must be quoted.
|
||||
.Pp
|
||||
@@ -364,9 +353,8 @@ The following is a list of valid operators:
|
||||
.El
|
||||
.Ss Quoting
|
||||
Quoting is used to remove the special meaning of certain characters
|
||||
or words to the shell, such as operators, whitespace, keywords,
|
||||
or alias names.
|
||||
.Pp
|
||||
or words to the shell, such as operators, whitespace, or
|
||||
keywords.
|
||||
There are three types of quoting: matched single quotes,
|
||||
matched double quotes, and backslash.
|
||||
.Bl -tag -width indent
|
||||
@@ -377,11 +365,11 @@ it impossible to put single-quotes in a single-quoted string).
|
||||
.It Double Quotes
|
||||
Enclosing characters within double quotes preserves the literal
|
||||
meaning of all characters except dollarsign
|
||||
.Pq Ql $ ,
|
||||
.Pq Li $ ,
|
||||
backquote
|
||||
.Pq Ql ` ,
|
||||
.Pq Li ` ,
|
||||
and backslash
|
||||
.Pq Ql \e .
|
||||
.Pq Li \e .
|
||||
The backslash inside double quotes is historically weird.
|
||||
It remains literal unless it precedes the following characters,
|
||||
which it serves to quote:
|
||||
@@ -391,7 +379,7 @@ which it serves to quote:
|
||||
.It Backslash
|
||||
A backslash preserves the literal meaning of the following
|
||||
character, with the exception of the newline character
|
||||
.Pq Ql \en .
|
||||
.Pq Li \en .
|
||||
A backslash preceding a newline is treated as a line continuation.
|
||||
.El
|
||||
.Ss Reserved Words
|
||||
@@ -432,16 +420,6 @@ to create functions with arguments.
|
||||
They can also be
|
||||
used to create lexically obscure code.
|
||||
This use is discouraged.
|
||||
.Pp
|
||||
An alias name may be escaped in a command line, so that it is not
|
||||
replaced by its alias value, by using quoting characters within or
|
||||
adjacent to the alias name.
|
||||
This is most often done by prefixing
|
||||
an alias name with a backslash to execute a function, built-in, or
|
||||
normal program with the same name.
|
||||
See the
|
||||
.Sx Quoting
|
||||
subsection.
|
||||
.Ss Commands
|
||||
The shell interprets the words it reads according to a
|
||||
language, the specification of which is outside the scope
|
||||
@@ -724,7 +702,7 @@ They are executed in the current shell, although they do not affect its
|
||||
environment when used in pipelines.
|
||||
.Ss Background Commands (&)
|
||||
If a command is terminated by the control operator ampersand
|
||||
.Pq Ql & ,
|
||||
.Pq Li & ,
|
||||
the shell executes the command asynchronously;
|
||||
the shell does not wait for the command to finish
|
||||
before executing the next command.
|
||||
@@ -796,15 +774,10 @@ repeat until the exit status of the first list is zero.
|
||||
The syntax of the
|
||||
.Ic for
|
||||
command is:
|
||||
.Dl Ic for Ar variable Op Ic in Ar word ...
|
||||
.Dl Ic for Ar variable Ic in Ar word ...
|
||||
.Dl Ic do Ar list
|
||||
.Dl Ic done
|
||||
.Pp
|
||||
If
|
||||
.Ic in
|
||||
and the following words are omitted,
|
||||
.Ic in Li $@
|
||||
is used instead.
|
||||
The words are expanded, and then the list is executed
|
||||
repeatedly with the variable set to each word in turn.
|
||||
The
|
||||
@@ -897,7 +870,7 @@ and the syntax is:
|
||||
.Bd -ragged -offset indent
|
||||
.Ic local
|
||||
.Op Ar variable ...
|
||||
.Op Fl
|
||||
.Op Ar -
|
||||
.Ed
|
||||
.Pp
|
||||
The
|
||||
@@ -927,7 +900,7 @@ declared inside
|
||||
not to the global variable named
|
||||
.Em x .
|
||||
.Pp
|
||||
The only special parameter that can be made local is
|
||||
The only special parameter than can be made local is
|
||||
.Dq Li - .
|
||||
Making
|
||||
.Dq Li -
|
||||
@@ -974,16 +947,12 @@ The
|
||||
.Ic set
|
||||
built-in command can also be used to set or reset them.
|
||||
.Ss Special Parameters
|
||||
A special parameter is a parameter denoted by a special one-character
|
||||
name.
|
||||
The special parameters recognized by the
|
||||
.Nm
|
||||
shell of
|
||||
.Fx
|
||||
are shown in the following list, exactly as they would appear in input
|
||||
typed by the user or in the source of a shell script.
|
||||
A special parameter is a parameter denoted by one of the following
|
||||
special characters.
|
||||
The value of the parameter is listed
|
||||
next to its character.
|
||||
.Bl -hang
|
||||
.It Li $*
|
||||
.It Li *
|
||||
Expands to the positional parameters, starting from one.
|
||||
When
|
||||
the expansion occurs within a double-quoted string
|
||||
@@ -996,7 +965,7 @@ or by a
|
||||
if
|
||||
.Ev IFS
|
||||
is unset.
|
||||
.It Li $@
|
||||
.It Li @
|
||||
Expands to the positional parameters, starting from one.
|
||||
When
|
||||
the expansion occurs within double-quotes, each positional
|
||||
@@ -1019,26 +988,26 @@ the two arguments:
|
||||
.Bd -literal -offset indent
|
||||
"abc" "def ghi"
|
||||
.Ed
|
||||
.It Li $#
|
||||
.It Li #
|
||||
Expands to the number of positional parameters.
|
||||
.It Li $\&?
|
||||
.It Li \&?
|
||||
Expands to the exit status of the most recent pipeline.
|
||||
.It Li $-
|
||||
.It Li -
|
||||
(hyphen) Expands to the current option flags (the single-letter
|
||||
option names concatenated into a string) as specified on
|
||||
invocation, by the set built-in command, or implicitly
|
||||
by the shell.
|
||||
.It Li $$
|
||||
.It Li $
|
||||
Expands to the process ID of the invoked shell.
|
||||
A subshell
|
||||
retains the same value of $ as its parent.
|
||||
.It Li $\&!
|
||||
.It Li \&!
|
||||
Expands to the process ID of the most recent background
|
||||
command executed from the current shell.
|
||||
For a
|
||||
pipeline, the process ID is that of the last command in the
|
||||
pipeline.
|
||||
.It Li $0
|
||||
.It Li 0
|
||||
(zero) Expands to the name of the shell or shell script.
|
||||
.El
|
||||
.Ss Word Expansions
|
||||
@@ -1083,11 +1052,11 @@ character is used to introduce parameter expansion, command
|
||||
substitution, or arithmetic evaluation.
|
||||
.Ss Tilde Expansion (substituting a user's home directory)
|
||||
A word beginning with an unquoted tilde character
|
||||
.Pq Ql ~
|
||||
.Pq Li ~
|
||||
is
|
||||
subjected to tilde expansion.
|
||||
All the characters up to a slash
|
||||
.Pq Ql /
|
||||
.Pq Li /
|
||||
or the end of the word are treated as a username
|
||||
and are replaced with the user's home directory.
|
||||
If the
|
||||
@@ -1316,13 +1285,13 @@ variable or the output of the command is scanned for these
|
||||
characters and they are turned into meta-characters.
|
||||
.Pp
|
||||
An asterisk
|
||||
.Pq Ql *
|
||||
.Pq Li *
|
||||
matches any string of characters.
|
||||
A question mark
|
||||
.Pq Ql \&?
|
||||
.Pq Li \&?
|
||||
matches any single character.
|
||||
A left bracket
|
||||
.Pq Ql [
|
||||
.Pq Li [
|
||||
introduces a character class.
|
||||
The end of the character class is indicated by a
|
||||
.Dq Li \&] ;
|
||||
@@ -1336,7 +1305,7 @@ rather than introducing a character class.
|
||||
A character class matches any of the characters between the square brackets.
|
||||
A range of characters may be specified using a minus sign.
|
||||
The character class may be complemented by making an exclamation point
|
||||
.Pq Ql !\&
|
||||
.Pq Li !\&
|
||||
the first character of the character class.
|
||||
.Pp
|
||||
To include a
|
||||
@@ -1377,7 +1346,8 @@ for the file.
|
||||
If it is not found in the
|
||||
.Ev PATH ,
|
||||
it is sought in the current working directory.
|
||||
.It Ic alias Oo Ar name Ns Oo = Ns Ar string Oc ... Oc
|
||||
.It Ic alias Op Ar name ...
|
||||
.It Ic alias Op Ar name Ns = Ns Ar string ...
|
||||
If
|
||||
.Ar name Ns = Ns Ar string
|
||||
is specified, the shell defines the alias
|
||||
@@ -1396,9 +1366,6 @@ built-in command prints the names and values of all defined aliases
|
||||
.Ic unalias ) .
|
||||
Alias values are written with appropriate quoting so that they are
|
||||
suitable for re-input to the shell.
|
||||
Also see the
|
||||
.Sx Aliases
|
||||
subsection.
|
||||
.It Ic bg Op Ar job ...
|
||||
Continue the specified jobs
|
||||
(or the current job if no jobs are given)
|
||||
@@ -1466,8 +1433,7 @@ A synonym for the
|
||||
.Ic cd
|
||||
built-in command.
|
||||
.It Ic command Oo Fl p Oc Op Ar utility Op Ar argument ...
|
||||
.It Ic command Oo Fl v | V Oc Op Ar utility
|
||||
The first form of invocation executes the specified
|
||||
Execute the specified
|
||||
.Ar utility
|
||||
as a simple command (see the
|
||||
.Sx Simple Commands
|
||||
@@ -1479,39 +1445,10 @@ option is specified, the command search is performed using a
|
||||
default value of
|
||||
.Ev PATH
|
||||
that is guaranteed to find all of the standard utilities.
|
||||
.Pp
|
||||
If the
|
||||
.Fl v
|
||||
option is specified,
|
||||
.Ar utility
|
||||
is not executed but a description of its interpretation by the shell is
|
||||
printed.
|
||||
For ordinary commands the output is the path name; for shell built-in
|
||||
commands, shell functions and keywords only the name is written.
|
||||
Aliases are printed as
|
||||
.Dq Ic alias Ar name Ns = Ns Ar value .
|
||||
.Pp
|
||||
The
|
||||
.Fl V
|
||||
option is identical to
|
||||
.Fl v
|
||||
except for the output.
|
||||
It prints
|
||||
.Dq Ar utility Ic is Ar description
|
||||
where
|
||||
.Ar description
|
||||
is either
|
||||
the path name to
|
||||
.Ar utility ,
|
||||
a shell builtin,
|
||||
a shell function,
|
||||
a shell keyword
|
||||
or
|
||||
an alias for
|
||||
. Ar value .
|
||||
.It Ic echo Oo Fl e | n Oc Op Ar string ...
|
||||
Print a space-separated list of the arguments to the standard output
|
||||
and append a newline character.
|
||||
.It Ic echo Oo Fl e | n Oc Op Ar string
|
||||
Print
|
||||
.Ar string
|
||||
to the standard output with a newline appended.
|
||||
.Bl -tag -width indent
|
||||
.It Fl n
|
||||
Suppress the output of the trailing newline.
|
||||
@@ -1591,8 +1528,7 @@ If
|
||||
is given
|
||||
it is used as the exit status of the shell;
|
||||
otherwise the exit status of the preceding command is used.
|
||||
.It Ic export Ar name ...
|
||||
.It Ic export Op Fl p
|
||||
.It Ic export Oo Fl p Oc Op Ar name ...
|
||||
The specified names are exported so that they will
|
||||
appear in the environment of subsequent commands.
|
||||
The only way to un-export a variable is to
|
||||
@@ -1702,9 +1638,9 @@ the string form of the first operand cannot contain an embedded equal sign.
|
||||
.Pp
|
||||
The following environment variables affect the execution of
|
||||
.Ic fc :
|
||||
.Bl -tag -width ".Ev HISTSIZE"
|
||||
.Bl -tag -width indent
|
||||
.It Ev FCEDIT
|
||||
Name of the editor to use for history editing.
|
||||
Name of the editor to use.
|
||||
.It Ev HISTSIZE
|
||||
The number of previous commands that are accessible.
|
||||
.El
|
||||
@@ -1777,10 +1713,6 @@ option is specified, the PID of each job is also printed.
|
||||
If the
|
||||
.Fl s
|
||||
option is specified, only the PIDs of the jobs are printed, one per line.
|
||||
.It Ic local Oo Ar variable ... Oc Op Fl
|
||||
See the
|
||||
.Sx Functions
|
||||
subsection.
|
||||
.It Ic pwd Op Fl L | P
|
||||
Print the path of the current directory.
|
||||
The built-in command may
|
||||
@@ -1846,7 +1778,7 @@ option is specified and the
|
||||
elapses before any input is supplied,
|
||||
the
|
||||
.Ic read
|
||||
command will return an exit status of 1 without assigning any values.
|
||||
command will return without assigning any values.
|
||||
The
|
||||
.Ar timeout
|
||||
value may optionally be followed by one of
|
||||
@@ -1882,10 +1814,6 @@ If the
|
||||
option is specified, the read-only variables are printed as
|
||||
.Dq Ic readonly Ar name Ns = Ns Ar value
|
||||
lines, suitable for re-input to the shell.
|
||||
.It Ic return Op Ar exitstatus
|
||||
See the
|
||||
.Sx Functions
|
||||
subsection.
|
||||
.It Ic set Oo Fl /+abCEefIimnpTuVvx Oc Oo Fl /+o Ar longname Oc Oo
|
||||
.Fl c Ar string Oc Op Fl - Ar arg ...
|
||||
The
|
||||
@@ -1920,9 +1848,9 @@ flag may be omitted when specifying arguments to be used
|
||||
as positional replacement parameters.
|
||||
This is not recommended,
|
||||
because the first argument may begin with a dash
|
||||
.Pq Ql -
|
||||
.Pq Li -
|
||||
or a plus
|
||||
.Pq Ql + ,
|
||||
.Pq Li + ,
|
||||
which the
|
||||
.Ic set
|
||||
command will interpret as a request to enable or disable options.
|
||||
@@ -1951,13 +1879,7 @@ A shift sets the value of $1 to the value of $2,
|
||||
the value of $2 to the value of $3, and so on,
|
||||
decreasing the value of $# by one.
|
||||
If there are zero positional parameters, shifting does not do anything.
|
||||
.It Ic times
|
||||
Print the amount of time spent executing the shell and its children.
|
||||
The first output line shows the user and system times for the shell
|
||||
itself, the second one contains the user and system times for the
|
||||
children.
|
||||
.It Ic trap Oo Ar action Oc Ar signal ...
|
||||
.It Ic trap Fl l
|
||||
Cause the shell to parse and execute
|
||||
.Ar action
|
||||
when any specified
|
||||
@@ -1969,25 +1891,14 @@ In addition, the pseudo-signal
|
||||
may be used to specify an action that is performed when the shell terminates.
|
||||
The
|
||||
.Ar action
|
||||
may be an empty string or a dash
|
||||
.Pq Ar - ;
|
||||
may be null or omitted;
|
||||
the former causes the specified signal to be ignored
|
||||
and the latter causes the default action to be taken.
|
||||
Omitting the
|
||||
.Ar action
|
||||
is another way to request the default action, for compatibility reasons this
|
||||
usage is not recommended though.
|
||||
When the shell forks off a subshell,
|
||||
it resets trapped (but not ignored) signals to the default action.
|
||||
The
|
||||
.Ic trap
|
||||
command has no effect on signals that were ignored on entry to the shell.
|
||||
.Pp
|
||||
Option
|
||||
.Fl l
|
||||
causes the
|
||||
.Ic trap
|
||||
command to display a list of valid signal names.
|
||||
.It Ic type Op Ar name ...
|
||||
Interpret each
|
||||
.Ar name
|
||||
@@ -2061,19 +1972,16 @@ The maximal number of simultaneous processes for this user ID.
|
||||
.It Fl v Ar virtualmem
|
||||
The maximal virtual size of a process, in kilobytes.
|
||||
.El
|
||||
.It Ic umask Oo Fl S Oc Op Ar mask
|
||||
.It Ic umask Op Ar mask
|
||||
Set the file creation mask (see
|
||||
.Xr umask 2 )
|
||||
to the octal or symbolic (see
|
||||
.Xr chmod 1 )
|
||||
value specified by
|
||||
to the octal value specified by
|
||||
.Ar mask .
|
||||
If the argument is omitted, the current mask value is printed.
|
||||
If the
|
||||
.Fl S
|
||||
option is specified, the output is symbolic, otherwise the output is octal.
|
||||
.It Ic unalias Oo Fl a Oc Op Ar name ...
|
||||
The specified alias names are removed.
|
||||
.It Ic unalias Oo Fl a Oc Op Ar name
|
||||
If
|
||||
.Ar name
|
||||
is specified, the shell removes that alias.
|
||||
If
|
||||
.Fl a
|
||||
is specified, all aliases are removed.
|
||||
@@ -2130,94 +2038,12 @@ Similarly, the
|
||||
.Dq Li set -E )
|
||||
command can be used to enable a subset of
|
||||
emacs-style command line editing features.
|
||||
.Sh ENVIRONMENT
|
||||
The following environment variables affect the execution of
|
||||
.Nm :
|
||||
.Bl -tag -width ".Ev HISTSIZE"
|
||||
.It Ev CDPATH
|
||||
The search path used with the
|
||||
.Ic cd
|
||||
built-in.
|
||||
.It Ev EDITOR
|
||||
The fallback editor used with the
|
||||
.Ic fc
|
||||
built-in.
|
||||
If not set, the default editor is
|
||||
.Xr ed 1 .
|
||||
.It Ev FCEDIT
|
||||
The default editor used with the
|
||||
.Ic fc
|
||||
built-in.
|
||||
.It Ev HISTSIZE
|
||||
The number of previous commands that are accessible.
|
||||
.It Ev HOME
|
||||
The starting directory of
|
||||
.Nm .
|
||||
.It Ev IFS
|
||||
Input Field Separators.
|
||||
This is normally set to
|
||||
.Aq space ,
|
||||
.Aq tab ,
|
||||
and
|
||||
.Aq newline .
|
||||
See the
|
||||
.Sx White Space Splitting
|
||||
section for more details.
|
||||
.It Ev MAIL
|
||||
The name of a mail file, that will be checked for the arrival of new
|
||||
mail.
|
||||
Overridden by
|
||||
.Ev MAILPATH .
|
||||
.It Ev MAILPATH
|
||||
A colon
|
||||
.Pq Ql \&:
|
||||
separated list of file names, for the shell to check for incoming
|
||||
mail.
|
||||
This environment setting overrides the
|
||||
.Ev MAIL
|
||||
setting.
|
||||
There is a maximum of 10 mailboxes that can be monitored at once.
|
||||
.It Ev PATH
|
||||
The default search path for executables.
|
||||
See the
|
||||
.Sx Path Search
|
||||
section for details.
|
||||
.It Ev PS1
|
||||
The primary prompt string, which defaults to
|
||||
.Dq Li "$ " ,
|
||||
unless you are the superuser, in which case it defaults to
|
||||
.Dq Li "# " .
|
||||
.It Ev PS2
|
||||
The secondary prompt string, which defaults to
|
||||
.Dq Li "> " .
|
||||
.It Ev TERM
|
||||
The default terminal setting for the shell.
|
||||
This is inherited by children of the shell, and is used in the history
|
||||
editing modes.
|
||||
.El
|
||||
.Sh EXIT STATUS
|
||||
Errors that are detected by the shell, such as a syntax error, will
|
||||
cause the shell to exit with a non-zero exit status.
|
||||
If the shell is not an interactive shell, the execution of the shell
|
||||
file will be aborted.
|
||||
Otherwise the shell will return the exit status of the last command
|
||||
executed, or if the exit builtin is used with a numeric argument, it
|
||||
will return the argument.
|
||||
.Sh SEE ALSO
|
||||
.Xr builtin 1 ,
|
||||
.Xr chsh 1 ,
|
||||
.Xr echo 1 ,
|
||||
.Xr ed 1 ,
|
||||
.Xr emacs 1 ,
|
||||
.Xr expr 1 ,
|
||||
.Xr getopt 1 ,
|
||||
.Xr pwd 1 ,
|
||||
.Xr test 1 ,
|
||||
.Xr vi 1 ,
|
||||
.Xr execve 2 ,
|
||||
.Xr getrlimit 2 ,
|
||||
.Xr umask 2 ,
|
||||
.Xr editrc 5
|
||||
.Xr test 1
|
||||
.Sh HISTORY
|
||||
A
|
||||
.Nm
|
||||
|
||||
+7
-6
@@ -153,14 +153,15 @@ trapcmd(int argc, char **argv)
|
||||
if (argc <= 1) {
|
||||
for (signo = 0 ; signo < sys_nsig ; signo++) {
|
||||
if (signo < NSIG && trap[signo] != NULL) {
|
||||
out1str("trap -- ");
|
||||
out1qstr(trap[signo]);
|
||||
if (signo == 0) {
|
||||
out1str(" exit\n");
|
||||
out1fmt("trap -- '%s' %s\n",
|
||||
trap[signo], "exit");
|
||||
} else if (sys_signame[signo]) {
|
||||
out1fmt(" %s\n", sys_signame[signo]);
|
||||
out1fmt("trap -- '%s' %s\n",
|
||||
trap[signo], sys_signame[signo]);
|
||||
} else {
|
||||
out1fmt(" %d\n", signo);
|
||||
out1fmt("trap -- '%s' %d\n",
|
||||
trap[signo], signo);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -381,7 +382,7 @@ onsig(int signo)
|
||||
*/
|
||||
if (Tflag &&
|
||||
trap[signo] != NULL &&
|
||||
! (trap[signo][0] == '\0') &&
|
||||
! trap[signo][0] == '\0' &&
|
||||
! (trap[signo][0] == ':' && trap[signo][1] == '\0'))
|
||||
breakwaitcmd = 1;
|
||||
|
||||
|
||||
+1
-3
@@ -541,11 +541,9 @@ exportcmd(int argc, char **argv)
|
||||
argc -= optind;
|
||||
argv += optind;
|
||||
|
||||
if (values && argc != 0)
|
||||
error("-p requires no arguments");
|
||||
listsetvar(cmdenviron);
|
||||
if (argc != 0) {
|
||||
while ((name = *argv++) != NULL) {
|
||||
while ((name = *argptr++) != NULL) {
|
||||
if ((p = strchr(name, '=')) != NULL) {
|
||||
p++;
|
||||
} else {
|
||||
|
||||
+2
-2
@@ -142,8 +142,8 @@ print(struct termios *tp, struct winsize *wp, int ldisc, enum FMT fmt)
|
||||
put("-onlcr", ONLCR, 1);
|
||||
put("-ocrnl", OCRNL, 0);
|
||||
put("-oxtabs", OXTABS, 1);
|
||||
put("-onocr", ONOCR, 0);
|
||||
put("-onlret", ONLRET, 0);
|
||||
put("-onocr", OXTABS, 0);
|
||||
put("-onlret", OXTABS, 0);
|
||||
|
||||
/* control flags (hardware state) */
|
||||
tmp = tp->c_cflag;
|
||||
|
||||
+52
-77
@@ -50,7 +50,7 @@
|
||||
.Sh SYNOPSIS
|
||||
.Nm amd
|
||||
.Fl H
|
||||
.Nm amd
|
||||
.Nm amd
|
||||
.Op Fl F Ar conf_file
|
||||
.Nm amd
|
||||
.Op Fl nprvHS
|
||||
@@ -83,8 +83,7 @@
|
||||
.Sh DESCRIPTION
|
||||
.Nm Amd
|
||||
is a daemon that automatically mounts file systems whenever a file or directory
|
||||
within that file system is accessed.
|
||||
File systems are automatically unmounted
|
||||
within that file system is accessed. File systems are automatically unmounted
|
||||
when they appear to be quiescent.
|
||||
.Pp
|
||||
.Nm Amd
|
||||
@@ -97,19 +96,17 @@ are handled by
|
||||
.Nm amd ,
|
||||
which uses the map defined by
|
||||
.Ar mapname
|
||||
to determine how to resolve the lookup.
|
||||
Generally, this will be a host name,
|
||||
to determine how to resolve the lookup. Generally, this will be a host name,
|
||||
some file system information and some mount options for the given file system.
|
||||
.Pp
|
||||
In the first form depicted above,
|
||||
.Nm amd
|
||||
will print a short help string.
|
||||
In the second form, if no options are
|
||||
will print a short help string. In the second form, if no options are
|
||||
specified, or if the
|
||||
.Fl F
|
||||
is used,
|
||||
.Nm amd
|
||||
will read configuration parameters from the file
|
||||
is used,
|
||||
.Nm amd
|
||||
will read configuration parameters from the file
|
||||
.Ar conf_file
|
||||
which defaults to
|
||||
.Pa /etc/amd.conf .
|
||||
@@ -124,15 +121,12 @@ The default is
|
||||
Specify a
|
||||
.Ar duration ,
|
||||
in seconds, that a looked up name remains
|
||||
cached when not in use.
|
||||
The default is 5 minutes.
|
||||
cached when not in use. The default is 5 minutes.
|
||||
.It Fl d Ar domain
|
||||
Specify the local domain name.
|
||||
If this option is not
|
||||
Specify the local domain name. If this option is not
|
||||
given the domain name is determined from the hostname.
|
||||
.It Fl k Ar kernel-arch
|
||||
Specifies the kernel architecture.
|
||||
This is used solely
|
||||
Specifies the kernel architecture. This is used solely
|
||||
to set the ${karch} selector.
|
||||
.It Fl l Ar logfile
|
||||
Specify a logfile in which to record mount and unmount events.
|
||||
@@ -142,32 +136,31 @@ is the string
|
||||
.Em syslog ,
|
||||
the log messages will be sent to the system log daemon by
|
||||
.Xr syslog 3 .
|
||||
The default syslog facility used is LOG_DAEMON.
|
||||
The default syslog facility used is LOG_DAEMON.
|
||||
If you wish to change it, append its name to the log file name,
|
||||
delimited by a single colon.
|
||||
For example, if
|
||||
For example, if
|
||||
.Ar logfile
|
||||
is the string
|
||||
.Dq Li syslog:local7
|
||||
then
|
||||
.Nm amd
|
||||
will log messages via
|
||||
will log messages via
|
||||
.Xr syslog 3
|
||||
using the LOG_LOCAL7 facility (if it exists on the system).
|
||||
.It Fl n
|
||||
Normalize hostnames.
|
||||
The name referred to by ${rhost} is normalized relative to the
|
||||
host database before being used.
|
||||
The effect is to translate
|
||||
host database before being used. The effect is to translate
|
||||
aliases into ``official'' names.
|
||||
.It Fl o Ar op_sys_ver
|
||||
Override the compiled-in version number of the operating system.
|
||||
Useful when the built in version is not desired for backward
|
||||
Useful when the built in version is not desired for backward
|
||||
compatibility reasons.
|
||||
For example, if the build in version is
|
||||
.Dq 2.5.1 ,
|
||||
For example, if the build in version is
|
||||
.Dq 2.5.1 ,
|
||||
you can override it to
|
||||
.Dq 5.5.1 ,
|
||||
.Dq 5.5.1 ,
|
||||
and use older maps that were written with the latter in mind.
|
||||
.It Fl p
|
||||
Print
|
||||
@@ -179,8 +172,7 @@ to standard output where it can be saved into a file.
|
||||
Restart existing mounts.
|
||||
.Nm Amd
|
||||
will scan the mount file table to determine which file systems
|
||||
are currently mounted.
|
||||
Whenever one of these would have
|
||||
are currently mounted. Whenever one of these would have
|
||||
been auto-mounted,
|
||||
.Nm amd
|
||||
.Em inherits
|
||||
@@ -190,33 +182,25 @@ Specify the NFS timeout
|
||||
.Ar interval ,
|
||||
in tenths of a second, between
|
||||
.Tn NFS/RPC
|
||||
retries (for UDP only).
|
||||
The default
|
||||
is 0.8 seconds.
|
||||
The second value alters the retransmit counter, which
|
||||
defaults to 11 retransmissions.
|
||||
Both of these values are used by the kernel
|
||||
to communicate with amd.
|
||||
Useful defaults are supplied if either or both
|
||||
retries (for UDP only). The default
|
||||
is 0.8 seconds. The second value alters the retransmit counter, which
|
||||
defaults to 11 retransmissions. Both of these values are used by the kernel
|
||||
to communicate with amd. Useful defaults are supplied if either or both
|
||||
values are missing.
|
||||
.Pp
|
||||
Amd relies on the kernel RPC retransmit mechanism to trigger mount retries.
|
||||
The values of these parameters change the overall retry interval.
|
||||
Too long
|
||||
The values of these parameters change the overall retry interval. Too long
|
||||
an interval gives poor interactive response; too short an interval causes
|
||||
excessive retries.
|
||||
.It Fl v
|
||||
Version.
|
||||
Displays version and configuration information on standard error.
|
||||
Version. Displays version and configuration information on standard error.
|
||||
.It Fl w Ar interval
|
||||
Specify an
|
||||
.Ar interval ,
|
||||
in seconds, between attempts to dismount file systems that have exceeded their
|
||||
cached times.
|
||||
The default is 2 minutes.
|
||||
cached times. The default is 2 minutes.
|
||||
.It Fl x Ar options
|
||||
Specify run-time logging options.
|
||||
The options are a comma separated list
|
||||
Specify run-time logging options. The options are a comma separated list
|
||||
chosen from: fatal, error, user, warn, info, map, stats, all.
|
||||
.It Fl y Ar domain
|
||||
Specify an alternative
|
||||
@@ -231,12 +215,10 @@ support is not available.
|
||||
.It Fl C Ar cluster-name
|
||||
Specify an alternative HP-UX cluster name to use.
|
||||
.It Fl D Ar option
|
||||
Select from a variety of debug options.
|
||||
Prefixing an
|
||||
Select from a variety of debug options. Prefixing an
|
||||
option with the string
|
||||
.Em no
|
||||
reverses the effect of that option.
|
||||
Options are cumulative.
|
||||
reverses the effect of that option. Options are cumulative.
|
||||
The most useful option is
|
||||
.Ar all .
|
||||
.Pp
|
||||
@@ -250,47 +232,40 @@ and a fuller description is available in the program source.
|
||||
.It Fl F Ar conf_file
|
||||
Specify an
|
||||
.Nm amd
|
||||
configuration file to use.
|
||||
See
|
||||
configuration file to use. See
|
||||
.Xr amd.conf 5
|
||||
for description of this file's format.
|
||||
This configuration file is used to
|
||||
specify any options in lieu of typing many of them on the command line.
|
||||
The
|
||||
for description of this file's format. This configuration file is used to
|
||||
specify any options in lieu of typing many of them on the command line. The
|
||||
.Nm amd.conf
|
||||
file includes directives for every command line option amd has,
|
||||
and many more that are only available via the configuration file
|
||||
facility.
|
||||
The configuration file specified by this option is
|
||||
facility. The configuration file specified by this option is
|
||||
processed after all other options have been processed, regardless
|
||||
of the actual location of this option on the command line.
|
||||
.It Fl H
|
||||
Print help and usage string.
|
||||
.It Fl O Ar op_sys_name
|
||||
Override the compiled-in name of the operating system.
|
||||
Override the compiled-in name of the operating system.
|
||||
Useful when the built in name is not desired for backward
|
||||
compatibility reasons.
|
||||
For example, if the build in name is
|
||||
.Dq sunos5 ,
|
||||
.Dq sunos5 ,
|
||||
you can override it to
|
||||
.Dq sos5
|
||||
and use older maps which were written with the latter in mind.
|
||||
.It Fl S
|
||||
Do not lock the running executable pages of
|
||||
.Nm amd
|
||||
into memory.
|
||||
To improve
|
||||
into memory. To improve
|
||||
.Nm amd's
|
||||
performance, systems that support the
|
||||
performance, systems that support the
|
||||
.Xr plock 3
|
||||
call, could lock the
|
||||
.Nm amd
|
||||
process into memory.
|
||||
This way there is less chance the operating system will
|
||||
process into memory. This way there is less chance the operating system will
|
||||
schedule, page out, and swap the
|
||||
.Nm amd
|
||||
process as needed.
|
||||
This tends to improve
|
||||
process as needed. This tends to improve
|
||||
.Nm amd's
|
||||
performance, at the cost of reserving the memory used by the
|
||||
.Nm amd
|
||||
@@ -302,7 +277,7 @@ option.
|
||||
.It Fl T Ar tag
|
||||
Specify a tag to use with
|
||||
.Xr amd.conf 5 .
|
||||
All Map entries tagged with tag will be processed.
|
||||
All Map entries tagged with tag will be processed.
|
||||
Map entries that are not tagged are always processed.
|
||||
Map entries that are tagged with a tag other than
|
||||
.Ar tag
|
||||
@@ -355,20 +330,20 @@ the features.
|
||||
.%T Amd \- The 4.4 BSD Automounter
|
||||
.Re
|
||||
.Pp
|
||||
.Pa http://www.am-utils.org/
|
||||
.Pa http://www.cs.columbia.edu/~ezk/am-utils/
|
||||
.Sh AUTHORS
|
||||
.An Jan-Simon Pendry Aq [email protected] ,
|
||||
Department of Computing, Imperial College, London, UK.
|
||||
.Pp
|
||||
.An Erez Zadok Aq [email protected] ,
|
||||
Department of Computer Science, Columbia University,
|
||||
New York, USA.
|
||||
.Pp
|
||||
Other authors and contributors to am-utils are listed in the
|
||||
.Pa AUTHORS
|
||||
file distributed with am-utils.
|
||||
.Sh HISTORY
|
||||
The
|
||||
.Nm amd
|
||||
utility first appeared in
|
||||
.Bx 4.4 .
|
||||
.Sh AUTHORS
|
||||
.An Jan-Simon Pendry Aq [email protected] ,
|
||||
Department of Computing, Imperial College, London, UK.
|
||||
.Pp
|
||||
.An Erez Zadok Aq [email protected] ,
|
||||
Department of Computer Science, Columbia University,
|
||||
New York, USA.
|
||||
.Pp
|
||||
Other authors and contributors to am-utils are listed in the
|
||||
.Pa AUTHORS
|
||||
file distributed with am-utils.
|
||||
@@ -64,9 +64,9 @@ The
|
||||
.Nm
|
||||
utility takes a set of system configuration information, and generates
|
||||
a coordinated set of
|
||||
.Xr amd 8
|
||||
.I amd
|
||||
,
|
||||
.Xr mount 8
|
||||
.I mount
|
||||
and
|
||||
.Xr mountd 8
|
||||
configuration files.
|
||||
|
||||
@@ -65,7 +65,7 @@ usage (char *progname)
|
||||
printf ("usage: %s [options] [file ...]\n%s%s%s%s%s%s%s", progname,
|
||||
" -h --help print this usage and exit\n",
|
||||
" -i --interactive force interactive mode\n",
|
||||
" -l --mathlib use the predefined math routines\n",
|
||||
" -l --mathlib use the predefine math routnes\n",
|
||||
" -q --quiet don't print initial banner\n",
|
||||
" -s --standard non-standard bc constructs are errors\n",
|
||||
" -w --warn warn about non-standard bc constructs\n",
|
||||
|
||||
+3
-863
@@ -1,860 +1,4 @@
|
||||
|
||||
--- 9.3.4-P1 released ---
|
||||
|
||||
2203. [security] Query id generation was cryptographically weak.
|
||||
[RT # 16915]
|
||||
|
||||
2193. [port] win32: BINDInstall.exe is now linked statically.
|
||||
[RT #16906]
|
||||
|
||||
2192. [port] win32: use vcredist_x86.exe to install Visual
|
||||
Studio's redistributable dlls if building with
|
||||
Visual Stdio 2005 or later.
|
||||
|
||||
--- 9.3.4 released ---
|
||||
|
||||
2126. [security] Serialise validation of type ANY responses. [RT #16555]
|
||||
|
||||
2124. [security] It was possible to dereference a freed fetch
|
||||
context. [RT #16584]
|
||||
|
||||
--- 9.3.3 released ---
|
||||
|
||||
2107. [bug] dighost.c: more cleanup of buffers. [RT #16499]
|
||||
|
||||
2104. [port] Fix Solaris SMF error message.
|
||||
|
||||
2103. [port] Add /usr/sfw to list of locations for OpenSSL
|
||||
under Solaris.
|
||||
|
||||
2102. [port] Silence solaris 10 warnings.
|
||||
|
||||
2101. [bug] OpenSSL version checks were not quite right.
|
||||
[RT #16476]
|
||||
|
||||
2100. [port] win32: copy libeay32.dll to Build\Debug.
|
||||
|
||||
2099. [port] win32: more manifiest issues.
|
||||
|
||||
--- 9.3.3rc3 released ---
|
||||
|
||||
2096. [bug] libbind: handle applications that fail to detect
|
||||
res_init() failures better.
|
||||
|
||||
2095. [port] libbind: alway prototype inet_cidr_ntop_ipv6() and
|
||||
net_cidr_ntop_ipv6(). [RT #16388]
|
||||
|
||||
2094. [contrib] Update named-bootconf. [RT# 16404]
|
||||
|
||||
2092. [bug] win32: dig, host, nslookup. Use registry config
|
||||
if resolv.conf does not exist or no nameservers
|
||||
listed. [RT #15877]
|
||||
|
||||
2091. [port] dighost.c: race condition on cleanup. [RT #16417]
|
||||
|
||||
2090. [port] win32: Visual C++ 2005 command line manifest support.
|
||||
[RT #16417]
|
||||
|
||||
2089. [security] Raise the minimum safe OpenSSL versions to
|
||||
OpenSSL 0.9.7l and OpenSSL 0.9.8d. Versions
|
||||
prior to these have known security flaws which
|
||||
are (potentially) exploitable in named. [RT #16391]
|
||||
|
||||
2088. [security] Change the default RSA exponent from 3 to 65537.
|
||||
[RT #16391]
|
||||
|
||||
2086. [port] libbind: FreeBSD now has get*by*_r() functions.
|
||||
[RT #16403]
|
||||
|
||||
2085. [doc] win32: added index.html and README to zip. [RT #16201]
|
||||
|
||||
2084. [contrib] dbus update for 9.3.3rc2.
|
||||
|
||||
2083. [port] win32: Visual C++ 2005 support.
|
||||
|
||||
2082. [doc] Document 'cache-file' as a test only option.
|
||||
|
||||
--- 9.3.3rc2 released ---
|
||||
|
||||
2081. [port] libbind: minor 64-bit portability fix in memcluster.c.
|
||||
[RT #16360]
|
||||
|
||||
2080. [port] libbind: res_init.c did not compile on older versions
|
||||
of Solaris. [RT #16363]
|
||||
|
||||
2076. [bug] Several files were missing #include <config.h>
|
||||
causing build failures on OSF. [RT #16341]
|
||||
|
||||
2074. [bug] dns_request_createvia2(), dns_request_createvia3(),
|
||||
dns_request_createraw2() and dns_request_createraw3()
|
||||
failed to send multiple UDP requests. [RT #16349]
|
||||
|
||||
2066. [security] Handle SIG queries gracefully. [RT #16300]
|
||||
|
||||
--- 9.3.3rc1 released ---
|
||||
|
||||
2071. [port] Test whether gcc accepts -fno-strict-aliasing.
|
||||
[RT #16324]
|
||||
|
||||
2070. [bug] The remote address was not always displayed when
|
||||
reporting dispatch failures. [RT #16315]
|
||||
|
||||
2069. [bug] Cross compiling was not working. [RT #16330]
|
||||
|
||||
2067. [bug] 'rndc' could close the socket too early triggering
|
||||
a INSIST under Windows. [RT #16317]
|
||||
|
||||
2065. [bug] libbind: probe for HPUX prototypes for
|
||||
endprotoent_r() and endservent_r(). [RT 16313]
|
||||
|
||||
2064. [bug] libbind: silence AIX compiler warnings. [RT #16218]
|
||||
|
||||
2063. [bug] Change #1955 introduced a bug which caused the first
|
||||
'rndc flush' call to not free memory. [RT #16244]
|
||||
|
||||
2062. [bug] 'dig +nssearch' was reusing a buffer before it had
|
||||
been returned by the socket code. [RT #16307]
|
||||
|
||||
2057. [bug] Make setting "ra" dependent on both allow-query and
|
||||
allow-recursion. [RT #16290]
|
||||
|
||||
2056. [bug] dig: ixfr= was not being treated case insensitively
|
||||
at all times. [RT #15955]
|
||||
|
||||
2055. [bug] Missing goto after dropping multicast query.
|
||||
[RT #15944]
|
||||
|
||||
2054. [port] freebsd: do not explicitly link against -lpthread.
|
||||
[RT #16170]
|
||||
|
||||
2053. [port] netbsd:libbind: silence compiler warnings. [RT #16220]
|
||||
|
||||
2052. [bug] 'rndc' improve connect failed message to report
|
||||
the failing address. [RT #15978]
|
||||
|
||||
2051. [port] More strtol() fixes. [RT #16249]
|
||||
|
||||
2050. [bug] Parsing of NSAP records was not case insensitive.
|
||||
[RT #16287]
|
||||
|
||||
2049. [bug] Restore SOA before AXFR when falling back from
|
||||
a attempted IXFR when transfering in a zone.
|
||||
Allow a initial SOA query before attempting
|
||||
a AXFR to be requested. [RT #16156]
|
||||
|
||||
2048. [bug] It was possible to loop forever when using
|
||||
avoid-v4-udp-ports / avoid-v6-udp-ports when
|
||||
the OS always returned the same local port.
|
||||
[RT #16182]
|
||||
|
||||
2047. [bug] Failed to initialise the interface flags to zero.
|
||||
[RT #16245]
|
||||
|
||||
2043. [port] nsupdate/nslookup: Force the flushing of the prompt
|
||||
for interactive sessions. [RT#16148]
|
||||
|
||||
2038. [bug] dig/nslookup/host was unlinking from wrong list
|
||||
when handling errors. [RT #16122]
|
||||
|
||||
2037. [func] When unlinking the first or last element in a list
|
||||
check that the list head points to the element to
|
||||
be unlinked. [RT #15959]
|
||||
|
||||
2036. [bug] 'rndc recursing' could cause trigger a REQUIRE.
|
||||
[RT #16075]
|
||||
|
||||
2034. [bug] gcc: set -fno-strict-aliasing. [RT #16124]
|
||||
|
||||
--- 9.3.3b1 released ---
|
||||
|
||||
2031. [bug] Emit a error message when "rndc refresh" is called on
|
||||
a non slave/stub zone. [RT # 16073]
|
||||
|
||||
2030. [bug] We were being overly conservative when disabling
|
||||
openssl engine support. [RT #16030]
|
||||
|
||||
2029. [bug] host printed out the server multiple times when
|
||||
specified on the command line. [RT #15992]
|
||||
|
||||
2028. [port] linux: socket.c compatability for old systems.
|
||||
[RT #16015]
|
||||
|
||||
2027. [port] libbind: Solaris x86 support. [RT #16020]
|
||||
|
||||
2026. [bug] Rate limit the two recursive client exceeded messages.
|
||||
[RT #16044]
|
||||
|
||||
2024. [bug] named emited spurious "zone serial unchanged"
|
||||
messages on reload. [RT #16027]
|
||||
|
||||
2023. [bug] "make install" should create ${localstatedir}/run and
|
||||
${sysconfdir} if they do not exist. [RT #16033]
|
||||
|
||||
2016. [bug] Return a partial answer if recursion is not
|
||||
allowed but requested and we had the answer
|
||||
to the original qname. [RT #15945]
|
||||
|
||||
2013. [bug] Handle unexpected TSIGs on unsigned AXFR/IXFR
|
||||
responses more gracefully. [RT #15941]
|
||||
|
||||
2009. [bug] libbind: coverity fixes. [RT #15808]
|
||||
|
||||
2005. [bug] libbind: Retransmission timeouts should be
|
||||
based on which attempt it is to the nameserver
|
||||
and not the nameserver itself. [RT #13548]
|
||||
|
||||
2004. [bug] dns_tsig_sign() could pass a NULL pointer to
|
||||
dst_context_destroy() when cleaning up after a
|
||||
error. [RT #15835]
|
||||
|
||||
2003. [bug] libbind: The DNS name/address lookup functions could
|
||||
occasionally follow a random pointer due to
|
||||
structures not being completely zeroed. [RT #15806]
|
||||
|
||||
2002. [bug] libbind: tighten the constraints on when
|
||||
struct addrinfo._ai_pad exists. [RT #15783]
|
||||
|
||||
2000. [bug] memmove()/strtol() fix was incomplete. [RT #15812]
|
||||
|
||||
1998. [bug] Restrict handling of fifos as sockets to just SunOS.
|
||||
This allows named to connect to entropy gathering
|
||||
daemons that use fifos instead of sockets. [RT #15840]
|
||||
|
||||
1997. [bug] Named was failing to replace negative cache entries
|
||||
when a positive one for the type was learnt.
|
||||
[RT #15818]
|
||||
|
||||
1995. [bug] 'host' was reporting multiple "is an alias" messages.
|
||||
[RT #15702]
|
||||
|
||||
1994. [port] OpenSSL 0.9.8 support. [RT #15694]
|
||||
|
||||
1993. [bug] Log messsage, via syslog, were missing the space
|
||||
after the timestamp if "print-time yes" was specified.
|
||||
[RT #15844]
|
||||
|
||||
1991. [cleanup] The configuration data, once read, should be treated
|
||||
as readonly. Expand the use of const to enforce this
|
||||
at compile time. [RT #15813]
|
||||
|
||||
1990. [bug] libbind: isc's override of broken gettimeofday()
|
||||
implementions was not always effective.
|
||||
[RT #15709]
|
||||
|
||||
1989. [bug] win32: don't check the service password when
|
||||
re-installing. [RT #15882]
|
||||
|
||||
1985. [protocol] DLV has now been assigned a official type code of
|
||||
32769. [RT #15807]
|
||||
|
||||
Note: care should be taken to ensure you upgrade
|
||||
both named and dnssec-signzone at the same time for
|
||||
zones with DLV records where named is the master
|
||||
server for the zone. Also any zones that contain
|
||||
DLV records should be removed when upgrading a slave
|
||||
zone. You do not however have to upgrade all
|
||||
servers for a zone with DLV records simultaniously.
|
||||
|
||||
1982. [bug] DNSKEY was being accepted on the parent side of
|
||||
a delegation. KEY is still accepted there for
|
||||
RFC 3007 validated updates. [RT #15620]
|
||||
|
||||
1981. [bug] win32: condition.c:wait() could fail to reattain
|
||||
the mutex lock.
|
||||
|
||||
1979. [port] linux: allow named to drop core after changing
|
||||
user ids. [RT #15753]
|
||||
|
||||
1978. [port] Handle systems which have a broken recvmsg().
|
||||
[RT #15742]
|
||||
|
||||
1977. [bug] Silence noisy log message. [RT #15704]
|
||||
|
||||
1976. [bug] Handle systems with no IPv4 addresses. [RT #15695]
|
||||
|
||||
1975. [bug] libbind: isc_gethexstring() could misparse multi-line
|
||||
hex strings with comments. [RT #15814]
|
||||
|
||||
1974. [doc] List each of the zone types and associated zone
|
||||
options seperately in the ARM.
|
||||
|
||||
1972. [contrib] DBUS dynamic forwarders integation from
|
||||
Jason Vas Dias <[email protected]>.
|
||||
|
||||
1971. [port] linux: make detection of missing IF_NAMESIZE more
|
||||
robust. [RT #15443]
|
||||
|
||||
1970. [bug] nsupdate: adjust UDP timeout when falling back to
|
||||
unsigned SOA query. [RT #15775]
|
||||
|
||||
1969. [bug] win32: the socket code was freeing the socket
|
||||
structure too early. [RT #15776]
|
||||
|
||||
1968. [bug] Missing lock in resolver.c:validated(). [RT #15739]
|
||||
|
||||
1966. [bug] Don't set CD when we have fallen back to plain DNS.
|
||||
[RT #15727]
|
||||
|
||||
1963. [port] Tru64 4.0E doesn't support send() and recv().
|
||||
[RT #15586]
|
||||
|
||||
1962. [bug] Named failed to clear old update-policy when it
|
||||
was removed. [RT #15491]
|
||||
|
||||
1961. [bug] Check the port and address of responses forwarded
|
||||
to dispatch. [RT #15474]
|
||||
|
||||
1960. [bug] Update code should set NSEC ttls from SOA MINIMUM.
|
||||
[RT #15465]
|
||||
|
||||
1958. [bug] Named failed to update the zone's secure state
|
||||
until the zone was reloaded. [RT #15412]
|
||||
|
||||
1957. [bug] Dig mishandled responses to class ANY queries.
|
||||
[RT #15402]
|
||||
|
||||
1956. [bug] Improve cross compile support, 'gen' is now built
|
||||
by native compiler. See README for additional
|
||||
cross compile support information. [RT #15148]
|
||||
|
||||
1955. [bug] Pre-allocate the cache cleaning interator. [RT #14998]
|
||||
|
||||
1952. [port] hpux: tell the linker to build a runtime link
|
||||
path "-Wl,+b:". [RT #14816].
|
||||
|
||||
1951. [security] Drop queries from particular well known ports.
|
||||
Don't return FORMERR to queries from particular
|
||||
well known ports. [RT #15636]
|
||||
|
||||
1950. [port] Solaris 2.5.1 and earlier cannot bind() then connect()
|
||||
a TCP socket. This prevents the source address being
|
||||
set for TCP connections. [RT #15628]
|
||||
|
||||
1948. [bug] If was possible to trigger a REQUIRE failure in
|
||||
xfrin.c:maybe_free() if named ran out of memory.
|
||||
[RT #15568]
|
||||
|
||||
1946. [bug] resume_dslookup() could trigger a REQUIRE failure
|
||||
when using forwarders. [RT #15549]
|
||||
|
||||
1944. [cleanup] isc_hash_create() does not need a read/write lock.
|
||||
[RT #15522]
|
||||
|
||||
1943. [bug] Set the loadtime after rolling forward the journal.
|
||||
[RT #15647]
|
||||
|
||||
1942. [bug] If the name of a DNSKEY match that of one in
|
||||
trusted-keys do not attempt to validate the DNSKEY
|
||||
using the parents DS RRset. [RT #15649]
|
||||
|
||||
1941. [bug] ncache_adderesult() should set eresult even if no
|
||||
rdataset is passed to it. [RT #15642]
|
||||
|
||||
1940. [bug] Fixed a number of error conditions reported by
|
||||
Coverity.
|
||||
|
||||
1939. [bug] The resolver could dereference a null pointer after
|
||||
validation if all the queries have timed out.
|
||||
[RT #15528]
|
||||
|
||||
1938. [bug] The validator was not correctly handling unsecure
|
||||
negative responses at or below a SEP. [RT #15528]
|
||||
|
||||
1919. [contrib] queryperf: a set of new features: collecting/printing
|
||||
response delays, printing intermediate results, and
|
||||
adjusting query rate for the "target" qps.
|
||||
|
||||
--- 9.3.2 released ---
|
||||
|
||||
--- 9.3.2rc1 released ---
|
||||
|
||||
1936. [bug] The validator could leak memory. [RT #15544]
|
||||
|
||||
1932. [bug] hpux: LDFLAGS was getting corrupted. [RT #15530]
|
||||
|
||||
--- 9.3.2b2 released ---
|
||||
|
||||
1930. [port] HPUX: ia64 support. [RT #15473]
|
||||
|
||||
1929. [port] FreeBSD: extend use of PTHREAD_SCOPE_SYSTEM.
|
||||
|
||||
1926. [bug] The Windows installer did not check for empty
|
||||
passwords. BINDinstall was being installed in
|
||||
the wrong place. [RT #15483]
|
||||
|
||||
1925. [port] All outer level AC_TRY_RUNs need cross compiling
|
||||
defaults. [RT #15469]
|
||||
|
||||
1924. [port] libbind: hpux ia64 support. [RT #15473]
|
||||
|
||||
1923. [bug] ns_client_detach() called too early. [RT #15499]
|
||||
|
||||
--- 9.3.2b1 released ---
|
||||
|
||||
1917. [doc] funcsynopsisinfo wasn't being treated as verbatim
|
||||
when generating man pages. [RT #15385]
|
||||
|
||||
1915. [bug] dig +ndots was broken. [RT #15215]
|
||||
|
||||
1914. [protocol] DS is required to accept mnemonic algorithms
|
||||
(RFC 4034). Still emit numeric algorithms for
|
||||
compatability with RFC 3658. [RT #15354]
|
||||
|
||||
1911. [bug] Update windows socket code. [RT #14965]
|
||||
|
||||
1910. [bug] dig's +sigchase code overhauled. [RT #14933]
|
||||
|
||||
1909. [bug] The DLV code has been re-worked to make no longer
|
||||
query order sensitive. [RT #14933]
|
||||
|
||||
1905. [bug] Strings returned from cfg_obj_asstring() should be
|
||||
treated as read-only. [RT #15256]
|
||||
|
||||
1901. [cleanup] Don't add DNSKEY records to the additional section.
|
||||
|
||||
1900. [bug] ixfr-from-differences failed to ensure that the
|
||||
serial number increased. [RT #15036]
|
||||
|
||||
1896. [bug] Extend ISC_SOCKADDR_FORMATSIZE and
|
||||
ISC_NETADDR_FORMATSIZE to allow for scope details.
|
||||
|
||||
1894. [bug] Recursive clients soft quota support wasn't working
|
||||
as expected. [RT #15103]
|
||||
|
||||
1893. [bug] A escaped character is, potentially, converted to
|
||||
the output character set too early. [RT #14666]
|
||||
|
||||
1892. [port] Use uintptr_t if available. [RT #14606]
|
||||
|
||||
1889. [port] sunos: non blocking i/o support. [RT #14951]
|
||||
|
||||
1887. [bug] The cache could delete expired records too fast for
|
||||
clients with a virtual time in the past. [RT #14991]
|
||||
|
||||
1886. [bug] fctx_create() could return success even though it
|
||||
failed. [RT #14993]
|
||||
|
||||
1884. [cleanup] dighost.c: move external declarations into <dig/dig.h>.
|
||||
|
||||
1883. [bug] dnssec-signzone, dnssec-keygen: handle negative debug
|
||||
levels. [RT #14962]
|
||||
|
||||
1881. [func] Add a system test for named-checkconf. [RT #14931]
|
||||
|
||||
1877. [bug] Fix unreasonably low quantum on call to
|
||||
dns_rbt_destroy2(). Remove unnecessay unhash_node()
|
||||
call. [RT #14919]
|
||||
|
||||
1875. [bug] process_dhtkey() was using the wrong memory context
|
||||
to free some memory. [RT #14890]
|
||||
|
||||
1874. [port] sunos: portability fixes. [RT #14814]
|
||||
|
||||
1873. [port] win32: isc__errno2result() now reports its caller.
|
||||
[RT #13753]
|
||||
|
||||
1872. [port] win32: Handle ERROR_NETNAME_DELETED. [RT #13753]
|
||||
|
||||
1867. [bug] It was possible to trigger a INSIST in
|
||||
dlv_validatezonekey(). [RT #14846]
|
||||
|
||||
1866. [bug] resolv.conf parse errors were being ignored by
|
||||
dig/host/nslookup. [RT #14841]
|
||||
|
||||
1865. [bug] Silently ignore nameservers in /etc/resolv.conf with
|
||||
bad addresses. [RT #14841]
|
||||
|
||||
1864. [bug] Don't try the alternative transfer source if you
|
||||
got a answer / transfer with the main source
|
||||
address. [RT #14802]
|
||||
|
||||
1863. [bug] rrset-order "fixed" error messages not complete.
|
||||
|
||||
1861. [bug] dig could trigger a INSIST on certain malformed
|
||||
responses. [RT #14801]
|
||||
|
||||
1860. [port] solaris 2.8: hack_shutup_pthreadmutexinit was
|
||||
incorrectly set. [RT #14775]
|
||||
|
||||
1858. [bug] The flush-zones-on-shutdown option wasn't being
|
||||
parsed. [RT #14686]
|
||||
|
||||
1857. [bug] named could trigger a INSIST() if reconfigured /
|
||||
reloaded too fast. [RT #14673]
|
||||
|
||||
1856. [doc] Switch Docbook toolchain from DSSSL to XSL.
|
||||
[RT #11398]
|
||||
|
||||
1855. [bug] ixfr-from-differences was failing to detect changes
|
||||
of ttl due to dns_diff_subtract() was ignoring the ttl
|
||||
of records. [RT #14616]
|
||||
|
||||
1854. [bug] lwres also needs to know the print format for
|
||||
(long long). [RT #13754]
|
||||
|
||||
1853. [bug] Rework how DLV interacts with proveunsecure().
|
||||
[RT #13605]
|
||||
|
||||
1852. [cleanup] Remove last vestiges of dnssec-signkey and
|
||||
dnssec-makekeyset (removed from Makefile years ago).
|
||||
|
||||
1850. [bug] Memory leak in lwres_getipnodebyaddr(). [RT #14591]
|
||||
|
||||
1849. [doc] All forms of the man pages (docbook, man, html) should
|
||||
have consistant copyright dates.
|
||||
|
||||
1848. [bug] Improve SMF integration. [RT #13238]
|
||||
|
||||
1847. [bug] isc_ondestroy_init() is called too late in
|
||||
dns_rbtdb_create()/dns_rbtdb64_create().
|
||||
[RT #13661]
|
||||
|
||||
1846. [contrib] query-loc-0.3.0 from Stephane Bortzmeyer
|
||||
<[email protected]>.
|
||||
|
||||
1845. [bug] Improve error reporting to distingish between
|
||||
accept()/fcntl() and socket()/fcntl() errors.
|
||||
[RT #13745]
|
||||
|
||||
1844. [bug] inet_pton() accepted more that 4 hexadecimal digits
|
||||
for each 16 bit piece of the IPv6 address. The text
|
||||
representation of a IPv6 address has been tighted
|
||||
to disallow this (draft-ietf-ipv6-addr-arch-v4-02.txt).
|
||||
[RT #5662]
|
||||
|
||||
1843. [cleanup] CINCLUDES takes precedence over CFLAGS. This helps
|
||||
when CFLAGS contains "-I /usr/local/include"
|
||||
resulting in old header files being used.
|
||||
|
||||
1842. [port] cmsg_len() could produce incorrect results on
|
||||
some platform. [RT #13744]
|
||||
|
||||
1841. [bug] "dig +nssearch" now makes a recursive query to
|
||||
find the list of nameservers to query. [RT #13694]
|
||||
|
||||
1839. [bug] <isc/hash.h> was not being installed.
|
||||
|
||||
1838. [cleanup] Don't allow Linux capabilities to be inherited.
|
||||
[RT #13707]
|
||||
|
||||
1837. [bug] Compile time option ISC_FACILITY was not effective
|
||||
for 'named -u <user>'. [RT #13714]
|
||||
|
||||
1836. [cleanup] Silence compiler warnings in hash_test.c.
|
||||
|
||||
1835. [bug] Update dnssec-signzone's usage message. [RT #13657]
|
||||
|
||||
1834. [bug] Bad memset in rdata_test.c. [RT #13658]
|
||||
|
||||
1833. [bug] Race condition in isc_mutex_lock_profile(). [RT #13660]
|
||||
|
||||
1832. [bug] named fails to return BADKEY on unknown TSIG algorithm.
|
||||
[RT #13620]
|
||||
|
||||
1831. [doc] Update named-checkzone documentation. [RT#13604]
|
||||
|
||||
1830. [bug] adb lame cache has sence of test reversed. [RT #13600]
|
||||
|
||||
1829. [bug] win32: "pid-file none;" broken. [RT #13563]
|
||||
|
||||
1828. [bug] isc_rwlock_init() failed to properly cleanup if it
|
||||
encountered a error. [RT #13549]
|
||||
|
||||
1827. [bug] host: update usage message for '-a'. [RT #37116]
|
||||
|
||||
1826. [bug] Missing DESTROYLOCK() in isc_mem_createx() on out
|
||||
of memory error. [RT #13537]
|
||||
|
||||
1825. [bug] Missing UNLOCK() on out of memory error from in
|
||||
rbtdb.c:subtractrdataset(). [RT #13519]
|
||||
|
||||
1824. [bug] Memory leak on dns_zone_setdbtype() failure.
|
||||
[RT #13510]
|
||||
|
||||
1823. [bug] Wrong macro used to check for point to point interface.
|
||||
[RT#13418]
|
||||
|
||||
1822. [bug] check-names test for RT was reversed. [RT #13382]
|
||||
|
||||
1821. [doc] acls definitions are no longer required to be
|
||||
in named.conf prior to reference. They can be
|
||||
defined after being referenced.
|
||||
|
||||
1820. [bug] Gracefully handle acl loops. [RT #13659]
|
||||
|
||||
1819. [bug] The validator needed to check both the algorithm and
|
||||
digest types of the DS to determine if it could be
|
||||
used to introduce a secure zone. [RT #13593]
|
||||
|
||||
1816. [port] UnixWare: failed to compile lib/isc/unix/net.c.
|
||||
[RT #13597]
|
||||
|
||||
1815. [bug] nsupdate triggered a REQUIRE if the server was set
|
||||
without also setting the zone and it encountered
|
||||
a CNAME and was using TSIG. [RT #13086]
|
||||
|
||||
1810. [bug] configure, lib/bind/configure make different default
|
||||
decisions about whether to do a threaded build.
|
||||
[RT #13212]
|
||||
|
||||
1809. [bug] "make distclean" failed for libbind if the platform
|
||||
is not supported.
|
||||
|
||||
1807. [bug] When forwarding (forward only) set the active domain
|
||||
from the forward zone name. [RT #13526]
|
||||
|
||||
1804. [bug] Ensure that if we are queried for glue that it fits
|
||||
in the additional section or TC is set to tell the
|
||||
client to retry using TCP. [RT #10114]
|
||||
|
||||
1803. [bug] dnssec-signzone sometimes failed to remove old
|
||||
RRSIGs. [RT #13483]
|
||||
|
||||
1802. [bug] Handle connection resets better. [RT #11280]
|
||||
|
||||
1799. [bug] 'rndc flushname' failed to flush negative cache
|
||||
entries. [RT #13438]
|
||||
|
||||
1795. [bug] "rndc dumpdb" was not fully documented. Minor
|
||||
formating issues with "rndc dumpdb -all". [RT #13396]
|
||||
|
||||
1791. [bug] 'host -t a' still printed out AAAA and MX records.
|
||||
[RT #13230]
|
||||
|
||||
--- 9.3.1 released ---
|
||||
|
||||
1818. [bug] 'named-checkconf -z' triggered an INSIST. [RT #13599]
|
||||
|
||||
--- 9.3.1rc1 released ---
|
||||
|
||||
1812. [port] win32: IN6_IS_ADDR_UNSPECIFIED macro is incorrect.
|
||||
[RT #13453]
|
||||
|
||||
1808. [bug] zone.c:notify_zone() contained a race condition,
|
||||
zone->db could change underneath it. [RT #13511]
|
||||
|
||||
1806. [bug] The resolver returned the wrong result when a CNAME /
|
||||
DNAME was encountered when fetching glue from a
|
||||
secure namespace. [RT #13501]
|
||||
|
||||
1805. [bug] Pending status was not being cleared when DLV was
|
||||
active. [RT #13501]
|
||||
|
||||
--- 9.3.1beta2 released ---
|
||||
|
||||
1800. [bug] Changes #1719 allowed a INSIST to be triggered.
|
||||
[RT #13428]
|
||||
|
||||
--- 9.3.1beta1 released ---
|
||||
|
||||
1790. [cleanup] Move lib/dns/sec/dst up into lib/dns. This should
|
||||
allow parallel make to succeed.
|
||||
|
||||
1789. [bug] Prerequisite test for tkey and dnssec could fail
|
||||
with "configure --with-libtool".
|
||||
|
||||
1788. [bug] libbind9.la/libbind9.so needs to link against
|
||||
libisccfg.la/libisccfg.so.
|
||||
|
||||
1787. [port] HPUX: both "cc" and "gcc" need -Wl,+vnocompatwarnings.
|
||||
|
||||
1786. [port] AIX: libt_api needs to be taught to look for
|
||||
T_testlist in the main executable (--with-libtool).
|
||||
[RT #13239]
|
||||
|
||||
1785. [bug] libbind9.la/libbind9.so needs to link against
|
||||
libisc.la/libisc.so.
|
||||
|
||||
1784. [cleanup] "libtool -allow-undefined" is the default.
|
||||
Leave hooks in configure to allow it to be set
|
||||
if needed in the future.
|
||||
|
||||
1783. [cleanup] We only need one copy of libtool.m4, ltmain.sh in the
|
||||
source tree.
|
||||
|
||||
1782. [port] OSX: --with-libtool + --enable-libbind broke on
|
||||
__evOptMonoTime. [RT #13219]
|
||||
|
||||
1781. [port] FreeBSD 5.3: set PTHREAD_SCOPE_SYSTEM. [RT #12810]
|
||||
|
||||
1780. [bug] Update libtool to 1.5.10.
|
||||
|
||||
1779. [port] OSF 5.1: libtool didn't handle -pthread correctly.
|
||||
|
||||
1778. [port] HUX 11.11: fix broken IN6ADDR_ANY_INIT and
|
||||
IN6ADDR_LOOPBACK_INIT macros.
|
||||
|
||||
1777. [port] OSF 5.1: fix broken IN6ADDR_ANY_INIT and
|
||||
IN6ADDR_LOOPBACK_INIT macros.
|
||||
|
||||
1776. [port] Solaris 2.9: fix broken IN6ADDR_ANY_INIT and
|
||||
IN6ADDR_LOOPBACK_INIT macros.
|
||||
|
||||
1775. [bug] Only compile getnetent_r.c when threaded. [RT #13205]
|
||||
|
||||
1774. [port] Aix: Silence compiler warnings / build failures.
|
||||
[RT #13154]
|
||||
|
||||
1773. [bug] Fast retry on host / net unreachable. [RT #13153]
|
||||
|
||||
1770. [bug] named-checkconf failed to report missing a missing
|
||||
file clause for rbt{64} master/hint zones. [RT#13009]
|
||||
|
||||
1769. [port] win32: change compiler flags /MTd ==> /MDd,
|
||||
/MT ==> /MD.
|
||||
|
||||
1768. [bug] nsecnoexistnodata() could be called with a non-NSEC
|
||||
rdataset. [RT #12907]
|
||||
|
||||
1767. [port] Builds on IPv6 platforms without IPv6 Advanced API
|
||||
support for (struct in6_pktinfo) failed. [RT #13077]
|
||||
|
||||
1766. [bug] Update the master file timestamp on successful refresh
|
||||
as well as the journal's timestamp. [RT# 13062]
|
||||
|
||||
1765. [bug] configure --with-openssl=auto failed. [RT #12937]
|
||||
|
||||
1764. [bug] dns_zone_replacedb failed to emit a error message
|
||||
if there was no SOA record in the replacment db.
|
||||
[RT #13016]
|
||||
|
||||
1762. [bug] isc_interfaceiter_create() could return ISC_R_SUCCESS
|
||||
even when it failed. [RT #12995]
|
||||
|
||||
1761. [bug] 'rndc dumpdb' didn't report unassociated entries.
|
||||
[RT #12971]
|
||||
|
||||
1760. [bug] Host / net unreachable was not penalising rtt
|
||||
estimates. [RT #12970]
|
||||
|
||||
1759. [bug] Named failed to startup if the OS supported IPv6
|
||||
but had no IPv6 interfaces configured. [RT #12942]
|
||||
|
||||
1754. [bug] We wern't always attempting to query the parent
|
||||
server for the DS records at the zone cut.
|
||||
[RT #12774]
|
||||
|
||||
1753. [bug] Don't serve a slave zone which has no NS records.
|
||||
[RT #12894]
|
||||
|
||||
1752. [port] Move isc_app_start() to after ns_os_daemonise()
|
||||
as some fork() implementations unblock the signals
|
||||
that are blocked by isc_app_start(). [RT #12810]
|
||||
|
||||
1751. [bug] --enable-getifaddrs failed under linux. [RT #12867]
|
||||
|
||||
1750. [port] lib/bind/make/rules.in:subdirs was not bash friendly.
|
||||
[RT #12864]
|
||||
|
||||
1749. [bug] 'check-names response ignore;' failed to ignore.
|
||||
[RT #12866]
|
||||
|
||||
1747. [bug] BIND 8 compatability: named/named-checkconf failed
|
||||
to parse "host-statistics-max" in named.conf.
|
||||
|
||||
1745. [bug] Dig/host/nslookup accept replies from link locals
|
||||
regardless of scope if no scope was specified when
|
||||
query was sent. [RT #12745]
|
||||
|
||||
1744. [bug] If tuple2msgname() failed to convert a tuple to
|
||||
a name a REQUIRE could be triggered. [RT #12796]
|
||||
|
||||
1743. [bug] If isc_taskmgr_create() was not able to create the
|
||||
requested number of worker threads then destruction
|
||||
of the manager would trigger an INSIST() failure.
|
||||
[RT #12790]
|
||||
|
||||
1742. [bug] Deleting all records at a node then adding a
|
||||
previously existing record, in a single UPDATE
|
||||
transaction, failed to leave / regenerate the
|
||||
associated RRSIG records. [RT #12788]
|
||||
|
||||
1741. [bug] Deleting all records at a node in a secure zone
|
||||
using a update-policy grant failed. [RT #12787]
|
||||
|
||||
1740. [bug] Replace rbt's hash algorithm as it performed badly
|
||||
with certain zones. [RT #12729]
|
||||
|
||||
NOTE: a hash context now needs to be established
|
||||
via isc_hash_create() if the application was not
|
||||
already doing this.
|
||||
|
||||
1739. [bug] dns_rbt_deletetree() could incorrectly return
|
||||
ISC_R_QUOTA. [RT #12695]
|
||||
|
||||
1738. [bug] Enable overrun checking by default. [RT #12695]
|
||||
|
||||
1737. [bug] named failed if more than 16 masters were specified.
|
||||
[RT #12627]
|
||||
|
||||
1736. [bug] dst_key_fromnamedfile() could fail to read a
|
||||
public key. [RT #12687]
|
||||
|
||||
1735. [bug] 'dig +sigtrace' could die with a REQUIRE failure.
|
||||
[RE #12688]
|
||||
|
||||
1734. [cleanup] 'rndc-confgen -a -t' remove extra '/' in path.
|
||||
[RT #12588]
|
||||
|
||||
1733. [bug] Return non-zero exit status on initial load failure.
|
||||
[RT #12658]
|
||||
|
||||
1732. [bug] 'rrset-order name "*"' wasn't being applied to ".".
|
||||
[RT #12467]
|
||||
|
||||
1731. [port] darwin: relax version test in ifconfig.sh.
|
||||
[RT #12581]
|
||||
|
||||
1730. [port] Determine the length type used by the socket API.
|
||||
[RT #12581]
|
||||
|
||||
1728. [doc] Update check-names documentation.
|
||||
|
||||
1727. [bug] named-checkzone: check-names support didn't match
|
||||
documentation.
|
||||
|
||||
1726. [port] aix5: add support for aix5.
|
||||
|
||||
1725. [port] linux: update error message on interaction of threads,
|
||||
capabilities and setuid support (named -u). [RT #12541]
|
||||
|
||||
1724. [bug] Look for DNSKEY records with "dig +sigtrace".
|
||||
[RT #12557]
|
||||
|
||||
1723. [cleanup] Silence compiler warnings from t_tasks.c. [RT #12493]
|
||||
|
||||
1722. [bug] Don't commit the journal on malformed ixfr streams.
|
||||
[RT #12519]
|
||||
|
||||
1721. [bug] Error message from the journal processing were not
|
||||
always identifing the relevent journal. [RT #12519]
|
||||
|
||||
1720. [bug] 'dig +chase' did not terminate on a RFC 2308 Type 1
|
||||
negative response. [RT #12506]
|
||||
|
||||
1719. [bug] named was not correctly caching a RFC 2308 Type 1
|
||||
negative response. [RT #12506]
|
||||
|
||||
1718. [bug] nsupdate was not handling RFC 2308 Type 3 negative
|
||||
responses when looking for the zone / master server.
|
||||
[RT #12506]
|
||||
|
||||
1717. [port] solaris: ifconfig.sh did not support Solaris 10.
|
||||
"ifconfig.sh down" didn't work for Solaris 9.
|
||||
|
||||
1716. [doc] named.conf(5) was being installed in the wrong
|
||||
location. [RT# 12441]
|
||||
|
||||
1714. [bug] dig/host/nslookup were only trying the first
|
||||
address when a nameserver was specified by name.
|
||||
[RT #12286]
|
||||
|
||||
1713. [port] linux: extend capset failure message to say:
|
||||
please ensure that the capset kernel module is
|
||||
loaded. see insmod(8)
|
||||
|
||||
1712. [bug] Missing FULLCHECK for "trusted-key" in dig.
|
||||
|
||||
--- 9.3.0 released ---
|
||||
|
||||
1711. [func] 'rndc unfreeze' has been deprecated by 'rndc thaw'.
|
||||
@@ -1155,10 +299,6 @@
|
||||
1609. [func] dig now has support to chase DNSSEC signature chains.
|
||||
Requires -DDIG_SIGCHASE=1 to be set in STD_CDEFINES.
|
||||
|
||||
DNSSEC validation code in dig coded by Olivier Courtay
|
||||
([email protected]) for the IDsA project
|
||||
(http://idsa.irisa.fr).
|
||||
|
||||
1608. [func] dig and host now accept -4/-6 to select IP transport
|
||||
to use when making queries.
|
||||
|
||||
@@ -1531,8 +671,8 @@
|
||||
|
||||
1414. [func] Support for KSK flag.
|
||||
|
||||
1413. [func] Explicitly request the (re-)generation of DS records
|
||||
from keysets (dnssec-signzone -g).
|
||||
1413. [func] Explictly request the (re-)generation of DS records from
|
||||
keysets (dnssec-signzone -g).
|
||||
|
||||
1412. [func] You can now specify servers to be tried if a nameserver
|
||||
has IPv6 address and you only support IPv4 or the
|
||||
@@ -5929,7 +5069,7 @@
|
||||
<isc/bufferlist.h>, <isc/task.h>, <isc/mem.h> or
|
||||
<isc/net.h>.
|
||||
|
||||
119. [cleanup] structure definitions for generic rdata structures do
|
||||
119. [cleanup] structure definitions for generic rdata stuctures do
|
||||
not have _generic_ in their names.
|
||||
|
||||
118. [cleanup] libdns.a is now namespace-clean, on NetBSD, excepting
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
Copyright (C) 1996-2003 Internet Software Consortium.
|
||||
|
||||
Permission to use, copy, modify, and distribute this software for any
|
||||
@@ -13,7 +13,7 @@ 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: COPYRIGHT,v 1.6.2.2.8.4 2006/01/04 00:37:22 marka Exp $
|
||||
$Id: COPYRIGHT,v 1.6.2.2.8.2 2004/03/08 04:04:12 marka Exp $
|
||||
|
||||
Portions Copyright (C) 1996-2001 Nominum, Inc.
|
||||
|
||||
|
||||
+331
-552
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,99 @@
|
||||
|
||||
|
||||
FreeBSD maintainer's guide to updating BIND 9
|
||||
=============================================
|
||||
|
||||
1) Obtain the latest source distribution from the ISC's FTP server
|
||||
(ftp://ftp.isc.org/isc/bind9/)
|
||||
|
||||
2) Unpack the tarball in a suitable directory.
|
||||
|
||||
3) Remove unwanted files and directories:
|
||||
|
||||
$ while read pattern ; do rm -rf $pattern ; done \
|
||||
</usr/src/contrib/bind9/FREEBSD-Xlist
|
||||
|
||||
Make sure that took care of everything, and if it didn't, make sure
|
||||
to update FREEBSD-Xlist so you won't miss it the next time. A good
|
||||
way to do this is to run a test import and see if any new files
|
||||
show up:
|
||||
|
||||
$ cvs -n import src/contrib/bind9 ISC x | grep \^N
|
||||
|
||||
4) Import the sources:
|
||||
|
||||
$ cvs import src/contrib/bind9 ISC BIND_9_X_Y
|
||||
|
||||
5) Resolve conflicts.
|
||||
|
||||
As of 2004-09-27, we have no local patches against BIND 9; thus
|
||||
there are no conflicts to merge. This may change at a later date.
|
||||
|
||||
6) Remove any references to the {bin,lib}/tests and docutil
|
||||
directories from the configure and Makefile templates:
|
||||
|
||||
$ sed -i.orig -e '/\/tests/d; /docutil/d;' \
|
||||
configure.in Makefile.in */Makefile.in
|
||||
|
||||
Please do not commit this change, as it would unnecessarily take
|
||||
files off the vendor branch. You only need this to generate
|
||||
config.h.
|
||||
|
||||
7) Generate and run configure:
|
||||
|
||||
$ autoconf253
|
||||
$ autoheader253
|
||||
$ ./configure --prefix=/usr \
|
||||
--infodir=/usr/share/info --mandir=/usr/share/man \
|
||||
--enable-threads --enable-libbind --disable-ipv6 \
|
||||
--enable-getifaddrs --disable-linux-caps \
|
||||
--with-openssl=/usr --with-randomdev=/dev/random
|
||||
|
||||
Note that we intentionally disable IPv6 support on the configure
|
||||
command line; src/lib/bind/config.mk will re-enable it at compile
|
||||
time if NOINET6 is not defined.
|
||||
|
||||
8) Copy the resulting config.h to src/lib/bind, add an RCS id tag and
|
||||
commit it. Do not commit any other file that was modified or
|
||||
created in steps 6) or 7).
|
||||
|
||||
9) The following directories contain Makefiles for bits and pieces of
|
||||
BIND 9:
|
||||
|
||||
FreeBSD directory ISC directory
|
||||
========================================================
|
||||
src/lib/bind bind9/lib
|
||||
src/lib/bind/bind bind9/lib/bind
|
||||
src/lib/bind/bind9 bind9/lib/bind9
|
||||
src/lib/bind/dns bind9/lib/dns
|
||||
src/lib/bind/isc bind9/lib/isc
|
||||
src/lib/bind/isccc bind9/lib/isccc
|
||||
src/lib/bind/isccfg bind9/lib/isccfg
|
||||
src/lib/bind/lwres bind9/lib/lwres
|
||||
src/share/doc/bind9 bind9/doc/{arm,misc}
|
||||
src/usr.bin/dig bind9/bin/dig
|
||||
src/usr.bin/host bind9/bin/dig
|
||||
src/usr.bin/nslookup bind9/bin/dig
|
||||
src/usr.bin/nsupdate bind9/bin/nsupdate
|
||||
src/usr.sbin/dnssec-keygen bind9/bin/dnssec
|
||||
src/usr.sbin/dnssec-signzone bind9/bin/dnssec
|
||||
src/usr.sbin/named bind9/bin/named
|
||||
src/usr.sbin/named-checkconf bind9/bin/check
|
||||
src/usr.sbin/named-checkzone bind9/bin/check
|
||||
src/usr.sbin/rndc bind9/bin/rndc
|
||||
src/usr.sbin/rndc-confgen bind9/bin/rndc
|
||||
|
||||
Make sure that the lists of sources, headers and man pages in each
|
||||
FreeBSD Makefile accurately reflects those in the corresponding ISC
|
||||
Makefile. Please strive to keep those lists in the same order and
|
||||
with line breaks in the same places to ease future comparisons.
|
||||
|
||||
A) Build and test.
|
||||
|
||||
B) Lather, rinse, repeat.
|
||||
|
||||
C) Commit when everything builds cleanly and works properly.
|
||||
|
||||
-- [email protected]
|
||||
|
||||
$FreeBSD$
|
||||
@@ -0,0 +1,64 @@
|
||||
# $FreeBSD$
|
||||
|
||||
# Misc. stuff
|
||||
.cvsignore
|
||||
aclocal.m4
|
||||
config.h.in
|
||||
configure
|
||||
contrib
|
||||
docutil
|
||||
|
||||
# Tests
|
||||
bin/tests
|
||||
lib/tests
|
||||
|
||||
# Windows directories
|
||||
bin/check/win32
|
||||
bin/dig/win32
|
||||
bin/dnssec/win32
|
||||
bin/named/win32
|
||||
bin/nsupdate/win32
|
||||
bin/rndc/win32
|
||||
bin/win32
|
||||
config.h.win32
|
||||
lib/bind9/win32
|
||||
lib/dns/gen-win32.h
|
||||
lib/dns/win32
|
||||
lib/isc/win32
|
||||
lib/isccc/win32
|
||||
lib/isccfg/win32
|
||||
lib/lwres/win32
|
||||
lib/win32
|
||||
win32utils
|
||||
|
||||
# Various ports to other OSs
|
||||
lib/bind/port/aix32
|
||||
lib/bind/port/aix4
|
||||
lib/bind/port/aux3
|
||||
lib/bind/port/bsdos
|
||||
lib/bind/port/bsdos2
|
||||
lib/bind/port/cygwin
|
||||
lib/bind/port/darwin
|
||||
lib/bind/port/decunix
|
||||
lib/bind/port/hpux
|
||||
lib/bind/port/hpux10
|
||||
lib/bind/port/hpux9
|
||||
lib/bind/port/irix
|
||||
lib/bind/port/linux
|
||||
lib/bind/port/lynxos
|
||||
lib/bind/port/mpe
|
||||
lib/bind/port/netbsd
|
||||
lib/bind/port/next
|
||||
lib/bind/port/openbsd
|
||||
lib/bind/port/prand_conf
|
||||
lib/bind/port/qnx
|
||||
lib/bind/port/rhapsody
|
||||
lib/bind/port/sco42
|
||||
lib/bind/port/sco50
|
||||
lib/bind/port/solaris
|
||||
lib/bind/port/sunos
|
||||
lib/bind/port/ultrix
|
||||
lib/bind/port/unixware20
|
||||
lib/bind/port/unixware212
|
||||
lib/bind/port/unixware7
|
||||
lib/bind/port/unknown
|
||||
@@ -0,0 +1,21 @@
|
||||
|
||||
Known Defects in BIND 9.3.0
|
||||
|
||||
* 'dig +chase' does not terminate on a RFC 2308 Type 1 negative response.
|
||||
|
||||
* named does not correctly caching a RFC 2308 Type 1 negative response.
|
||||
This causes named to emit RFC 2308 Type 3 responses instead of RFC 2308
|
||||
Type 2 responses which inturn causes problems for nsupdate (below).
|
||||
|
||||
* nsupdate does not handling RFC 2308 Type 3 negative responses when looking
|
||||
for the zone / master server. Use server and zone commands to work around
|
||||
this.
|
||||
|
||||
* "ifconfig.sh down" doesn't work for Solaris 9.
|
||||
|
||||
* named.conf(5) is being installed in the wrong location.
|
||||
|
||||
* dig/host/nslookup are only trying the first address when a nameserver was
|
||||
specified by name.
|
||||
|
||||
* Missing FULLCHECK for "trusted-key" in dig.
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
# Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
# Copyright (C) 1998-2002 Internet Software Consortium.
|
||||
#
|
||||
# Permission to use, copy, modify, and distribute this software for any
|
||||
@@ -13,7 +13,7 @@
|
||||
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
# PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
# $Id: Makefile.in,v 1.41.2.2.2.4 2006/05/19 00:04:00 marka Exp $
|
||||
# $Id: Makefile.in,v 1.41.2.2.2.2 2004/03/08 04:04:12 marka Exp $
|
||||
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
@@ -44,8 +44,7 @@ maintainer-clean::
|
||||
rm -f configure
|
||||
|
||||
installdirs:
|
||||
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${bindir} \
|
||||
${DESTDIR}${localstatedir}/run ${DESTDIR}${sysconfdir}
|
||||
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${bindir}
|
||||
|
||||
install:: isc-config.sh installdirs
|
||||
${INSTALL_SCRIPT} isc-config.sh ${DESTDIR}${bindir}
|
||||
|
||||
+2
-60
@@ -42,45 +42,6 @@ BIND 9
|
||||
Stichting NLnet - NLnet Foundation
|
||||
Nominum, Inc.
|
||||
|
||||
BIND 9.3.4-P1
|
||||
|
||||
BIND 9.3.4-P1 is a security release.
|
||||
|
||||
BIND 9.3.4
|
||||
|
||||
BIND 9.3.4 is a security release.
|
||||
|
||||
BIND 9.3.3
|
||||
|
||||
BIND 9.3.3 is a maintenance release, containing fixes for
|
||||
a number of bugs in 9.3.2.
|
||||
|
||||
BIND 9.3.2
|
||||
|
||||
BIND 9.3.2 is a maintenance release, containing fixes for
|
||||
a number of bugs in 9.3.1.
|
||||
|
||||
libbind: corresponds to that from BIND 8.4.7-REL.
|
||||
|
||||
Known Issues:
|
||||
|
||||
The following INSIST can be triggered with DNSSEC enabled.
|
||||
|
||||
resolver.c:762: INSIST(result != 0 || dns_rdataset_isassociated(event->rdataset) || fctx->type == ((dns_rdatatype_t)dns_rdatatype_any) || fctx->type == ((dns_rdatatype_t)dns_rdatatype_rrsig)) failed
|
||||
|
||||
We are still trying to isolate the cause. If you have core
|
||||
dump please send a bug report to [email protected] with
|
||||
the location of the core, named executable and OS details.
|
||||
|
||||
Note: contrib/nanny contains a perl script to restart named
|
||||
in the event of a INSIST/REQUIRE/ENSURE failure.
|
||||
|
||||
BIND 9.3.1
|
||||
|
||||
BIND 9.3.1 is a maintenance release, containing fixes for
|
||||
a number of bugs in 9.3.0.
|
||||
|
||||
libbind: corresponds to that from BIND 8.4.6-REL.
|
||||
|
||||
BIND 9.3.0
|
||||
|
||||
@@ -206,9 +167,6 @@ BIND 9.2.0
|
||||
|
||||
--with-libtool does not work on AIX.
|
||||
|
||||
--with-libtool does not work on SunOS 4. configure
|
||||
requires "printf" which is not available.
|
||||
|
||||
A bug in the Windows 2000 DNS server can cause zone transfers
|
||||
from a BIND 9 server to a W2K server to fail. For details,
|
||||
see the "Zone Transfers" section in doc/misc/migration.
|
||||
@@ -241,11 +199,11 @@ Building
|
||||
Red Hat Linux 7.1
|
||||
Debian GNU/Linux 2.2 and 3.0
|
||||
Mandrake 8.1
|
||||
OpenBSD 2.6, 2.8, 2.9, 3.1, 3.6, 3.8
|
||||
OpenBSD 2.6, 2.8, 2.9
|
||||
UnixWare 7.1.1
|
||||
HP-UX 10.20
|
||||
BSD/OS 4.2
|
||||
Mac OS X 10.1, 10.3.8
|
||||
Mac OS X 10.1
|
||||
|
||||
To build, just
|
||||
|
||||
@@ -280,23 +238,10 @@ Building
|
||||
Enable DNSSEC signature chasing support in dig.
|
||||
-DDIG_SIGCHASE=1 (sets -DDIG_SIGCHASE_TD=1 and
|
||||
-DDIG_SIGCHASE_BU=1)
|
||||
Disable dropping queries from particular well known ports.
|
||||
-DNS_CLIENT_DROPPORT=0
|
||||
|
||||
LDFLAGS
|
||||
Linker flags. Defaults to empty string.
|
||||
|
||||
The following need to be set when cross compiling.
|
||||
|
||||
BUILD_CC
|
||||
The native C compiler.
|
||||
BUILD_CFLAGS (optional)
|
||||
BUILD_CPPFLAGS (optional)
|
||||
Possible Settings:
|
||||
-DNEED_OPTARG=1 (optarg is not declared in <unistd.h>)
|
||||
BUILD_LDFLAGS (optional)
|
||||
BUILD_LIBS (optional)
|
||||
|
||||
To build shared libraries, specify "--with-libtool" on the
|
||||
configure command line.
|
||||
|
||||
@@ -348,11 +293,8 @@ Building
|
||||
Building with gcc is not supported, unless gcc is the vendor's usual
|
||||
compiler (e.g. the various BSD systems, Linux).
|
||||
|
||||
Known compiler issues:
|
||||
* gcc-3.2.1 and gcc-3.1.1 is known to cause problems with solaris-x86.
|
||||
* gcc prior to gcc-3.2.3 ultrasparc generates incorrect code at -02.
|
||||
* gcc-3.3.5 powerpc generates incorrect code at -02.
|
||||
* Irix, MipsPRO 7.4.1m is known to cause problems.
|
||||
|
||||
A limited test suite can be run with "make test". Many of
|
||||
the tests require you to configure a set of virtual IP addresses
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: acconfig.h,v 1.35.2.4.2.10 2004/12/04 06:50:02 marka Exp $ */
|
||||
/* $Id: acconfig.h,v 1.35.2.4.2.8 2004/05/21 08:24:04 marka Exp $ */
|
||||
|
||||
/***
|
||||
*** This file is not to be included by any public header files, because
|
||||
@@ -134,14 +134,8 @@ int sigwait(const unsigned int *set, int *sig);
|
||||
/* define if you have strerror in the C library. */
|
||||
#undef HAVE_STRERROR
|
||||
|
||||
/* Define if you are running under Compaq TruCluster. */
|
||||
/* Define if you are running under Compaq TruCluster.. */
|
||||
#undef HAVE_TRUCLUSTER
|
||||
|
||||
/* Define if OpenSSL includes DSA support */
|
||||
#undef HAVE_OPENSSL_DSA
|
||||
|
||||
/* Define to the length type used by the socket API (socklen_t, size_t, int). */
|
||||
#undef ISC_SOCKADDR_LEN_T
|
||||
|
||||
/* Define if threads need PTHREAD_SCOPE_SYSTEM */
|
||||
#undef NEED_PTHREAD_SCOPE_SYSTEM
|
||||
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: check-tool.c,v 1.4.12.7 2004/11/30 01:15:40 marka Exp $ */
|
||||
/* $Id: check-tool.c,v 1.4.12.5 2004/03/08 04:04:13 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
#include <isc/types.h>
|
||||
|
||||
#include <dns/fixedname.h>
|
||||
#include <dns/log.h>
|
||||
#include <dns/name.h>
|
||||
#include <dns/rdataclass.h>
|
||||
#include <dns/types.h>
|
||||
@@ -49,9 +48,7 @@ static const char *dbtype[] = { "rbt" };
|
||||
|
||||
int debug = 0;
|
||||
isc_boolean_t nomerge = ISC_TRUE;
|
||||
unsigned int zone_options = DNS_ZONEOPT_CHECKNS |
|
||||
DNS_ZONEOPT_MANYERRORS |
|
||||
DNS_ZONEOPT_CHECKNAMES;
|
||||
unsigned int zone_options = DNS_ZONEOPT_CHECKNS|DNS_ZONEOPT_MANYERRORS;
|
||||
|
||||
isc_result_t
|
||||
setup_logging(isc_mem_t *mctx, isc_log_t **logp) {
|
||||
|
||||
@@ -1,75 +1,59 @@
|
||||
.\" Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2000-2002 Internet Software Consortium.
|
||||
.\"
|
||||
.\" Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2000-2002 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 ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
.\" REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
.\" AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
.\" AND FITNESS. IN NO EVENT SHALL ISC 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: named-checkconf.8,v 1.11.12.8 2006/06/29 13:02:30 marka Exp $
|
||||
.\" $Id: named-checkconf.8,v 1.11.12.4 2004/06/03 05:35:41 marka Exp $
|
||||
.\"
|
||||
.hy 0
|
||||
.ad l
|
||||
.\" Title: named\-checkconf
|
||||
.\" Author:
|
||||
.\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
|
||||
.\" Date: June 14, 2000
|
||||
.\" Manual: BIND9
|
||||
.\" Source: BIND9
|
||||
.\"
|
||||
.TH "NAMED\-CHECKCONF" "8" "June 14, 2000" "BIND9" "BIND9"
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.SH "NAME"
|
||||
named\-checkconf \- named configuration file syntax checking tool
|
||||
.SH "SYNOPSIS"
|
||||
.HP 16
|
||||
\fBnamed\-checkconf\fR [\fB\-v\fR] [\fB\-j\fR] [\fB\-t\ \fR\fB\fIdirectory\fR\fR] {filename} [\fB\-z\fR]
|
||||
.TH "NAMED-CHECKCONF" "8" "June 14, 2000" "BIND9" ""
|
||||
.SH NAME
|
||||
named-checkconf \- named configuration file syntax checking tool
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
\fBnamed-checkconf\fR [ \fB-v\fR ] [ \fB-j\fR ] [ \fB-t \fIdirectory\fB\fR ] \fBfilename\fR [ \fB-z\fR ]
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
\fBnamed\-checkconf\fR
|
||||
checks the syntax, but not the semantics, of a named configuration file.
|
||||
\fBnamed-checkconf\fR checks the syntax, but not
|
||||
the semantics, of a named configuration file.
|
||||
.SH "OPTIONS"
|
||||
.TP 3n
|
||||
\-t \fIdirectory\fR
|
||||
chroot to
|
||||
\fIdirectory\fR
|
||||
so that include directives in the configuration file are processed as if run by a similarly chrooted named.
|
||||
.TP 3n
|
||||
\-v
|
||||
Print the version of the
|
||||
\fBnamed\-checkconf\fR
|
||||
.TP
|
||||
\fB-t \fIdirectory\fB\fR
|
||||
chroot to \fIdirectory\fR so that include
|
||||
directives in the configuration file are processed as if
|
||||
run by a similarly chrooted named.
|
||||
.TP
|
||||
\fB-v\fR
|
||||
Print the version of the \fBnamed-checkconf\fR
|
||||
program and exit.
|
||||
.TP 3n
|
||||
\-z
|
||||
.TP
|
||||
\fB-z\fR
|
||||
Perform a check load the master zonefiles found in
|
||||
\fInamed.conf\fR.
|
||||
.TP 3n
|
||||
\-j
|
||||
.TP
|
||||
\fB-j\fR
|
||||
When loading a zonefile read the journal if it exists.
|
||||
.TP 3n
|
||||
filename
|
||||
The name of the configuration file to be checked. If not specified, it defaults to
|
||||
\fI/etc/named.conf\fR.
|
||||
.TP
|
||||
\fBfilename\fR
|
||||
The name of the configuration file to be checked. If not
|
||||
specified, it defaults to \fI/etc/named.conf\fR.
|
||||
.SH "RETURN VALUES"
|
||||
.PP
|
||||
\fBnamed\-checkconf\fR
|
||||
returns an exit status of 1 if errors were detected and 0 otherwise.
|
||||
\fBnamed-checkconf\fR returns an exit status of 1 if
|
||||
errors were detected and 0 otherwise.
|
||||
.SH "SEE ALSO"
|
||||
.PP
|
||||
\fBnamed\fR(8),
|
||||
BIND 9 Administrator Reference Manual.
|
||||
\fIBIND 9 Administrator Reference Manual\fR.
|
||||
.SH "AUTHOR"
|
||||
.PP
|
||||
Internet Systems Consortium
|
||||
.SH "COPYRIGHT"
|
||||
Copyright \(co 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 1999-2002 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: named-checkconf.c,v 1.12.12.11 2006/03/02 00:37:20 marka Exp $ */
|
||||
/* $Id: named-checkconf.c,v 1.12.12.7 2004/03/08 09:04:14 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -25,8 +25,6 @@
|
||||
|
||||
#include <isc/commandline.h>
|
||||
#include <isc/dir.h>
|
||||
#include <isc/entropy.h>
|
||||
#include <isc/hash.h>
|
||||
#include <isc/log.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/result.h>
|
||||
@@ -37,7 +35,6 @@
|
||||
|
||||
#include <bind9/check.h>
|
||||
|
||||
#include <dns/fixedname.h>
|
||||
#include <dns/log.h>
|
||||
#include <dns/result.h>
|
||||
|
||||
@@ -60,9 +57,9 @@ usage(void) {
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
directory_callback(const char *clausename, const cfg_obj_t *obj, void *arg) {
|
||||
directory_callback(const char *clausename, cfg_obj_t *obj, void *arg) {
|
||||
isc_result_t result;
|
||||
const char *directory;
|
||||
char *directory;
|
||||
|
||||
REQUIRE(strcasecmp("directory", clausename) == 0);
|
||||
|
||||
@@ -85,18 +82,18 @@ directory_callback(const char *clausename, const cfg_obj_t *obj, void *arg) {
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
configure_zone(const char *vclass, const char *view,
|
||||
const cfg_obj_t *zconfig, isc_mem_t *mctx)
|
||||
configure_zone(const char *vclass, const char *view, cfg_obj_t *zconfig,
|
||||
isc_mem_t *mctx)
|
||||
{
|
||||
isc_result_t result;
|
||||
const char *zclass;
|
||||
const char *zname;
|
||||
const char *zfile;
|
||||
const cfg_obj_t *zoptions = NULL;
|
||||
const cfg_obj_t *classobj = NULL;
|
||||
const cfg_obj_t *typeobj = NULL;
|
||||
const cfg_obj_t *fileobj = NULL;
|
||||
const cfg_obj_t *dbobj = NULL;
|
||||
cfg_obj_t *zoptions = NULL;
|
||||
cfg_obj_t *classobj = NULL;
|
||||
cfg_obj_t *typeobj = NULL;
|
||||
cfg_obj_t *fileobj = NULL;
|
||||
cfg_obj_t *dbobj = NULL;
|
||||
|
||||
zname = cfg_obj_asstring(cfg_tuple_get(zconfig, "name"));
|
||||
classobj = cfg_tuple_get(zconfig, "class");
|
||||
@@ -125,12 +122,12 @@ configure_zone(const char *vclass, const char *view,
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
configure_view(const char *vclass, const char *view, const cfg_obj_t *config,
|
||||
const cfg_obj_t *vconfig, isc_mem_t *mctx)
|
||||
configure_view(const char *vclass, const char *view, cfg_obj_t *config,
|
||||
cfg_obj_t *vconfig, isc_mem_t *mctx)
|
||||
{
|
||||
const cfg_listelt_t *element;
|
||||
const cfg_obj_t *voptions;
|
||||
const cfg_obj_t *zonelist;
|
||||
cfg_listelt_t *element;
|
||||
cfg_obj_t *voptions;
|
||||
cfg_obj_t *zonelist;
|
||||
isc_result_t result = ISC_R_SUCCESS;
|
||||
isc_result_t tresult;
|
||||
|
||||
@@ -148,7 +145,7 @@ configure_view(const char *vclass, const char *view, const cfg_obj_t *config,
|
||||
element != NULL;
|
||||
element = cfg_list_next(element))
|
||||
{
|
||||
const cfg_obj_t *zconfig = cfg_listelt_value(element);
|
||||
cfg_obj_t *zconfig = cfg_listelt_value(element);
|
||||
tresult = configure_zone(vclass, view, zconfig, mctx);
|
||||
if (tresult != ISC_R_SUCCESS)
|
||||
result = tresult;
|
||||
@@ -158,11 +155,11 @@ configure_view(const char *vclass, const char *view, const cfg_obj_t *config,
|
||||
|
||||
|
||||
static isc_result_t
|
||||
load_zones_fromconfig(const cfg_obj_t *config, isc_mem_t *mctx) {
|
||||
const cfg_listelt_t *element;
|
||||
const cfg_obj_t *classobj;
|
||||
const cfg_obj_t *views;
|
||||
const cfg_obj_t *vconfig;
|
||||
load_zones_fromconfig(cfg_obj_t *config, isc_mem_t *mctx) {
|
||||
cfg_listelt_t *element;
|
||||
cfg_obj_t *classobj;
|
||||
cfg_obj_t *views;
|
||||
cfg_obj_t *vconfig;
|
||||
const char *vclass;
|
||||
isc_result_t result = ISC_R_SUCCESS;
|
||||
isc_result_t tresult;
|
||||
@@ -206,7 +203,6 @@ main(int argc, char **argv) {
|
||||
isc_mem_t *mctx = NULL;
|
||||
isc_result_t result;
|
||||
int exit_status = 0;
|
||||
isc_entropy_t *ectx = NULL;
|
||||
isc_boolean_t load_zones = ISC_FALSE;
|
||||
|
||||
while ((c = isc_commandline_parse(argc, argv, "djt:vz")) != EOF) {
|
||||
@@ -256,10 +252,6 @@ main(int argc, char **argv) {
|
||||
|
||||
RUNTIME_CHECK(setup_logging(mctx, &logc) == ISC_R_SUCCESS);
|
||||
|
||||
RUNTIME_CHECK(isc_entropy_create(mctx, &ectx) == ISC_R_SUCCESS);
|
||||
RUNTIME_CHECK(isc_hash_create(mctx, ectx, DNS_NAME_MAXWIRE)
|
||||
== ISC_R_SUCCESS);
|
||||
|
||||
dns_result_register();
|
||||
|
||||
RUNTIME_CHECK(cfg_parser_create(mctx, logc, &parser) == ISC_R_SUCCESS);
|
||||
@@ -288,9 +280,6 @@ main(int argc, char **argv) {
|
||||
|
||||
isc_log_destroy(&logc);
|
||||
|
||||
isc_hash_destroy();
|
||||
isc_entropy_detach(&ectx);
|
||||
|
||||
isc_mem_destroy(&mctx);
|
||||
|
||||
return (exit_status);
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
|
||||
[<!ENTITY mdash "—">]>
|
||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
|
||||
<!--
|
||||
- Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2000-2002 Internet Software Consortium.
|
||||
- Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2001, 2002 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
|
||||
@@ -18,7 +16,7 @@
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
|
||||
<!-- $Id: named-checkconf.docbook,v 1.3.2.1.8.7 2005/05/12 21:35:56 sra Exp $ -->
|
||||
<!-- $Id: named-checkconf.docbook,v 1.3.2.1.8.5 2004/06/03 02:24:59 marka Exp $ -->
|
||||
|
||||
<refentry>
|
||||
<refentryinfo>
|
||||
@@ -31,20 +29,6 @@
|
||||
<refmiscinfo>BIND9</refmiscinfo>
|
||||
</refmeta>
|
||||
|
||||
<docinfo>
|
||||
<copyright>
|
||||
<year>2004</year>
|
||||
<year>2005</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
<copyright>
|
||||
<year>2000</year>
|
||||
<year>2001</year>
|
||||
<year>2002</year>
|
||||
<holder>Internet Software Consortium.</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
<refnamediv>
|
||||
<refname><application>named-checkconf</application></refname>
|
||||
<refpurpose>named configuration file syntax checking tool</refpurpose>
|
||||
@@ -132,7 +116,6 @@
|
||||
<para>
|
||||
<command>named-checkconf</command> returns an exit status of 1 if
|
||||
errors were detected and 0 otherwise.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
|
||||
@@ -1,92 +1,216 @@
|
||||
<!--
|
||||
- Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2000-2002 Internet Software Consortium.
|
||||
-
|
||||
- Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2001, 2002 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 ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
- AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
- AND FITNESS. IN NO EVENT SHALL ISC 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: named-checkconf.html,v 1.5.2.1.4.15 2006/06/29 13:02:30 marka Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>named-checkconf</title>
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
|
||||
<a name="id2482688"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2>Name</h2>
|
||||
<p><span class="application">named-checkconf</span> — named configuration file syntax checking tool</p>
|
||||
</div>
|
||||
<div class="refsynopsisdiv">
|
||||
<h2>Synopsis</h2>
|
||||
<div class="cmdsynopsis"><p><code class="command">named-checkconf</code> [<code class="option">-v</code>] [<code class="option">-j</code>] [<code class="option">-t <em class="replaceable"><code>directory</code></em></code>] {filename} [<code class="option">-z</code>]</p></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549430"></a><h2>DESCRIPTION</h2>
|
||||
<p>
|
||||
<span><strong class="command">named-checkconf</strong></span> checks the syntax, but not
|
||||
|
||||
<!-- $Id: named-checkconf.html,v 1.5.2.1.4.5 2004/08/22 23:38:57 marka Exp $ -->
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<HTML
|
||||
><HEAD
|
||||
><TITLE
|
||||
>named-checkconf</TITLE
|
||||
><META
|
||||
NAME="GENERATOR"
|
||||
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"></HEAD
|
||||
><BODY
|
||||
CLASS="REFENTRY"
|
||||
BGCOLOR="#FFFFFF"
|
||||
TEXT="#000000"
|
||||
LINK="#0000FF"
|
||||
VLINK="#840084"
|
||||
ALINK="#0000FF"
|
||||
><H1
|
||||
><A
|
||||
NAME="AEN1"
|
||||
></A
|
||||
><SPAN
|
||||
CLASS="APPLICATION"
|
||||
>named-checkconf</SPAN
|
||||
></H1
|
||||
><DIV
|
||||
CLASS="REFNAMEDIV"
|
||||
><A
|
||||
NAME="AEN9"
|
||||
></A
|
||||
><H2
|
||||
>Name</H2
|
||||
><SPAN
|
||||
CLASS="APPLICATION"
|
||||
>named-checkconf</SPAN
|
||||
> -- named configuration file syntax checking tool</DIV
|
||||
><DIV
|
||||
CLASS="REFSYNOPSISDIV"
|
||||
><A
|
||||
NAME="AEN13"
|
||||
></A
|
||||
><H2
|
||||
>Synopsis</H2
|
||||
><P
|
||||
><B
|
||||
CLASS="COMMAND"
|
||||
>named-checkconf</B
|
||||
> [<VAR
|
||||
CLASS="OPTION"
|
||||
>-v</VAR
|
||||
>] [<VAR
|
||||
CLASS="OPTION"
|
||||
>-j</VAR
|
||||
>] [<VAR
|
||||
CLASS="OPTION"
|
||||
>-t <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>directory</VAR
|
||||
></VAR
|
||||
>] {filename} [<VAR
|
||||
CLASS="OPTION"
|
||||
>-z</VAR
|
||||
>]</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN26"
|
||||
></A
|
||||
><H2
|
||||
>DESCRIPTION</H2
|
||||
><P
|
||||
> <B
|
||||
CLASS="COMMAND"
|
||||
>named-checkconf</B
|
||||
> checks the syntax, but not
|
||||
the semantics, of a named configuration file.
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549443"></a><h2>OPTIONS</h2>
|
||||
<div class="variablelist"><dl>
|
||||
<dt><span class="term">-t <em class="replaceable"><code>directory</code></em></span></dt>
|
||||
<dd><p>
|
||||
chroot to <code class="filename">directory</code> so that include
|
||||
</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN30"
|
||||
></A
|
||||
><H2
|
||||
>OPTIONS</H2
|
||||
><P
|
||||
></P
|
||||
><DIV
|
||||
CLASS="VARIABLELIST"
|
||||
><DL
|
||||
><DT
|
||||
>-t <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>directory</VAR
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> chroot to <TT
|
||||
CLASS="FILENAME"
|
||||
>directory</TT
|
||||
> so that include
|
||||
directives in the configuration file are processed as if
|
||||
run by a similarly chrooted named.
|
||||
</p></dd>
|
||||
<dt><span class="term">-v</span></dt>
|
||||
<dd><p>
|
||||
Print the version of the <span><strong class="command">named-checkconf</strong></span>
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-v</DT
|
||||
><DD
|
||||
><P
|
||||
> Print the version of the <B
|
||||
CLASS="COMMAND"
|
||||
>named-checkconf</B
|
||||
>
|
||||
program and exit.
|
||||
</p></dd>
|
||||
<dt><span class="term">-z</span></dt>
|
||||
<dd><p>
|
||||
Perform a check load the master zonefiles found in
|
||||
<code class="filename">named.conf</code>.
|
||||
</p></dd>
|
||||
<dt><span class="term">-j</span></dt>
|
||||
<dd><p>
|
||||
When loading a zonefile read the journal if it exists.
|
||||
</p></dd>
|
||||
<dt><span class="term">filename</span></dt>
|
||||
<dd><p>
|
||||
The name of the configuration file to be checked. If not
|
||||
specified, it defaults to <code class="filename">/etc/named.conf</code>.
|
||||
</p></dd>
|
||||
</dl></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549534"></a><h2>RETURN VALUES</h2>
|
||||
<p>
|
||||
<span><strong class="command">named-checkconf</strong></span> returns an exit status of 1 if
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-z</DT
|
||||
><DD
|
||||
><P
|
||||
> Perform a check load the master zonefiles found in
|
||||
<TT
|
||||
CLASS="FILENAME"
|
||||
>named.conf</TT
|
||||
>.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-j</DT
|
||||
><DD
|
||||
><P
|
||||
> When loading a zonefile read the journal if it exists.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>filename</DT
|
||||
><DD
|
||||
><P
|
||||
> The name of the configuration file to be checked. If not
|
||||
specified, it defaults to <TT
|
||||
CLASS="FILENAME"
|
||||
>/etc/named.conf</TT
|
||||
>.
|
||||
</P
|
||||
></DD
|
||||
></DL
|
||||
></DIV
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN58"
|
||||
></A
|
||||
><H2
|
||||
>RETURN VALUES</H2
|
||||
><P
|
||||
> <B
|
||||
CLASS="COMMAND"
|
||||
>named-checkconf</B
|
||||
> returns an exit status of 1 if
|
||||
errors were detected and 0 otherwise.
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549547"></a><h2>SEE ALSO</h2>
|
||||
<p>
|
||||
<span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>,
|
||||
<em class="citetitle">BIND 9 Administrator Reference Manual</em>.
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549639"></a><h2>AUTHOR</h2>
|
||||
<p>
|
||||
<span class="corpauthor">Internet Systems Consortium</span>
|
||||
</p>
|
||||
</div>
|
||||
</div></body>
|
||||
</html>
|
||||
</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN62"
|
||||
></A
|
||||
><H2
|
||||
>SEE ALSO</H2
|
||||
><P
|
||||
> <SPAN
|
||||
CLASS="CITEREFENTRY"
|
||||
><SPAN
|
||||
CLASS="REFENTRYTITLE"
|
||||
>named</SPAN
|
||||
>(8)</SPAN
|
||||
>,
|
||||
<I
|
||||
CLASS="CITETITLE"
|
||||
>BIND 9 Administrator Reference Manual</I
|
||||
>.
|
||||
</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN69"
|
||||
></A
|
||||
><H2
|
||||
>AUTHOR</H2
|
||||
><P
|
||||
> Internet Systems Consortium
|
||||
</P
|
||||
></DIV
|
||||
></BODY
|
||||
></HTML
|
||||
>
|
||||
@@ -1,116 +1,94 @@
|
||||
.\" Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2000-2002 Internet Software Consortium.
|
||||
.\"
|
||||
.\" Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2000-2002 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 ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
.\" REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
.\" AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
.\" AND FITNESS. IN NO EVENT SHALL ISC 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: named-checkzone.8,v 1.11.2.1.8.11 2006/10/05 02:50:17 marka Exp $
|
||||
.\" $Id: named-checkzone.8,v 1.11.2.1.8.4 2004/06/03 05:35:42 marka Exp $
|
||||
.\"
|
||||
.hy 0
|
||||
.ad l
|
||||
.\" Title: named\-checkzone
|
||||
.\" Author:
|
||||
.\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
|
||||
.\" Date: June 13, 2000
|
||||
.\" Manual: BIND9
|
||||
.\" Source: BIND9
|
||||
.\"
|
||||
.TH "NAMED\-CHECKZONE" "8" "June 13, 2000" "BIND9" "BIND9"
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.SH "NAME"
|
||||
named\-checkzone \- zone file validity checking tool
|
||||
.SH "SYNOPSIS"
|
||||
.HP 16
|
||||
\fBnamed\-checkzone\fR [\fB\-d\fR] [\fB\-j\fR] [\fB\-q\fR] [\fB\-v\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-k\ \fR\fB\fImode\fR\fR] [\fB\-n\ \fR\fB\fImode\fR\fR] [\fB\-o\ \fR\fB\fIfilename\fR\fR] [\fB\-t\ \fR\fB\fIdirectory\fR\fR] [\fB\-w\ \fR\fB\fIdirectory\fR\fR] [\fB\-D\fR] {zonename} {filename}
|
||||
.TH "NAMED-CHECKZONE" "8" "June 13, 2000" "BIND9" ""
|
||||
.SH NAME
|
||||
named-checkzone \- zone file validity checking tool
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
\fBnamed-checkzone\fR [ \fB-d\fR ] [ \fB-j\fR ] [ \fB-q\fR ] [ \fB-v\fR ] [ \fB-c \fIclass\fB\fR ] [ \fB-k \fImode\fB\fR ] [ \fB-n \fImode\fB\fR ] [ \fB-o \fIfilename\fB\fR ] [ \fB-t \fIdirectory\fB\fR ] [ \fB-w \fIdirectory\fB\fR ] [ \fB-D\fR ] \fBzonename\fR \fBfilename\fR
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
\fBnamed\-checkzone\fR
|
||||
checks the syntax and integrity of a zone file. It performs the same checks as
|
||||
\fBnamed\fR
|
||||
\fBnamed-checkzone\fR checks the syntax and integrity of
|
||||
a zone file. It performs the same checks as \fBnamed\fR
|
||||
does when loading a zone. This makes
|
||||
\fBnamed\-checkzone\fR
|
||||
useful for checking zone files before configuring them into a name server.
|
||||
\fBnamed-checkzone\fR useful for checking zone
|
||||
files before configuring them into a name server.
|
||||
.SH "OPTIONS"
|
||||
.TP 3n
|
||||
\-d
|
||||
.TP
|
||||
\fB-d\fR
|
||||
Enable debugging.
|
||||
.TP 3n
|
||||
\-q
|
||||
Quiet mode \- exit code only.
|
||||
.TP 3n
|
||||
\-v
|
||||
Print the version of the
|
||||
\fBnamed\-checkzone\fR
|
||||
.TP
|
||||
\fB-q\fR
|
||||
Quiet mode - exit code only.
|
||||
.TP
|
||||
\fB-v\fR
|
||||
Print the version of the \fBnamed-checkzone\fR
|
||||
program and exit.
|
||||
.TP 3n
|
||||
\-j
|
||||
.TP
|
||||
\fB-j\fR
|
||||
When loading the zone file read the journal if it exists.
|
||||
.TP 3n
|
||||
\-c \fIclass\fR
|
||||
.TP
|
||||
\fB-c \fIclass\fB\fR
|
||||
Specify the class of the zone. If not specified "IN" is assumed.
|
||||
.TP 3n
|
||||
\-k \fImode\fR
|
||||
Perform
|
||||
\fB"check\-names"\fR
|
||||
checks with the specified failure mode. Possible modes are
|
||||
\fB"fail"\fR,
|
||||
\fB"warn"\fR
|
||||
(default) and
|
||||
.TP
|
||||
\fB-k \fImode\fB\fR
|
||||
Perform \fB"check-name"\fR checks with the specified failure mode.
|
||||
Possible modes are \fB"fail"\fR,
|
||||
\fB"warn"\fR (default) and
|
||||
\fB"ignore"\fR.
|
||||
.TP 3n
|
||||
\-n \fImode\fR
|
||||
Specify whether NS records should be checked to see if they are addresses. Possible modes are
|
||||
\fB"fail"\fR,
|
||||
\fB"warn"\fR
|
||||
(default) and
|
||||
.TP
|
||||
\fB-n \fImode\fB\fR
|
||||
Specify whether NS records should be checked to see if they
|
||||
are addresses. Possible modes are \fB"fail"\fR,
|
||||
\fB"warn"\fR (default) and
|
||||
\fB"ignore"\fR.
|
||||
.TP 3n
|
||||
\-o \fIfilename\fR
|
||||
Write zone output to
|
||||
\fIfilename\fR.
|
||||
.TP 3n
|
||||
\-t \fIdirectory\fR
|
||||
chroot to
|
||||
\fIdirectory\fR
|
||||
so that include directives in the configuration file are processed as if run by a similarly chrooted named.
|
||||
.TP 3n
|
||||
\-w \fIdirectory\fR
|
||||
chdir to
|
||||
\fIdirectory\fR
|
||||
so that relative filenames in master file $INCLUDE directives work. This is similar to the directory clause in
|
||||
.TP
|
||||
\fB-o \fIfilename\fB\fR
|
||||
Write zone output to \fIdirectory\fR.
|
||||
.TP
|
||||
\fB-t \fIdirectory\fB\fR
|
||||
chroot to \fIdirectory\fR so that include
|
||||
directives in the configuration file are processed as if
|
||||
run by a similarly chrooted named.
|
||||
.TP
|
||||
\fB-w \fIdirectory\fB\fR
|
||||
chdir to \fIdirectory\fR so that relative
|
||||
filenames in master file $INCLUDE directives work. This
|
||||
is similar to the directory clause in
|
||||
\fInamed.conf\fR.
|
||||
.TP 3n
|
||||
\-D
|
||||
.TP
|
||||
\fB-D\fR
|
||||
Dump zone file in canonical format.
|
||||
.TP 3n
|
||||
zonename
|
||||
.TP
|
||||
\fBzonename\fR
|
||||
The domain name of the zone being checked.
|
||||
.TP 3n
|
||||
filename
|
||||
.TP
|
||||
\fBfilename\fR
|
||||
The name of the zone file.
|
||||
.SH "RETURN VALUES"
|
||||
.PP
|
||||
\fBnamed\-checkzone\fR
|
||||
returns an exit status of 1 if errors were detected and 0 otherwise.
|
||||
\fBnamed-checkzone\fR returns an exit status of 1 if
|
||||
errors were detected and 0 otherwise.
|
||||
.SH "SEE ALSO"
|
||||
.PP
|
||||
\fBnamed\fR(8),
|
||||
RFC 1035,
|
||||
BIND 9 Administrator Reference Manual.
|
||||
\fIRFC 1035\fR,
|
||||
\fIBIND 9 Administrator Reference Manual\fR.
|
||||
.SH "AUTHOR"
|
||||
.PP
|
||||
Internet Systems Consortium
|
||||
.SH "COPYRIGHT"
|
||||
Copyright \(co 2004\-2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: named-checkzone.c,v 1.13.2.3.8.11 2004/10/25 01:36:06 marka Exp $ */
|
||||
/* $Id: named-checkzone.c,v 1.13.2.3.8.9 2004/03/06 10:21:11 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -24,8 +24,6 @@
|
||||
#include <isc/app.h>
|
||||
#include <isc/commandline.h>
|
||||
#include <isc/dir.h>
|
||||
#include <isc/entropy.h>
|
||||
#include <isc/hash.h>
|
||||
#include <isc/log.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/socket.h>
|
||||
@@ -46,7 +44,6 @@
|
||||
|
||||
static int quiet = 0;
|
||||
static isc_mem_t *mctx = NULL;
|
||||
static isc_entropy_t *ectx = NULL;
|
||||
dns_zone_t *zone = NULL;
|
||||
dns_zonetype_t zonetype = dns_zone_master;
|
||||
static int dumpzone = 0;
|
||||
@@ -66,8 +63,7 @@ static void
|
||||
usage(void) {
|
||||
fprintf(stderr,
|
||||
"usage: named-checkzone [-djqvD] [-c class] [-o output] "
|
||||
"[-t directory] [-w directory] [-k (ignore|warn|fail)] "
|
||||
"[-n (ignore|warn|fail)] zonename filename\n");
|
||||
"[-t directory] [-w directory] [-k option] zonename filename\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@@ -115,17 +111,12 @@ main(int argc, char **argv) {
|
||||
break;
|
||||
|
||||
case 'k':
|
||||
if (!strcmp(isc_commandline_argument, "warn")) {
|
||||
if (!strcmp(isc_commandline_argument, "check-names")) {
|
||||
zone_options |= DNS_ZONEOPT_CHECKNAMES;
|
||||
zone_options &= ~DNS_ZONEOPT_CHECKNAMESFAIL;
|
||||
} else if (!strcmp(isc_commandline_argument,
|
||||
"fail")) {
|
||||
"check-names-fail")) {
|
||||
zone_options |= DNS_ZONEOPT_CHECKNAMES |
|
||||
DNS_ZONEOPT_CHECKNAMESFAIL;
|
||||
} else if (!strcmp(isc_commandline_argument,
|
||||
"ignore")) {
|
||||
zone_options &= ~(DNS_ZONEOPT_CHECKNAMES |
|
||||
DNS_ZONEOPT_CHECKNAMESFAIL);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -188,9 +179,6 @@ main(int argc, char **argv) {
|
||||
dns_log_init(lctx);
|
||||
dns_log_setcontext(lctx);
|
||||
}
|
||||
RUNTIME_CHECK(isc_entropy_create(mctx, &ectx) == ISC_R_SUCCESS);
|
||||
RUNTIME_CHECK(isc_hash_create(mctx, ectx, DNS_NAME_MAXWIRE)
|
||||
== ISC_R_SUCCESS);
|
||||
|
||||
dns_result_register();
|
||||
|
||||
@@ -207,8 +195,6 @@ main(int argc, char **argv) {
|
||||
destroy();
|
||||
if (lctx != NULL)
|
||||
isc_log_destroy(&lctx);
|
||||
isc_hash_destroy();
|
||||
isc_entropy_detach(&ectx);
|
||||
isc_mem_destroy(&mctx);
|
||||
return ((result == ISC_R_SUCCESS) ? 0 : 1);
|
||||
}
|
||||
@@ -1,9 +1,7 @@
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
|
||||
[<!ENTITY mdash "—">]>
|
||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
|
||||
<!--
|
||||
- Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2000-2002 Internet Software Consortium.
|
||||
- Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2001, 2002 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
|
||||
@@ -18,7 +16,7 @@
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
|
||||
<!-- $Id: named-checkzone.docbook,v 1.3.2.2.8.13 2006/09/30 23:58:36 marka Exp $ -->
|
||||
<!-- $Id: named-checkzone.docbook,v 1.3.2.2.8.7 2004/06/03 02:25:00 marka Exp $ -->
|
||||
|
||||
<refentry>
|
||||
<refentryinfo>
|
||||
@@ -31,21 +29,6 @@
|
||||
<refmiscinfo>BIND9</refmiscinfo>
|
||||
</refmeta>
|
||||
|
||||
<docinfo>
|
||||
<copyright>
|
||||
<year>2004</year>
|
||||
<year>2005</year>
|
||||
<year>2006</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
<copyright>
|
||||
<year>2000</year>
|
||||
<year>2001</year>
|
||||
<year>2002</year>
|
||||
<holder>Internet Software Consortium.</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
<refnamediv>
|
||||
<refname><application>named-checkzone</application></refname>
|
||||
<refpurpose>zone file validity checking tool</refpurpose>
|
||||
@@ -120,7 +103,6 @@
|
||||
When loading the zone file read the journal if it exists.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-c <replaceable class="parameter">class</replaceable></term>
|
||||
@@ -135,7 +117,7 @@
|
||||
<term>-k <replaceable class="parameter">mode</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Perform <command>"check-names"</command> checks with the specified failure mode.
|
||||
Perform <command>"check-name"</command> checks with the specified failure mode.
|
||||
Possible modes are <command>"fail"</command>,
|
||||
<command>"warn"</command> (default) and
|
||||
<command>"ignore"</command>.
|
||||
@@ -159,7 +141,7 @@
|
||||
<term>-o <replaceable class="parameter">filename</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Write zone output to <filename>filename</filename>.
|
||||
Write zone output to <filename>directory</filename>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@@ -223,7 +205,6 @@
|
||||
<para>
|
||||
<command>named-checkzone</command> returns an exit status of 1 if
|
||||
errors were detected and 0 otherwise.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
|
||||
@@ -1,135 +1,367 @@
|
||||
<!--
|
||||
- Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2000-2002 Internet Software Consortium.
|
||||
-
|
||||
- Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2001, 2002 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 ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
- AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
- AND FITNESS. IN NO EVENT SHALL ISC 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: named-checkzone.html,v 1.5.2.2.4.17 2006/10/05 02:50:17 marka Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>named-checkzone</title>
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
|
||||
<a name="id2482688"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2>Name</h2>
|
||||
<p><span class="application">named-checkzone</span> — zone file validity checking tool</p>
|
||||
</div>
|
||||
<div class="refsynopsisdiv">
|
||||
<h2>Synopsis</h2>
|
||||
<div class="cmdsynopsis"><p><code class="command">named-checkzone</code> [<code class="option">-d</code>] [<code class="option">-j</code>] [<code class="option">-q</code>] [<code class="option">-v</code>] [<code class="option">-c <em class="replaceable"><code>class</code></em></code>] [<code class="option">-k <em class="replaceable"><code>mode</code></em></code>] [<code class="option">-n <em class="replaceable"><code>mode</code></em></code>] [<code class="option">-o <em class="replaceable"><code>filename</code></em></code>] [<code class="option">-t <em class="replaceable"><code>directory</code></em></code>] [<code class="option">-w <em class="replaceable"><code>directory</code></em></code>] [<code class="option">-D</code>] {zonename} {filename}</p></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549490"></a><h2>DESCRIPTION</h2>
|
||||
<p>
|
||||
<span><strong class="command">named-checkzone</strong></span> checks the syntax and integrity of
|
||||
a zone file. It performs the same checks as <span><strong class="command">named</strong></span>
|
||||
|
||||
<!-- $Id: named-checkzone.html,v 1.5.2.2.4.5 2004/08/22 23:38:57 marka Exp $ -->
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<HTML
|
||||
><HEAD
|
||||
><TITLE
|
||||
>named-checkzone</TITLE
|
||||
><META
|
||||
NAME="GENERATOR"
|
||||
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"></HEAD
|
||||
><BODY
|
||||
CLASS="REFENTRY"
|
||||
BGCOLOR="#FFFFFF"
|
||||
TEXT="#000000"
|
||||
LINK="#0000FF"
|
||||
VLINK="#840084"
|
||||
ALINK="#0000FF"
|
||||
><H1
|
||||
><A
|
||||
NAME="AEN1"
|
||||
></A
|
||||
><SPAN
|
||||
CLASS="APPLICATION"
|
||||
>named-checkzone</SPAN
|
||||
></H1
|
||||
><DIV
|
||||
CLASS="REFNAMEDIV"
|
||||
><A
|
||||
NAME="AEN9"
|
||||
></A
|
||||
><H2
|
||||
>Name</H2
|
||||
><SPAN
|
||||
CLASS="APPLICATION"
|
||||
>named-checkzone</SPAN
|
||||
> -- zone file validity checking tool</DIV
|
||||
><DIV
|
||||
CLASS="REFSYNOPSISDIV"
|
||||
><A
|
||||
NAME="AEN13"
|
||||
></A
|
||||
><H2
|
||||
>Synopsis</H2
|
||||
><P
|
||||
><B
|
||||
CLASS="COMMAND"
|
||||
>named-checkzone</B
|
||||
> [<VAR
|
||||
CLASS="OPTION"
|
||||
>-d</VAR
|
||||
>] [<VAR
|
||||
CLASS="OPTION"
|
||||
>-j</VAR
|
||||
>] [<VAR
|
||||
CLASS="OPTION"
|
||||
>-q</VAR
|
||||
>] [<VAR
|
||||
CLASS="OPTION"
|
||||
>-v</VAR
|
||||
>] [<VAR
|
||||
CLASS="OPTION"
|
||||
>-c <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>class</VAR
|
||||
></VAR
|
||||
>] [<VAR
|
||||
CLASS="OPTION"
|
||||
>-k <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>mode</VAR
|
||||
></VAR
|
||||
>] [<VAR
|
||||
CLASS="OPTION"
|
||||
>-n <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>mode</VAR
|
||||
></VAR
|
||||
>] [<VAR
|
||||
CLASS="OPTION"
|
||||
>-o <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>filename</VAR
|
||||
></VAR
|
||||
>] [<VAR
|
||||
CLASS="OPTION"
|
||||
>-t <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>directory</VAR
|
||||
></VAR
|
||||
>] [<VAR
|
||||
CLASS="OPTION"
|
||||
>-w <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>directory</VAR
|
||||
></VAR
|
||||
>] [<VAR
|
||||
CLASS="OPTION"
|
||||
>-D</VAR
|
||||
>] {zonename} {filename}</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN46"
|
||||
></A
|
||||
><H2
|
||||
>DESCRIPTION</H2
|
||||
><P
|
||||
> <B
|
||||
CLASS="COMMAND"
|
||||
>named-checkzone</B
|
||||
> checks the syntax and integrity of
|
||||
a zone file. It performs the same checks as <B
|
||||
CLASS="COMMAND"
|
||||
>named</B
|
||||
>
|
||||
does when loading a zone. This makes
|
||||
<span><strong class="command">named-checkzone</strong></span> useful for checking zone
|
||||
<B
|
||||
CLASS="COMMAND"
|
||||
>named-checkzone</B
|
||||
> useful for checking zone
|
||||
files before configuring them into a name server.
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549510"></a><h2>OPTIONS</h2>
|
||||
<div class="variablelist"><dl>
|
||||
<dt><span class="term">-d</span></dt>
|
||||
<dd><p>
|
||||
Enable debugging.
|
||||
</p></dd>
|
||||
<dt><span class="term">-q</span></dt>
|
||||
<dd><p>
|
||||
Quiet mode - exit code only.
|
||||
</p></dd>
|
||||
<dt><span class="term">-v</span></dt>
|
||||
<dd><p>
|
||||
Print the version of the <span><strong class="command">named-checkzone</strong></span>
|
||||
</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN52"
|
||||
></A
|
||||
><H2
|
||||
>OPTIONS</H2
|
||||
><P
|
||||
></P
|
||||
><DIV
|
||||
CLASS="VARIABLELIST"
|
||||
><DL
|
||||
><DT
|
||||
>-d</DT
|
||||
><DD
|
||||
><P
|
||||
> Enable debugging.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-q</DT
|
||||
><DD
|
||||
><P
|
||||
> Quiet mode - exit code only.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-v</DT
|
||||
><DD
|
||||
><P
|
||||
> Print the version of the <B
|
||||
CLASS="COMMAND"
|
||||
>named-checkzone</B
|
||||
>
|
||||
program and exit.
|
||||
</p></dd>
|
||||
<dt><span class="term">-j</span></dt>
|
||||
<dd><p>
|
||||
When loading the zone file read the journal if it exists.
|
||||
</p></dd>
|
||||
<dt><span class="term">-c <em class="replaceable"><code>class</code></em></span></dt>
|
||||
<dd><p>
|
||||
Specify the class of the zone. If not specified "IN" is assumed.
|
||||
</p></dd>
|
||||
<dt><span class="term">-k <em class="replaceable"><code>mode</code></em></span></dt>
|
||||
<dd><p>
|
||||
Perform <span><strong class="command">"check-names"</strong></span> checks with the specified failure mode.
|
||||
Possible modes are <span><strong class="command">"fail"</strong></span>,
|
||||
<span><strong class="command">"warn"</strong></span> (default) and
|
||||
<span><strong class="command">"ignore"</strong></span>.
|
||||
</p></dd>
|
||||
<dt><span class="term">-n <em class="replaceable"><code>mode</code></em></span></dt>
|
||||
<dd><p>
|
||||
Specify whether NS records should be checked to see if they
|
||||
are addresses. Possible modes are <span><strong class="command">"fail"</strong></span>,
|
||||
<span><strong class="command">"warn"</strong></span> (default) and
|
||||
<span><strong class="command">"ignore"</strong></span>.
|
||||
</p></dd>
|
||||
<dt><span class="term">-o <em class="replaceable"><code>filename</code></em></span></dt>
|
||||
<dd><p>
|
||||
Write zone output to <code class="filename">filename</code>.
|
||||
</p></dd>
|
||||
<dt><span class="term">-t <em class="replaceable"><code>directory</code></em></span></dt>
|
||||
<dd><p>
|
||||
chroot to <code class="filename">directory</code> so that include
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-j</DT
|
||||
><DD
|
||||
><P
|
||||
> When loading the zone file read the journal if it exists.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-c <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>class</VAR
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Specify the class of the zone. If not specified "IN" is assumed.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-k <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>mode</VAR
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Perform <B
|
||||
CLASS="COMMAND"
|
||||
>"check-name"</B
|
||||
> checks with the specified failure mode.
|
||||
Possible modes are <B
|
||||
CLASS="COMMAND"
|
||||
>"fail"</B
|
||||
>,
|
||||
<B
|
||||
CLASS="COMMAND"
|
||||
>"warn"</B
|
||||
> (default) and
|
||||
<B
|
||||
CLASS="COMMAND"
|
||||
>"ignore"</B
|
||||
>.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-n <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>mode</VAR
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Specify whether NS records should be checked to see if they
|
||||
are addresses. Possible modes are <B
|
||||
CLASS="COMMAND"
|
||||
>"fail"</B
|
||||
>,
|
||||
<B
|
||||
CLASS="COMMAND"
|
||||
>"warn"</B
|
||||
> (default) and
|
||||
<B
|
||||
CLASS="COMMAND"
|
||||
>"ignore"</B
|
||||
>.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-o <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>filename</VAR
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Write zone output to <TT
|
||||
CLASS="FILENAME"
|
||||
>directory</TT
|
||||
>.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-t <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>directory</VAR
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> chroot to <TT
|
||||
CLASS="FILENAME"
|
||||
>directory</TT
|
||||
> so that include
|
||||
directives in the configuration file are processed as if
|
||||
run by a similarly chrooted named.
|
||||
</p></dd>
|
||||
<dt><span class="term">-w <em class="replaceable"><code>directory</code></em></span></dt>
|
||||
<dd><p>
|
||||
chdir to <code class="filename">directory</code> so that relative
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-w <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>directory</VAR
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> chdir to <TT
|
||||
CLASS="FILENAME"
|
||||
>directory</TT
|
||||
> so that relative
|
||||
filenames in master file $INCLUDE directives work. This
|
||||
is similar to the directory clause in
|
||||
<code class="filename">named.conf</code>.
|
||||
</p></dd>
|
||||
<dt><span class="term">-D</span></dt>
|
||||
<dd><p>
|
||||
Dump zone file in canonical format.
|
||||
</p></dd>
|
||||
<dt><span class="term">zonename</span></dt>
|
||||
<dd><p>
|
||||
The domain name of the zone being checked.
|
||||
</p></dd>
|
||||
<dt><span class="term">filename</span></dt>
|
||||
<dd><p>
|
||||
The name of the zone file.
|
||||
</p></dd>
|
||||
</dl></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549824"></a><h2>RETURN VALUES</h2>
|
||||
<p>
|
||||
<span><strong class="command">named-checkzone</strong></span> returns an exit status of 1 if
|
||||
<TT
|
||||
CLASS="FILENAME"
|
||||
>named.conf</TT
|
||||
>.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-D</DT
|
||||
><DD
|
||||
><P
|
||||
> Dump zone file in canonical format.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>zonename</DT
|
||||
><DD
|
||||
><P
|
||||
> The domain name of the zone being checked.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>filename</DT
|
||||
><DD
|
||||
><P
|
||||
> The name of the zone file.
|
||||
</P
|
||||
></DD
|
||||
></DL
|
||||
></DIV
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN125"
|
||||
></A
|
||||
><H2
|
||||
>RETURN VALUES</H2
|
||||
><P
|
||||
> <B
|
||||
CLASS="COMMAND"
|
||||
>named-checkzone</B
|
||||
> returns an exit status of 1 if
|
||||
errors were detected and 0 otherwise.
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549836"></a><h2>SEE ALSO</h2>
|
||||
<p>
|
||||
<span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>,
|
||||
<em class="citetitle">RFC 1035</em>,
|
||||
<em class="citetitle">BIND 9 Administrator Reference Manual</em>.
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549863"></a><h2>AUTHOR</h2>
|
||||
<p>
|
||||
<span class="corpauthor">Internet Systems Consortium</span>
|
||||
</p>
|
||||
</div>
|
||||
</div></body>
|
||||
</html>
|
||||
</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN129"
|
||||
></A
|
||||
><H2
|
||||
>SEE ALSO</H2
|
||||
><P
|
||||
> <SPAN
|
||||
CLASS="CITEREFENTRY"
|
||||
><SPAN
|
||||
CLASS="REFENTRYTITLE"
|
||||
>named</SPAN
|
||||
>(8)</SPAN
|
||||
>,
|
||||
<I
|
||||
CLASS="CITETITLE"
|
||||
>RFC 1035</I
|
||||
>,
|
||||
<I
|
||||
CLASS="CITETITLE"
|
||||
>BIND 9 Administrator Reference Manual</I
|
||||
>.
|
||||
</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN137"
|
||||
></A
|
||||
><H2
|
||||
>AUTHOR</H2
|
||||
><P
|
||||
> Internet Systems Consortium
|
||||
</P
|
||||
></DIV
|
||||
></BODY
|
||||
></HTML
|
||||
>
|
||||
+286
-317
@@ -1,417 +1,388 @@
|
||||
.\" Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2000-2003 Internet Software Consortium.
|
||||
.\"
|
||||
.\" Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2000-2003 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 ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
.\" REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
.\" AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
.\" AND FITNESS. IN NO EVENT SHALL ISC 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: dig.1,v 1.14.2.4.2.11 2006/06/29 13:02:30 marka Exp $
|
||||
.\" $Id: dig.1,v 1.14.2.4.2.6 2004/06/23 09:11:01 marka Exp $
|
||||
.\"
|
||||
.hy 0
|
||||
.ad l
|
||||
.\" Title: dig
|
||||
.\" Author:
|
||||
.\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
|
||||
.\" Date: Jun 30, 2000
|
||||
.\" Manual: BIND9
|
||||
.\" Source: BIND9
|
||||
.\"
|
||||
.TH "DIG" "1" "Jun 30, 2000" "BIND9" "BIND9"
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.SH "NAME"
|
||||
.TH "DIG" "1" "Jun 30, 2000" "BIND9" ""
|
||||
.SH NAME
|
||||
dig \- DNS lookup utility
|
||||
.SH "SYNOPSIS"
|
||||
.HP 4
|
||||
\fBdig\fR [@server] [\fB\-b\ \fR\fB\fIaddress\fR\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-f\ \fR\fB\fIfilename\fR\fR] [\fB\-k\ \fR\fB\fIfilename\fR\fR] [\fB\-p\ \fR\fB\fIport#\fR\fR] [\fB\-t\ \fR\fB\fItype\fR\fR] [\fB\-x\ \fR\fB\fIaddr\fR\fR] [\fB\-y\ \fR\fB\fIname:key\fR\fR] [\fB\-4\fR] [\fB\-6\fR] [name] [type] [class] [queryopt...]
|
||||
.HP 4
|
||||
\fBdig\fR [\fB\-h\fR]
|
||||
.HP 4
|
||||
\fBdig\fR [global\-queryopt...] [query...]
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
\fBdig\fR [ \fB@server\fR ] [ \fB-b \fIaddress\fB\fR ] [ \fB-c \fIclass\fB\fR ] [ \fB-f \fIfilename\fB\fR ] [ \fB-k \fIfilename\fB\fR ] [ \fB-p \fIport#\fB\fR ] [ \fB-t \fItype\fB\fR ] [ \fB-x \fIaddr\fB\fR ] [ \fB-y \fIname:key\fB\fR ] [ \fB-4\fR ] [ \fB-6\fR ] [ \fBname\fR ] [ \fBtype\fR ] [ \fBclass\fR ] [ \fBqueryopt\fR\fI...\fR ]
|
||||
.sp
|
||||
\fBdig\fR [ \fB-h\fR ]
|
||||
.sp
|
||||
\fBdig\fR [ \fBglobal-queryopt\fR\fI...\fR ] [ \fBquery\fR\fI...\fR ]
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
\fBdig\fR
|
||||
(domain information groper) is a flexible tool for interrogating DNS name servers. It performs DNS lookups and displays the answers that are returned from the name server(s) that were queried. Most DNS administrators use
|
||||
\fBdig\fR
|
||||
to troubleshoot DNS problems because of its flexibility, ease of use and clarity of output. Other lookup tools tend to have less functionality than
|
||||
\fBdig\fR.
|
||||
\fBdig\fR (domain information groper) is a flexible tool
|
||||
for interrogating DNS name servers. It performs DNS lookups and
|
||||
displays the answers that are returned from the name server(s) that
|
||||
were queried. Most DNS administrators use \fBdig\fR to
|
||||
troubleshoot DNS problems because of its flexibility, ease of use and
|
||||
clarity of output. Other lookup tools tend to have less functionality
|
||||
than \fBdig\fR.
|
||||
.PP
|
||||
Although
|
||||
\fBdig\fR
|
||||
is normally used with command\-line arguments, it also has a batch mode of operation for reading lookup requests from a file. A brief summary of its command\-line arguments and options is printed when the
|
||||
\fB\-h\fR
|
||||
option is given. Unlike earlier versions, the BIND9 implementation of
|
||||
\fBdig\fR
|
||||
allows multiple lookups to be issued from the command line.
|
||||
Although \fBdig\fR is normally used with command-line
|
||||
arguments, it also has a batch mode of operation for reading lookup
|
||||
requests from a file. A brief summary of its command-line arguments
|
||||
and options is printed when the \fB-h\fR option is given.
|
||||
Unlike earlier versions, the BIND9 implementation of
|
||||
\fBdig\fR allows multiple lookups to be issued from the
|
||||
command line.
|
||||
.PP
|
||||
Unless it is told to query a specific name server,
|
||||
\fBdig\fR
|
||||
will try each of the servers listed in
|
||||
\fBdig\fR will try each of the servers listed in
|
||||
\fI/etc/resolv.conf\fR.
|
||||
.PP
|
||||
When no command line arguments or options are given, will perform an NS query for "." (the root).
|
||||
When no command line arguments or options are given, will perform an
|
||||
NS query for "." (the root).
|
||||
.PP
|
||||
It is possible to set per\-user defaults for
|
||||
\fBdig\fR
|
||||
via
|
||||
\fI${HOME}/.digrc\fR. This file is read and any options in it are applied before the command line arguments.
|
||||
It is possible to set per-user defaults for \fBdig\fR via
|
||||
\fI${HOME}/.digrc\fR. This file is read and any options in it
|
||||
are applied before the command line arguments.
|
||||
.SH "SIMPLE USAGE"
|
||||
.PP
|
||||
A typical invocation of
|
||||
\fBdig\fR
|
||||
looks like:
|
||||
A typical invocation of \fBdig\fR looks like:
|
||||
.sp
|
||||
.RS 3n
|
||||
.nf
|
||||
dig @server name type
|
||||
.fi
|
||||
.RE
|
||||
.sp
|
||||
.fi
|
||||
where:
|
||||
.TP 3n
|
||||
.TP
|
||||
\fBserver\fR
|
||||
is the name or IP address of the name server to query. This can be an IPv4 address in dotted\-decimal notation or an IPv6 address in colon\-delimited notation. When the supplied
|
||||
\fIserver\fR
|
||||
argument is a hostname,
|
||||
\fBdig\fR
|
||||
resolves that name before querying that name server. If no
|
||||
\fIserver\fR
|
||||
argument is provided,
|
||||
\fBdig\fR
|
||||
consults
|
||||
\fI/etc/resolv.conf\fR
|
||||
and queries the name servers listed there. The reply from the name server that responds is displayed.
|
||||
.TP 3n
|
||||
is the name or IP address of the name server to query. This can be an IPv4
|
||||
address in dotted-decimal notation or an IPv6
|
||||
address in colon-delimited notation. When the supplied
|
||||
\fIserver\fR argument is a hostname,
|
||||
\fBdig\fR resolves that name before querying that name
|
||||
server. If no \fIserver\fR argument is provided,
|
||||
\fBdig\fR consults \fI/etc/resolv.conf\fR
|
||||
and queries the name servers listed there. The reply from the name
|
||||
server that responds is displayed.
|
||||
.TP
|
||||
\fBname\fR
|
||||
is the name of the resource record that is to be looked up.
|
||||
.TP 3n
|
||||
.TP
|
||||
\fBtype\fR
|
||||
indicates what type of query is required \(em ANY, A, MX, SIG, etc.
|
||||
\fItype\fR
|
||||
can be any valid query type. If no
|
||||
\fItype\fR
|
||||
argument is supplied,
|
||||
\fBdig\fR
|
||||
will perform a lookup for an A record.
|
||||
indicates what type of query is required \(em
|
||||
ANY, A, MX, SIG, etc.
|
||||
\fItype\fR can be any valid query type. If no
|
||||
\fItype\fR argument is supplied,
|
||||
\fBdig\fR will perform a lookup for an A record.
|
||||
.SH "OPTIONS"
|
||||
.PP
|
||||
The
|
||||
\fB\-b\fR
|
||||
option sets the source IP address of the query to
|
||||
\fIaddress\fR. This must be a valid address on one of the host's network interfaces or "0.0.0.0" or "::". An optional port may be specified by appending "#<port>"
|
||||
The \fB-b\fR option sets the source IP address of the query
|
||||
to \fIaddress\fR. This must be a valid address on
|
||||
one of the host's network interfaces or "0.0.0.0" or "::". An optional port
|
||||
may be specified by appending "#<port>"
|
||||
.PP
|
||||
The default query class (IN for internet) is overridden by the
|
||||
\fB\-c\fR
|
||||
option.
|
||||
\fIclass\fR
|
||||
is any valid class, such as HS for Hesiod records or CH for CHAOSNET records.
|
||||
\fB-c\fR option. \fIclass\fR is any valid
|
||||
class, such as HS for Hesiod records or CH for CHAOSNET records.
|
||||
.PP
|
||||
The
|
||||
\fB\-f\fR
|
||||
option makes
|
||||
\fBdig \fR
|
||||
operate in batch mode by reading a list of lookup requests to process from the file
|
||||
\fIfilename\fR. The file contains a number of queries, one per line. Each entry in the file should be organised in the same way they would be presented as queries to
|
||||
\fBdig\fR
|
||||
using the command\-line interface.
|
||||
The \fB-f\fR option makes \fBdig \fR operate
|
||||
in batch mode by reading a list of lookup requests to process from the
|
||||
file \fIfilename\fR. The file contains a number of
|
||||
queries, one per line. Each entry in the file should be organised in
|
||||
the same way they would be presented as queries to
|
||||
\fBdig\fR using the command-line interface.
|
||||
.PP
|
||||
If a non\-standard port number is to be queried, the
|
||||
\fB\-p\fR
|
||||
option is used.
|
||||
\fIport#\fR
|
||||
is the port number that
|
||||
\fBdig\fR
|
||||
will send its queries instead of the standard DNS port number 53. This option would be used to test a name server that has been configured to listen for queries on a non\-standard port number.
|
||||
If a non-standard port number is to be queried, the
|
||||
\fB-p\fR option is used. \fIport#\fR is
|
||||
the port number that \fBdig\fR will send its queries
|
||||
instead of the standard DNS port number 53. This option would be used
|
||||
to test a name server that has been configured to listen for queries
|
||||
on a non-standard port number.
|
||||
.PP
|
||||
The
|
||||
\fB\-4\fR
|
||||
option forces
|
||||
\fBdig\fR
|
||||
to only use IPv4 query transport. The
|
||||
\fB\-6\fR
|
||||
option forces
|
||||
\fBdig\fR
|
||||
to only use IPv6 query transport.
|
||||
The \fB-4\fR option forces \fBdig\fR to only
|
||||
use IPv4 query transport. The \fB-6\fR option forces
|
||||
\fBdig\fR to only use IPv6 query transport.
|
||||
.PP
|
||||
The
|
||||
\fB\-t\fR
|
||||
option sets the query type to
|
||||
\fItype\fR. It can be any valid query type which is supported in BIND9. The default query type "A", unless the
|
||||
\fB\-x\fR
|
||||
option is supplied to indicate a reverse lookup. A zone transfer can be requested by specifying a type of AXFR. When an incremental zone transfer (IXFR) is required,
|
||||
\fItype\fR
|
||||
is set to
|
||||
ixfr=N. The incremental zone transfer will contain the changes made to the zone since the serial number in the zone's SOA record was
|
||||
The \fB-t\fR option sets the query type to
|
||||
\fItype\fR. It can be any valid query type which is
|
||||
supported in BIND9. The default query type "A", unless the
|
||||
\fB-x\fR option is supplied to indicate a reverse lookup.
|
||||
A zone transfer can be requested by specifying a type of AXFR. When
|
||||
an incremental zone transfer (IXFR) is required,
|
||||
\fItype\fR is set to ixfr=N.
|
||||
The incremental zone transfer will contain the changes made to the zone
|
||||
since the serial number in the zone's SOA record was
|
||||
\fIN\fR.
|
||||
.PP
|
||||
Reverse lookups \- mapping addresses to names \- are simplified by the
|
||||
\fB\-x\fR
|
||||
option.
|
||||
\fIaddr\fR
|
||||
is an IPv4 address in dotted\-decimal notation, or a colon\-delimited IPv6 address. When this option is used, there is no need to provide the
|
||||
\fIname\fR,
|
||||
\fIclass\fR
|
||||
and
|
||||
\fItype\fR
|
||||
arguments.
|
||||
\fBdig\fR
|
||||
Reverse lookups - mapping addresses to names - are simplified by the
|
||||
\fB-x\fR option. \fIaddr\fR is an IPv4
|
||||
address in dotted-decimal notation, or a colon-delimited IPv6 address.
|
||||
When this option is used, there is no need to provide the
|
||||
\fIname\fR, \fIclass\fR and
|
||||
\fItype\fR arguments. \fBdig\fR
|
||||
automatically performs a lookup for a name like
|
||||
11.12.13.10.in\-addr.arpa
|
||||
and sets the query type and class to PTR and IN respectively. By default, IPv6 addresses are looked up using nibble format under the IP6.ARPA domain. To use the older RFC1886 method using the IP6.INT domain specify the
|
||||
\fB\-i\fR
|
||||
option. Bit string labels (RFC2874) are now experimental and are not attempted.
|
||||
11.12.13.10.in-addr.arpa and sets the query type and
|
||||
class to PTR and IN respectively. By default, IPv6 addresses are
|
||||
looked up using nibble format under the IP6.ARPA domain.
|
||||
To use the older RFC1886 method using the IP6.INT domain
|
||||
specify the \fB-i\fR option. Bit string labels (RFC2874)
|
||||
are now experimental and are not attempted.
|
||||
.PP
|
||||
To sign the DNS queries sent by
|
||||
\fBdig\fR
|
||||
and their responses using transaction signatures (TSIG), specify a TSIG key file using the
|
||||
\fB\-k\fR
|
||||
option. You can also specify the TSIG key itself on the command line using the
|
||||
\fB\-y\fR
|
||||
option;
|
||||
\fIname\fR
|
||||
is the name of the TSIG key and
|
||||
\fIkey\fR
|
||||
is the actual key. The key is a base\-64 encoded string, typically generated by
|
||||
\fBdnssec\-keygen\fR(8). Caution should be taken when using the
|
||||
\fB\-y\fR
|
||||
option on multi\-user systems as the key can be visible in the output from
|
||||
\fBps\fR(1 )
|
||||
or in the shell's history file. When using TSIG authentication with
|
||||
\fBdig\fR, the name server that is queried needs to know the key and algorithm that is being used. In BIND, this is done by providing appropriate
|
||||
\fBkey\fR
|
||||
and
|
||||
\fBserver\fR
|
||||
statements in
|
||||
To sign the DNS queries sent by \fBdig\fR and their
|
||||
responses using transaction signatures (TSIG), specify a TSIG key file
|
||||
using the \fB-k\fR option. You can also specify the TSIG
|
||||
key itself on the command line using the \fB-y\fR option;
|
||||
\fIname\fR is the name of the TSIG key and
|
||||
\fIkey\fR is the actual key. The key is a base-64
|
||||
encoded string, typically generated by \fBdnssec-keygen\fR(8).
|
||||
Caution should be taken when using the \fB-y\fR option on
|
||||
multi-user systems as the key can be visible in the output from
|
||||
\fBps\fR(1) or in the shell's history file. When
|
||||
using TSIG authentication with \fBdig\fR, the name
|
||||
server that is queried needs to know the key and algorithm that is
|
||||
being used. In BIND, this is done by providing appropriate
|
||||
\fBkey\fR and \fBserver\fR statements in
|
||||
\fInamed.conf\fR.
|
||||
.SH "QUERY OPTIONS"
|
||||
.PP
|
||||
\fBdig\fR
|
||||
provides a number of query options which affect the way in which lookups are made and the results displayed. Some of these set or reset flag bits in the query header, some determine which sections of the answer get printed, and others determine the timeout and retry strategies.
|
||||
\fBdig\fR provides a number of query options which affect
|
||||
the way in which lookups are made and the results displayed. Some of
|
||||
these set or reset flag bits in the query header, some determine which
|
||||
sections of the answer get printed, and others determine the timeout
|
||||
and retry strategies.
|
||||
.PP
|
||||
Each query option is identified by a keyword preceded by a plus sign (+). Some keywords set or reset an option. These may be preceded by the string
|
||||
no
|
||||
to negate the meaning of that keyword. Other keywords assign values to options like the timeout interval. They have the form
|
||||
\fB+keyword=value\fR. The query options are:
|
||||
.TP 3n
|
||||
Each query option is identified by a keyword preceded by a plus sign
|
||||
(+). Some keywords set or reset an option. These may be preceded
|
||||
by the string no to negate the meaning of that keyword. Other
|
||||
keywords assign values to options like the timeout interval. They
|
||||
have the form \fB+keyword=value\fR.
|
||||
The query options are:
|
||||
.TP
|
||||
\fB+[no]tcp\fR
|
||||
Use [do not use] TCP when querying name servers. The default behaviour is to use UDP unless an AXFR or IXFR query is requested, in which case a TCP connection is used.
|
||||
.TP 3n
|
||||
Use [do not use] TCP when querying name servers. The default
|
||||
behaviour is to use UDP unless an AXFR or IXFR query is requested, in
|
||||
which case a TCP connection is used.
|
||||
.TP
|
||||
\fB+[no]vc\fR
|
||||
Use [do not use] TCP when querying name servers. This alternate syntax to
|
||||
\fI+[no]tcp\fR
|
||||
is provided for backwards compatibility. The "vc" stands for "virtual circuit".
|
||||
.TP 3n
|
||||
Use [do not use] TCP when querying name servers. This alternate
|
||||
syntax to \fI+[no]tcp\fR is provided for backwards
|
||||
compatibility. The "vc" stands for "virtual circuit".
|
||||
.TP
|
||||
\fB+[no]ignore\fR
|
||||
Ignore truncation in UDP responses instead of retrying with TCP. By default, TCP retries are performed.
|
||||
.TP 3n
|
||||
Ignore truncation in UDP responses instead of retrying with TCP. By
|
||||
default, TCP retries are performed.
|
||||
.TP
|
||||
\fB+domain=somename\fR
|
||||
Set the search list to contain the single domain
|
||||
\fIsomename\fR, as if specified in a
|
||||
\fBdomain\fR
|
||||
directive in
|
||||
\fI/etc/resolv.conf\fR, and enable search list processing as if the
|
||||
\fI+search\fR
|
||||
option were given.
|
||||
.TP 3n
|
||||
\fBdomain\fR directive in
|
||||
\fI/etc/resolv.conf\fR, and enable search list
|
||||
processing as if the \fI+search\fR option were given.
|
||||
.TP
|
||||
\fB+[no]search\fR
|
||||
Use [do not use] the search list defined by the searchlist or domain directive in
|
||||
\fIresolv.conf\fR
|
||||
(if any). The search list is not used by default.
|
||||
.TP 3n
|
||||
Use [do not use] the search list defined by the searchlist or domain
|
||||
directive in \fIresolv.conf\fR (if any).
|
||||
The search list is not used by default.
|
||||
.TP
|
||||
\fB+[no]defname\fR
|
||||
Deprecated, treated as a synonym for
|
||||
\fI+[no]search\fR
|
||||
.TP 3n
|
||||
Deprecated, treated as a synonym for \fI+[no]search\fR
|
||||
.TP
|
||||
\fB+[no]aaonly\fR
|
||||
Sets the "aa" flag in the query.
|
||||
.TP 3n
|
||||
.TP
|
||||
\fB+[no]aaflag\fR
|
||||
A synonym for
|
||||
\fI+[no]aaonly\fR.
|
||||
.TP 3n
|
||||
A synonym for \fI+[no]aaonly\fR.
|
||||
.TP
|
||||
\fB+[no]adflag\fR
|
||||
Set [do not set] the AD (authentic data) bit in the query. The AD bit currently has a standard meaning only in responses, not in queries, but the ability to set the bit in the query is provided for completeness.
|
||||
.TP 3n
|
||||
Set [do not set] the AD (authentic data) bit in the query. The AD bit
|
||||
currently has a standard meaning only in responses, not in queries,
|
||||
but the ability to set the bit in the query is provided for
|
||||
completeness.
|
||||
.TP
|
||||
\fB+[no]cdflag\fR
|
||||
Set [do not set] the CD (checking disabled) bit in the query. This requests the server to not perform DNSSEC validation of responses.
|
||||
.TP 3n
|
||||
Set [do not set] the CD (checking disabled) bit in the query. This
|
||||
requests the server to not perform DNSSEC validation of responses.
|
||||
.TP
|
||||
\fB+[no]cl\fR
|
||||
Display [do not display] the CLASS when printing the record.
|
||||
.TP 3n
|
||||
.TP
|
||||
\fB+[no]ttlid\fR
|
||||
Display [do not display] the TTL when printing the record.
|
||||
.TP 3n
|
||||
.TP
|
||||
\fB+[no]recurse\fR
|
||||
Toggle the setting of the RD (recursion desired) bit in the query. This bit is set by default, which means
|
||||
\fBdig\fR
|
||||
normally sends recursive queries. Recursion is automatically disabled when the
|
||||
\fI+nssearch\fR
|
||||
or
|
||||
\fI+trace\fR
|
||||
query options are used.
|
||||
.TP 3n
|
||||
Toggle the setting of the RD (recursion desired) bit in the query.
|
||||
This bit is set by default, which means \fBdig\fR
|
||||
normally sends recursive queries. Recursion is automatically disabled
|
||||
when the \fI+nssearch\fR or
|
||||
\fI+trace\fR query options are used.
|
||||
.TP
|
||||
\fB+[no]nssearch\fR
|
||||
When this option is set,
|
||||
\fBdig\fR
|
||||
attempts to find the authoritative name servers for the zone containing the name being looked up and display the SOA record that each name server has for the zone.
|
||||
.TP 3n
|
||||
When this option is set, \fBdig\fR attempts to find the
|
||||
authoritative name servers for the zone containing the name being
|
||||
looked up and display the SOA record that each name server has for the
|
||||
zone.
|
||||
.TP
|
||||
\fB+[no]trace\fR
|
||||
Toggle tracing of the delegation path from the root name servers for the name being looked up. Tracing is disabled by default. When tracing is enabled,
|
||||
\fBdig\fR
|
||||
makes iterative queries to resolve the name being looked up. It will follow referrals from the root servers, showing the answer from each server that was used to resolve the lookup.
|
||||
.TP 3n
|
||||
Toggle tracing of the delegation path from the root name servers for
|
||||
the name being looked up. Tracing is disabled by default. When
|
||||
tracing is enabled, \fBdig\fR makes iterative queries to
|
||||
resolve the name being looked up. It will follow referrals from the
|
||||
root servers, showing the answer from each server that was used to
|
||||
resolve the lookup.
|
||||
.TP
|
||||
\fB+[no]cmd\fR
|
||||
toggles the printing of the initial comment in the output identifying the version of
|
||||
\fBdig\fR
|
||||
and the query options that have been applied. This comment is printed by default.
|
||||
.TP 3n
|
||||
toggles the printing of the initial comment in the output identifying
|
||||
the version of \fBdig\fR and the query options that have
|
||||
been applied. This comment is printed by default.
|
||||
.TP
|
||||
\fB+[no]short\fR
|
||||
Provide a terse answer. The default is to print the answer in a verbose form.
|
||||
.TP 3n
|
||||
Provide a terse answer. The default is to print the answer in a
|
||||
verbose form.
|
||||
.TP
|
||||
\fB+[no]identify\fR
|
||||
Show [or do not show] the IP address and port number that supplied the answer when the
|
||||
\fI+short\fR
|
||||
option is enabled. If short form answers are requested, the default is not to show the source address and port number of the server that provided the answer.
|
||||
.TP 3n
|
||||
Show [or do not show] the IP address and port number that supplied the
|
||||
answer when the \fI+short\fR option is enabled. If
|
||||
short form answers are requested, the default is not to show the
|
||||
source address and port number of the server that provided the answer.
|
||||
.TP
|
||||
\fB+[no]comments\fR
|
||||
Toggle the display of comment lines in the output. The default is to print comments.
|
||||
.TP 3n
|
||||
Toggle the display of comment lines in the output. The default is to
|
||||
print comments.
|
||||
.TP
|
||||
\fB+[no]stats\fR
|
||||
This query option toggles the printing of statistics: when the query was made, the size of the reply and so on. The default behaviour is to print the query statistics.
|
||||
.TP 3n
|
||||
This query option toggles the printing of statistics: when the query
|
||||
was made, the size of the reply and so on. The default behaviour is
|
||||
to print the query statistics.
|
||||
.TP
|
||||
\fB+[no]qr\fR
|
||||
Print [do not print] the query as it is sent. By default, the query is not printed.
|
||||
.TP 3n
|
||||
Print [do not print] the query as it is sent.
|
||||
By default, the query is not printed.
|
||||
.TP
|
||||
\fB+[no]question\fR
|
||||
Print [do not print] the question section of a query when an answer is returned. The default is to print the question section as a comment.
|
||||
.TP 3n
|
||||
Print [do not print] the question section of a query when an answer is
|
||||
returned. The default is to print the question section as a comment.
|
||||
.TP
|
||||
\fB+[no]answer\fR
|
||||
Display [do not display] the answer section of a reply. The default is to display it.
|
||||
.TP 3n
|
||||
Display [do not display] the answer section of a reply. The default
|
||||
is to display it.
|
||||
.TP
|
||||
\fB+[no]authority\fR
|
||||
Display [do not display] the authority section of a reply. The default is to display it.
|
||||
.TP 3n
|
||||
Display [do not display] the authority section of a reply. The
|
||||
default is to display it.
|
||||
.TP
|
||||
\fB+[no]additional\fR
|
||||
Display [do not display] the additional section of a reply. The default is to display it.
|
||||
.TP 3n
|
||||
Display [do not display] the additional section of a reply.
|
||||
The default is to display it.
|
||||
.TP
|
||||
\fB+[no]all\fR
|
||||
Set or clear all display flags.
|
||||
.TP 3n
|
||||
.TP
|
||||
\fB+time=T\fR
|
||||
Sets the timeout for a query to
|
||||
\fIT\fR
|
||||
seconds. The default time out is 5 seconds. An attempt to set
|
||||
\fIT\fR
|
||||
to less than 1 will result in a query timeout of 1 second being applied.
|
||||
.TP 3n
|
||||
\fIT\fR seconds. The default time out is 5 seconds.
|
||||
An attempt to set \fIT\fR to less than 1 will result
|
||||
in a query timeout of 1 second being applied.
|
||||
.TP
|
||||
\fB+tries=T\fR
|
||||
Sets the number of times to try UDP queries to server to
|
||||
\fIT\fR
|
||||
instead of the default, 3. If
|
||||
\fIT\fR
|
||||
is less than or equal to zero, the number of tries is silently rounded up to 1.
|
||||
.TP 3n
|
||||
\fIT\fR instead of the default, 3. If
|
||||
\fIT\fR is less than or equal to zero, the number of
|
||||
tries is silently rounded up to 1.
|
||||
.TP
|
||||
\fB+retry=T\fR
|
||||
Sets the number of times to retry UDP queries to server to
|
||||
\fIT\fR
|
||||
instead of the default, 2. Unlike
|
||||
\fI+tries\fR, this does not include the initial query.
|
||||
.TP 3n
|
||||
\fIT\fR instead of the default, 2. Unlike
|
||||
\fI+tries\fR, this does not include the initial
|
||||
query.
|
||||
.TP
|
||||
\fB+ndots=D\fR
|
||||
Set the number of dots that have to appear in
|
||||
\fIname\fR
|
||||
to
|
||||
\fID\fR
|
||||
for it to be considered absolute. The default value is that defined using the ndots statement in
|
||||
\fI/etc/resolv.conf\fR, or 1 if no ndots statement is present. Names with fewer dots are interpreted as relative names and will be searched for in the domains listed in the
|
||||
\fBsearch\fR
|
||||
or
|
||||
\fBdomain\fR
|
||||
directive in
|
||||
\fIname\fR to \fID\fR for it to be
|
||||
considered absolute. The default value is that defined using the
|
||||
ndots statement in \fI/etc/resolv.conf\fR, or 1 if no
|
||||
ndots statement is present. Names with fewer dots are interpreted as
|
||||
relative names and will be searched for in the domains listed in the
|
||||
\fBsearch\fR or \fBdomain\fR directive in
|
||||
\fI/etc/resolv.conf\fR.
|
||||
.TP 3n
|
||||
.TP
|
||||
\fB+bufsize=B\fR
|
||||
Set the UDP message buffer size advertised using EDNS0 to
|
||||
\fIB\fR
|
||||
bytes. The maximum and minimum sizes of this buffer are 65535 and 0 respectively. Values outside this range are rounded up or down appropriately.
|
||||
.TP 3n
|
||||
\fIB\fR bytes. The maximum and minimum sizes of this
|
||||
buffer are 65535 and 0 respectively. Values outside this range are
|
||||
rounded up or down appropriately.
|
||||
.TP
|
||||
\fB+[no]multiline\fR
|
||||
Print records like the SOA records in a verbose multi\-line format with human\-readable comments. The default is to print each record on a single line, to facilitate machine parsing of the
|
||||
\fBdig\fR
|
||||
output.
|
||||
.TP 3n
|
||||
Print records like the SOA records in a verbose multi-line
|
||||
format with human-readable comments. The default is to print
|
||||
each record on a single line, to facilitate machine parsing
|
||||
of the \fBdig\fR output.
|
||||
.TP
|
||||
\fB+[no]fail\fR
|
||||
Do not try the next server if you receive a SERVFAIL. The default is to not try the next server which is the reverse of normal stub resolver behaviour.
|
||||
.TP 3n
|
||||
Do not try the next server if you receive a SERVFAIL. The default is
|
||||
to not try the next server which is the reverse of normal stub resolver
|
||||
behaviour.
|
||||
.TP
|
||||
\fB+[no]besteffort\fR
|
||||
Attempt to display the contents of messages which are malformed. The default is to not display malformed answers.
|
||||
.TP 3n
|
||||
Attempt to display the contents of messages which are malformed.
|
||||
The default is to not display malformed answers.
|
||||
.TP
|
||||
\fB+[no]dnssec\fR
|
||||
Requests DNSSEC records be sent by setting the DNSSEC OK bit (DO) in the OPT record in the additional section of the query.
|
||||
.TP 3n
|
||||
Requests DNSSEC records be sent by setting the DNSSEC OK bit (DO)
|
||||
in the OPT record in the additional section of the query.
|
||||
.TP
|
||||
\fB+[no]sigchase\fR
|
||||
Chase DNSSEC signature chains. Requires dig be compiled with \-DDIG_SIGCHASE.
|
||||
.TP 3n
|
||||
\fB+trusted\-key=####\fR
|
||||
Specifies a file containing trusted keys to be used with
|
||||
\fB+sigchase\fR. Each DNSKEY record must be on its own line.
|
||||
.sp
|
||||
If not specified
|
||||
\fBdig\fR
|
||||
will look for
|
||||
\fI/etc/trusted\-key.key\fR
|
||||
then
|
||||
\fItrusted\-key.key\fR
|
||||
in the current directory.
|
||||
.sp
|
||||
Requires dig be compiled with \-DDIG_SIGCHASE.
|
||||
.TP 3n
|
||||
Chase DNSSEC signature chains. Requires dig be compiled with
|
||||
-DDIG_SIGCHASE.
|
||||
.TP
|
||||
\fB+trusted-key=####\fR
|
||||
Specify a trusted key to be used with \fB+sigchase\fR.
|
||||
Requires dig be compiled with -DDIG_SIGCHASE.
|
||||
.TP
|
||||
\fB+[no]topdown\fR
|
||||
When chasing DNSSEC signature chains perform a top down validation. Requires dig be compiled with \-DDIG_SIGCHASE.
|
||||
When chasing DNSSEC signature chains perform a top down validation.
|
||||
Requires dig be compiled with -DDIG_SIGCHASE.
|
||||
.SH "MULTIPLE QUERIES"
|
||||
.PP
|
||||
The BIND 9 implementation of
|
||||
\fBdig \fR
|
||||
supports specifying multiple queries on the command line (in addition to supporting the
|
||||
\fB\-f\fR
|
||||
batch file option). Each of those queries can be supplied with its own set of flags, options and query options.
|
||||
The BIND 9 implementation of \fBdig \fR supports
|
||||
specifying multiple queries on the command line (in addition to
|
||||
supporting the \fB-f\fR batch file option). Each of those
|
||||
queries can be supplied with its own set of flags, options and query
|
||||
options.
|
||||
.PP
|
||||
In this case, each
|
||||
\fIquery\fR
|
||||
argument represent an individual query in the command\-line syntax described above. Each consists of any of the standard options and flags, the name to be looked up, an optional query type and class and any query options that should be applied to that query.
|
||||
In this case, each \fIquery\fR argument represent an
|
||||
individual query in the command-line syntax described above. Each
|
||||
consists of any of the standard options and flags, the name to be
|
||||
looked up, an optional query type and class and any query options that
|
||||
should be applied to that query.
|
||||
.PP
|
||||
A global set of query options, which should be applied to all queries, can also be supplied. These global query options must precede the first tuple of name, class, type, options, flags, and query options supplied on the command line. Any global query options (except the
|
||||
\fB+[no]cmd\fR
|
||||
option) can be overridden by a query\-specific set of query options. For example:
|
||||
A global set of query options, which should be applied to all queries,
|
||||
can also be supplied. These global query options must precede the
|
||||
first tuple of name, class, type, options, flags, and query options
|
||||
supplied on the command line. Any global query options (except
|
||||
the \fB+[no]cmd\fR option) can be
|
||||
overridden by a query-specific set of query options. For example:
|
||||
.sp
|
||||
.RS 3n
|
||||
.nf
|
||||
dig +qr www.isc.org any \-x 127.0.0.1 isc.org ns +noqr
|
||||
.fi
|
||||
.RE
|
||||
dig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr
|
||||
.sp
|
||||
shows how
|
||||
\fBdig\fR
|
||||
could be used from the command line to make three lookups: an ANY query for
|
||||
www.isc.org, a reverse lookup of 127.0.0.1 and a query for the NS records of
|
||||
isc.org. A global query option of
|
||||
\fI+qr\fR
|
||||
is applied, so that
|
||||
\fBdig\fR
|
||||
shows the initial query it made for each lookup. The final query has a local query option of
|
||||
\fI+noqr\fR
|
||||
which means that
|
||||
\fBdig\fR
|
||||
.fi
|
||||
shows how \fBdig\fR could be used from the command line
|
||||
to make three lookups: an ANY query for www.isc.org, a
|
||||
reverse lookup of 127.0.0.1 and a query for the NS records of
|
||||
isc.org.
|
||||
A global query option of \fI+qr\fR is applied, so
|
||||
that \fBdig\fR shows the initial query it made for each
|
||||
lookup. The final query has a local query option of
|
||||
\fI+noqr\fR which means that \fBdig\fR
|
||||
will not print the initial query when it looks up the NS records for
|
||||
isc.org.
|
||||
.SH "FILES"
|
||||
@@ -423,10 +394,8 @@ isc.org.
|
||||
.PP
|
||||
\fBhost\fR(1),
|
||||
\fBnamed\fR(8),
|
||||
\fBdnssec\-keygen\fR(8),
|
||||
RFC1035.
|
||||
.SH "BUGS "
|
||||
\fBdnssec-keygen\fR(8),
|
||||
\fIRFC1035\fR.
|
||||
.SH "BUGS"
|
||||
.PP
|
||||
There are probably too many query options.
|
||||
.SH "COPYRIGHT"
|
||||
Copyright \(co 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
There are probably too many query options.
|
||||
+54
-53
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2000-2003 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: dig.c,v 1.157.2.13.2.31 2006/07/22 23:52:57 marka Exp $ */
|
||||
/* $Id: dig.c,v 1.157.2.13.2.20 2004/06/23 04:19:40 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
#include <stdlib.h>
|
||||
@@ -41,10 +41,12 @@
|
||||
#include <dns/rdataclass.h>
|
||||
#include <dns/result.h>
|
||||
|
||||
#include <bind9/getaddresses.h>
|
||||
|
||||
#include <dig/dig.h>
|
||||
|
||||
extern ISC_LIST(dig_lookup_t) lookup_list;
|
||||
extern dig_serverlist_t server_list;
|
||||
extern ISC_LIST(dig_searchlist_t) search_list;
|
||||
|
||||
#define ADD_STRING(b, s) { \
|
||||
if (strlen(s) >= isc_buffer_availablelength(b)) \
|
||||
return (ISC_R_NOSPACE); \
|
||||
@@ -52,14 +54,35 @@
|
||||
isc_buffer_putstr(b, s); \
|
||||
}
|
||||
|
||||
#define DIG_MAX_ADDRESSES 20
|
||||
|
||||
extern isc_boolean_t have_ipv4, have_ipv6, specified_source,
|
||||
usesearch, qr;
|
||||
extern in_port_t port;
|
||||
extern unsigned int timeout;
|
||||
extern isc_mem_t *mctx;
|
||||
extern dns_messageid_t id;
|
||||
extern int sendcount;
|
||||
extern int ndots;
|
||||
extern int lookup_counter;
|
||||
extern int exitcode;
|
||||
extern isc_sockaddr_t bind_address;
|
||||
extern char keynametext[MXNAME];
|
||||
extern char keyfile[MXNAME];
|
||||
extern char keysecret[MXNAME];
|
||||
#ifdef DIG_SIGCHASE
|
||||
extern char trustedkey[MXNAME];
|
||||
#endif
|
||||
extern dns_tsigkey_t *key;
|
||||
extern isc_boolean_t validated;
|
||||
extern isc_taskmgr_t *taskmgr;
|
||||
extern isc_task_t *global_task;
|
||||
extern isc_boolean_t free_now;
|
||||
dig_lookup_t *default_lookup = NULL;
|
||||
|
||||
extern isc_boolean_t debugging, memdebugging;
|
||||
static char *batchname = NULL;
|
||||
static FILE *batchfp = NULL;
|
||||
static char *argv0;
|
||||
static int addresscount = 0;
|
||||
|
||||
static char domainopt[DNS_NAME_MAXTEXT];
|
||||
|
||||
@@ -106,6 +129,8 @@ static const char *rcodetext[] = {
|
||||
"BADVERS"
|
||||
};
|
||||
|
||||
extern char *progname;
|
||||
|
||||
static void
|
||||
print_usage(FILE *fp) {
|
||||
fputs(
|
||||
@@ -564,7 +589,6 @@ buftoosmall:
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (headers && query->lookup->comments && !short_form)
|
||||
printf("\n");
|
||||
|
||||
@@ -603,15 +627,6 @@ printgreeting(int argc, char **argv, dig_lookup_t *lookup) {
|
||||
remaining = sizeof(lookup->cmdline) -
|
||||
strlen(lookup->cmdline) - 1;
|
||||
strncat(lookup->cmdline, "\n", remaining);
|
||||
if (first && addresscount != 0) {
|
||||
snprintf(append, sizeof(append),
|
||||
"; (%d server%s found)\n",
|
||||
addresscount,
|
||||
addresscount > 1 ? "s" : "");
|
||||
remaining = sizeof(lookup->cmdline) -
|
||||
strlen(lookup->cmdline) - 1;
|
||||
strncat(lookup->cmdline, append, remaining);
|
||||
}
|
||||
if (first) {
|
||||
snprintf(append, sizeof(append),
|
||||
";; global options: %s %s\n",
|
||||
@@ -790,7 +805,7 @@ plus_option(char *option, isc_boolean_t is_batchfile,
|
||||
break;
|
||||
case 'l': /* cl */
|
||||
FULLCHECK("cl");
|
||||
noclass = ISC_TF(!state);
|
||||
noclass = !state;
|
||||
break;
|
||||
case 'm': /* cmd */
|
||||
FULLCHECK("cmd");
|
||||
@@ -864,7 +879,7 @@ plus_option(char *option, isc_boolean_t is_batchfile,
|
||||
lookup->ns_search_only = state;
|
||||
if (state) {
|
||||
lookup->trace_root = ISC_TRUE;
|
||||
lookup->recurse = ISC_TRUE;
|
||||
lookup->recurse = ISC_FALSE;
|
||||
lookup->identify = ISC_TRUE;
|
||||
lookup->stats = ISC_FALSE;
|
||||
lookup->comments = ISC_FALSE;
|
||||
@@ -993,7 +1008,7 @@ plus_option(char *option, isc_boolean_t is_batchfile,
|
||||
lookup->stats = ISC_FALSE;
|
||||
lookup->section_additional = ISC_FALSE;
|
||||
lookup->section_authority = ISC_TRUE;
|
||||
lookup->section_question = ISC_FALSE;
|
||||
lookup->section_question = ISC_FALSE;
|
||||
}
|
||||
break;
|
||||
case 'i': /* tries */
|
||||
@@ -1009,7 +1024,6 @@ plus_option(char *option, isc_boolean_t is_batchfile,
|
||||
break;
|
||||
#ifdef DIG_SIGCHASE
|
||||
case 'u': /* trusted-key */
|
||||
FULLCHECK("trusted-key");
|
||||
if (value == NULL)
|
||||
goto need_value;
|
||||
if (!state)
|
||||
@@ -1026,7 +1040,7 @@ plus_option(char *option, isc_boolean_t is_batchfile,
|
||||
break;
|
||||
case 't': /* ttlid */
|
||||
FULLCHECK("ttlid");
|
||||
nottl = ISC_TF(!state);
|
||||
nottl = !state;
|
||||
break;
|
||||
default:
|
||||
goto invalid_option;
|
||||
@@ -1054,7 +1068,8 @@ static const char *single_dash_opts = "46dhimnv";
|
||||
static const char *dash_opts = "46bcdfhikmnptvyx";
|
||||
static isc_boolean_t
|
||||
dash_option(char *option, char *next, dig_lookup_t **lookup,
|
||||
isc_boolean_t *open_type_class)
|
||||
isc_boolean_t *open_type_class, isc_boolean_t *firstarg,
|
||||
int argc, char **argv)
|
||||
{
|
||||
char opt, *value, *ptr;
|
||||
isc_result_t result;
|
||||
@@ -1259,6 +1274,10 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
|
||||
if (!(*lookup)->rdclassset)
|
||||
(*lookup)->rdclass = dns_rdataclass_in;
|
||||
(*lookup)->new_search = ISC_TRUE;
|
||||
if (*lookup && *firstarg) {
|
||||
printgreeting(argc, argv, *lookup);
|
||||
*firstarg = ISC_FALSE;
|
||||
}
|
||||
ISC_LIST_APPEND(lookup_list, *lookup, link);
|
||||
} else {
|
||||
fprintf(stderr, "Invalid IP address %s\n", value);
|
||||
@@ -1305,36 +1324,13 @@ preparse_args(int argc, char **argv) {
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
getaddresses(dig_lookup_t *lookup, const char *host) {
|
||||
isc_result_t result;
|
||||
isc_sockaddr_t sockaddrs[DIG_MAX_ADDRESSES];
|
||||
isc_netaddr_t netaddr;
|
||||
int count, i;
|
||||
dig_server_t *srv;
|
||||
char tmp[ISC_NETADDR_FORMATSIZE];
|
||||
|
||||
result = bind9_getaddresses(host, 0, sockaddrs,
|
||||
DIG_MAX_ADDRESSES, &count);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("couldn't get address for '%s': %s",
|
||||
host, isc_result_totext(result));
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
isc_netaddr_fromsockaddr(&netaddr, &sockaddrs[i]);
|
||||
isc_netaddr_format(&netaddr, tmp, sizeof(tmp));
|
||||
srv = make_server(tmp, host);
|
||||
ISC_LIST_APPEND(lookup->my_server_list, srv, link);
|
||||
}
|
||||
addresscount = count;
|
||||
}
|
||||
|
||||
static void
|
||||
parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
|
||||
int argc, char **argv) {
|
||||
isc_result_t result;
|
||||
isc_textregion_t tr;
|
||||
isc_boolean_t firstarg = ISC_TRUE;
|
||||
dig_server_t *srv = NULL;
|
||||
dig_lookup_t *lookup = NULL;
|
||||
dns_rdatatype_t rdtype;
|
||||
dns_rdataclass_t rdclass;
|
||||
@@ -1414,20 +1410,24 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
|
||||
if (strncmp(rv[0], "%", 1) == 0)
|
||||
break;
|
||||
if (strncmp(rv[0], "@", 1) == 0) {
|
||||
getaddresses(lookup, &rv[0][1]);
|
||||
srv = make_server(&rv[0][1]);
|
||||
ISC_LIST_APPEND(lookup->my_server_list,
|
||||
srv, link);
|
||||
} else if (rv[0][0] == '+') {
|
||||
plus_option(&rv[0][1], is_batchfile,
|
||||
lookup);
|
||||
} else if (rv[0][0] == '-') {
|
||||
if (rc <= 1) {
|
||||
if (dash_option(&rv[0][1], NULL,
|
||||
&lookup, &open_type_class)) {
|
||||
&lookup, &open_type_class,
|
||||
&firstarg, argc, argv)) {
|
||||
rc--;
|
||||
rv++;
|
||||
}
|
||||
} else {
|
||||
if (dash_option(&rv[0][1], rv[1],
|
||||
&lookup, &open_type_class)) {
|
||||
&lookup, &open_type_class,
|
||||
&firstarg, argc, argv)) {
|
||||
rc--;
|
||||
rv++;
|
||||
}
|
||||
@@ -1437,7 +1437,7 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
|
||||
* Anything which isn't an option
|
||||
*/
|
||||
if (open_type_class) {
|
||||
if (strncasecmp(rv[0], "ixfr=", 5) == 0) {
|
||||
if (strncmp(rv[0], "ixfr=", 5) == 0) {
|
||||
rdtype = dns_rdatatype_ixfr;
|
||||
result = ISC_R_SUCCESS;
|
||||
} else {
|
||||
@@ -1498,6 +1498,10 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
|
||||
if (!config_only) {
|
||||
lookup = clone_lookup(default_lookup,
|
||||
ISC_TRUE);
|
||||
if (firstarg) {
|
||||
printgreeting(argc, argv, lookup);
|
||||
firstarg = ISC_FALSE;
|
||||
}
|
||||
strncpy(lookup->textname, rv[0],
|
||||
sizeof(lookup->textname));
|
||||
lookup->textname[sizeof(lookup->textname)-1]=0;
|
||||
@@ -1564,9 +1568,6 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
|
||||
firstarg = ISC_FALSE;
|
||||
}
|
||||
ISC_LIST_APPEND(lookup_list, lookup, link);
|
||||
} else if (!config_only && firstarg) {
|
||||
printgreeting(argc, argv, lookup);
|
||||
firstarg = ISC_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
|
||||
[<!ENTITY mdash "—">]>
|
||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
|
||||
<!--
|
||||
- Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2000-2003 Internet Software Consortium.
|
||||
-
|
||||
- Permission to use, copy, modify, and distribute this software for any
|
||||
@@ -18,7 +16,7 @@
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
|
||||
<!-- $Id: dig.docbook,v 1.4.2.7.4.12 2005/08/30 00:50:29 marka Exp $ -->
|
||||
<!-- $Id: dig.docbook,v 1.4.2.7.4.9 2004/06/23 04:19:41 marka Exp $ -->
|
||||
|
||||
<refentry>
|
||||
|
||||
@@ -32,21 +30,6 @@
|
||||
<refmiscinfo>BIND9</refmiscinfo>
|
||||
</refmeta>
|
||||
|
||||
<docinfo>
|
||||
<copyright>
|
||||
<year>2004</year>
|
||||
<year>2005</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
<copyright>
|
||||
<year>2000</year>
|
||||
<year>2001</year>
|
||||
<year>2002</year>
|
||||
<year>2003</year>
|
||||
<holder>Internet Software Consortium.</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
<refnamediv>
|
||||
<refname>dig</refname>
|
||||
<refpurpose>DNS lookup utility</refpurpose>
|
||||
@@ -55,7 +38,7 @@
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis>
|
||||
<command>dig</command>
|
||||
<arg choice="opt">@server</arg>
|
||||
<arg choice=opt>@server</arg>
|
||||
<arg><option>-b <replaceable class="parameter">address</replaceable></option></arg>
|
||||
<arg><option>-c <replaceable class="parameter">class</replaceable></option></arg>
|
||||
<arg><option>-f <replaceable class="parameter">filename</replaceable></option></arg>
|
||||
@@ -66,10 +49,10 @@
|
||||
<arg><option>-y <replaceable class="parameter">name:key</replaceable></option></arg>
|
||||
<arg><option>-4</option></arg>
|
||||
<arg><option>-6</option></arg>
|
||||
<arg choice="opt">name</arg>
|
||||
<arg choice="opt">type</arg>
|
||||
<arg choice="opt">class</arg>
|
||||
<arg choice="opt" rep="repeat">queryopt</arg>
|
||||
<arg choice=opt>name</arg>
|
||||
<arg choice=opt>type</arg>
|
||||
<arg choice=opt>class</arg>
|
||||
<arg choice=opt rep=repeat>queryopt</arg>
|
||||
</cmdsynopsis>
|
||||
|
||||
<cmdsynopsis>
|
||||
@@ -79,8 +62,8 @@
|
||||
|
||||
<cmdsynopsis>
|
||||
<command>dig</command>
|
||||
<arg choice="opt" rep="repeat">global-queryopt</arg>
|
||||
<arg choice="opt" rep="repeat">query</arg>
|
||||
<arg choice=opt rep=repeat>global-queryopt</arg>
|
||||
<arg choice=opt rep=repeat>query</arg>
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
|
||||
@@ -530,24 +513,11 @@ Chase DNSSEC signature chains. Requires dig be compiled with
|
||||
-DDIG_SIGCHASE.
|
||||
</para></listitem></varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>+trusted-key=####</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies a file containing trusted keys to be used with
|
||||
<option>+sigchase</option>. Each DNSKEY record must be
|
||||
on its own line.
|
||||
</para>
|
||||
<para>
|
||||
If not specified <command>dig</command> will look for
|
||||
<filename>/etc/trusted-key.key</filename> then
|
||||
<filename>trusted-key.key</filename> in the current directory.
|
||||
</para>
|
||||
<para>
|
||||
Requires dig be compiled with -DDIG_SIGCHASE.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry><term><option>+trusted-key=####</option></term>
|
||||
<listitem><para>
|
||||
Specify a trusted key to be used with <option>+sigchase</option>.
|
||||
Requires dig be compiled with -DDIG_SIGCHASE.
|
||||
</para></listitem></varlistentry>
|
||||
|
||||
<varlistentry><term><option>+[no]topdown</option></term>
|
||||
<listitem><para>
|
||||
|
||||
+1092
-432
File diff suppressed because it is too large.
Load diff
+530
-549
File diff suppressed because it is too large.
Load diff
+91
-145
@@ -1,184 +1,132 @@
|
||||
.\" Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2000-2002 Internet Software Consortium.
|
||||
.\"
|
||||
.\" Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2000-2002 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 ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
.\" REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
.\" AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
.\" AND FITNESS. IN NO EVENT SHALL ISC 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: host.1,v 1.11.2.1.4.8 2006/06/29 13:02:30 marka Exp $
|
||||
.\" $Id: host.1,v 1.11.2.1.4.4 2004/04/13 04:11:03 marka Exp $
|
||||
.\"
|
||||
.hy 0
|
||||
.ad l
|
||||
.\" Title: host
|
||||
.\" Author:
|
||||
.\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
|
||||
.\" Date: Jun 30, 2000
|
||||
.\" Manual: BIND9
|
||||
.\" Source: BIND9
|
||||
.\"
|
||||
.TH "HOST" "1" "Jun 30, 2000" "BIND9" "BIND9"
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.SH "NAME"
|
||||
.TH "HOST" "1" "Jun 30, 2000" "BIND9" ""
|
||||
.SH NAME
|
||||
host \- DNS lookup utility
|
||||
.SH "SYNOPSIS"
|
||||
.HP 5
|
||||
\fBhost\fR [\fB\-aCdlnrTwv\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-N\ \fR\fB\fIndots\fR\fR] [\fB\-R\ \fR\fB\fInumber\fR\fR] [\fB\-t\ \fR\fB\fItype\fR\fR] [\fB\-W\ \fR\fB\fIwait\fR\fR] [\fB\-4\fR] [\fB\-6\fR] {name} [server]
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
\fBhost\fR [ \fB-aCdlnrTwv\fR ] [ \fB-c \fIclass\fB\fR ] [ \fB-N \fIndots\fB\fR ] [ \fB-R \fInumber\fB\fR ] [ \fB-t \fItype\fB\fR ] [ \fB-W \fIwait\fB\fR ] [ \fB-4\fR ] [ \fB-6\fR ] \fBname\fR [ \fBserver\fR ]
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
\fBhost\fR
|
||||
is a simple utility for performing DNS lookups. It is normally used to convert names to IP addresses and vice versa. When no arguments or options are given,
|
||||
is a simple utility for performing DNS lookups.
|
||||
It is normally used to convert names to IP addresses and vice versa.
|
||||
When no arguments or options are given,
|
||||
\fBhost\fR
|
||||
prints a short summary of its command line arguments and options.
|
||||
.PP
|
||||
\fIname\fR
|
||||
is the domain name that is to be looked up. It can also be a dotted\-decimal IPv4 address or a colon\-delimited IPv6 address, in which case
|
||||
\fBhost\fR
|
||||
will by default perform a reverse lookup for that address.
|
||||
\fIserver\fR
|
||||
is an optional argument which is either the name or IP address of the name server that
|
||||
\fBhost\fR
|
||||
\fIname\fR is the domain name that is to be looked
|
||||
up. It can also be a dotted-decimal IPv4 address or a colon-delimited
|
||||
IPv6 address, in which case \fBhost\fR will by default
|
||||
perform a reverse lookup for that address.
|
||||
\fIserver\fR is an optional argument which is either
|
||||
the name or IP address of the name server that \fBhost\fR
|
||||
should query instead of the server or servers listed in
|
||||
\fI/etc/resolv.conf\fR.
|
||||
.PP
|
||||
The
|
||||
\fB\-a\fR
|
||||
(all) option is equivalent to setting the
|
||||
\fB\-v\fR
|
||||
option and asking
|
||||
\fBhost\fR
|
||||
to make a query of type ANY.
|
||||
The \fB-a\fR (all) option is equivalent to setting the
|
||||
\fB-v\fR option and asking \fBhost\fR to make
|
||||
a query of type ANY.
|
||||
.PP
|
||||
When the
|
||||
\fB\-C\fR
|
||||
option is used,
|
||||
\fBhost\fR
|
||||
When the \fB-C\fR option is used, \fBhost\fR
|
||||
will attempt to display the SOA records for zone
|
||||
\fIname\fR
|
||||
from all the listed authoritative name servers for that zone. The list of name servers is defined by the NS records that are found for the zone.
|
||||
\fIname\fR from all the listed authoritative name
|
||||
servers for that zone. The list of name servers is defined by the NS
|
||||
records that are found for the zone.
|
||||
.PP
|
||||
The
|
||||
\fB\-c\fR
|
||||
option instructs to make a DNS query of class
|
||||
\fIclass\fR. This can be used to lookup Hesiod or Chaosnet class resource records. The default class is IN (Internet).
|
||||
The \fB-c\fR option instructs to make a DNS query of class
|
||||
\fIclass\fR. This can be used to lookup Hesiod or
|
||||
Chaosnet class resource records. The default class is IN (Internet).
|
||||
.PP
|
||||
Verbose output is generated by
|
||||
\fBhost\fR
|
||||
when the
|
||||
\fB\-d\fR
|
||||
or
|
||||
\fB\-v\fR
|
||||
option is used. The two options are equivalent. They have been provided for backwards compatibility. In previous versions, the
|
||||
\fB\-d\fR
|
||||
option switched on debugging traces and
|
||||
\fB\-v\fR
|
||||
enabled verbose output.
|
||||
Verbose output is generated by \fBhost\fR when the
|
||||
\fB-d\fR or \fB-v\fR option is used. The two
|
||||
options are equivalent. They have been provided for backwards
|
||||
compatibility. In previous versions, the \fB-d\fR option
|
||||
switched on debugging traces and \fB-v\fR enabled verbose
|
||||
output.
|
||||
.PP
|
||||
List mode is selected by the
|
||||
\fB\-l\fR
|
||||
option. This makes
|
||||
\fBhost\fR
|
||||
perform a zone transfer for zone
|
||||
\fIname\fR. Transfer the zone printing out the NS, PTR and address records (A/AAAA). If combined with
|
||||
\fB\-a\fR
|
||||
all records will be printed.
|
||||
List mode is selected by the \fB-l\fR option. This makes
|
||||
\fBhost\fR perform a zone transfer for zone
|
||||
\fIname\fR. Transfer the zone printing out the NS, PTR
|
||||
and address records (A/AAAA). If combined with \fB-a\fR
|
||||
all records will be printed.
|
||||
.PP
|
||||
The
|
||||
\fB\-i\fR
|
||||
option specifies that reverse lookups of IPv6 addresses should use the IP6.INT domain as defined in RFC1886. The default is to use IP6.ARPA.
|
||||
The \fB-i\fR
|
||||
option specifies that reverse lookups of IPv6 addresses should
|
||||
use the IP6.INT domain as defined in RFC1886.
|
||||
The default is to use IP6.ARPA.
|
||||
.PP
|
||||
The
|
||||
\fB\-N\fR
|
||||
option sets the number of dots that have to be in
|
||||
\fIname\fR
|
||||
for it to be considered absolute. The default value is that defined using the ndots statement in
|
||||
\fI/etc/resolv.conf\fR, or 1 if no ndots statement is present. Names with fewer dots are interpreted as relative names and will be searched for in the domains listed in the
|
||||
\fBsearch\fR
|
||||
or
|
||||
\fBdomain\fR
|
||||
directive in
|
||||
The \fB-N\fR option sets the number of dots that have to be
|
||||
in \fIname\fR for it to be considered absolute. The
|
||||
default value is that defined using the ndots statement in
|
||||
\fI/etc/resolv.conf\fR, or 1 if no ndots statement is
|
||||
present. Names with fewer dots are interpreted as relative names and
|
||||
will be searched for in the domains listed in the \fBsearch\fR
|
||||
or \fBdomain\fR directive in
|
||||
\fI/etc/resolv.conf\fR.
|
||||
.PP
|
||||
The number of UDP retries for a lookup can be changed with the
|
||||
\fB\-R\fR
|
||||
option.
|
||||
\fInumber\fR
|
||||
indicates how many times
|
||||
\fBhost\fR
|
||||
will repeat a query that does not get answered. The default number of retries is 1. If
|
||||
\fInumber\fR
|
||||
is negative or zero, the number of retries will default to 1.
|
||||
\fB-R\fR option. \fInumber\fR indicates
|
||||
how many times \fBhost\fR will repeat a query that does
|
||||
not get answered. The default number of retries is 1. If
|
||||
\fInumber\fR is negative or zero, the number of
|
||||
retries will default to 1.
|
||||
.PP
|
||||
Non\-recursive queries can be made via the
|
||||
\fB\-r\fR
|
||||
option. Setting this option clears the
|
||||
\fBRD\fR
|
||||
\(em recursion desired \(em bit in the query which
|
||||
\fBhost\fR
|
||||
makes. This should mean that the name server receiving the query will not attempt to resolve
|
||||
\fIname\fR. The
|
||||
\fB\-r\fR
|
||||
option enables
|
||||
\fBhost\fR
|
||||
to mimic the behaviour of a name server by making non\-recursive queries and expecting to receive answers to those queries that are usually referrals to other name servers.
|
||||
Non-recursive queries can be made via the \fB-r\fR option.
|
||||
Setting this option clears the \fBRD\fR \(em recursion
|
||||
desired \(em bit in the query which \fBhost\fR makes.
|
||||
This should mean that the name server receiving the query will not
|
||||
attempt to resolve \fIname\fR. The
|
||||
\fB-r\fR option enables \fBhost\fR to mimic
|
||||
the behaviour of a name server by making non-recursive queries and
|
||||
expecting to receive answers to those queries that are usually
|
||||
referrals to other name servers.
|
||||
.PP
|
||||
By default
|
||||
\fBhost\fR
|
||||
uses UDP when making queries. The
|
||||
\fB\-T\fR
|
||||
option makes it use a TCP connection when querying the name server. TCP will be automatically selected for queries that require it, such as zone transfer (AXFR) requests.
|
||||
By default \fBhost\fR uses UDP when making queries. The
|
||||
\fB-T\fR option makes it use a TCP connection when querying
|
||||
the name server. TCP will be automatically selected for queries that
|
||||
require it, such as zone transfer (AXFR) requests.
|
||||
.PP
|
||||
The
|
||||
\fB\-4\fR
|
||||
option forces
|
||||
\fBhost\fR
|
||||
to only use IPv4 query transport. The
|
||||
\fB\-6\fR
|
||||
option forces
|
||||
\fBhost\fR
|
||||
to only use IPv6 query transport.
|
||||
The \fB-4\fR option forces \fBhost\fR to only
|
||||
use IPv4 query transport. The \fB-6\fR option forces
|
||||
\fBhost\fR to only use IPv6 query transport.
|
||||
.PP
|
||||
The
|
||||
\fB\-t\fR
|
||||
option is used to select the query type.
|
||||
\fItype\fR
|
||||
can be any recognised query type: CNAME, NS, SOA, SIG, KEY, AXFR, etc. When no query type is specified,
|
||||
\fBhost\fR
|
||||
automatically selects an appropriate query type. By default it looks for A records, but if the
|
||||
\fB\-C\fR
|
||||
option was given, queries will be made for SOA records, and if
|
||||
\fIname\fR
|
||||
is a dotted\-decimal IPv4 address or colon\-delimited IPv6 address,
|
||||
\fBhost\fR
|
||||
will query for PTR records. If a query type of IXFR is chosen the starting serial number can be specified by appending an equal followed by the starting serial number (e.g. \-t IXFR=12345678).
|
||||
The \fB-t\fR option is used to select the query type.
|
||||
\fItype\fR can be any recognised query type: CNAME,
|
||||
NS, SOA, SIG, KEY, AXFR, etc. When no query type is specified,
|
||||
\fBhost\fR automatically selects an appropriate query
|
||||
type. By default it looks for A records, but if the
|
||||
\fB-C\fR option was given, queries will be made for SOA
|
||||
records, and if \fIname\fR is a dotted-decimal IPv4
|
||||
address or colon-delimited IPv6 address, \fBhost\fR will
|
||||
query for PTR records. If a query type of IXFR is chosen the starting
|
||||
serial number can be specified by appending an equal followed by the
|
||||
starting serial number (e.g. -t IXFR=12345678).
|
||||
.PP
|
||||
The time to wait for a reply can be controlled through the
|
||||
\fB\-W\fR
|
||||
and
|
||||
\fB\-w\fR
|
||||
options. The
|
||||
\fB\-W\fR
|
||||
option makes
|
||||
\fBhost\fR
|
||||
wait for
|
||||
\fIwait\fR
|
||||
seconds. If
|
||||
\fIwait\fR
|
||||
\fB-W\fR and \fB-w\fR options. The
|
||||
\fB-W\fR option makes \fBhost\fR wait for
|
||||
\fIwait\fR seconds. If \fIwait\fR
|
||||
is less than one, the wait interval is set to one second. When the
|
||||
\fB\-w\fR
|
||||
option is used,
|
||||
\fBhost\fR
|
||||
will effectively wait forever for a reply. The time to wait for a response will be set to the number of seconds given by the hardware's maximum value for an integer quantity.
|
||||
\fB-w\fR option is used, \fBhost\fR will
|
||||
effectively wait forever for a reply. The time to wait for a response
|
||||
will be set to the number of seconds given by the hardware's maximum
|
||||
value for an integer quantity.
|
||||
.SH "FILES"
|
||||
.PP
|
||||
\fI/etc/resolv.conf\fR
|
||||
@@ -186,5 +134,3 @@ will effectively wait forever for a reply. The time to wait for a response will
|
||||
.PP
|
||||
\fBdig\fR(1),
|
||||
\fBnamed\fR(8).
|
||||
.SH "COPYRIGHT"
|
||||
Copyright \(co 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2000-2003 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: host.c,v 1.76.2.5.2.16 2006/05/23 04:43:47 marka Exp $ */
|
||||
/* $Id: host.c,v 1.76.2.5.2.9 2004/04/13 03:00:06 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
#include <limits.h>
|
||||
@@ -37,16 +37,29 @@
|
||||
#include <dns/rdataclass.h>
|
||||
#include <dns/rdataset.h>
|
||||
#include <dns/rdatatype.h>
|
||||
#include <dns/rdatastruct.h>
|
||||
|
||||
#include <dig/dig.h>
|
||||
|
||||
extern ISC_LIST(dig_lookup_t) lookup_list;
|
||||
extern dig_serverlist_t server_list;
|
||||
extern ISC_LIST(dig_searchlist_t) search_list;
|
||||
|
||||
extern isc_boolean_t have_ipv4, have_ipv6;
|
||||
extern isc_boolean_t usesearch;
|
||||
extern isc_boolean_t debugging;
|
||||
extern unsigned int timeout;
|
||||
extern isc_mem_t *mctx;
|
||||
extern int ndots;
|
||||
extern int tries;
|
||||
extern char *progname;
|
||||
extern isc_task_t *global_task;
|
||||
extern int fatalexit;
|
||||
|
||||
static isc_boolean_t short_form = ISC_TRUE, listed_server = ISC_FALSE;
|
||||
static isc_boolean_t default_lookups = ISC_TRUE;
|
||||
static int seen_error = -1;
|
||||
static isc_boolean_t list_addresses = ISC_TRUE;
|
||||
static dns_rdatatype_t list_type = dns_rdatatype_a;
|
||||
static isc_boolean_t printed_server = ISC_FALSE;
|
||||
|
||||
static const char *opcodetext[] = {
|
||||
"QUERY",
|
||||
@@ -353,32 +366,6 @@ printrdata(dns_message_t *msg, dns_rdataset_t *rdataset, dns_name_t *owner,
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static void
|
||||
chase_cnamechain(dns_message_t *msg, dns_name_t *qname) {
|
||||
isc_result_t result;
|
||||
dns_rdataset_t *rdataset;
|
||||
dns_rdata_cname_t cname;
|
||||
dns_rdata_t rdata = DNS_RDATA_INIT;
|
||||
unsigned int i = msg->counts[DNS_SECTION_ANSWER];
|
||||
|
||||
while (i-- > 0) {
|
||||
rdataset = NULL;
|
||||
result = dns_message_findname(msg, DNS_SECTION_ANSWER, qname,
|
||||
dns_rdatatype_cname, 0, NULL,
|
||||
&rdataset);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return;
|
||||
result = dns_rdataset_first(rdataset);
|
||||
check_result(result, "dns_rdataset_first");
|
||||
dns_rdata_reset(&rdata);
|
||||
dns_rdataset_current(rdataset, &rdata);
|
||||
result = dns_rdata_tostruct(&rdata, &cname, NULL);
|
||||
check_result(result, "dns_rdata_tostruct");
|
||||
dns_name_copy(&cname.cname, qname, NULL);
|
||||
dns_rdata_freestruct(&cname);
|
||||
}
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
|
||||
isc_boolean_t did_flag = ISC_FALSE;
|
||||
@@ -395,16 +382,15 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
|
||||
*/
|
||||
force_error = (seen_error == 1) ? 1 : 0;
|
||||
seen_error = 1;
|
||||
if (listed_server && !printed_server) {
|
||||
if (listed_server) {
|
||||
char sockstr[ISC_SOCKADDR_FORMATSIZE];
|
||||
|
||||
printf("Using domain server:\n");
|
||||
printf("Name: %s\n", query->userarg);
|
||||
printf("Name: %s\n", query->servname);
|
||||
isc_sockaddr_format(&query->sockaddr, sockstr,
|
||||
sizeof(sockstr));
|
||||
printf("Address: %s\n", sockstr);
|
||||
printf("Aliases: \n\n");
|
||||
printed_server = ISC_TRUE;
|
||||
}
|
||||
|
||||
if (msg->rcode != 0) {
|
||||
@@ -418,15 +404,10 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
|
||||
if (default_lookups && query->lookup->rdtype == dns_rdatatype_a) {
|
||||
char namestr[DNS_NAME_FORMATSIZE];
|
||||
dig_lookup_t *lookup;
|
||||
dns_fixedname_t fixed;
|
||||
dns_name_t *name;
|
||||
|
||||
/* Add AAAA and MX lookups. */
|
||||
dns_fixedname_init(&fixed);
|
||||
name = dns_fixedname_name(&fixed);
|
||||
dns_name_copy(query->lookup->name, name, NULL);
|
||||
chase_cnamechain(msg, name);
|
||||
dns_name_format(name, namestr, sizeof(namestr));
|
||||
|
||||
dns_name_format(query->lookup->name, namestr, sizeof(namestr));
|
||||
lookup = clone_lookup(query->lookup, ISC_FALSE);
|
||||
if (lookup != NULL) {
|
||||
strncpy(lookup->textname, namestr,
|
||||
@@ -623,7 +604,6 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
|
||||
} else
|
||||
list_type = rdtype;
|
||||
list_addresses = ISC_FALSE;
|
||||
default_lookups = ISC_FALSE;
|
||||
break;
|
||||
case 'c':
|
||||
tr.base = isc_commandline_argument;
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
|
||||
[<!ENTITY mdash "—">]>
|
||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
|
||||
<!--
|
||||
- Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2000-2002 Internet Software Consortium.
|
||||
-
|
||||
- Permission to use, copy, modify, and distribute this software for any
|
||||
@@ -18,7 +16,7 @@
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
|
||||
<!-- $Id: host.docbook,v 1.2.2.2.4.7 2005/05/13 01:22:32 marka Exp $ -->
|
||||
<!-- $Id: host.docbook,v 1.2.2.2.4.5 2004/04/13 01:26:26 marka Exp $ -->
|
||||
|
||||
<refentry>
|
||||
|
||||
@@ -32,20 +30,6 @@
|
||||
<refmiscinfo>BIND9</refmiscinfo>
|
||||
</refmeta>
|
||||
|
||||
<docinfo>
|
||||
<copyright>
|
||||
<year>2004</year>
|
||||
<year>2005</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
<copyright>
|
||||
<year>2000</year>
|
||||
<year>2001</year>
|
||||
<year>2002</year>
|
||||
<holder>Internet Software Consortium.</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
<refnamediv>
|
||||
<refname>host</refname>
|
||||
<refpurpose>DNS lookup utility</refpurpose>
|
||||
@@ -62,8 +46,8 @@
|
||||
<arg><option>-W <replaceable class="parameter">wait</replaceable></option></arg>
|
||||
<arg><option>-4</option></arg>
|
||||
<arg><option>-6</option></arg>
|
||||
<arg choice="req">name</arg>
|
||||
<arg choice="opt">server</arg>
|
||||
<arg choice=req>name</arg>
|
||||
<arg choice=opt>server</arg>
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
|
||||
|
||||
+398
-135
@@ -1,171 +1,434 @@
|
||||
<!--
|
||||
- Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2000-2002 Internet Software Consortium.
|
||||
-
|
||||
- Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2000-2002 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 ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
- AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
- AND FITNESS. IN NO EVENT SHALL ISC 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: host.html,v 1.4.2.1.4.14 2006/06/29 13:02:30 marka Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>host</title>
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
|
||||
<a name="id2482688"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2>Name</h2>
|
||||
<p>host — DNS lookup utility</p>
|
||||
</div>
|
||||
<div class="refsynopsisdiv">
|
||||
<h2>Synopsis</h2>
|
||||
<div class="cmdsynopsis"><p><code class="command">host</code> [<code class="option">-aCdlnrTwv</code>] [<code class="option">-c <em class="replaceable"><code>class</code></em></code>] [<code class="option">-N <em class="replaceable"><code>ndots</code></em></code>] [<code class="option">-R <em class="replaceable"><code>number</code></em></code>] [<code class="option">-t <em class="replaceable"><code>type</code></em></code>] [<code class="option">-W <em class="replaceable"><code>wait</code></em></code>] [<code class="option">-4</code>] [<code class="option">-6</code>] {name} [server]</p></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549466"></a><h2>DESCRIPTION</h2>
|
||||
<p>
|
||||
<span><strong class="command">host</strong></span>
|
||||
|
||||
<!-- $Id: host.html,v 1.4.2.1.4.6 2004/08/22 23:38:58 marka Exp $ -->
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<HTML
|
||||
><HEAD
|
||||
><TITLE
|
||||
>host</TITLE
|
||||
><META
|
||||
NAME="GENERATOR"
|
||||
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"></HEAD
|
||||
><BODY
|
||||
CLASS="REFENTRY"
|
||||
BGCOLOR="#FFFFFF"
|
||||
TEXT="#000000"
|
||||
LINK="#0000FF"
|
||||
VLINK="#840084"
|
||||
ALINK="#0000FF"
|
||||
><H1
|
||||
><A
|
||||
NAME="AEN1"
|
||||
></A
|
||||
>host</H1
|
||||
><DIV
|
||||
CLASS="REFNAMEDIV"
|
||||
><A
|
||||
NAME="AEN8"
|
||||
></A
|
||||
><H2
|
||||
>Name</H2
|
||||
>host -- DNS lookup utility</DIV
|
||||
><DIV
|
||||
CLASS="REFSYNOPSISDIV"
|
||||
><A
|
||||
NAME="AEN11"
|
||||
></A
|
||||
><H2
|
||||
>Synopsis</H2
|
||||
><P
|
||||
><B
|
||||
CLASS="COMMAND"
|
||||
>host</B
|
||||
> [<VAR
|
||||
CLASS="OPTION"
|
||||
>-aCdlnrTwv</VAR
|
||||
>] [<VAR
|
||||
CLASS="OPTION"
|
||||
>-c <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>class</VAR
|
||||
></VAR
|
||||
>] [<VAR
|
||||
CLASS="OPTION"
|
||||
>-N <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>ndots</VAR
|
||||
></VAR
|
||||
>] [<VAR
|
||||
CLASS="OPTION"
|
||||
>-R <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>number</VAR
|
||||
></VAR
|
||||
>] [<VAR
|
||||
CLASS="OPTION"
|
||||
>-t <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>type</VAR
|
||||
></VAR
|
||||
>] [<VAR
|
||||
CLASS="OPTION"
|
||||
>-W <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>wait</VAR
|
||||
></VAR
|
||||
>] [<VAR
|
||||
CLASS="OPTION"
|
||||
>-4</VAR
|
||||
>] [<VAR
|
||||
CLASS="OPTION"
|
||||
>-6</VAR
|
||||
>] {name} [server]</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN37"
|
||||
></A
|
||||
><H2
|
||||
>DESCRIPTION</H2
|
||||
><P
|
||||
><B
|
||||
CLASS="COMMAND"
|
||||
>host</B
|
||||
>
|
||||
is a simple utility for performing DNS lookups.
|
||||
It is normally used to convert names to IP addresses and vice versa.
|
||||
When no arguments or options are given,
|
||||
<span><strong class="command">host</strong></span>
|
||||
prints a short summary of its command line arguments and options.
|
||||
</p>
|
||||
<p>
|
||||
<em class="parameter"><code>name</code></em> is the domain name that is to be looked
|
||||
<B
|
||||
CLASS="COMMAND"
|
||||
>host</B
|
||||
>
|
||||
prints a short summary of its command line arguments and options.</P
|
||||
><P
|
||||
><VAR
|
||||
CLASS="PARAMETER"
|
||||
>name</VAR
|
||||
> is the domain name that is to be looked
|
||||
up. It can also be a dotted-decimal IPv4 address or a colon-delimited
|
||||
IPv6 address, in which case <span><strong class="command">host</strong></span> will by default
|
||||
IPv6 address, in which case <B
|
||||
CLASS="COMMAND"
|
||||
>host</B
|
||||
> will by default
|
||||
perform a reverse lookup for that address.
|
||||
<em class="parameter"><code>server</code></em> is an optional argument which is either
|
||||
the name or IP address of the name server that <span><strong class="command">host</strong></span>
|
||||
<VAR
|
||||
CLASS="PARAMETER"
|
||||
>server</VAR
|
||||
> is an optional argument which is either
|
||||
the name or IP address of the name server that <B
|
||||
CLASS="COMMAND"
|
||||
>host</B
|
||||
>
|
||||
should query instead of the server or servers listed in
|
||||
<code class="filename">/etc/resolv.conf</code>.
|
||||
</p>
|
||||
<p>
|
||||
The <code class="option">-a</code> (all) option is equivalent to setting the
|
||||
<code class="option">-v</code> option and asking <span><strong class="command">host</strong></span> to make
|
||||
a query of type ANY.
|
||||
</p>
|
||||
<p>
|
||||
When the <code class="option">-C</code> option is used, <span><strong class="command">host</strong></span>
|
||||
<TT
|
||||
CLASS="FILENAME"
|
||||
>/etc/resolv.conf</TT
|
||||
>.</P
|
||||
><P
|
||||
>The <VAR
|
||||
CLASS="OPTION"
|
||||
>-a</VAR
|
||||
> (all) option is equivalent to setting the
|
||||
<VAR
|
||||
CLASS="OPTION"
|
||||
>-v</VAR
|
||||
> option and asking <B
|
||||
CLASS="COMMAND"
|
||||
>host</B
|
||||
> to make
|
||||
a query of type ANY.</P
|
||||
><P
|
||||
>When the <VAR
|
||||
CLASS="OPTION"
|
||||
>-C</VAR
|
||||
> option is used, <B
|
||||
CLASS="COMMAND"
|
||||
>host</B
|
||||
>
|
||||
will attempt to display the SOA records for zone
|
||||
<em class="parameter"><code>name</code></em> from all the listed authoritative name
|
||||
<VAR
|
||||
CLASS="PARAMETER"
|
||||
>name</VAR
|
||||
> from all the listed authoritative name
|
||||
servers for that zone. The list of name servers is defined by the NS
|
||||
records that are found for the zone.
|
||||
</p>
|
||||
<p>
|
||||
The <code class="option">-c</code> option instructs to make a DNS query of class
|
||||
<em class="parameter"><code>class</code></em>. This can be used to lookup Hesiod or
|
||||
Chaosnet class resource records. The default class is IN (Internet).
|
||||
</p>
|
||||
<p>
|
||||
Verbose output is generated by <span><strong class="command">host</strong></span> when the
|
||||
<code class="option">-d</code> or <code class="option">-v</code> option is used. The two
|
||||
records that are found for the zone.</P
|
||||
><P
|
||||
>The <VAR
|
||||
CLASS="OPTION"
|
||||
>-c</VAR
|
||||
> option instructs to make a DNS query of class
|
||||
<VAR
|
||||
CLASS="PARAMETER"
|
||||
>class</VAR
|
||||
>. This can be used to lookup Hesiod or
|
||||
Chaosnet class resource records. The default class is IN (Internet).</P
|
||||
><P
|
||||
>Verbose output is generated by <B
|
||||
CLASS="COMMAND"
|
||||
>host</B
|
||||
> when the
|
||||
<VAR
|
||||
CLASS="OPTION"
|
||||
>-d</VAR
|
||||
> or <VAR
|
||||
CLASS="OPTION"
|
||||
>-v</VAR
|
||||
> option is used. The two
|
||||
options are equivalent. They have been provided for backwards
|
||||
compatibility. In previous versions, the <code class="option">-d</code> option
|
||||
switched on debugging traces and <code class="option">-v</code> enabled verbose
|
||||
output.
|
||||
</p>
|
||||
<p>
|
||||
List mode is selected by the <code class="option">-l</code> option. This makes
|
||||
<span><strong class="command">host</strong></span> perform a zone transfer for zone
|
||||
<em class="parameter"><code>name</code></em>. Transfer the zone printing out the NS, PTR
|
||||
and address records (A/AAAA). If combined with <code class="option">-a</code>
|
||||
all records will be printed.
|
||||
</p>
|
||||
<p>
|
||||
The <code class="option">-i</code>
|
||||
compatibility. In previous versions, the <VAR
|
||||
CLASS="OPTION"
|
||||
>-d</VAR
|
||||
> option
|
||||
switched on debugging traces and <VAR
|
||||
CLASS="OPTION"
|
||||
>-v</VAR
|
||||
> enabled verbose
|
||||
output.</P
|
||||
><P
|
||||
>List mode is selected by the <VAR
|
||||
CLASS="OPTION"
|
||||
>-l</VAR
|
||||
> option. This makes
|
||||
<B
|
||||
CLASS="COMMAND"
|
||||
>host</B
|
||||
> perform a zone transfer for zone
|
||||
<VAR
|
||||
CLASS="PARAMETER"
|
||||
>name</VAR
|
||||
>. Transfer the zone printing out the NS, PTR
|
||||
and address records (A/AAAA). If combined with <VAR
|
||||
CLASS="OPTION"
|
||||
>-a</VAR
|
||||
>
|
||||
all records will be printed. </P
|
||||
><P
|
||||
>The <VAR
|
||||
CLASS="OPTION"
|
||||
>-i</VAR
|
||||
>
|
||||
option specifies that reverse lookups of IPv6 addresses should
|
||||
use the IP6.INT domain as defined in RFC1886.
|
||||
The default is to use IP6.ARPA.
|
||||
</p>
|
||||
<p>
|
||||
The <code class="option">-N</code> option sets the number of dots that have to be
|
||||
in <em class="parameter"><code>name</code></em> for it to be considered absolute. The
|
||||
The default is to use IP6.ARPA.</P
|
||||
><P
|
||||
>The <VAR
|
||||
CLASS="OPTION"
|
||||
>-N</VAR
|
||||
> option sets the number of dots that have to be
|
||||
in <VAR
|
||||
CLASS="PARAMETER"
|
||||
>name</VAR
|
||||
> for it to be considered absolute. The
|
||||
default value is that defined using the ndots statement in
|
||||
<code class="filename">/etc/resolv.conf</code>, or 1 if no ndots statement is
|
||||
<TT
|
||||
CLASS="FILENAME"
|
||||
>/etc/resolv.conf</TT
|
||||
>, or 1 if no ndots statement is
|
||||
present. Names with fewer dots are interpreted as relative names and
|
||||
will be searched for in the domains listed in the <span class="type">search</span>
|
||||
or <span class="type">domain</span> directive in
|
||||
<code class="filename">/etc/resolv.conf</code>.
|
||||
</p>
|
||||
<p>
|
||||
The number of UDP retries for a lookup can be changed with the
|
||||
<code class="option">-R</code> option. <em class="parameter"><code>number</code></em> indicates
|
||||
how many times <span><strong class="command">host</strong></span> will repeat a query that does
|
||||
will be searched for in the domains listed in the <SPAN
|
||||
CLASS="TYPE"
|
||||
>search</SPAN
|
||||
>
|
||||
or <SPAN
|
||||
CLASS="TYPE"
|
||||
>domain</SPAN
|
||||
> directive in
|
||||
<TT
|
||||
CLASS="FILENAME"
|
||||
>/etc/resolv.conf</TT
|
||||
>.</P
|
||||
><P
|
||||
>The number of UDP retries for a lookup can be changed with the
|
||||
<VAR
|
||||
CLASS="OPTION"
|
||||
>-R</VAR
|
||||
> option. <VAR
|
||||
CLASS="PARAMETER"
|
||||
>number</VAR
|
||||
> indicates
|
||||
how many times <B
|
||||
CLASS="COMMAND"
|
||||
>host</B
|
||||
> will repeat a query that does
|
||||
not get answered. The default number of retries is 1. If
|
||||
<em class="parameter"><code>number</code></em> is negative or zero, the number of
|
||||
retries will default to 1.
|
||||
</p>
|
||||
<p>
|
||||
Non-recursive queries can be made via the <code class="option">-r</code> option.
|
||||
Setting this option clears the <span class="type">RD</span> — recursion
|
||||
desired — bit in the query which <span><strong class="command">host</strong></span> makes.
|
||||
<VAR
|
||||
CLASS="PARAMETER"
|
||||
>number</VAR
|
||||
> is negative or zero, the number of
|
||||
retries will default to 1.</P
|
||||
><P
|
||||
>Non-recursive queries can be made via the <VAR
|
||||
CLASS="OPTION"
|
||||
>-r</VAR
|
||||
> option.
|
||||
Setting this option clears the <SPAN
|
||||
CLASS="TYPE"
|
||||
>RD</SPAN
|
||||
> — recursion
|
||||
desired — bit in the query which <B
|
||||
CLASS="COMMAND"
|
||||
>host</B
|
||||
> makes.
|
||||
This should mean that the name server receiving the query will not
|
||||
attempt to resolve <em class="parameter"><code>name</code></em>. The
|
||||
<code class="option">-r</code> option enables <span><strong class="command">host</strong></span> to mimic
|
||||
attempt to resolve <VAR
|
||||
CLASS="PARAMETER"
|
||||
>name</VAR
|
||||
>. The
|
||||
<VAR
|
||||
CLASS="OPTION"
|
||||
>-r</VAR
|
||||
> option enables <B
|
||||
CLASS="COMMAND"
|
||||
>host</B
|
||||
> to mimic
|
||||
the behaviour of a name server by making non-recursive queries and
|
||||
expecting to receive answers to those queries that are usually
|
||||
referrals to other name servers.
|
||||
</p>
|
||||
<p>
|
||||
By default <span><strong class="command">host</strong></span> uses UDP when making queries. The
|
||||
<code class="option">-T</code> option makes it use a TCP connection when querying
|
||||
referrals to other name servers.</P
|
||||
><P
|
||||
>By default <B
|
||||
CLASS="COMMAND"
|
||||
>host</B
|
||||
> uses UDP when making queries. The
|
||||
<VAR
|
||||
CLASS="OPTION"
|
||||
>-T</VAR
|
||||
> option makes it use a TCP connection when querying
|
||||
the name server. TCP will be automatically selected for queries that
|
||||
require it, such as zone transfer (AXFR) requests.
|
||||
</p>
|
||||
<p>
|
||||
The <code class="option">-4</code> option forces <span><strong class="command">host</strong></span> to only
|
||||
use IPv4 query transport. The <code class="option">-6</code> option forces
|
||||
<span><strong class="command">host</strong></span> to only use IPv6 query transport.
|
||||
</p>
|
||||
<p>
|
||||
The <code class="option">-t</code> option is used to select the query type.
|
||||
<em class="parameter"><code>type</code></em> can be any recognised query type: CNAME,
|
||||
require it, such as zone transfer (AXFR) requests.</P
|
||||
><P
|
||||
>The <VAR
|
||||
CLASS="OPTION"
|
||||
>-4</VAR
|
||||
> option forces <B
|
||||
CLASS="COMMAND"
|
||||
>host</B
|
||||
> to only
|
||||
use IPv4 query transport. The <VAR
|
||||
CLASS="OPTION"
|
||||
>-6</VAR
|
||||
> option forces
|
||||
<B
|
||||
CLASS="COMMAND"
|
||||
>host</B
|
||||
> to only use IPv6 query transport.</P
|
||||
><P
|
||||
>The <VAR
|
||||
CLASS="OPTION"
|
||||
>-t</VAR
|
||||
> option is used to select the query type.
|
||||
<VAR
|
||||
CLASS="PARAMETER"
|
||||
>type</VAR
|
||||
> can be any recognised query type: CNAME,
|
||||
NS, SOA, SIG, KEY, AXFR, etc. When no query type is specified,
|
||||
<span><strong class="command">host</strong></span> automatically selects an appropriate query
|
||||
<B
|
||||
CLASS="COMMAND"
|
||||
>host</B
|
||||
> automatically selects an appropriate query
|
||||
type. By default it looks for A records, but if the
|
||||
<code class="option">-C</code> option was given, queries will be made for SOA
|
||||
records, and if <em class="parameter"><code>name</code></em> is a dotted-decimal IPv4
|
||||
address or colon-delimited IPv6 address, <span><strong class="command">host</strong></span> will
|
||||
<VAR
|
||||
CLASS="OPTION"
|
||||
>-C</VAR
|
||||
> option was given, queries will be made for SOA
|
||||
records, and if <VAR
|
||||
CLASS="PARAMETER"
|
||||
>name</VAR
|
||||
> is a dotted-decimal IPv4
|
||||
address or colon-delimited IPv6 address, <B
|
||||
CLASS="COMMAND"
|
||||
>host</B
|
||||
> will
|
||||
query for PTR records. If a query type of IXFR is chosen the starting
|
||||
serial number can be specified by appending an equal followed by the
|
||||
starting serial number (e.g. -t IXFR=12345678).
|
||||
</p>
|
||||
<p>
|
||||
The time to wait for a reply can be controlled through the
|
||||
<code class="option">-W</code> and <code class="option">-w</code> options. The
|
||||
<code class="option">-W</code> option makes <span><strong class="command">host</strong></span> wait for
|
||||
<em class="parameter"><code>wait</code></em> seconds. If <em class="parameter"><code>wait</code></em>
|
||||
starting serial number (e.g. -t IXFR=12345678).</P
|
||||
><P
|
||||
>The time to wait for a reply can be controlled through the
|
||||
<VAR
|
||||
CLASS="OPTION"
|
||||
>-W</VAR
|
||||
> and <VAR
|
||||
CLASS="OPTION"
|
||||
>-w</VAR
|
||||
> options. The
|
||||
<VAR
|
||||
CLASS="OPTION"
|
||||
>-W</VAR
|
||||
> option makes <B
|
||||
CLASS="COMMAND"
|
||||
>host</B
|
||||
> wait for
|
||||
<VAR
|
||||
CLASS="PARAMETER"
|
||||
>wait</VAR
|
||||
> seconds. If <VAR
|
||||
CLASS="PARAMETER"
|
||||
>wait</VAR
|
||||
>
|
||||
is less than one, the wait interval is set to one second. When the
|
||||
<code class="option">-w</code> option is used, <span><strong class="command">host</strong></span> will
|
||||
<VAR
|
||||
CLASS="OPTION"
|
||||
>-w</VAR
|
||||
> option is used, <B
|
||||
CLASS="COMMAND"
|
||||
>host</B
|
||||
> will
|
||||
effectively wait forever for a reply. The time to wait for a response
|
||||
will be set to the number of seconds given by the hardware's maximum
|
||||
value for an integer quantity.
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549874"></a><h2>FILES</h2>
|
||||
<p>
|
||||
<code class="filename">/etc/resolv.conf</code>
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549886"></a><h2>SEE ALSO</h2>
|
||||
<p>
|
||||
<span class="citerefentry"><span class="refentrytitle">dig</span>(1)</span>,
|
||||
<span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>.
|
||||
</p>
|
||||
</div>
|
||||
</div></body>
|
||||
</html>
|
||||
value for an integer quantity.</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN115"
|
||||
></A
|
||||
><H2
|
||||
>FILES</H2
|
||||
><P
|
||||
><TT
|
||||
CLASS="FILENAME"
|
||||
>/etc/resolv.conf</TT
|
||||
></P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN119"
|
||||
></A
|
||||
><H2
|
||||
>SEE ALSO</H2
|
||||
><P
|
||||
><SPAN
|
||||
CLASS="CITEREFENTRY"
|
||||
><SPAN
|
||||
CLASS="REFENTRYTITLE"
|
||||
>dig</SPAN
|
||||
>(1)</SPAN
|
||||
>,
|
||||
<SPAN
|
||||
CLASS="CITEREFENTRY"
|
||||
><SPAN
|
||||
CLASS="REFENTRYTITLE"
|
||||
>named</SPAN
|
||||
>(8)</SPAN
|
||||
>.</P
|
||||
></DIV
|
||||
></BODY
|
||||
></HTML
|
||||
>
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2000-2003 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: dig.h,v 1.71.2.6.2.14 2006/12/07 01:26:33 marka Exp $ */
|
||||
/* $Id: dig.h,v 1.71.2.6.2.6 2004/06/19 02:30:12 sra Exp $ */
|
||||
|
||||
#ifndef DIG_H
|
||||
#define DIG_H
|
||||
@@ -35,7 +35,7 @@
|
||||
#include <isc/sockaddr.h>
|
||||
#include <isc/socket.h>
|
||||
|
||||
#define MXSERV 20
|
||||
#define MXSERV 6
|
||||
#define MXNAME (DNS_NAME_MAXTEXT+1)
|
||||
#define MXRD 32
|
||||
#define BUFSIZE 512
|
||||
@@ -66,6 +66,14 @@
|
||||
* in a tight loop of constant lookups. It's value is arbitrary.
|
||||
*/
|
||||
|
||||
#define ROOTNS 1
|
||||
/*
|
||||
* Set the number of root servers to ask for information when running in
|
||||
* trace mode.
|
||||
* XXXMWS -- trace mode is currently semi-broken, and this number *MUST*
|
||||
* be 1.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Defaults for the sigchase suboptions. Consolidated here because
|
||||
* these control the layout of dig_lookup_t (among other things).
|
||||
@@ -146,7 +154,7 @@ isc_boolean_t sigchase;
|
||||
char onamespace[BUFSIZE];
|
||||
isc_buffer_t namebuf;
|
||||
isc_buffer_t onamebuf;
|
||||
isc_buffer_t renderbuf;
|
||||
isc_buffer_t sendbuf;
|
||||
char *sendspace;
|
||||
dns_name_t *name;
|
||||
isc_timer_t *timer;
|
||||
@@ -173,8 +181,6 @@ isc_boolean_t sigchase;
|
||||
struct dig_query {
|
||||
dig_lookup_t *lookup;
|
||||
isc_boolean_t waiting_connect,
|
||||
pending_free,
|
||||
waiting_senddone,
|
||||
first_pass,
|
||||
first_soa_rcvd,
|
||||
second_rr_rcvd,
|
||||
@@ -186,7 +192,6 @@ struct dig_query {
|
||||
isc_uint32_t msg_count;
|
||||
isc_uint32_t rr_count;
|
||||
char *servname;
|
||||
char *userarg;
|
||||
isc_bufferlist_t sendlist,
|
||||
recvlist,
|
||||
lengthlist;
|
||||
@@ -200,12 +205,10 @@ struct dig_query {
|
||||
ISC_LINK(dig_query_t) link;
|
||||
isc_sockaddr_t sockaddr;
|
||||
isc_time_t time_sent;
|
||||
isc_buffer_t sendbuf;
|
||||
};
|
||||
|
||||
struct dig_server {
|
||||
char servername[MXNAME];
|
||||
char userarg[MXNAME];
|
||||
ISC_LINK(dig_server_t) link;
|
||||
};
|
||||
|
||||
@@ -219,46 +222,6 @@ struct dig_message {
|
||||
ISC_LINK(dig_message_t) link;
|
||||
};
|
||||
#endif
|
||||
|
||||
typedef ISC_LIST(dig_searchlist_t) dig_searchlistlist_t;
|
||||
typedef ISC_LIST(dig_lookup_t) dig_lookuplist_t;
|
||||
|
||||
/*
|
||||
* Externals from dighost.c
|
||||
*/
|
||||
|
||||
extern dig_lookuplist_t lookup_list;
|
||||
extern dig_serverlist_t server_list;
|
||||
extern dig_searchlistlist_t search_list;
|
||||
|
||||
extern isc_boolean_t have_ipv4, have_ipv6, specified_source,
|
||||
usesearch, qr;
|
||||
extern in_port_t port;
|
||||
extern unsigned int timeout;
|
||||
extern isc_mem_t *mctx;
|
||||
extern dns_messageid_t id;
|
||||
extern int sendcount;
|
||||
extern int ndots;
|
||||
extern int lookup_counter;
|
||||
extern int exitcode;
|
||||
extern isc_sockaddr_t bind_address;
|
||||
extern char keynametext[MXNAME];
|
||||
extern char keyfile[MXNAME];
|
||||
extern char keysecret[MXNAME];
|
||||
#ifdef DIG_SIGCHASE
|
||||
extern char trustedkey[MXNAME];
|
||||
#endif
|
||||
extern dns_tsigkey_t *key;
|
||||
extern isc_boolean_t validated;
|
||||
extern isc_taskmgr_t *taskmgr;
|
||||
extern isc_task_t *global_task;
|
||||
extern isc_boolean_t free_now;
|
||||
extern isc_boolean_t debugging, memdebugging;
|
||||
|
||||
extern char *progname;
|
||||
extern int tries;
|
||||
extern int fatalexit;
|
||||
|
||||
/*
|
||||
* Routines in dighost.c.
|
||||
*/
|
||||
@@ -309,7 +272,7 @@ dig_lookup_t *
|
||||
clone_lookup(dig_lookup_t *lookold, isc_boolean_t servers);
|
||||
|
||||
dig_server_t *
|
||||
make_server(const char *servname, const char *userarg);
|
||||
make_server(const char *servname);
|
||||
|
||||
void
|
||||
flush_server_list(void);
|
||||
|
||||
+124
-120
@@ -1,178 +1,184 @@
|
||||
.\" Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\"
|
||||
.\" Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\"
|
||||
.\" 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 ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
.\" REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
.\" AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
.\" AND FITNESS. IN NO EVENT SHALL ISC 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: nslookup.1,v 1.1.6.7 2006/06/29 13:02:30 marka Exp $
|
||||
.\" $Id: nslookup.1,v 1.1.6.2 2004/08/20 02:29:39 marka Exp $
|
||||
.\"
|
||||
.hy 0
|
||||
.ad l
|
||||
.\" Title: nslookup
|
||||
.\" Author:
|
||||
.\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
|
||||
.\" Date: Jun 30, 2000
|
||||
.\" Manual: BIND9
|
||||
.\" Source: BIND9
|
||||
.\"
|
||||
.TH "NSLOOKUP" "1" "Jun 30, 2000" "BIND9" "BIND9"
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.SH "NAME"
|
||||
.TH "NSLOOKUP" "1" "Jun 30, 2000" "BIND9" ""
|
||||
.SH NAME
|
||||
nslookup \- query Internet name servers interactively
|
||||
.SH "SYNOPSIS"
|
||||
.HP 9
|
||||
\fBnslookup\fR [\fB\-option\fR] [name\ |\ \-] [server]
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
\fBnslookup\fR [ \fB-option\fR ] [ \fBname | -\fR ] [ \fBserver\fR ]
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
\fBNslookup\fR
|
||||
is a program to query Internet domain name servers.
|
||||
\fBNslookup\fR
|
||||
has two modes: interactive and non\-interactive. Interactive mode allows the user to query name servers for information about various hosts and domains or to print a list of hosts in a domain. Non\-interactive mode is used to print just the name and requested information for a host or domain.
|
||||
is a program to query Internet domain name servers. \fBNslookup\fR
|
||||
has two modes: interactive and non-interactive. Interactive mode allows
|
||||
the user to query name servers for information about various hosts and
|
||||
domains or to print a list of hosts in a domain. Non-interactive mode is
|
||||
used to print just the name and requested information for a host or
|
||||
domain.
|
||||
.SH "ARGUMENTS"
|
||||
.PP
|
||||
Interactive mode is entered in the following cases:
|
||||
.TP 3n
|
||||
1.
|
||||
.IP 1.
|
||||
when no arguments are given (the default name server will be used)
|
||||
.TP 3n
|
||||
2.
|
||||
when the first argument is a hyphen (\-) and the second argument is the host name or Internet address of a name server.
|
||||
.IP 2.
|
||||
when the first argument is a hyphen (-) and the second argument is
|
||||
the host name or Internet address of a name server.
|
||||
.PP
|
||||
Non-interactive mode is used when the name or Internet address of the
|
||||
host to be looked up is given as the first argument. The optional second
|
||||
argument specifies the host name or address of a name server.
|
||||
.PP
|
||||
Options can also be specified on the command line if they precede the
|
||||
arguments and are prefixed with a hyphen. For example, to
|
||||
change the default query type to host information, and the initial timeout to 10 seconds, type:
|
||||
.PP
|
||||
.sp
|
||||
.RE
|
||||
.PP
|
||||
Non\-interactive mode is used when the name or Internet address of the host to be looked up is given as the first argument. The optional second argument specifies the host name or address of a name server.
|
||||
.PP
|
||||
Options can also be specified on the command line if they precede the arguments and are prefixed with a hyphen. For example, to change the default query type to host information, and the initial timeout to 10 seconds, type:
|
||||
.sp .RS 3n .nf nslookup \-query=hinfo \-timeout=10 .fi .RE
|
||||
.nf
|
||||
nslookup -query=hinfo -timeout=10
|
||||
.sp
|
||||
.fi
|
||||
.SH "INTERACTIVE COMMANDS"
|
||||
.TP 3n
|
||||
host [server]
|
||||
Look up information for host using the current default server or using server, if specified. If host is an Internet address and the query type is A or PTR, the name of the host is returned. If host is a name and does not have a trailing period, the search list is used to qualify the name.
|
||||
.sp
|
||||
To look up a host not in the current domain, append a period to the name.
|
||||
.TP 3n
|
||||
\fBserver\fR \fIdomain\fR
|
||||
.TP 3n
|
||||
\fBlserver\fR \fIdomain\fR
|
||||
Change the default server to
|
||||
\fIdomain\fR;
|
||||
\fBlserver\fR
|
||||
uses the initial server to look up information about
|
||||
\fIdomain\fR, while
|
||||
\fBserver\fR
|
||||
uses the current default server. If an authoritative answer can't be found, the names of servers that might have the answer are returned.
|
||||
.TP 3n
|
||||
.TP
|
||||
\fBhost [server]\fR
|
||||
Look up information for host using the current default server or
|
||||
using server, if specified. If host is an Internet address and
|
||||
the query type is A or PTR, the name of the host is returned.
|
||||
If host is a name and does not have a trailing period, the
|
||||
search list is used to qualify the name.
|
||||
|
||||
To look up a host not in the current domain, append a period to
|
||||
the name.
|
||||
.TP
|
||||
\fBserver \fIdomain\fB\fR
|
||||
.TP
|
||||
\fBlserver \fIdomain\fB\fR
|
||||
Change the default server to \fIdomain\fR; lserver uses the initial
|
||||
server to look up information about \fIdomain\fR, while server uses
|
||||
the current default server. If an authoritative answer can't be
|
||||
found, the names of servers that might have the answer are
|
||||
returned.
|
||||
.TP
|
||||
\fBroot\fR
|
||||
not implemented
|
||||
.TP 3n
|
||||
.TP
|
||||
\fBfinger\fR
|
||||
not implemented
|
||||
.TP 3n
|
||||
.TP
|
||||
\fBls\fR
|
||||
not implemented
|
||||
.TP 3n
|
||||
.TP
|
||||
\fBview\fR
|
||||
not implemented
|
||||
.TP 3n
|
||||
.TP
|
||||
\fBhelp\fR
|
||||
not implemented
|
||||
.TP 3n
|
||||
.TP
|
||||
\fB?\fR
|
||||
not implemented
|
||||
.TP 3n
|
||||
.TP
|
||||
\fBexit\fR
|
||||
Exits the program.
|
||||
.TP 3n
|
||||
\fBset\fR \fIkeyword\fR\fI[=value]\fR
|
||||
This command is used to change state information that affects the lookups. Valid keywords are:
|
||||
.RS 3n
|
||||
.TP 3n
|
||||
.TP
|
||||
\fBset \fIkeyword[=value]\fB\fR
|
||||
This command is used to change state information that affects
|
||||
the lookups. Valid keywords are:
|
||||
.RS
|
||||
.TP
|
||||
\fBall\fR
|
||||
Prints the current values of the frequently used options to
|
||||
\fBset\fR. Information about the current default server and host is also printed.
|
||||
.TP 3n
|
||||
\fBclass=\fR\fIvalue\fR
|
||||
Prints the current values of the frequently used
|
||||
options to \fBset\fR. Information about the current default
|
||||
server and host is also printed.
|
||||
.TP
|
||||
\fBclass=\fIvalue\fB\fR
|
||||
Change the query class to one of:
|
||||
.RS 3n
|
||||
.TP 3n
|
||||
.RS
|
||||
.TP
|
||||
\fBIN\fR
|
||||
the Internet class
|
||||
.TP 3n
|
||||
.TP
|
||||
\fBCH\fR
|
||||
the Chaos class
|
||||
.TP 3n
|
||||
.TP
|
||||
\fBHS\fR
|
||||
the Hesiod class
|
||||
.TP 3n
|
||||
.TP
|
||||
\fBANY\fR
|
||||
wildcard
|
||||
.RE
|
||||
.IP "" 3n
|
||||
.PP
|
||||
The class specifies the protocol group of the information.
|
||||
.sp
|
||||
|
||||
(Default = IN; abbreviation = cl)
|
||||
.TP 3n
|
||||
\fB\fI[no]\fR\fR\fBdebug\fR
|
||||
Turn debugging mode on. A lot more information is printed about the packet sent to the server and the resulting answer.
|
||||
.sp
|
||||
(Default = nodebug; abbreviation =
|
||||
[no]deb)
|
||||
.TP 3n
|
||||
\fB\fI[no]\fR\fR\fBd2\fR
|
||||
Turn debugging mode on. A lot more information is printed about the packet sent to the server and the resulting answer.
|
||||
.sp
|
||||
.TP
|
||||
\fB\fI[no]\fBdebug\fR
|
||||
Turn debugging mode on. A lot more information is
|
||||
printed about the packet sent to the server and the
|
||||
resulting answer.
|
||||
|
||||
(Default = nodebug; abbreviation = [no]deb)
|
||||
.TP
|
||||
\fB\fI[no]\fBd2\fR
|
||||
Turn debugging mode on. A lot more information is
|
||||
printed about the packet sent to the server and the
|
||||
resulting answer.
|
||||
|
||||
(Default = nod2)
|
||||
.TP 3n
|
||||
\fBdomain=\fR\fIname\fR
|
||||
Sets the search list to
|
||||
\fIname\fR.
|
||||
.TP 3n
|
||||
\fB\fI[no]\fR\fR\fBsearch\fR
|
||||
If the lookup request contains at least one period but doesn't end with a trailing period, append the domain names in the domain search list to the request until an answer is received.
|
||||
.sp
|
||||
.TP
|
||||
\fBdomain=\fIname\fB\fR
|
||||
Sets the search list to \fIname\fR.
|
||||
.TP
|
||||
\fB\fI[no]\fBsearch\fR
|
||||
If the lookup request contains at least one period but
|
||||
doesn't end with a trailing period, append the domain
|
||||
names in the domain search list to the request until an
|
||||
answer is received.
|
||||
|
||||
(Default = search)
|
||||
.TP 3n
|
||||
\fBport=\fR\fIvalue\fR
|
||||
Change the default TCP/UDP name server port to
|
||||
\fIvalue\fR.
|
||||
.sp
|
||||
.TP
|
||||
\fBport=\fIvalue\fB\fR
|
||||
Change the default TCP/UDP name server port to \fIvalue\fR.
|
||||
|
||||
(Default = 53; abbreviation = po)
|
||||
.TP 3n
|
||||
\fBquerytype=\fR\fIvalue\fR
|
||||
.TP 3n
|
||||
\fBtype=\fR\fIvalue\fR
|
||||
Change the type of the information query.
|
||||
.sp
|
||||
.TP
|
||||
\fBquerytype=\fIvalue\fB\fR
|
||||
.TP
|
||||
\fBtype=\fIvalue\fB\fR
|
||||
Change the top of the information query.
|
||||
|
||||
(Default = A; abbreviations = q, ty)
|
||||
.TP 3n
|
||||
\fB\fI[no]\fR\fR\fBrecurse\fR
|
||||
Tell the name server to query other servers if it does not have the information.
|
||||
.sp
|
||||
.TP
|
||||
\fB\fI[no]\fBrecurse\fR
|
||||
Tell the name server to query other servers if it does not have the
|
||||
information.
|
||||
|
||||
(Default = recurse; abbreviation = [no]rec)
|
||||
.TP 3n
|
||||
\fBretry=\fR\fInumber\fR
|
||||
.TP
|
||||
\fBretry=\fInumber\fB\fR
|
||||
Set the number of retries to number.
|
||||
.TP 3n
|
||||
\fBtimeout=\fR\fInumber\fR
|
||||
Change the initial timeout interval for waiting for a reply to number seconds.
|
||||
.TP 3n
|
||||
\fB\fI[no]\fR\fR\fBvc\fR
|
||||
.TP
|
||||
\fBtimeout=\fInumber\fB\fR
|
||||
Change the initial timeout interval for waiting for a
|
||||
reply to number seconds.
|
||||
.TP
|
||||
\fB\fI[no]\fBvc\fR
|
||||
Always use a virtual circuit when sending requests to the server.
|
||||
.sp
|
||||
|
||||
(Default = novc)
|
||||
.RE
|
||||
.IP "" 3n
|
||||
.SH "FILES"
|
||||
.PP
|
||||
\fI/etc/resolv.conf\fR
|
||||
@@ -184,5 +190,3 @@ Always use a virtual circuit when sending requests to the server.
|
||||
.SH "AUTHOR"
|
||||
.PP
|
||||
Andrew Cherenson
|
||||
.SH "COPYRIGHT"
|
||||
Copyright \(co 2004\-2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2000-2003 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: nslookup.c,v 1.90.2.4.2.12 2006/06/09 23:50:53 marka Exp $ */
|
||||
/* $Id: nslookup.c,v 1.90.2.4.2.7 2004/08/18 23:25:58 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -44,6 +44,19 @@
|
||||
|
||||
#include <dig/dig.h>
|
||||
|
||||
extern ISC_LIST(dig_lookup_t) lookup_list;
|
||||
extern dig_serverlist_t server_list;
|
||||
extern ISC_LIST(dig_searchlist_t) search_list;
|
||||
|
||||
extern isc_boolean_t usesearch, debugging;
|
||||
extern in_port_t port;
|
||||
extern unsigned int timeout;
|
||||
extern isc_mem_t *mctx;
|
||||
extern int tries;
|
||||
extern int lookup_counter;
|
||||
extern isc_task_t *global_task;
|
||||
extern char *progname;
|
||||
|
||||
static isc_boolean_t short_form = ISC_TRUE,
|
||||
tcpmode = ISC_FALSE,
|
||||
identify = ISC_FALSE, stats = ISC_TRUE,
|
||||
@@ -389,7 +402,7 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
|
||||
debug("printmessage()");
|
||||
|
||||
isc_sockaddr_format(&query->sockaddr, servtext, sizeof(servtext));
|
||||
printf("Server:\t\t%s\n", query->userarg);
|
||||
printf("Server:\t\t%s\n", query->servname);
|
||||
printf("Address:\t%s\n", servtext);
|
||||
|
||||
puts("");
|
||||
@@ -448,7 +461,7 @@ show_settings(isc_boolean_t full, isc_boolean_t serv_only) {
|
||||
get_address(srv->servername, port, &sockaddr);
|
||||
isc_sockaddr_format(&sockaddr, sockstr, sizeof(sockstr));
|
||||
printf("Default server: %s\nAddress: %s\n",
|
||||
srv->userarg, sockstr);
|
||||
srv->servername, sockstr);
|
||||
if (!full)
|
||||
return;
|
||||
srv = ISC_LIST_NEXT(srv, link);
|
||||
@@ -708,7 +721,6 @@ get_next_command(void) {
|
||||
if (buf == NULL)
|
||||
fatal("memory allocation failure");
|
||||
fputs("> ", stderr);
|
||||
fflush(stderr);
|
||||
isc_app_block();
|
||||
ptr = fgets(buf, COMMSIZE, stdin);
|
||||
isc_app_unblock();
|
||||
@@ -726,9 +738,7 @@ get_next_command(void) {
|
||||
setoption(arg);
|
||||
else if ((strcasecmp(ptr, "server") == 0) ||
|
||||
(strcasecmp(ptr, "lserver") == 0)) {
|
||||
isc_app_block();
|
||||
set_nameserver(arg);
|
||||
isc_app_unblock();
|
||||
show_settings(ISC_TRUE, ISC_TRUE);
|
||||
} else if (strcasecmp(ptr, "exit") == 0) {
|
||||
in_use = ISC_FALSE;
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
|
||||
[<!ENTITY mdash "—">]>
|
||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
|
||||
<!--
|
||||
- Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
-
|
||||
- Permission to use, copy, modify, and distribute this software for any
|
||||
- purpose with or without fee is hereby granted, provided that the above
|
||||
@@ -17,7 +15,7 @@
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
|
||||
<!-- $Id: nslookup.docbook,v 1.3.6.7 2006/01/06 00:01:42 marka Exp $ -->
|
||||
<!-- $Id: nslookup.docbook,v 1.3.6.3 2004/08/30 00:50:11 marka Exp $ -->
|
||||
|
||||
<!--
|
||||
- Copyright (c) 1985, 1989
|
||||
@@ -64,15 +62,6 @@
|
||||
<refmiscinfo>BIND9</refmiscinfo>
|
||||
</refmeta>
|
||||
|
||||
<docinfo>
|
||||
<copyright>
|
||||
<year>2004</year>
|
||||
<year>2005</year>
|
||||
<year>2006</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
<refnamediv>
|
||||
<refname>nslookup</refname>
|
||||
<refpurpose>query Internet name servers interactively</refpurpose>
|
||||
@@ -82,8 +71,8 @@
|
||||
<cmdsynopsis>
|
||||
<command>nslookup</command>
|
||||
<arg><option>-option</option></arg>
|
||||
<arg choice="opt">name | -</arg>
|
||||
<arg choice="opt">server</arg>
|
||||
<arg choice=opt>name | -</arg>
|
||||
<arg choice=opt>server</arg>
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
|
||||
@@ -104,19 +93,19 @@ domain.
|
||||
<title>ARGUMENTS</title>
|
||||
<para>
|
||||
Interactive mode is entered in the following cases:
|
||||
<orderedlist numeration="loweralpha">
|
||||
<listitem>
|
||||
<OrderedList Numeration=Loweralpha>
|
||||
<Listitem>
|
||||
<para>
|
||||
when no arguments are given (the default name server will be used)
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
</Listitem>
|
||||
<Listitem>
|
||||
<para>
|
||||
when the first argument is a hyphen (-) and the second argument is
|
||||
the host name or Internet address of a name server.
|
||||
</para>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
</Listitem>
|
||||
</OrderedList>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
@@ -129,11 +118,11 @@ argument specifies the host name or address of a name server.
|
||||
Options can also be specified on the command line if they precede the
|
||||
arguments and are prefixed with a hyphen. For example, to
|
||||
change the default query type to host information, and the initial timeout to 10 seconds, type:
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
<InformalExample>
|
||||
<PROGRAMLISTING>
|
||||
nslookup -query=hinfo -timeout=10
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
</PROGRAMLISTING>
|
||||
</InformalExample>
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
@@ -264,7 +253,7 @@ the lookups. Valid keywords are:
|
||||
|
||||
<varlistentry><term><constant>type=</constant><replaceable>value</replaceable></term>
|
||||
<listitem><para>
|
||||
Change the type of the information query.
|
||||
Change the top of the information query.
|
||||
</para><para>
|
||||
(Default = A; abbreviations = q, ty)
|
||||
</para></listitem></varlistentry>
|
||||
|
||||
+582
-229
@@ -1,264 +1,617 @@
|
||||
<!--
|
||||
- Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
-
|
||||
- Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
-
|
||||
- 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 ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
- AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
- AND FITNESS. IN NO EVENT SHALL ISC 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: nslookup.html,v 1.1.6.12 2006/06/29 13:02:30 marka Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>nslookup</title>
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
|
||||
<a name="id2482694"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2>Name</h2>
|
||||
<p>nslookup — query Internet name servers interactively</p>
|
||||
</div>
|
||||
<div class="refsynopsisdiv">
|
||||
<h2>Synopsis</h2>
|
||||
<div class="cmdsynopsis"><p><code class="command">nslookup</code> [<code class="option">-option</code>] [name | -] [server]</p></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549404"></a><h2>DESCRIPTION</h2>
|
||||
<p>
|
||||
<span><strong class="command">Nslookup</strong></span>
|
||||
is a program to query Internet domain name servers. <span><strong class="command">Nslookup</strong></span>
|
||||
|
||||
<!-- $Id: nslookup.html,v 1.1.6.3 2004/08/22 23:38:58 marka Exp $ -->
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<HTML
|
||||
><HEAD
|
||||
><TITLE
|
||||
>nslookup</TITLE
|
||||
><META
|
||||
NAME="GENERATOR"
|
||||
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"></HEAD
|
||||
><BODY
|
||||
CLASS="REFENTRY"
|
||||
BGCOLOR="#FFFFFF"
|
||||
TEXT="#000000"
|
||||
LINK="#0000FF"
|
||||
VLINK="#840084"
|
||||
ALINK="#0000FF"
|
||||
><H1
|
||||
><A
|
||||
NAME="AEN1"
|
||||
></A
|
||||
>nslookup</H1
|
||||
><DIV
|
||||
CLASS="REFNAMEDIV"
|
||||
><A
|
||||
NAME="AEN8"
|
||||
></A
|
||||
><H2
|
||||
>Name</H2
|
||||
>nslookup -- query Internet name servers interactively</DIV
|
||||
><DIV
|
||||
CLASS="REFSYNOPSISDIV"
|
||||
><A
|
||||
NAME="AEN11"
|
||||
></A
|
||||
><H2
|
||||
>Synopsis</H2
|
||||
><P
|
||||
><B
|
||||
CLASS="COMMAND"
|
||||
>nslookup</B
|
||||
> [<VAR
|
||||
CLASS="OPTION"
|
||||
>-option</VAR
|
||||
>] [name | -] [server]</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN18"
|
||||
></A
|
||||
><H2
|
||||
>DESCRIPTION</H2
|
||||
><P
|
||||
><B
|
||||
CLASS="COMMAND"
|
||||
>Nslookup</B
|
||||
>
|
||||
is a program to query Internet domain name servers. <B
|
||||
CLASS="COMMAND"
|
||||
>Nslookup</B
|
||||
>
|
||||
has two modes: interactive and non-interactive. Interactive mode allows
|
||||
the user to query name servers for information about various hosts and
|
||||
domains or to print a list of hosts in a domain. Non-interactive mode is
|
||||
used to print just the name and requested information for a host or
|
||||
domain.
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549421"></a><h2>ARGUMENTS</h2>
|
||||
<p>
|
||||
Interactive mode is entered in the following cases:
|
||||
</p>
|
||||
<div class="orderedlist"><ol type="a">
|
||||
<li><p>
|
||||
when no arguments are given (the default name server will be used)
|
||||
</p></li>
|
||||
<li><p>
|
||||
when the first argument is a hyphen (-) and the second argument is
|
||||
the host name or Internet address of a name server.
|
||||
</p></li>
|
||||
</ol></div>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Non-interactive mode is used when the name or Internet address of the
|
||||
domain.</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN23"
|
||||
></A
|
||||
><H2
|
||||
>ARGUMENTS</H2
|
||||
><P
|
||||
>Interactive mode is entered in the following cases:
|
||||
<P
|
||||
></P
|
||||
><OL
|
||||
TYPE="a"
|
||||
><LI
|
||||
><P
|
||||
>when no arguments are given (the default name server will be used)</P
|
||||
></LI
|
||||
><LI
|
||||
><P
|
||||
>when the first argument is a hyphen (-) and the second argument is
|
||||
the host name or Internet address of a name server.</P
|
||||
></LI
|
||||
></OL
|
||||
></P
|
||||
><P
|
||||
>Non-interactive mode is used when the name or Internet address of the
|
||||
host to be looked up is given as the first argument. The optional second
|
||||
argument specifies the host name or address of a name server.
|
||||
</p>
|
||||
<p>
|
||||
Options can also be specified on the command line if they precede the
|
||||
argument specifies the host name or address of a name server.</P
|
||||
><P
|
||||
>Options can also be specified on the command line if they precede the
|
||||
arguments and are prefixed with a hyphen. For example, to
|
||||
change the default query type to host information, and the initial timeout to 10 seconds, type:
|
||||
</p>
|
||||
<div class="informalexample"><pre class="programlisting">
|
||||
nslookup -query=hinfo -timeout=10
|
||||
</pre></div>
|
||||
<p>
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549464"></a><h2>INTERACTIVE COMMANDS</h2>
|
||||
<div class="variablelist"><dl>
|
||||
<dt><span class="term">host [<span class="optional">server</span>]</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Look up information for host using the current default server or
|
||||
<DIV
|
||||
CLASS="INFORMALEXAMPLE"
|
||||
><P
|
||||
></P
|
||||
><A
|
||||
NAME="AEN33"
|
||||
></A
|
||||
><PRE
|
||||
CLASS="PROGRAMLISTING"
|
||||
>nslookup -query=hinfo -timeout=10</PRE
|
||||
><P
|
||||
></P
|
||||
></DIV
|
||||
></P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN35"
|
||||
></A
|
||||
><H2
|
||||
>INTERACTIVE COMMANDS</H2
|
||||
><P
|
||||
></P
|
||||
><DIV
|
||||
CLASS="VARIABLELIST"
|
||||
><DL
|
||||
><DT
|
||||
>host [<SPAN
|
||||
CLASS="OPTIONAL"
|
||||
>server</SPAN
|
||||
>]</DT
|
||||
><DD
|
||||
><P
|
||||
>Look up information for host using the current default server or
|
||||
using server, if specified. If host is an Internet address and
|
||||
the query type is A or PTR, the name of the host is returned.
|
||||
If host is a name and does not have a trailing period, the
|
||||
search list is used to qualify the name.
|
||||
</p>
|
||||
<p>
|
||||
To look up a host not in the current domain, append a period to
|
||||
the name.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="constant">server</code> <em class="replaceable"><code>domain</code></em></span></dt>
|
||||
<dd><p></p></dd>
|
||||
<dt><span class="term"><code class="constant">lserver</code> <em class="replaceable"><code>domain</code></em></span></dt>
|
||||
<dd><p>
|
||||
Change the default server to <em class="replaceable"><code>domain</code></em>; <code class="constant">lserver</code> uses the initial
|
||||
server to look up information about <em class="replaceable"><code>domain</code></em>, while <code class="constant">server</code> uses
|
||||
search list is used to qualify the name.</P
|
||||
><P
|
||||
>To look up a host not in the current domain, append a period to
|
||||
the name.</P
|
||||
></DD
|
||||
><DT
|
||||
><CODE
|
||||
CLASS="CONSTANT"
|
||||
>server</CODE
|
||||
> <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>domain</VAR
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
></P
|
||||
></DD
|
||||
><DT
|
||||
><CODE
|
||||
CLASS="CONSTANT"
|
||||
>lserver</CODE
|
||||
> <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>domain</VAR
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
>Change the default server to <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>domain</VAR
|
||||
>; <CODE
|
||||
CLASS="CONSTANT"
|
||||
>lserver</CODE
|
||||
> uses the initial
|
||||
server to look up information about <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>domain</VAR
|
||||
>, while <CODE
|
||||
CLASS="CONSTANT"
|
||||
>server</CODE
|
||||
> uses
|
||||
the current default server. If an authoritative answer can't be
|
||||
found, the names of servers that might have the answer are
|
||||
returned.
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="constant">root</code></span></dt>
|
||||
<dd><p>not implemented</p></dd>
|
||||
<dt><span class="term"><code class="constant">finger</code></span></dt>
|
||||
<dd><p>not implemented</p></dd>
|
||||
<dt><span class="term"><code class="constant">ls</code></span></dt>
|
||||
<dd><p>not implemented</p></dd>
|
||||
<dt><span class="term"><code class="constant">view</code></span></dt>
|
||||
<dd><p>not implemented</p></dd>
|
||||
<dt><span class="term"><code class="constant">help</code></span></dt>
|
||||
<dd><p>not implemented</p></dd>
|
||||
<dt><span class="term"><code class="constant">?</code></span></dt>
|
||||
<dd><p>not implemented</p></dd>
|
||||
<dt><span class="term"><code class="constant">exit</code></span></dt>
|
||||
<dd><p>Exits the program.</p></dd>
|
||||
<dt><span class="term"><code class="constant">set</code> <em class="replaceable"><code>keyword[<span class="optional">=value</span>]</code></em></span></dt>
|
||||
<dd>
|
||||
<p>This command is used to change state information that affects
|
||||
returned.</P
|
||||
></DD
|
||||
><DT
|
||||
><CODE
|
||||
CLASS="CONSTANT"
|
||||
>root</CODE
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
>not implemented</P
|
||||
></DD
|
||||
><DT
|
||||
><CODE
|
||||
CLASS="CONSTANT"
|
||||
>finger</CODE
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
>not implemented</P
|
||||
></DD
|
||||
><DT
|
||||
><CODE
|
||||
CLASS="CONSTANT"
|
||||
>ls</CODE
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
>not implemented</P
|
||||
></DD
|
||||
><DT
|
||||
><CODE
|
||||
CLASS="CONSTANT"
|
||||
>view</CODE
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
>not implemented</P
|
||||
></DD
|
||||
><DT
|
||||
><CODE
|
||||
CLASS="CONSTANT"
|
||||
>help</CODE
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
>not implemented</P
|
||||
></DD
|
||||
><DT
|
||||
><CODE
|
||||
CLASS="CONSTANT"
|
||||
>?</CODE
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
>not implemented</P
|
||||
></DD
|
||||
><DT
|
||||
><CODE
|
||||
CLASS="CONSTANT"
|
||||
>exit</CODE
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
>Exits the program.</P
|
||||
></DD
|
||||
><DT
|
||||
><CODE
|
||||
CLASS="CONSTANT"
|
||||
>set</CODE
|
||||
> <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>keyword[<SPAN
|
||||
CLASS="OPTIONAL"
|
||||
>=value</SPAN
|
||||
>]</VAR
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
>This command is used to change state information that affects
|
||||
the lookups. Valid keywords are:
|
||||
</p>
|
||||
<div class="variablelist"><dl>
|
||||
<dt><span class="term"><code class="constant">all</code></span></dt>
|
||||
<dd><p>Prints the current values of the frequently used
|
||||
options to <span><strong class="command">set</strong></span>. Information about the current default
|
||||
<P
|
||||
></P
|
||||
><DIV
|
||||
CLASS="VARIABLELIST"
|
||||
><DL
|
||||
><DT
|
||||
><CODE
|
||||
CLASS="CONSTANT"
|
||||
>all</CODE
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
>Prints the current values of the frequently used
|
||||
options to <B
|
||||
CLASS="COMMAND"
|
||||
>set</B
|
||||
>. Information about the current default
|
||||
server and host is also printed.
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="constant">class=</code><em class="replaceable"><code>value</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Change the query class to one of:
|
||||
</p>
|
||||
<div class="variablelist"><dl>
|
||||
<dt><span class="term"><code class="constant">IN</code></span></dt>
|
||||
<dd><p>the Internet class</p></dd>
|
||||
<dt><span class="term"><code class="constant">CH</code></span></dt>
|
||||
<dd><p>the Chaos class</p></dd>
|
||||
<dt><span class="term"><code class="constant">HS</code></span></dt>
|
||||
<dd><p>the Hesiod class</p></dd>
|
||||
<dt><span class="term"><code class="constant">ANY</code></span></dt>
|
||||
<dd><p>wildcard</p></dd>
|
||||
</dl></div>
|
||||
<p>
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
><CODE
|
||||
CLASS="CONSTANT"
|
||||
>class=</CODE
|
||||
><VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>value</VAR
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Change the query class to one of:
|
||||
<P
|
||||
></P
|
||||
><DIV
|
||||
CLASS="VARIABLELIST"
|
||||
><DL
|
||||
><DT
|
||||
><CODE
|
||||
CLASS="CONSTANT"
|
||||
>IN</CODE
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
>the Internet class</P
|
||||
></DD
|
||||
><DT
|
||||
><CODE
|
||||
CLASS="CONSTANT"
|
||||
>CH</CODE
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
>the Chaos class</P
|
||||
></DD
|
||||
><DT
|
||||
><CODE
|
||||
CLASS="CONSTANT"
|
||||
>HS</CODE
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
>the Hesiod class</P
|
||||
></DD
|
||||
><DT
|
||||
><CODE
|
||||
CLASS="CONSTANT"
|
||||
>ANY</CODE
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
>wildcard</P
|
||||
></DD
|
||||
></DL
|
||||
></DIV
|
||||
>
|
||||
The class specifies the protocol group of the information.
|
||||
</p>
|
||||
<p>
|
||||
(Default = IN; abbreviation = cl)
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="constant"><em class="replaceable"><code>[<span class="optional">no</span>]</code></em>debug</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Turn debugging mode on. A lot more information is
|
||||
</P
|
||||
><P
|
||||
> (Default = IN; abbreviation = cl)
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
><CODE
|
||||
CLASS="CONSTANT"
|
||||
><VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>[<SPAN
|
||||
CLASS="OPTIONAL"
|
||||
>no</SPAN
|
||||
>]</VAR
|
||||
>debug</CODE
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Turn debugging mode on. A lot more information is
|
||||
printed about the packet sent to the server and the
|
||||
resulting answer.
|
||||
</p>
|
||||
<p>
|
||||
(Default = nodebug; abbreviation = [<span class="optional">no</span>]deb)
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="constant"><em class="replaceable"><code>[<span class="optional">no</span>]</code></em>d2</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Turn debugging mode on. A lot more information is
|
||||
</P
|
||||
><P
|
||||
> (Default = nodebug; abbreviation = [<SPAN
|
||||
CLASS="OPTIONAL"
|
||||
>no</SPAN
|
||||
>]deb)
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
><CODE
|
||||
CLASS="CONSTANT"
|
||||
><VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>[<SPAN
|
||||
CLASS="OPTIONAL"
|
||||
>no</SPAN
|
||||
>]</VAR
|
||||
>d2</CODE
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Turn debugging mode on. A lot more information is
|
||||
printed about the packet sent to the server and the
|
||||
resulting answer.
|
||||
</p>
|
||||
<p>
|
||||
(Default = nod2)
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="constant">domain=</code><em class="replaceable"><code>name</code></em></span></dt>
|
||||
<dd><p>
|
||||
Sets the search list to <em class="replaceable"><code>name</code></em>.
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="constant"><em class="replaceable"><code>[<span class="optional">no</span>]</code></em>search</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
If the lookup request contains at least one period but
|
||||
</P
|
||||
><P
|
||||
> (Default = nod2)
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
><CODE
|
||||
CLASS="CONSTANT"
|
||||
>domain=</CODE
|
||||
><VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>name</VAR
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Sets the search list to <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>name</VAR
|
||||
>.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
><CODE
|
||||
CLASS="CONSTANT"
|
||||
><VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>[<SPAN
|
||||
CLASS="OPTIONAL"
|
||||
>no</SPAN
|
||||
>]</VAR
|
||||
>search</CODE
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> If the lookup request contains at least one period but
|
||||
doesn't end with a trailing period, append the domain
|
||||
names in the domain search list to the request until an
|
||||
answer is received.
|
||||
</p>
|
||||
<p>
|
||||
(Default = search)
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="constant">port=</code><em class="replaceable"><code>value</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Change the default TCP/UDP name server port to <em class="replaceable"><code>value</code></em>.
|
||||
</p>
|
||||
<p>
|
||||
(Default = 53; abbreviation = po)
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="constant">querytype=</code><em class="replaceable"><code>value</code></em></span></dt>
|
||||
<dd><p></p></dd>
|
||||
<dt><span class="term"><code class="constant">type=</code><em class="replaceable"><code>value</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Change the type of the information query.
|
||||
</p>
|
||||
<p>
|
||||
(Default = A; abbreviations = q, ty)
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="constant"><em class="replaceable"><code>[<span class="optional">no</span>]</code></em>recurse</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Tell the name server to query other servers if it does not have the
|
||||
</P
|
||||
><P
|
||||
> (Default = search)
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
><CODE
|
||||
CLASS="CONSTANT"
|
||||
>port=</CODE
|
||||
><VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>value</VAR
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Change the default TCP/UDP name server port to <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>value</VAR
|
||||
>.
|
||||
</P
|
||||
><P
|
||||
> (Default = 53; abbreviation = po)
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
><CODE
|
||||
CLASS="CONSTANT"
|
||||
>querytype=</CODE
|
||||
><VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>value</VAR
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
></P
|
||||
></DD
|
||||
><DT
|
||||
><CODE
|
||||
CLASS="CONSTANT"
|
||||
>type=</CODE
|
||||
><VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>value</VAR
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Change the top of the information query.
|
||||
</P
|
||||
><P
|
||||
> (Default = A; abbreviations = q, ty)
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
><CODE
|
||||
CLASS="CONSTANT"
|
||||
><VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>[<SPAN
|
||||
CLASS="OPTIONAL"
|
||||
>no</SPAN
|
||||
>]</VAR
|
||||
>recurse</CODE
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Tell the name server to query other servers if it does not have the
|
||||
information.
|
||||
</p>
|
||||
<p>
|
||||
(Default = recurse; abbreviation = [no]rec)
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="constant">retry=</code><em class="replaceable"><code>number</code></em></span></dt>
|
||||
<dd><p>
|
||||
Set the number of retries to number.
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="constant">timeout=</code><em class="replaceable"><code>number</code></em></span></dt>
|
||||
<dd><p>
|
||||
Change the initial timeout interval for waiting for a
|
||||
</P
|
||||
><P
|
||||
> (Default = recurse; abbreviation = [no]rec)
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
><CODE
|
||||
CLASS="CONSTANT"
|
||||
>retry=</CODE
|
||||
><VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>number</VAR
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Set the number of retries to number.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
><CODE
|
||||
CLASS="CONSTANT"
|
||||
>timeout=</CODE
|
||||
><VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>number</VAR
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Change the initial timeout interval for waiting for a
|
||||
reply to number seconds.
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="constant"><em class="replaceable"><code>[<span class="optional">no</span>]</code></em>vc</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Always use a virtual circuit when sending requests to the server.
|
||||
</p>
|
||||
<p>
|
||||
(Default = novc)
|
||||
</p>
|
||||
</dd>
|
||||
</dl></div>
|
||||
<p>
|
||||
</p>
|
||||
</dd>
|
||||
</dl></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549990"></a><h2>FILES</h2>
|
||||
<p>
|
||||
<code class="filename">/etc/resolv.conf</code>
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2550003"></a><h2>SEE ALSO</h2>
|
||||
<p>
|
||||
<span class="citerefentry"><span class="refentrytitle">dig</span>(1)</span>,
|
||||
<span class="citerefentry"><span class="refentrytitle">host</span>(1)</span>,
|
||||
<span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>.
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2550038"></a><h2>Author</h2>
|
||||
<p>
|
||||
Andrew Cherenson
|
||||
</p>
|
||||
</div>
|
||||
</div></body>
|
||||
</html>
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
><CODE
|
||||
CLASS="CONSTANT"
|
||||
><VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>[<SPAN
|
||||
CLASS="OPTIONAL"
|
||||
>no</SPAN
|
||||
>]</VAR
|
||||
>vc</CODE
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Always use a virtual circuit when sending requests to the server.
|
||||
</P
|
||||
><P
|
||||
> (Default = novc)
|
||||
</P
|
||||
></DD
|
||||
></DL
|
||||
></DIV
|
||||
></P
|
||||
></DD
|
||||
></DL
|
||||
></DIV
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN218"
|
||||
></A
|
||||
><H2
|
||||
>FILES</H2
|
||||
><P
|
||||
><TT
|
||||
CLASS="FILENAME"
|
||||
>/etc/resolv.conf</TT
|
||||
></P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN222"
|
||||
></A
|
||||
><H2
|
||||
>SEE ALSO</H2
|
||||
><P
|
||||
><SPAN
|
||||
CLASS="CITEREFENTRY"
|
||||
><SPAN
|
||||
CLASS="REFENTRYTITLE"
|
||||
>dig</SPAN
|
||||
>(1)</SPAN
|
||||
>,
|
||||
<SPAN
|
||||
CLASS="CITEREFENTRY"
|
||||
><SPAN
|
||||
CLASS="REFENTRYTITLE"
|
||||
>host</SPAN
|
||||
>(1)</SPAN
|
||||
>,
|
||||
<SPAN
|
||||
CLASS="CITEREFENTRY"
|
||||
><SPAN
|
||||
CLASS="REFENTRYTITLE"
|
||||
>named</SPAN
|
||||
>(8)</SPAN
|
||||
>.</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN234"
|
||||
></A
|
||||
><H2
|
||||
>Author</H2
|
||||
><P
|
||||
>Andrew Cherenson</P
|
||||
></DIV
|
||||
></BODY
|
||||
></HTML
|
||||
>
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
# Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
# Copyright (C) 2000-2002 Internet Software Consortium.
|
||||
#
|
||||
# Permission to use, copy, modify, and distribute this software for any
|
||||
@@ -13,7 +13,7 @@
|
||||
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
# PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
# $Id: Makefile.in,v 1.19.12.12 2005/05/02 00:25:54 marka Exp $
|
||||
# $Id: Makefile.in,v 1.19.12.9 2004/07/20 07:01:48 marka Exp $
|
||||
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
@@ -58,8 +58,7 @@ dnssec-keygen@EXEEXT@: dnssec-keygen.@O@ ${OBJS} ${DEPLIBS}
|
||||
dnssec-keygen.@O@ ${OBJS} ${LIBS}
|
||||
|
||||
dnssec-signzone.@O@: dnssec-signzone.c
|
||||
${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} -DVERSION=\"${VERSION}\" \
|
||||
-c ${srcdir}/dnssec-signzone.c
|
||||
${LIBTOOL_MODE_COMPILE} ${PURIFY} ${CC} ${ALL_CFLAGS} -c $<
|
||||
|
||||
dnssec-signzone@EXEEXT@: dnssec-signzone.@O@ ${OBJS} ${DEPLIBS}
|
||||
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
|
||||
|
||||
@@ -1,171 +1,174 @@
|
||||
.\" Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2000-2003 Internet Software Consortium.
|
||||
.\"
|
||||
.\" Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2000-2003 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 ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
.\" REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
.\" AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
.\" AND FITNESS. IN NO EVENT SHALL ISC 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: dnssec-keygen.8,v 1.19.12.10 2006/06/29 13:02:30 marka Exp $
|
||||
.\" $Id: dnssec-keygen.8,v 1.19.12.5 2004/06/11 02:32:45 marka Exp $
|
||||
.\"
|
||||
.hy 0
|
||||
.ad l
|
||||
.\" Title: dnssec\-keygen
|
||||
.\" Author:
|
||||
.\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
|
||||
.\" Date: June 30, 2000
|
||||
.\" Manual: BIND9
|
||||
.\" Source: BIND9
|
||||
.\"
|
||||
.TH "DNSSEC\-KEYGEN" "8" "June 30, 2000" "BIND9" "BIND9"
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.SH "NAME"
|
||||
dnssec\-keygen \- DNSSEC key generation tool
|
||||
.SH "SYNOPSIS"
|
||||
.HP 14
|
||||
\fBdnssec\-keygen\fR {\-a\ \fIalgorithm\fR} {\-b\ \fIkeysize\fR} {\-n\ \fInametype\fR} [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-e\fR] [\fB\-f\ \fR\fB\fIflag\fR\fR] [\fB\-g\ \fR\fB\fIgenerator\fR\fR] [\fB\-h\fR] [\fB\-k\fR] [\fB\-p\ \fR\fB\fIprotocol\fR\fR] [\fB\-r\ \fR\fB\fIrandomdev\fR\fR] [\fB\-s\ \fR\fB\fIstrength\fR\fR] [\fB\-t\ \fR\fB\fItype\fR\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] {name}
|
||||
.TH "DNSSEC-KEYGEN" "8" "June 30, 2000" "BIND9" ""
|
||||
.SH NAME
|
||||
dnssec-keygen \- DNSSEC key generation tool
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
\fBdnssec-keygen\fR \fB-a \fIalgorithm\fB\fR \fB-b \fIkeysize\fB\fR \fB-n \fInametype\fB\fR [ \fB-c \fIclass\fB\fR ] [ \fB-e\fR ] [ \fB-f \fIflag\fB\fR ] [ \fB-g \fIgenerator\fB\fR ] [ \fB-h\fR ] [ \fB-k\fR ] [ \fB-p \fIprotocol\fB\fR ] [ \fB-r \fIrandomdev\fB\fR ] [ \fB-s \fIstrength\fB\fR ] [ \fB-t \fItype\fB\fR ] [ \fB-v \fIlevel\fB\fR ] \fBname\fR
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
\fBdnssec\-keygen\fR
|
||||
generates keys for DNSSEC (Secure DNS), as defined in RFC 2535 and RFC <TBA\\>. It can also generate keys for use with TSIG (Transaction Signatures), as defined in RFC 2845.
|
||||
\fBdnssec-keygen\fR generates keys for DNSSEC
|
||||
(Secure DNS), as defined in RFC 2535 and RFC <TBA\\>. It can also generate
|
||||
keys for use with TSIG (Transaction Signatures), as
|
||||
defined in RFC 2845.
|
||||
.SH "OPTIONS"
|
||||
.TP 3n
|
||||
\-a \fIalgorithm\fR
|
||||
.TP
|
||||
\fB-a \fIalgorithm\fB\fR
|
||||
Selects the cryptographic algorithm. The value of
|
||||
\fBalgorithm\fR
|
||||
must be one of RSAMD5 (RSA) or RSASHA1, DSA, DH (Diffie Hellman), or HMAC\-MD5. These values are case insensitive.
|
||||
.sp
|
||||
Note 1: that for DNSSEC, RSASHA1 is a mandatory to implement algorithm, and DSA is recommended. For TSIG, HMAC\-MD5 is mandatory.
|
||||
.sp
|
||||
Note 2: HMAC\-MD5 and DH automatically set the \-k flag.
|
||||
.TP 3n
|
||||
\-b \fIkeysize\fR
|
||||
Specifies the number of bits in the key. The choice of key size depends on the algorithm used. RSAMD5 / RSASHA1 keys must be between 512 and 2048 bits. Diffie Hellman keys must be between 128 and 4096 bits. DSA keys must be between 512 and 1024 bits and an exact multiple of 64. HMAC\-MD5 keys must be between 1 and 512 bits.
|
||||
.TP 3n
|
||||
\-n \fInametype\fR
|
||||
\fBalgorithm\fR must be one of RSAMD5 (RSA) or RSASHA1,
|
||||
DSA, DH (Diffie Hellman), or HMAC-MD5. These values
|
||||
are case insensitive.
|
||||
|
||||
Note 1: that for DNSSEC, RSASHA1 is a mandatory to implement algorithm,
|
||||
and DSA is recommended. For TSIG, HMAC-MD5 is mandatory.
|
||||
|
||||
Note 2: HMAC-MD5 and DH automatically set the -k flag.
|
||||
.TP
|
||||
\fB-b \fIkeysize\fB\fR
|
||||
Specifies the number of bits in the key. The choice of key
|
||||
size depends on the algorithm used. RSAMD5 / RSASHA1 keys must be between
|
||||
512 and 2048 bits. Diffie Hellman keys must be between
|
||||
128 and 4096 bits. DSA keys must be between 512 and 1024
|
||||
bits and an exact multiple of 64. HMAC-MD5 keys must be
|
||||
between 1 and 512 bits.
|
||||
.TP
|
||||
\fB-n \fInametype\fB\fR
|
||||
Specifies the owner type of the key. The value of
|
||||
\fBnametype\fR
|
||||
must either be ZONE (for a DNSSEC zone key (KEY/DNSKEY)), HOST or ENTITY (for a key associated with a host (KEY)), USER (for a key associated with a user(KEY)) or OTHER (DNSKEY). These values are case insensitive.
|
||||
.TP 3n
|
||||
\-c \fIclass\fR
|
||||
Indicates that the DNS record containing the key should have the specified class. If not specified, class IN is used.
|
||||
.TP 3n
|
||||
\-e
|
||||
\fBnametype\fR must either be ZONE (for a DNSSEC
|
||||
zone key (KEY/DNSKEY)), HOST or ENTITY (for a key associated with a host (KEY)),
|
||||
USER (for a key associated with a user(KEY)) or OTHER (DNSKEY). These values are
|
||||
case insensitive.
|
||||
.TP
|
||||
\fB-c \fIclass\fB\fR
|
||||
Indicates that the DNS record containing the key should have
|
||||
the specified class. If not specified, class IN is used.
|
||||
.TP
|
||||
\fB-e\fR
|
||||
If generating an RSAMD5/RSASHA1 key, use a large exponent.
|
||||
.TP 3n
|
||||
\-f \fIflag\fR
|
||||
Set the specified flag in the flag field of the KEY/DNSKEY record. The only recognized flag is KSK (Key Signing Key) DNSKEY.
|
||||
.TP 3n
|
||||
\-g \fIgenerator\fR
|
||||
If generating a Diffie Hellman key, use this generator. Allowed values are 2 and 5. If no generator is specified, a known prime from RFC 2539 will be used if possible; otherwise the default is 2.
|
||||
.TP 3n
|
||||
\-h
|
||||
.TP
|
||||
\fB-f \fIflag\fB\fR
|
||||
Set the specified flag in the flag field of the KEY/DNSKEY record.
|
||||
The only recognized flag is KSK (Key Signing Key) DNSKEY.
|
||||
.TP
|
||||
\fB-g \fIgenerator\fB\fR
|
||||
If generating a Diffie Hellman key, use this generator.
|
||||
Allowed values are 2 and 5. If no generator
|
||||
is specified, a known prime from RFC 2539 will be used
|
||||
if possible; otherwise the default is 2.
|
||||
.TP
|
||||
\fB-h\fR
|
||||
Prints a short summary of the options and arguments to
|
||||
\fBdnssec\-keygen\fR.
|
||||
.TP 3n
|
||||
\-k
|
||||
\fBdnssec-keygen\fR.
|
||||
.TP
|
||||
\fB-k\fR
|
||||
Generate KEY records rather than DNSKEY records.
|
||||
.TP 3n
|
||||
\-p \fIprotocol\fR
|
||||
Sets the protocol value for the generated key. The protocol is a number between 0 and 255. The default is 3 (DNSSEC). Other possible values for this argument are listed in RFC 2535 and its successors.
|
||||
.TP 3n
|
||||
\-r \fIrandomdev\fR
|
||||
Specifies the source of randomness. If the operating system does not provide a
|
||||
\fI/dev/random\fR
|
||||
or equivalent device, the default source of randomness is keyboard input.
|
||||
\fIrandomdev\fR
|
||||
specifies the name of a character device or file containing random data to be used instead of the default. The special value
|
||||
\fIkeyboard\fR
|
||||
indicates that keyboard input should be used.
|
||||
.TP 3n
|
||||
\-s \fIstrength\fR
|
||||
Specifies the strength value of the key. The strength is a number between 0 and 15, and currently has no defined purpose in DNSSEC.
|
||||
.TP 3n
|
||||
\-t \fItype\fR
|
||||
Indicates the use of the key.
|
||||
\fBtype\fR
|
||||
must be one of AUTHCONF, NOAUTHCONF, NOAUTH, or NOCONF. The default is AUTHCONF. AUTH refers to the ability to authenticate data, and CONF the ability to encrypt data.
|
||||
.TP 3n
|
||||
\-v \fIlevel\fR
|
||||
.TP
|
||||
\fB-p \fIprotocol\fB\fR
|
||||
Sets the protocol value for the generated key. The protocol
|
||||
is a number between 0 and 255. The default is 3 (DNSSEC).
|
||||
Other possible values for this argument are listed in
|
||||
RFC 2535 and its successors.
|
||||
.TP
|
||||
\fB-r \fIrandomdev\fB\fR
|
||||
Specifies the source of randomness. If the operating
|
||||
system does not provide a \fI/dev/random\fR
|
||||
or equivalent device, the default source of randomness
|
||||
is keyboard input. \fIrandomdev\fR specifies
|
||||
the name of a character device or file containing random
|
||||
data to be used instead of the default. The special value
|
||||
\fIkeyboard\fR indicates that keyboard
|
||||
input should be used.
|
||||
.TP
|
||||
\fB-s \fIstrength\fB\fR
|
||||
Specifies the strength value of the key. The strength is
|
||||
a number between 0 and 15, and currently has no defined
|
||||
purpose in DNSSEC.
|
||||
.TP
|
||||
\fB-t \fItype\fB\fR
|
||||
Indicates the use of the key. \fBtype\fR must be
|
||||
one of AUTHCONF, NOAUTHCONF, NOAUTH, or NOCONF. The default
|
||||
is AUTHCONF. AUTH refers to the ability to authenticate
|
||||
data, and CONF the ability to encrypt data.
|
||||
.TP
|
||||
\fB-v \fIlevel\fB\fR
|
||||
Sets the debugging level.
|
||||
.SH "GENERATED KEYS"
|
||||
.PP
|
||||
When
|
||||
\fBdnssec\-keygen\fR
|
||||
completes successfully, it prints a string of the form
|
||||
\fIKnnnn.+aaa+iiiii\fR
|
||||
to the standard output. This is an identification string for the key it has generated.
|
||||
.TP 3n
|
||||
When \fBdnssec-keygen\fR completes successfully,
|
||||
it prints a string of the form \fIKnnnn.+aaa+iiiii\fR
|
||||
to the standard output. This is an identification string for
|
||||
the key it has generated. These strings can be used as arguments
|
||||
to \fBdnssec-makekeyset\fR.
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
\fInnnn\fR
|
||||
is the key name.
|
||||
.TP 3n
|
||||
\fInnnn\fR is the key name.
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
\fIaaa\fR
|
||||
is the numeric representation of the algorithm.
|
||||
.TP 3n
|
||||
\fIaaa\fR is the numeric representation of the
|
||||
algorithm.
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
\fIiiiii\fR
|
||||
is the key identifier (or footprint).
|
||||
.sp
|
||||
.RE
|
||||
\fIiiiii\fR is the key identifier (or footprint).
|
||||
.PP
|
||||
\fBdnssec\-keygen\fR
|
||||
creates two file, with names based on the printed string.
|
||||
\fIKnnnn.+aaa+iiiii.key\fR
|
||||
\fBdnssec-keygen\fR creates two file, with names based
|
||||
on the printed string. \fIKnnnn.+aaa+iiiii.key\fR
|
||||
contains the public key, and
|
||||
\fIKnnnn.+aaa+iiiii.private\fR
|
||||
contains the private key.
|
||||
\fIKnnnn.+aaa+iiiii.private\fR contains the private
|
||||
key.
|
||||
.PP
|
||||
The
|
||||
\fI.key\fR
|
||||
file contains a DNS KEY record that can be inserted into a zone file (directly or with a $INCLUDE statement).
|
||||
.PP
|
||||
The
|
||||
\fI.private\fR
|
||||
file contains algorithm specific fields. For obvious security reasons, this file does not have general read permission.
|
||||
The \fI.key\fR file contains a DNS KEY record that
|
||||
can be inserted into a zone file (directly or with a $INCLUDE
|
||||
statement).
|
||||
.PP
|
||||
.PP
|
||||
The \fI.private\fR file contains algorithm specific
|
||||
fields. For obvious security reasons, this file does not have
|
||||
general read permission.
|
||||
.PP
|
||||
.PP
|
||||
Both \fI.key\fR and \fI.private\fR
|
||||
files are generated for symmetric encryption algorithm such as
|
||||
HMAC-MD5, even though the public and private key are equivalent.
|
||||
.PP
|
||||
Both
|
||||
\fI.key\fR
|
||||
and
|
||||
\fI.private\fR
|
||||
files are generated for symmetric encryption algorithm such as HMAC\-MD5, even though the public and private key are equivalent.
|
||||
.SH "EXAMPLE"
|
||||
.PP
|
||||
To generate a 768\-bit DSA key for the domain
|
||||
\fBexample.com\fR, the following command would be issued:
|
||||
To generate a 768-bit DSA key for the domain
|
||||
\fBexample.com\fR, the following command would be
|
||||
issued:
|
||||
.PP
|
||||
\fBdnssec\-keygen \-a DSA \-b 768 \-n ZONE example.com\fR
|
||||
\fBdnssec-keygen -a DSA -b 768 -n ZONE example.com\fR
|
||||
.PP
|
||||
The command would print a string of the form:
|
||||
.PP
|
||||
\fBKexample.com.+003+26160\fR
|
||||
.PP
|
||||
In this example,
|
||||
\fBdnssec\-keygen\fR
|
||||
creates the files
|
||||
\fIKexample.com.+003+26160.key\fR
|
||||
and
|
||||
In this example, \fBdnssec-keygen\fR creates
|
||||
the files \fIKexample.com.+003+26160.key\fR and
|
||||
\fIKexample.com.+003+26160.private\fR
|
||||
.SH "SEE ALSO"
|
||||
.PP
|
||||
\fBdnssec\-signzone\fR(8),
|
||||
BIND 9 Administrator Reference Manual,
|
||||
RFC 2535,
|
||||
RFC 2845,
|
||||
RFC 2539.
|
||||
\fBdnssec-signzone\fR(8),
|
||||
\fIBIND 9 Administrator Reference Manual\fR,
|
||||
\fIRFC 2535\fR,
|
||||
\fIRFC 2845\fR,
|
||||
\fIRFC 2539\fR.
|
||||
.SH "AUTHOR"
|
||||
.PP
|
||||
Internet Systems Consortium
|
||||
.SH "COPYRIGHT"
|
||||
Copyright \(co 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
@@ -1,9 +1,7 @@
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
|
||||
[<!ENTITY mdash "—">]>
|
||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
|
||||
<!--
|
||||
- Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2000-2003 Internet Software Consortium.
|
||||
- Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2001-2003 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
|
||||
@@ -18,7 +16,7 @@
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
|
||||
<!-- $Id: dnssec-keygen.docbook,v 1.3.12.9 2005/08/30 01:41:41 marka Exp $ -->
|
||||
<!-- $Id: dnssec-keygen.docbook,v 1.3.12.6 2004/06/11 01:17:34 marka Exp $ -->
|
||||
|
||||
<refentry>
|
||||
<refentryinfo>
|
||||
@@ -31,21 +29,6 @@
|
||||
<refmiscinfo>BIND9</refmiscinfo>
|
||||
</refmeta>
|
||||
|
||||
<docinfo>
|
||||
<copyright>
|
||||
<year>2004</year>
|
||||
<year>2005</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
<copyright>
|
||||
<year>2000</year>
|
||||
<year>2001</year>
|
||||
<year>2002</year>
|
||||
<year>2003</year>
|
||||
<holder>Internet Software Consortium.</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
<refnamediv>
|
||||
<refname><application>dnssec-keygen</application></refname>
|
||||
<refpurpose>DNSSEC key generation tool</refpurpose>
|
||||
@@ -261,7 +244,8 @@
|
||||
When <command>dnssec-keygen</command> completes successfully,
|
||||
it prints a string of the form <filename>Knnnn.+aaa+iiiii</filename>
|
||||
to the standard output. This is an identification string for
|
||||
the key it has generated.
|
||||
the key it has generated. These strings can be used as arguments
|
||||
to <command>dnssec-makekeyset</command>.
|
||||
</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
|
||||
@@ -1,228 +1,544 @@
|
||||
<!--
|
||||
- Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2000-2003 Internet Software Consortium.
|
||||
-
|
||||
- Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2001-2003 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 ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
- AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
- AND FITNESS. IN NO EVENT SHALL ISC 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: dnssec-keygen.html,v 1.5.2.1.4.15 2006/06/29 13:02:30 marka Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>dnssec-keygen</title>
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
|
||||
<a name="id2482688"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2>Name</h2>
|
||||
<p><span class="application">dnssec-keygen</span> — DNSSEC key generation tool</p>
|
||||
</div>
|
||||
<div class="refsynopsisdiv">
|
||||
<h2>Synopsis</h2>
|
||||
<div class="cmdsynopsis"><p><code class="command">dnssec-keygen</code> {-a <em class="replaceable"><code>algorithm</code></em>} {-b <em class="replaceable"><code>keysize</code></em>} {-n <em class="replaceable"><code>nametype</code></em>} [<code class="option">-c <em class="replaceable"><code>class</code></em></code>] [<code class="option">-e</code>] [<code class="option">-f <em class="replaceable"><code>flag</code></em></code>] [<code class="option">-g <em class="replaceable"><code>generator</code></em></code>] [<code class="option">-h</code>] [<code class="option">-k</code>] [<code class="option">-p <em class="replaceable"><code>protocol</code></em></code>] [<code class="option">-r <em class="replaceable"><code>randomdev</code></em></code>] [<code class="option">-s <em class="replaceable"><code>strength</code></em></code>] [<code class="option">-t <em class="replaceable"><code>type</code></em></code>] [<code class="option">-v <em class="replaceable"><code>level</code></em></code>] {name}</p></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549521"></a><h2>DESCRIPTION</h2>
|
||||
<p>
|
||||
<span><strong class="command">dnssec-keygen</strong></span> generates keys for DNSSEC
|
||||
|
||||
<!-- $Id: dnssec-keygen.html,v 1.5.2.1.4.6 2004/08/22 23:38:58 marka Exp $ -->
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<HTML
|
||||
><HEAD
|
||||
><TITLE
|
||||
>dnssec-keygen</TITLE
|
||||
><META
|
||||
NAME="GENERATOR"
|
||||
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"></HEAD
|
||||
><BODY
|
||||
CLASS="REFENTRY"
|
||||
BGCOLOR="#FFFFFF"
|
||||
TEXT="#000000"
|
||||
LINK="#0000FF"
|
||||
VLINK="#840084"
|
||||
ALINK="#0000FF"
|
||||
><H1
|
||||
><A
|
||||
NAME="AEN1"
|
||||
></A
|
||||
><SPAN
|
||||
CLASS="APPLICATION"
|
||||
>dnssec-keygen</SPAN
|
||||
></H1
|
||||
><DIV
|
||||
CLASS="REFNAMEDIV"
|
||||
><A
|
||||
NAME="AEN9"
|
||||
></A
|
||||
><H2
|
||||
>Name</H2
|
||||
><SPAN
|
||||
CLASS="APPLICATION"
|
||||
>dnssec-keygen</SPAN
|
||||
> -- DNSSEC key generation tool</DIV
|
||||
><DIV
|
||||
CLASS="REFSYNOPSISDIV"
|
||||
><A
|
||||
NAME="AEN13"
|
||||
></A
|
||||
><H2
|
||||
>Synopsis</H2
|
||||
><P
|
||||
><B
|
||||
CLASS="COMMAND"
|
||||
>dnssec-keygen</B
|
||||
> {-a <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>algorithm</VAR
|
||||
>} {-b <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>keysize</VAR
|
||||
>} {-n <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>nametype</VAR
|
||||
>} [<VAR
|
||||
CLASS="OPTION"
|
||||
>-c <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>class</VAR
|
||||
></VAR
|
||||
>] [<VAR
|
||||
CLASS="OPTION"
|
||||
>-e</VAR
|
||||
>] [<VAR
|
||||
CLASS="OPTION"
|
||||
>-f <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>flag</VAR
|
||||
></VAR
|
||||
>] [<VAR
|
||||
CLASS="OPTION"
|
||||
>-g <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>generator</VAR
|
||||
></VAR
|
||||
>] [<VAR
|
||||
CLASS="OPTION"
|
||||
>-h</VAR
|
||||
>] [<VAR
|
||||
CLASS="OPTION"
|
||||
>-k</VAR
|
||||
>] [<VAR
|
||||
CLASS="OPTION"
|
||||
>-p <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>protocol</VAR
|
||||
></VAR
|
||||
>] [<VAR
|
||||
CLASS="OPTION"
|
||||
>-r <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>randomdev</VAR
|
||||
></VAR
|
||||
>] [<VAR
|
||||
CLASS="OPTION"
|
||||
>-s <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>strength</VAR
|
||||
></VAR
|
||||
>] [<VAR
|
||||
CLASS="OPTION"
|
||||
>-t <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>type</VAR
|
||||
></VAR
|
||||
>] [<VAR
|
||||
CLASS="OPTION"
|
||||
>-v <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>level</VAR
|
||||
></VAR
|
||||
>] {name}</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN53"
|
||||
></A
|
||||
><H2
|
||||
>DESCRIPTION</H2
|
||||
><P
|
||||
> <B
|
||||
CLASS="COMMAND"
|
||||
>dnssec-keygen</B
|
||||
> generates keys for DNSSEC
|
||||
(Secure DNS), as defined in RFC 2535 and RFC <TBA\>. It can also generate
|
||||
keys for use with TSIG (Transaction Signatures), as
|
||||
defined in RFC 2845.
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549533"></a><h2>OPTIONS</h2>
|
||||
<div class="variablelist"><dl>
|
||||
<dt><span class="term">-a <em class="replaceable"><code>algorithm</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Selects the cryptographic algorithm. The value of
|
||||
<code class="option">algorithm</code> must be one of RSAMD5 (RSA) or RSASHA1,
|
||||
</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN57"
|
||||
></A
|
||||
><H2
|
||||
>OPTIONS</H2
|
||||
><P
|
||||
></P
|
||||
><DIV
|
||||
CLASS="VARIABLELIST"
|
||||
><DL
|
||||
><DT
|
||||
>-a <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>algorithm</VAR
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Selects the cryptographic algorithm. The value of
|
||||
<VAR
|
||||
CLASS="OPTION"
|
||||
>algorithm</VAR
|
||||
> must be one of RSAMD5 (RSA) or RSASHA1,
|
||||
DSA, DH (Diffie Hellman), or HMAC-MD5. These values
|
||||
are case insensitive.
|
||||
</p>
|
||||
<p>
|
||||
Note 1: that for DNSSEC, RSASHA1 is a mandatory to implement algorithm,
|
||||
</P
|
||||
><P
|
||||
> Note 1: that for DNSSEC, RSASHA1 is a mandatory to implement algorithm,
|
||||
and DSA is recommended. For TSIG, HMAC-MD5 is mandatory.
|
||||
</p>
|
||||
<p>
|
||||
Note 2: HMAC-MD5 and DH automatically set the -k flag.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-b <em class="replaceable"><code>keysize</code></em></span></dt>
|
||||
<dd><p>
|
||||
Specifies the number of bits in the key. The choice of key
|
||||
</P
|
||||
><P
|
||||
> Note 2: HMAC-MD5 and DH automatically set the -k flag.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-b <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>keysize</VAR
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Specifies the number of bits in the key. The choice of key
|
||||
size depends on the algorithm used. RSAMD5 / RSASHA1 keys must be between
|
||||
512 and 2048 bits. Diffie Hellman keys must be between
|
||||
128 and 4096 bits. DSA keys must be between 512 and 1024
|
||||
bits and an exact multiple of 64. HMAC-MD5 keys must be
|
||||
between 1 and 512 bits.
|
||||
</p></dd>
|
||||
<dt><span class="term">-n <em class="replaceable"><code>nametype</code></em></span></dt>
|
||||
<dd><p>
|
||||
Specifies the owner type of the key. The value of
|
||||
<code class="option">nametype</code> must either be ZONE (for a DNSSEC
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-n <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>nametype</VAR
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Specifies the owner type of the key. The value of
|
||||
<VAR
|
||||
CLASS="OPTION"
|
||||
>nametype</VAR
|
||||
> must either be ZONE (for a DNSSEC
|
||||
zone key (KEY/DNSKEY)), HOST or ENTITY (for a key associated with a host (KEY)),
|
||||
USER (for a key associated with a user(KEY)) or OTHER (DNSKEY). These values are
|
||||
case insensitive.
|
||||
</p></dd>
|
||||
<dt><span class="term">-c <em class="replaceable"><code>class</code></em></span></dt>
|
||||
<dd><p>
|
||||
Indicates that the DNS record containing the key should have
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-c <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>class</VAR
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Indicates that the DNS record containing the key should have
|
||||
the specified class. If not specified, class IN is used.
|
||||
</p></dd>
|
||||
<dt><span class="term">-e</span></dt>
|
||||
<dd><p>
|
||||
If generating an RSAMD5/RSASHA1 key, use a large exponent.
|
||||
</p></dd>
|
||||
<dt><span class="term">-f <em class="replaceable"><code>flag</code></em></span></dt>
|
||||
<dd><p>
|
||||
Set the specified flag in the flag field of the KEY/DNSKEY record.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-e</DT
|
||||
><DD
|
||||
><P
|
||||
> If generating an RSAMD5/RSASHA1 key, use a large exponent.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-f <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>flag</VAR
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Set the specified flag in the flag field of the KEY/DNSKEY record.
|
||||
The only recognized flag is KSK (Key Signing Key) DNSKEY.
|
||||
</p></dd>
|
||||
<dt><span class="term">-g <em class="replaceable"><code>generator</code></em></span></dt>
|
||||
<dd><p>
|
||||
If generating a Diffie Hellman key, use this generator.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-g <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>generator</VAR
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> If generating a Diffie Hellman key, use this generator.
|
||||
Allowed values are 2 and 5. If no generator
|
||||
is specified, a known prime from RFC 2539 will be used
|
||||
if possible; otherwise the default is 2.
|
||||
</p></dd>
|
||||
<dt><span class="term">-h</span></dt>
|
||||
<dd><p>
|
||||
Prints a short summary of the options and arguments to
|
||||
<span><strong class="command">dnssec-keygen</strong></span>.
|
||||
</p></dd>
|
||||
<dt><span class="term">-k</span></dt>
|
||||
<dd><p>
|
||||
Generate KEY records rather than DNSKEY records.
|
||||
</p></dd>
|
||||
<dt><span class="term">-p <em class="replaceable"><code>protocol</code></em></span></dt>
|
||||
<dd><p>
|
||||
Sets the protocol value for the generated key. The protocol
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-h</DT
|
||||
><DD
|
||||
><P
|
||||
> Prints a short summary of the options and arguments to
|
||||
<B
|
||||
CLASS="COMMAND"
|
||||
>dnssec-keygen</B
|
||||
>.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-k</DT
|
||||
><DD
|
||||
><P
|
||||
> Generate KEY records rather than DNSKEY records.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-p <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>protocol</VAR
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Sets the protocol value for the generated key. The protocol
|
||||
is a number between 0 and 255. The default is 3 (DNSSEC).
|
||||
Other possible values for this argument are listed in
|
||||
RFC 2535 and its successors.
|
||||
</p></dd>
|
||||
<dt><span class="term">-r <em class="replaceable"><code>randomdev</code></em></span></dt>
|
||||
<dd><p>
|
||||
Specifies the source of randomness. If the operating
|
||||
system does not provide a <code class="filename">/dev/random</code>
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-r <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>randomdev</VAR
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Specifies the source of randomness. If the operating
|
||||
system does not provide a <TT
|
||||
CLASS="FILENAME"
|
||||
>/dev/random</TT
|
||||
>
|
||||
or equivalent device, the default source of randomness
|
||||
is keyboard input. <code class="filename">randomdev</code> specifies
|
||||
is keyboard input. <TT
|
||||
CLASS="FILENAME"
|
||||
>randomdev</TT
|
||||
> specifies
|
||||
the name of a character device or file containing random
|
||||
data to be used instead of the default. The special value
|
||||
<code class="filename">keyboard</code> indicates that keyboard
|
||||
<TT
|
||||
CLASS="FILENAME"
|
||||
>keyboard</TT
|
||||
> indicates that keyboard
|
||||
input should be used.
|
||||
</p></dd>
|
||||
<dt><span class="term">-s <em class="replaceable"><code>strength</code></em></span></dt>
|
||||
<dd><p>
|
||||
Specifies the strength value of the key. The strength is
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-s <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>strength</VAR
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Specifies the strength value of the key. The strength is
|
||||
a number between 0 and 15, and currently has no defined
|
||||
purpose in DNSSEC.
|
||||
</p></dd>
|
||||
<dt><span class="term">-t <em class="replaceable"><code>type</code></em></span></dt>
|
||||
<dd><p>
|
||||
Indicates the use of the key. <code class="option">type</code> must be
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-t <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>type</VAR
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Indicates the use of the key. <VAR
|
||||
CLASS="OPTION"
|
||||
>type</VAR
|
||||
> must be
|
||||
one of AUTHCONF, NOAUTHCONF, NOAUTH, or NOCONF. The default
|
||||
is AUTHCONF. AUTH refers to the ability to authenticate
|
||||
data, and CONF the ability to encrypt data.
|
||||
</p></dd>
|
||||
<dt><span class="term">-v <em class="replaceable"><code>level</code></em></span></dt>
|
||||
<dd><p>
|
||||
Sets the debugging level.
|
||||
</p></dd>
|
||||
</dl></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549939"></a><h2>GENERATED KEYS</h2>
|
||||
<p>
|
||||
When <span><strong class="command">dnssec-keygen</strong></span> completes successfully,
|
||||
it prints a string of the form <code class="filename">Knnnn.+aaa+iiiii</code>
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-v <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>level</VAR
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Sets the debugging level.
|
||||
</P
|
||||
></DD
|
||||
></DL
|
||||
></DIV
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN136"
|
||||
></A
|
||||
><H2
|
||||
>GENERATED KEYS</H2
|
||||
><P
|
||||
> When <B
|
||||
CLASS="COMMAND"
|
||||
>dnssec-keygen</B
|
||||
> completes successfully,
|
||||
it prints a string of the form <TT
|
||||
CLASS="FILENAME"
|
||||
>Knnnn.+aaa+iiiii</TT
|
||||
>
|
||||
to the standard output. This is an identification string for
|
||||
the key it has generated.
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li><p>
|
||||
<code class="filename">nnnn</code> is the key name.
|
||||
</p></li>
|
||||
<li><p>
|
||||
<code class="filename">aaa</code> is the numeric representation of the
|
||||
the key it has generated. These strings can be used as arguments
|
||||
to <B
|
||||
CLASS="COMMAND"
|
||||
>dnssec-makekeyset</B
|
||||
>.
|
||||
</P
|
||||
><P
|
||||
></P
|
||||
><UL
|
||||
><LI
|
||||
><P
|
||||
> <TT
|
||||
CLASS="FILENAME"
|
||||
>nnnn</TT
|
||||
> is the key name.
|
||||
</P
|
||||
></LI
|
||||
><LI
|
||||
><P
|
||||
> <TT
|
||||
CLASS="FILENAME"
|
||||
>aaa</TT
|
||||
> is the numeric representation of the
|
||||
algorithm.
|
||||
</p></li>
|
||||
<li><p>
|
||||
<code class="filename">iiiii</code> is the key identifier (or footprint).
|
||||
</p></li>
|
||||
</ul></div>
|
||||
<p>
|
||||
<span><strong class="command">dnssec-keygen</strong></span> creates two file, with names based
|
||||
on the printed string. <code class="filename">Knnnn.+aaa+iiiii.key</code>
|
||||
</P
|
||||
></LI
|
||||
><LI
|
||||
><P
|
||||
> <TT
|
||||
CLASS="FILENAME"
|
||||
>iiiii</TT
|
||||
> is the key identifier (or footprint).
|
||||
</P
|
||||
></LI
|
||||
></UL
|
||||
><P
|
||||
> <B
|
||||
CLASS="COMMAND"
|
||||
>dnssec-keygen</B
|
||||
> creates two file, with names based
|
||||
on the printed string. <TT
|
||||
CLASS="FILENAME"
|
||||
>Knnnn.+aaa+iiiii.key</TT
|
||||
>
|
||||
contains the public key, and
|
||||
<code class="filename">Knnnn.+aaa+iiiii.private</code> contains the private
|
||||
<TT
|
||||
CLASS="FILENAME"
|
||||
>Knnnn.+aaa+iiiii.private</TT
|
||||
> contains the private
|
||||
key.
|
||||
</p>
|
||||
<p>
|
||||
The <code class="filename">.key</code> file contains a DNS KEY record that
|
||||
</P
|
||||
><P
|
||||
> The <TT
|
||||
CLASS="FILENAME"
|
||||
>.key</TT
|
||||
> file contains a DNS KEY record that
|
||||
can be inserted into a zone file (directly or with a $INCLUDE
|
||||
statement).
|
||||
</p>
|
||||
<p>
|
||||
The <code class="filename">.private</code> file contains algorithm specific
|
||||
</P
|
||||
><P
|
||||
> The <TT
|
||||
CLASS="FILENAME"
|
||||
>.private</TT
|
||||
> file contains algorithm specific
|
||||
fields. For obvious security reasons, this file does not have
|
||||
general read permission.
|
||||
</p>
|
||||
<p>
|
||||
Both <code class="filename">.key</code> and <code class="filename">.private</code>
|
||||
</P
|
||||
><P
|
||||
> Both <TT
|
||||
CLASS="FILENAME"
|
||||
>.key</TT
|
||||
> and <TT
|
||||
CLASS="FILENAME"
|
||||
>.private</TT
|
||||
>
|
||||
files are generated for symmetric encryption algorithm such as
|
||||
HMAC-MD5, even though the public and private key are equivalent.
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2550027"></a><h2>EXAMPLE</h2>
|
||||
<p>
|
||||
To generate a 768-bit DSA key for the domain
|
||||
<strong class="userinput"><code>example.com</code></strong>, the following command would be
|
||||
</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN163"
|
||||
></A
|
||||
><H2
|
||||
>EXAMPLE</H2
|
||||
><P
|
||||
> To generate a 768-bit DSA key for the domain
|
||||
<KBD
|
||||
CLASS="USERINPUT"
|
||||
>example.com</KBD
|
||||
>, the following command would be
|
||||
issued:
|
||||
</p>
|
||||
<p>
|
||||
<strong class="userinput"><code>dnssec-keygen -a DSA -b 768 -n ZONE example.com</code></strong>
|
||||
</p>
|
||||
<p>
|
||||
The command would print a string of the form:
|
||||
</p>
|
||||
<p>
|
||||
<strong class="userinput"><code>Kexample.com.+003+26160</code></strong>
|
||||
</p>
|
||||
<p>
|
||||
In this example, <span><strong class="command">dnssec-keygen</strong></span> creates
|
||||
the files <code class="filename">Kexample.com.+003+26160.key</code> and
|
||||
<code class="filename">Kexample.com.+003+26160.private</code>
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2550073"></a><h2>SEE ALSO</h2>
|
||||
<p>
|
||||
<span class="citerefentry"><span class="refentrytitle">dnssec-signzone</span>(8)</span>,
|
||||
<em class="citetitle">BIND 9 Administrator Reference Manual</em>,
|
||||
<em class="citetitle">RFC 2535</em>,
|
||||
<em class="citetitle">RFC 2845</em>,
|
||||
<em class="citetitle">RFC 2539</em>.
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2550106"></a><h2>AUTHOR</h2>
|
||||
<p>
|
||||
<span class="corpauthor">Internet Systems Consortium</span>
|
||||
</p>
|
||||
</div>
|
||||
</div></body>
|
||||
</html>
|
||||
</P
|
||||
><P
|
||||
> <KBD
|
||||
CLASS="USERINPUT"
|
||||
>dnssec-keygen -a DSA -b 768 -n ZONE example.com</KBD
|
||||
>
|
||||
</P
|
||||
><P
|
||||
> The command would print a string of the form:
|
||||
</P
|
||||
><P
|
||||
> <KBD
|
||||
CLASS="USERINPUT"
|
||||
>Kexample.com.+003+26160</KBD
|
||||
>
|
||||
</P
|
||||
><P
|
||||
> In this example, <B
|
||||
CLASS="COMMAND"
|
||||
>dnssec-keygen</B
|
||||
> creates
|
||||
the files <TT
|
||||
CLASS="FILENAME"
|
||||
>Kexample.com.+003+26160.key</TT
|
||||
> and
|
||||
<TT
|
||||
CLASS="FILENAME"
|
||||
>Kexample.com.+003+26160.private</TT
|
||||
>
|
||||
</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN176"
|
||||
></A
|
||||
><H2
|
||||
>SEE ALSO</H2
|
||||
><P
|
||||
> <SPAN
|
||||
CLASS="CITEREFENTRY"
|
||||
><SPAN
|
||||
CLASS="REFENTRYTITLE"
|
||||
>dnssec-signzone</SPAN
|
||||
>(8)</SPAN
|
||||
>,
|
||||
<I
|
||||
CLASS="CITETITLE"
|
||||
>BIND 9 Administrator Reference Manual</I
|
||||
>,
|
||||
<I
|
||||
CLASS="CITETITLE"
|
||||
>RFC 2535</I
|
||||
>,
|
||||
<I
|
||||
CLASS="CITETITLE"
|
||||
>RFC 2845</I
|
||||
>,
|
||||
<I
|
||||
CLASS="CITETITLE"
|
||||
>RFC 2539</I
|
||||
>.
|
||||
</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN186"
|
||||
></A
|
||||
><H2
|
||||
>AUTHOR</H2
|
||||
><P
|
||||
> Internet Systems Consortium
|
||||
</P
|
||||
></DIV
|
||||
></BODY
|
||||
></HTML
|
||||
>
|
||||
@@ -0,0 +1,113 @@
|
||||
.\" Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2000, 2001, 2003 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 ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
.\" REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
.\" AND FITNESS. IN NO EVENT SHALL ISC 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: dnssec-makekeyset.8,v 1.16.2.2.4.1 2004/03/06 07:41:39 marka Exp $
|
||||
.\"
|
||||
.TH "DNSSEC-MAKEKEYSET" "8" "June 30, 2000" "BIND9" ""
|
||||
.SH NAME
|
||||
dnssec-makekeyset \- DNSSEC zone signing tool
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
\fBdnssec-makekeyset\fR [ \fB-a\fR ] [ \fB-s \fIstart-time\fB\fR ] [ \fB-e \fIend-time\fB\fR ] [ \fB-h\fR ] [ \fB-p\fR ] [ \fB-r \fIrandomdev\fB\fR ] [ \fB-t\fIttl\fB\fR ] [ \fB-v \fIlevel\fB\fR ] \fBkey\fR\fI...\fR
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
\fBdnssec-makekeyset\fR generates a key set from one
|
||||
or more keys created by \fBdnssec-keygen\fR. It creates
|
||||
a file containing a KEY record for each key, and self-signs the key
|
||||
set with each zone key. The output file is of the form
|
||||
\fIkeyset-nnnn.\fR, where \fInnnn\fR
|
||||
is the zone name.
|
||||
.SH "OPTIONS"
|
||||
.TP
|
||||
\fB-a\fR
|
||||
Verify all generated signatures.
|
||||
.TP
|
||||
\fB-s \fIstart-time\fB\fR
|
||||
Specify the date and time when the generated SIG records
|
||||
become valid. This can be either an absolute or relative
|
||||
time. An absolute start time is indicated by a number
|
||||
in YYYYMMDDHHMMSS notation; 20000530144500 denotes
|
||||
14:45:00 UTC on May 30th, 2000. A relative start time is
|
||||
indicated by +N, which is N seconds from the current time.
|
||||
If no \fBstart-time\fR is specified, the current
|
||||
time is used.
|
||||
.TP
|
||||
\fB-e \fIend-time\fB\fR
|
||||
Specify the date and time when the generated SIG records
|
||||
expire. As with \fBstart-time\fR, an absolute
|
||||
time is indicated in YYYYMMDDHHMMSS notation. A time relative
|
||||
to the start time is indicated with +N, which is N seconds from
|
||||
the start time. A time relative to the current time is
|
||||
indicated with now+N. If no \fBend-time\fR is
|
||||
specified, 30 days from the start time is used as a default.
|
||||
.TP
|
||||
\fB-h\fR
|
||||
Prints a short summary of the options and arguments to
|
||||
\fBdnssec-makekeyset\fR.
|
||||
.TP
|
||||
\fB-p\fR
|
||||
Use pseudo-random data when signing the zone. This is faster,
|
||||
but less secure, than using real random data. This option
|
||||
may be useful when signing large zones or when the entropy
|
||||
source is limited.
|
||||
.TP
|
||||
\fB-r \fIrandomdev\fB\fR
|
||||
Specifies the source of randomness. If the operating
|
||||
system does not provide a \fI/dev/random\fR
|
||||
or equivalent device, the default source of randomness
|
||||
is keyboard input. \fIrandomdev\fR specifies
|
||||
the name of a character device or file containing random
|
||||
data to be used instead of the default. The special value
|
||||
\fIkeyboard\fR indicates that keyboard
|
||||
input should be used.
|
||||
.TP
|
||||
\fB-t \fIttl\fB\fR
|
||||
Specify the TTL (time to live) of the KEY and SIG records.
|
||||
The default is 3600 seconds.
|
||||
.TP
|
||||
\fB-v \fIlevel\fB\fR
|
||||
Sets the debugging level.
|
||||
.TP
|
||||
\fBkey\fR
|
||||
The list of keys to be included in the keyset file. These keys
|
||||
are expressed in the form \fIKnnnn.+aaa+iiiii\fR
|
||||
as generated by \fBdnssec-keygen\fR.
|
||||
.SH "EXAMPLE"
|
||||
.PP
|
||||
The following command generates a keyset containing the DSA key for
|
||||
\fBexample.com\fR generated in the
|
||||
\fBdnssec-keygen\fR man page.
|
||||
.PP
|
||||
\fBdnssec-makekeyset -t 86400 -s 20000701120000 -e +2592000 Kexample.com.+003+26160\fR
|
||||
.PP
|
||||
In this example, \fBdnssec-makekeyset\fR creates
|
||||
the file \fIkeyset-example.com.\fR. This file
|
||||
contains the specified key and a self-generated signature.
|
||||
.PP
|
||||
The DNS administrator for \fBexample.com\fR could
|
||||
send \fIkeyset-example.com.\fR to the DNS
|
||||
administrator for \fB.com\fR for signing, if the
|
||||
\&.com zone is DNSSEC-aware and the administrators of the two zones
|
||||
have some mechanism for authenticating each other and exchanging
|
||||
the keys and signatures securely.
|
||||
.SH "SEE ALSO"
|
||||
.PP
|
||||
\fBdnssec-keygen\fR(8),
|
||||
\fBdnssec-signkey\fR(8),
|
||||
\fIBIND 9 Administrator Reference Manual\fR,
|
||||
\fIRFC 2535\fR.
|
||||
.SH "AUTHOR"
|
||||
.PP
|
||||
Internet Software Consortium
|
||||
@@ -0,0 +1,401 @@
|
||||
/*
|
||||
* Portions Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Portions Copyright (C) 2000-2003 Internet Software Consortium.
|
||||
* Portions Copyright (C) 1995-2000 by Network Associates, Inc.
|
||||
*
|
||||
* 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 ISC AND NETWORK ASSOCIATES DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC 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: dnssec-makekeyset.c,v 1.52.2.1.10.7 2004/08/28 06:25:27 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <isc/commandline.h>
|
||||
#include <isc/entropy.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <dns/db.h>
|
||||
#include <dns/diff.h>
|
||||
#include <dns/dnssec.h>
|
||||
#include <dns/fixedname.h>
|
||||
#include <dns/log.h>
|
||||
#include <dns/rdata.h>
|
||||
#include <dns/rdataset.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/secalg.h>
|
||||
#include <dns/time.h>
|
||||
|
||||
#include <dst/dst.h>
|
||||
|
||||
#include "dnssectool.h"
|
||||
|
||||
const char *program = "dnssec-makekeyset";
|
||||
int verbose;
|
||||
|
||||
typedef struct keynode keynode_t;
|
||||
struct keynode {
|
||||
dst_key_t *key;
|
||||
ISC_LINK(keynode_t) link;
|
||||
};
|
||||
typedef ISC_LIST(keynode_t) keylist_t;
|
||||
|
||||
static isc_stdtime_t starttime = 0, endtime = 0, now;
|
||||
static int ttl = -1;
|
||||
|
||||
static isc_mem_t *mctx = NULL;
|
||||
static isc_entropy_t *ectx = NULL;
|
||||
|
||||
static keylist_t keylist;
|
||||
|
||||
static void
|
||||
usage(void) {
|
||||
fprintf(stderr, "Usage:\n");
|
||||
fprintf(stderr, "\t%s [options] keys\n", program);
|
||||
|
||||
fprintf(stderr, "\n");
|
||||
|
||||
fprintf(stderr, "Version: %s\n", VERSION);
|
||||
|
||||
fprintf(stderr, "Options: (default value in parenthesis) \n");
|
||||
fprintf(stderr, "\t-a\n");
|
||||
fprintf(stderr, "\t\tverify generated signatures\n");
|
||||
fprintf(stderr, "\t-s YYYYMMDDHHMMSS|+offset:\n");
|
||||
fprintf(stderr, "\t\tSIG start time - absolute|offset (now)\n");
|
||||
fprintf(stderr, "\t-e YYYYMMDDHHMMSS|+offset|\"now\"+offset]:\n");
|
||||
fprintf(stderr, "\t\tSIG end time - "
|
||||
"absolute|from start|from now (now + 30 days)\n");
|
||||
fprintf(stderr, "\t-t ttl\n");
|
||||
fprintf(stderr, "\t-p\n");
|
||||
fprintf(stderr, "\t\tuse pseudorandom data (faster but less secure)\n");
|
||||
fprintf(stderr, "\t-r randomdev:\n");
|
||||
fprintf(stderr, "\t\ta file containing random data\n");
|
||||
fprintf(stderr, "\t-v level:\n");
|
||||
fprintf(stderr, "\t\tverbose level (0)\n");
|
||||
|
||||
fprintf(stderr, "\n");
|
||||
|
||||
fprintf(stderr, "keys:\n");
|
||||
fprintf(stderr, "\tkeyfile (Kname+alg+tag)\n");
|
||||
|
||||
fprintf(stderr, "\n");
|
||||
|
||||
fprintf(stderr, "Output:\n");
|
||||
fprintf(stderr, "\tkeyset (keyset-<name>)\n");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
static isc_boolean_t
|
||||
zonekey_on_list(dst_key_t *key) {
|
||||
keynode_t *keynode;
|
||||
for (keynode = ISC_LIST_HEAD(keylist);
|
||||
keynode != NULL;
|
||||
keynode = ISC_LIST_NEXT(keynode, link))
|
||||
{
|
||||
if (dst_key_compare(keynode->key, key))
|
||||
return (ISC_TRUE);
|
||||
}
|
||||
return (ISC_FALSE);
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char *argv[]) {
|
||||
int i, ch;
|
||||
char *startstr = NULL, *endstr = NULL;
|
||||
dns_fixedname_t fdomain;
|
||||
dns_name_t *domain = NULL;
|
||||
char *output = NULL;
|
||||
char *endp;
|
||||
unsigned char data[65536];
|
||||
dns_db_t *db;
|
||||
dns_dbversion_t *version;
|
||||
dns_diff_t diff;
|
||||
dns_difftuple_t *tuple;
|
||||
dns_fixedname_t tname;
|
||||
dst_key_t *key = NULL;
|
||||
dns_rdata_t rdata = DNS_RDATA_INIT;
|
||||
dns_rdataset_t rdataset;
|
||||
dns_rdataclass_t rdclass;
|
||||
isc_result_t result;
|
||||
isc_buffer_t b;
|
||||
isc_region_t r;
|
||||
isc_log_t *log = NULL;
|
||||
keynode_t *keynode;
|
||||
unsigned int eflags;
|
||||
isc_boolean_t pseudorandom = ISC_FALSE;
|
||||
isc_boolean_t tryverify = ISC_FALSE;
|
||||
|
||||
result = isc_mem_create(0, 0, &mctx);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("failed to create memory context: %s",
|
||||
isc_result_totext(result));
|
||||
|
||||
dns_result_register();
|
||||
|
||||
while ((ch = isc_commandline_parse(argc, argv, "as:e:t:r:v:ph")) != -1)
|
||||
{
|
||||
switch (ch) {
|
||||
case 'a':
|
||||
tryverify = ISC_TRUE;
|
||||
break;
|
||||
case 's':
|
||||
startstr = isc_commandline_argument;
|
||||
break;
|
||||
|
||||
case 'e':
|
||||
endstr = isc_commandline_argument;
|
||||
break;
|
||||
|
||||
case 't':
|
||||
endp = NULL;
|
||||
ttl = strtol(isc_commandline_argument, &endp, 0);
|
||||
if (*endp != '\0')
|
||||
fatal("TTL must be numeric");
|
||||
break;
|
||||
|
||||
case 'r':
|
||||
setup_entropy(mctx, isc_commandline_argument, &ectx);
|
||||
break;
|
||||
|
||||
case 'v':
|
||||
endp = NULL;
|
||||
verbose = strtol(isc_commandline_argument, &endp, 0);
|
||||
if (*endp != '\0')
|
||||
fatal("verbose level must be numeric");
|
||||
break;
|
||||
|
||||
case 'p':
|
||||
pseudorandom = ISC_TRUE;
|
||||
break;
|
||||
|
||||
case 'h':
|
||||
default:
|
||||
usage();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
argc -= isc_commandline_index;
|
||||
argv += isc_commandline_index;
|
||||
|
||||
if (argc < 1)
|
||||
usage();
|
||||
|
||||
if (ectx == NULL)
|
||||
setup_entropy(mctx, NULL, &ectx);
|
||||
eflags = ISC_ENTROPY_BLOCKING;
|
||||
if (!pseudorandom)
|
||||
eflags |= ISC_ENTROPY_GOODONLY;
|
||||
result = dst_lib_init(mctx, ectx, eflags);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("could not initialize dst: %s",
|
||||
isc_result_totext(result));
|
||||
|
||||
isc_stdtime_get(&now);
|
||||
|
||||
if (startstr != NULL)
|
||||
starttime = strtotime(startstr, now, now);
|
||||
else
|
||||
starttime = now;
|
||||
|
||||
if (endstr != NULL)
|
||||
endtime = strtotime(endstr, now, starttime);
|
||||
else
|
||||
endtime = starttime + (30 * 24 * 60 * 60);
|
||||
|
||||
if (ttl == -1) {
|
||||
ttl = 3600;
|
||||
fprintf(stderr, "%s: TTL not specified, assuming 3600\n",
|
||||
program);
|
||||
}
|
||||
|
||||
setup_logging(verbose, mctx, &log);
|
||||
|
||||
dns_diff_init(mctx, &diff);
|
||||
rdclass = 0;
|
||||
|
||||
ISC_LIST_INIT(keylist);
|
||||
|
||||
for (i = 0; i < argc; i++) {
|
||||
char namestr[DNS_NAME_FORMATSIZE];
|
||||
isc_buffer_t namebuf;
|
||||
|
||||
key = NULL;
|
||||
result = dst_key_fromnamedfile(argv[i], DST_TYPE_PUBLIC,
|
||||
mctx, &key);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("error loading key from %s: %s", argv[i],
|
||||
isc_result_totext(result));
|
||||
if (rdclass == 0)
|
||||
rdclass = dst_key_class(key);
|
||||
|
||||
isc_buffer_init(&namebuf, namestr, sizeof(namestr));
|
||||
result = dns_name_tofilenametext(dst_key_name(key),
|
||||
ISC_FALSE,
|
||||
&namebuf);
|
||||
check_result(result, "dns_name_tofilenametext");
|
||||
isc_buffer_putuint8(&namebuf, 0);
|
||||
|
||||
if (domain == NULL) {
|
||||
dns_fixedname_init(&fdomain);
|
||||
domain = dns_fixedname_name(&fdomain);
|
||||
dns_name_copy(dst_key_name(key), domain, NULL);
|
||||
} else if (!dns_name_equal(domain, dst_key_name(key))) {
|
||||
char str[DNS_NAME_FORMATSIZE];
|
||||
dns_name_format(domain, str, sizeof(str));
|
||||
fatal("all keys must have the same owner - %s "
|
||||
"and %s do not match", str, namestr);
|
||||
}
|
||||
|
||||
if (output == NULL) {
|
||||
output = isc_mem_allocate(mctx,
|
||||
strlen("keyset-") +
|
||||
strlen(namestr) + 1);
|
||||
if (output == NULL)
|
||||
fatal("out of memory");
|
||||
sprintf(output, "keyset-%s", namestr);
|
||||
}
|
||||
|
||||
if (dst_key_iszonekey(key)) {
|
||||
dst_key_t *zonekey = NULL;
|
||||
result = dst_key_fromnamedfile(argv[i],
|
||||
DST_TYPE_PUBLIC |
|
||||
DST_TYPE_PRIVATE,
|
||||
mctx, &zonekey);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("failed to read private key %s: %s",
|
||||
argv[i], isc_result_totext(result));
|
||||
if (!zonekey_on_list(zonekey)) {
|
||||
keynode = isc_mem_get(mctx, sizeof(keynode_t));
|
||||
if (keynode == NULL)
|
||||
fatal("out of memory");
|
||||
keynode->key = zonekey;
|
||||
ISC_LIST_INITANDAPPEND(keylist, keynode, link);
|
||||
} else
|
||||
dst_key_free(&zonekey);
|
||||
}
|
||||
dns_rdata_reset(&rdata);
|
||||
isc_buffer_init(&b, data, sizeof(data));
|
||||
result = dst_key_todns(key, &b);
|
||||
dst_key_free(&key);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("failed to convert key %s to a DNS KEY: %s",
|
||||
argv[i], isc_result_totext(result));
|
||||
isc_buffer_usedregion(&b, &r);
|
||||
dns_rdata_fromregion(&rdata, rdclass, dns_rdatatype_dnskey, &r);
|
||||
tuple = NULL;
|
||||
result = dns_difftuple_create(mctx, DNS_DIFFOP_ADD,
|
||||
domain, ttl, &rdata, &tuple);
|
||||
check_result(result, "dns_difftuple_create");
|
||||
dns_diff_append(&diff, &tuple);
|
||||
}
|
||||
|
||||
db = NULL;
|
||||
result = dns_db_create(mctx, "rbt", dns_rootname, dns_dbtype_zone,
|
||||
rdclass, 0, NULL, &db);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("failed to create a database");
|
||||
|
||||
version = NULL;
|
||||
dns_db_newversion(db, &version);
|
||||
|
||||
result = dns_diff_apply(&diff, db, version);
|
||||
check_result(result, "dns_diff_apply");
|
||||
dns_diff_clear(&diff);
|
||||
|
||||
dns_fixedname_init(&tname);
|
||||
dns_rdataset_init(&rdataset);
|
||||
result = dns_db_find(db, domain, version, dns_rdatatype_dnskey, 0, 0,
|
||||
NULL, dns_fixedname_name(&tname), &rdataset,
|
||||
NULL);
|
||||
check_result(result, "dns_db_find");
|
||||
|
||||
if (ISC_LIST_EMPTY(keylist))
|
||||
fprintf(stderr,
|
||||
"%s: no private zone key found; not self-signing\n",
|
||||
program);
|
||||
for (keynode = ISC_LIST_HEAD(keylist);
|
||||
keynode != NULL;
|
||||
keynode = ISC_LIST_NEXT(keynode, link))
|
||||
{
|
||||
dns_rdata_reset(&rdata);
|
||||
isc_buffer_init(&b, data, sizeof(data));
|
||||
result = dns_dnssec_sign(domain, &rdataset, keynode->key,
|
||||
&starttime, &endtime, mctx, &b,
|
||||
&rdata);
|
||||
isc_entropy_stopcallbacksources(ectx);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
char keystr[KEY_FORMATSIZE];
|
||||
key_format(keynode->key, keystr, sizeof(keystr));
|
||||
fatal("failed to sign keyset with key %s: %s",
|
||||
keystr, isc_result_totext(result));
|
||||
}
|
||||
if (tryverify) {
|
||||
result = dns_dnssec_verify(domain, &rdataset,
|
||||
keynode->key, ISC_TRUE,
|
||||
mctx, &rdata);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
char keystr[KEY_FORMATSIZE];
|
||||
key_format(keynode->key, keystr, sizeof(keystr));
|
||||
fatal("signature from key '%s' failed to "
|
||||
"verify: %s",
|
||||
keystr, isc_result_totext(result));
|
||||
}
|
||||
}
|
||||
tuple = NULL;
|
||||
result = dns_difftuple_create(mctx, DNS_DIFFOP_ADD,
|
||||
domain, ttl, &rdata, &tuple);
|
||||
check_result(result, "dns_difftuple_create");
|
||||
dns_diff_append(&diff, &tuple);
|
||||
}
|
||||
|
||||
result = dns_diff_apply(&diff, db, version);
|
||||
check_result(result, "dns_diff_apply");
|
||||
dns_diff_clear(&diff);
|
||||
|
||||
dns_rdataset_disassociate(&rdataset);
|
||||
|
||||
dns_db_closeversion(db, &version, ISC_TRUE);
|
||||
result = dns_db_dump(db, version, output);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
char domainstr[DNS_NAME_FORMATSIZE];
|
||||
dns_name_format(domain, domainstr, sizeof(domainstr));
|
||||
fatal("failed to write database for %s to %s",
|
||||
domainstr, output);
|
||||
}
|
||||
|
||||
printf("%s\n", output);
|
||||
|
||||
dns_db_detach(&db);
|
||||
|
||||
while (!ISC_LIST_EMPTY(keylist)) {
|
||||
keynode = ISC_LIST_HEAD(keylist);
|
||||
ISC_LIST_UNLINK(keylist, keynode, link);
|
||||
dst_key_free(&keynode->key);
|
||||
isc_mem_put(mctx, keynode, sizeof(keynode_t));
|
||||
}
|
||||
|
||||
cleanup_logging(&log);
|
||||
cleanup_entropy(&ectx);
|
||||
|
||||
isc_mem_free(mctx, output);
|
||||
dst_lib_destroy();
|
||||
if (verbose > 10)
|
||||
isc_mem_stats(mctx, stdout);
|
||||
isc_mem_destroy(&mctx);
|
||||
return (0);
|
||||
}
|
||||
@@ -0,0 +1,233 @@
|
||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
|
||||
<!--
|
||||
- Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2001, 2003 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 ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
- AND FITNESS. IN NO EVENT SHALL ISC 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: dnssec-makekeyset.docbook,v 1.2.2.3.4.2 2004/06/03 02:24:55 marka Exp $ -->
|
||||
|
||||
<refentry>
|
||||
<refentryinfo>
|
||||
<date>June 30, 2000</date>
|
||||
</refentryinfo>
|
||||
|
||||
<refmeta>
|
||||
<refentrytitle><application>dnssec-makekeyset</application></refentrytitle>
|
||||
<manvolnum>8</manvolnum>
|
||||
<refmiscinfo>BIND9</refmiscinfo>
|
||||
</refmeta>
|
||||
|
||||
<refnamediv>
|
||||
<refname><application>dnssec-makekeyset</application></refname>
|
||||
<refpurpose>DNSSEC zone signing tool</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis>
|
||||
<command>dnssec-makekeyset</command>
|
||||
<arg><option>-a</option></arg>
|
||||
<arg><option>-s <replaceable class="parameter">start-time</replaceable></option></arg>
|
||||
<arg><option>-e <replaceable class="parameter">end-time</replaceable></option></arg>
|
||||
<arg><option>-h</option></arg>
|
||||
<arg><option>-p</option></arg>
|
||||
<arg><option>-r <replaceable class="parameter">randomdev</replaceable></option></arg>
|
||||
<arg><option>-t</option><replaceable class="parameter">ttl</replaceable></arg>
|
||||
<arg><option>-v <replaceable class="parameter">level</replaceable></option></arg>
|
||||
<arg choice="req" rep="repeat">key</arg>
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
|
||||
<refsect1>
|
||||
<title>DESCRIPTION</title>
|
||||
<para>
|
||||
<command>dnssec-makekeyset</command> generates a key set from one
|
||||
or more keys created by <command>dnssec-keygen</command>. It creates
|
||||
a file containing a KEY record for each key, and self-signs the key
|
||||
set with each zone key. The output file is of the form
|
||||
<filename>keyset-nnnn.</filename>, where <filename>nnnn</filename>
|
||||
is the zone name.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>OPTIONS</title>
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>-a</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Verify all generated signatures.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-s <replaceable class="parameter">start-time</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specify the date and time when the generated SIG records
|
||||
become valid. This can be either an absolute or relative
|
||||
time. An absolute start time is indicated by a number
|
||||
in YYYYMMDDHHMMSS notation; 20000530144500 denotes
|
||||
14:45:00 UTC on May 30th, 2000. A relative start time is
|
||||
indicated by +N, which is N seconds from the current time.
|
||||
If no <option>start-time</option> is specified, the current
|
||||
time is used.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-e <replaceable class="parameter">end-time</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specify the date and time when the generated SIG records
|
||||
expire. As with <option>start-time</option>, an absolute
|
||||
time is indicated in YYYYMMDDHHMMSS notation. A time relative
|
||||
to the start time is indicated with +N, which is N seconds from
|
||||
the start time. A time relative to the current time is
|
||||
indicated with now+N. If no <option>end-time</option> is
|
||||
specified, 30 days from the start time is used as a default.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-h</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Prints a short summary of the options and arguments to
|
||||
<command>dnssec-makekeyset</command>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-p</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Use pseudo-random data when signing the zone. This is faster,
|
||||
but less secure, than using real random data. This option
|
||||
may be useful when signing large zones or when the entropy
|
||||
source is limited.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-r <replaceable class="parameter">randomdev</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the source of randomness. If the operating
|
||||
system does not provide a <filename>/dev/random</filename>
|
||||
or equivalent device, the default source of randomness
|
||||
is keyboard input. <filename>randomdev</filename> specifies
|
||||
the name of a character device or file containing random
|
||||
data to be used instead of the default. The special value
|
||||
<filename>keyboard</filename> indicates that keyboard
|
||||
input should be used.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-t <replaceable class="parameter">ttl</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specify the TTL (time to live) of the KEY and SIG records.
|
||||
The default is 3600 seconds.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-v <replaceable class="parameter">level</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Sets the debugging level.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>key</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The list of keys to be included in the keyset file. These keys
|
||||
are expressed in the form <filename>Knnnn.+aaa+iiiii</filename>
|
||||
as generated by <command>dnssec-keygen</command>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>EXAMPLE</title>
|
||||
<para>
|
||||
The following command generates a keyset containing the DSA key for
|
||||
<userinput>example.com</userinput> generated in the
|
||||
<command>dnssec-keygen</command> man page.
|
||||
</para>
|
||||
<para>
|
||||
<userinput>dnssec-makekeyset -t 86400 -s 20000701120000 -e +2592000 Kexample.com.+003+26160</userinput>
|
||||
</para>
|
||||
<para>
|
||||
In this example, <command>dnssec-makekeyset</command> creates
|
||||
the file <filename>keyset-example.com.</filename>. This file
|
||||
contains the specified key and a self-generated signature.
|
||||
</para>
|
||||
<para>
|
||||
The DNS administrator for <userinput>example.com</userinput> could
|
||||
send <filename>keyset-example.com.</filename> to the DNS
|
||||
administrator for <userinput>.com</userinput> for signing, if the
|
||||
.com zone is DNSSEC-aware and the administrators of the two zones
|
||||
have some mechanism for authenticating each other and exchanging
|
||||
the keys and signatures securely.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>SEE ALSO</title>
|
||||
<para>
|
||||
<citerefentry>
|
||||
<refentrytitle>dnssec-keygen</refentrytitle>
|
||||
<manvolnum>8</manvolnum>
|
||||
</citerefentry>,
|
||||
<citerefentry>
|
||||
<refentrytitle>dnssec-signkey</refentrytitle>
|
||||
<manvolnum>8</manvolnum>
|
||||
</citerefentry>,
|
||||
<citetitle>BIND 9 Administrator Reference Manual</citetitle>,
|
||||
<citetitle>RFC 2535</citetitle>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>AUTHOR</title>
|
||||
<para>
|
||||
<corpauthor>Internet Systems Consortium</corpauthor>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!--
|
||||
- Local variables:
|
||||
- mode: sgml
|
||||
- End:
|
||||
-->
|
||||
@@ -0,0 +1,407 @@
|
||||
<!--
|
||||
- Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2001, 2003 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 ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
- AND FITNESS. IN NO EVENT SHALL ISC 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: dnssec-makekeyset.html,v 1.4.2.2.4.1 2004/03/06 10:21:15 marka Exp $ -->
|
||||
|
||||
<HTML
|
||||
><HEAD
|
||||
><TITLE
|
||||
>dnssec-makekeyset</TITLE
|
||||
><META
|
||||
NAME="GENERATOR"
|
||||
CONTENT="Modular DocBook HTML Stylesheet Version 1.73
|
||||
"></HEAD
|
||||
><BODY
|
||||
CLASS="REFENTRY"
|
||||
BGCOLOR="#FFFFFF"
|
||||
TEXT="#000000"
|
||||
LINK="#0000FF"
|
||||
VLINK="#840084"
|
||||
ALINK="#0000FF"
|
||||
><H1
|
||||
><A
|
||||
NAME="AEN1"
|
||||
><SPAN
|
||||
CLASS="APPLICATION"
|
||||
>dnssec-makekeyset</SPAN
|
||||
></A
|
||||
></H1
|
||||
><DIV
|
||||
CLASS="REFNAMEDIV"
|
||||
><A
|
||||
NAME="AEN9"
|
||||
></A
|
||||
><H2
|
||||
>Name</H2
|
||||
><SPAN
|
||||
CLASS="APPLICATION"
|
||||
>dnssec-makekeyset</SPAN
|
||||
> -- DNSSEC zone signing tool</DIV
|
||||
><DIV
|
||||
CLASS="REFSYNOPSISDIV"
|
||||
><A
|
||||
NAME="AEN13"
|
||||
></A
|
||||
><H2
|
||||
>Synopsis</H2
|
||||
><P
|
||||
><B
|
||||
CLASS="COMMAND"
|
||||
>dnssec-makekeyset</B
|
||||
> [<TT
|
||||
CLASS="OPTION"
|
||||
>-a</TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-s <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>start-time</I
|
||||
></TT
|
||||
></TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-e <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>end-time</I
|
||||
></TT
|
||||
></TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-h</TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-p</TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-r <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>randomdev</I
|
||||
></TT
|
||||
></TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-t</TT
|
||||
><TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>ttl</I
|
||||
></TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-v <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>level</I
|
||||
></TT
|
||||
></TT
|
||||
>] {key...}</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN38"
|
||||
></A
|
||||
><H2
|
||||
>DESCRIPTION</H2
|
||||
><P
|
||||
> <B
|
||||
CLASS="COMMAND"
|
||||
>dnssec-makekeyset</B
|
||||
> generates a key set from one
|
||||
or more keys created by <B
|
||||
CLASS="COMMAND"
|
||||
>dnssec-keygen</B
|
||||
>. It creates
|
||||
a file containing a KEY record for each key, and self-signs the key
|
||||
set with each zone key. The output file is of the form
|
||||
<TT
|
||||
CLASS="FILENAME"
|
||||
>keyset-nnnn.</TT
|
||||
>, where <TT
|
||||
CLASS="FILENAME"
|
||||
>nnnn</TT
|
||||
>
|
||||
is the zone name.
|
||||
</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN45"
|
||||
></A
|
||||
><H2
|
||||
>OPTIONS</H2
|
||||
><P
|
||||
></P
|
||||
><DIV
|
||||
CLASS="VARIABLELIST"
|
||||
><DL
|
||||
><DT
|
||||
>-a</DT
|
||||
><DD
|
||||
><P
|
||||
> Verify all generated signatures.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-s <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>start-time</I
|
||||
></TT
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Specify the date and time when the generated SIG records
|
||||
become valid. This can be either an absolute or relative
|
||||
time. An absolute start time is indicated by a number
|
||||
in YYYYMMDDHHMMSS notation; 20000530144500 denotes
|
||||
14:45:00 UTC on May 30th, 2000. A relative start time is
|
||||
indicated by +N, which is N seconds from the current time.
|
||||
If no <TT
|
||||
CLASS="OPTION"
|
||||
>start-time</TT
|
||||
> is specified, the current
|
||||
time is used.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-e <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>end-time</I
|
||||
></TT
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Specify the date and time when the generated SIG records
|
||||
expire. As with <TT
|
||||
CLASS="OPTION"
|
||||
>start-time</TT
|
||||
>, an absolute
|
||||
time is indicated in YYYYMMDDHHMMSS notation. A time relative
|
||||
to the start time is indicated with +N, which is N seconds from
|
||||
the start time. A time relative to the current time is
|
||||
indicated with now+N. If no <TT
|
||||
CLASS="OPTION"
|
||||
>end-time</TT
|
||||
> is
|
||||
specified, 30 days from the start time is used as a default.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-h</DT
|
||||
><DD
|
||||
><P
|
||||
> Prints a short summary of the options and arguments to
|
||||
<B
|
||||
CLASS="COMMAND"
|
||||
>dnssec-makekeyset</B
|
||||
>.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-p</DT
|
||||
><DD
|
||||
><P
|
||||
> Use pseudo-random data when signing the zone. This is faster,
|
||||
but less secure, than using real random data. This option
|
||||
may be useful when signing large zones or when the entropy
|
||||
source is limited.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-r <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>randomdev</I
|
||||
></TT
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Specifies the source of randomness. If the operating
|
||||
system does not provide a <TT
|
||||
CLASS="FILENAME"
|
||||
>/dev/random</TT
|
||||
>
|
||||
or equivalent device, the default source of randomness
|
||||
is keyboard input. <TT
|
||||
CLASS="FILENAME"
|
||||
>randomdev</TT
|
||||
> specifies
|
||||
the name of a character device or file containing random
|
||||
data to be used instead of the default. The special value
|
||||
<TT
|
||||
CLASS="FILENAME"
|
||||
>keyboard</TT
|
||||
> indicates that keyboard
|
||||
input should be used.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-t <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>ttl</I
|
||||
></TT
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Specify the TTL (time to live) of the KEY and SIG records.
|
||||
The default is 3600 seconds.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-v <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>level</I
|
||||
></TT
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Sets the debugging level.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>key</DT
|
||||
><DD
|
||||
><P
|
||||
> The list of keys to be included in the keyset file. These keys
|
||||
are expressed in the form <TT
|
||||
CLASS="FILENAME"
|
||||
>Knnnn.+aaa+iiiii</TT
|
||||
>
|
||||
as generated by <B
|
||||
CLASS="COMMAND"
|
||||
>dnssec-keygen</B
|
||||
>.
|
||||
</P
|
||||
></DD
|
||||
></DL
|
||||
></DIV
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN98"
|
||||
></A
|
||||
><H2
|
||||
>EXAMPLE</H2
|
||||
><P
|
||||
> The following command generates a keyset containing the DSA key for
|
||||
<TT
|
||||
CLASS="USERINPUT"
|
||||
><B
|
||||
>example.com</B
|
||||
></TT
|
||||
> generated in the
|
||||
<B
|
||||
CLASS="COMMAND"
|
||||
>dnssec-keygen</B
|
||||
> man page.
|
||||
</P
|
||||
><P
|
||||
> <TT
|
||||
CLASS="USERINPUT"
|
||||
><B
|
||||
>dnssec-makekeyset -t 86400 -s 20000701120000 -e +2592000 Kexample.com.+003+26160</B
|
||||
></TT
|
||||
>
|
||||
</P
|
||||
><P
|
||||
> In this example, <B
|
||||
CLASS="COMMAND"
|
||||
>dnssec-makekeyset</B
|
||||
> creates
|
||||
the file <TT
|
||||
CLASS="FILENAME"
|
||||
>keyset-example.com.</TT
|
||||
>. This file
|
||||
contains the specified key and a self-generated signature.
|
||||
</P
|
||||
><P
|
||||
> The DNS administrator for <TT
|
||||
CLASS="USERINPUT"
|
||||
><B
|
||||
>example.com</B
|
||||
></TT
|
||||
> could
|
||||
send <TT
|
||||
CLASS="FILENAME"
|
||||
>keyset-example.com.</TT
|
||||
> to the DNS
|
||||
administrator for <TT
|
||||
CLASS="USERINPUT"
|
||||
><B
|
||||
>.com</B
|
||||
></TT
|
||||
> for signing, if the
|
||||
.com zone is DNSSEC-aware and the administrators of the two zones
|
||||
have some mechanism for authenticating each other and exchanging
|
||||
the keys and signatures securely.
|
||||
</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN112"
|
||||
></A
|
||||
><H2
|
||||
>SEE ALSO</H2
|
||||
><P
|
||||
> <SPAN
|
||||
CLASS="CITEREFENTRY"
|
||||
><SPAN
|
||||
CLASS="REFENTRYTITLE"
|
||||
>dnssec-keygen</SPAN
|
||||
>(8)</SPAN
|
||||
>,
|
||||
<SPAN
|
||||
CLASS="CITEREFENTRY"
|
||||
><SPAN
|
||||
CLASS="REFENTRYTITLE"
|
||||
>dnssec-signkey</SPAN
|
||||
>(8)</SPAN
|
||||
>,
|
||||
<I
|
||||
CLASS="CITETITLE"
|
||||
>BIND 9 Administrator Reference Manual</I
|
||||
>,
|
||||
<I
|
||||
CLASS="CITETITLE"
|
||||
>RFC 2535</I
|
||||
>.
|
||||
</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN123"
|
||||
></A
|
||||
><H2
|
||||
>AUTHOR</H2
|
||||
><P
|
||||
> Internet Software Consortium
|
||||
</P
|
||||
></DIV
|
||||
></BODY
|
||||
></HTML
|
||||
>
|
||||
@@ -0,0 +1,108 @@
|
||||
.\" Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2000, 2001, 2003 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 ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
.\" REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
.\" AND FITNESS. IN NO EVENT SHALL ISC 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: dnssec-signkey.8,v 1.18.2.1.4.1 2004/03/06 07:41:39 marka Exp $
|
||||
.\"
|
||||
.TH "DNSSEC-SIGNKEY" "8" "June 30, 2000" "BIND9" ""
|
||||
.SH NAME
|
||||
dnssec-signkey \- DNSSEC key set signing tool
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
\fBdnssec-signkey\fR [ \fB-a\fR ] [ \fB-c \fIclass\fB\fR ] [ \fB-s \fIstart-time\fB\fR ] [ \fB-e \fIend-time\fB\fR ] [ \fB-h\fR ] [ \fB-p\fR ] [ \fB-r \fIrandomdev\fB\fR ] [ \fB-v \fIlevel\fB\fR ] \fBkeyset\fR \fBkey\fR\fI...\fR
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
\fBdnssec-signkey\fR signs a keyset. Typically
|
||||
the keyset will be for a child zone, and will have been generated
|
||||
by \fBdnssec-makekeyset\fR. The child zone's keyset
|
||||
is signed with the zone keys for its parent zone. The output file
|
||||
is of the form \fIsignedkey-nnnn.\fR, where
|
||||
\fInnnn\fR is the zone name.
|
||||
.SH "OPTIONS"
|
||||
.TP
|
||||
\fB-a\fR
|
||||
Verify all generated signatures.
|
||||
.TP
|
||||
\fB-c \fIclass\fB\fR
|
||||
Specifies the DNS class of the key sets.
|
||||
.TP
|
||||
\fB-s \fIstart-time\fB\fR
|
||||
Specify the date and time when the generated SIG records
|
||||
become valid. This can be either an absolute or relative
|
||||
time. An absolute start time is indicated by a number
|
||||
in YYYYMMDDHHMMSS notation; 20000530144500 denotes
|
||||
14:45:00 UTC on May 30th, 2000. A relative start time is
|
||||
indicated by +N, which is N seconds from the current time.
|
||||
If no \fBstart-time\fR is specified, the current
|
||||
time is used.
|
||||
.TP
|
||||
\fB-e \fIend-time\fB\fR
|
||||
Specify the date and time when the generated SIG records
|
||||
expire. As with \fBstart-time\fR, an absolute
|
||||
time is indicated in YYYYMMDDHHMMSS notation. A time relative
|
||||
to the start time is indicated with +N, which is N seconds from
|
||||
the start time. A time relative to the current time is
|
||||
indicated with now+N. If no \fBend-time\fR is
|
||||
specified, 30 days from the start time is used as a default.
|
||||
.TP
|
||||
\fB-h\fR
|
||||
Prints a short summary of the options and arguments to
|
||||
\fBdnssec-signkey\fR.
|
||||
.TP
|
||||
\fB-p\fR
|
||||
Use pseudo-random data when signing the zone. This is faster,
|
||||
but less secure, than using real random data. This option
|
||||
may be useful when signing large zones or when the entropy
|
||||
source is limited.
|
||||
.TP
|
||||
\fB-r \fIrandomdev\fB\fR
|
||||
Specifies the source of randomness. If the operating
|
||||
system does not provide a \fI/dev/random\fR
|
||||
or equivalent device, the default source of randomness
|
||||
is keyboard input. \fIrandomdev\fR specifies
|
||||
the name of a character device or file containing random
|
||||
data to be used instead of the default. The special value
|
||||
\fIkeyboard\fR indicates that keyboard
|
||||
input should be used.
|
||||
.TP
|
||||
\fB-v \fIlevel\fB\fR
|
||||
Sets the debugging level.
|
||||
.TP
|
||||
\fBkeyset\fR
|
||||
The file containing the child's keyset.
|
||||
.TP
|
||||
\fBkey\fR
|
||||
The keys used to sign the child's keyset.
|
||||
.SH "EXAMPLE"
|
||||
.PP
|
||||
The DNS administrator for a DNSSEC-aware \fB.com\fR
|
||||
zone would use the following command to sign the
|
||||
\fIkeyset\fR file for \fBexample.com\fR
|
||||
created by \fBdnssec-makekeyset\fR with a key generated
|
||||
by \fBdnssec-keygen\fR:
|
||||
.PP
|
||||
\fBdnssec-signkey keyset-example.com. Kcom.+003+51944\fR
|
||||
.PP
|
||||
In this example, \fBdnssec-signkey\fR creates
|
||||
the file \fIsignedkey-example.com.\fR, which
|
||||
contains the \fBexample.com\fR keys and the
|
||||
signatures by the \fB.com\fR keys.
|
||||
.SH "SEE ALSO"
|
||||
.PP
|
||||
\fBdnssec-keygen\fR(8),
|
||||
\fBdnssec-makekeyset\fR(8),
|
||||
\fBdnssec-signzone\fR(8).
|
||||
.SH "AUTHOR"
|
||||
.PP
|
||||
Internet Software Consortium
|
||||
@@ -0,0 +1,448 @@
|
||||
/*
|
||||
* Portions Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Portions Copyright (C) 2000-2003 Internet Software Consortium.
|
||||
* Portions Copyright (C) 1995-2000 by Network Associates, Inc.
|
||||
*
|
||||
* 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 ISC AND NETWORK ASSOCIATES DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC 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: dnssec-signkey.c,v 1.50.2.2.2.7 2004/08/28 06:25:28 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <isc/string.h>
|
||||
#include <isc/commandline.h>
|
||||
#include <isc/entropy.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <dns/db.h>
|
||||
#include <dns/dbiterator.h>
|
||||
#include <dns/diff.h>
|
||||
#include <dns/dnssec.h>
|
||||
#include <dns/fixedname.h>
|
||||
#include <dns/log.h>
|
||||
#include <dns/rdata.h>
|
||||
#include <dns/rdataclass.h>
|
||||
#include <dns/rdataset.h>
|
||||
#include <dns/rdatasetiter.h>
|
||||
#include <dns/rdatastruct.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/secalg.h>
|
||||
|
||||
#include <dst/dst.h>
|
||||
|
||||
#include "dnssectool.h"
|
||||
|
||||
const char *program = "dnssec-signkey";
|
||||
int verbose;
|
||||
|
||||
typedef struct keynode keynode_t;
|
||||
struct keynode {
|
||||
dst_key_t *key;
|
||||
isc_boolean_t verified;
|
||||
ISC_LINK(keynode_t) link;
|
||||
};
|
||||
typedef ISC_LIST(keynode_t) keylist_t;
|
||||
|
||||
static isc_stdtime_t starttime = 0, endtime = 0, now;
|
||||
|
||||
static isc_mem_t *mctx = NULL;
|
||||
static isc_entropy_t *ectx = NULL;
|
||||
static keylist_t keylist;
|
||||
|
||||
static void
|
||||
usage(void) {
|
||||
fprintf(stderr, "Usage:\n");
|
||||
fprintf(stderr, "\t%s [options] keyset keys\n", program);
|
||||
|
||||
fprintf(stderr, "\n");
|
||||
|
||||
fprintf(stderr, "Version: %s\n", VERSION);
|
||||
|
||||
fprintf(stderr, "Options: (default value in parenthesis) \n");
|
||||
fprintf(stderr, "\t-a\n");
|
||||
fprintf(stderr, "\t\tverify generated signatures\n");
|
||||
fprintf(stderr, "\t-c class (IN)\n");
|
||||
fprintf(stderr, "\t-s YYYYMMDDHHMMSS|+offset:\n");
|
||||
fprintf(stderr, "\t\tSIG start time - absolute|offset (from keyset)\n");
|
||||
fprintf(stderr, "\t-e YYYYMMDDHHMMSS|+offset|\"now\"+offset]:\n");
|
||||
fprintf(stderr, "\t\tSIG end time - absolute|from start|from now "
|
||||
"(from keyset)\n");
|
||||
fprintf(stderr, "\t-v level:\n");
|
||||
fprintf(stderr, "\t\tverbose level (0)\n");
|
||||
fprintf(stderr, "\t-p\n");
|
||||
fprintf(stderr, "\t\tuse pseudorandom data (faster but less secure)\n");
|
||||
fprintf(stderr, "\t-r randomdev:\n");
|
||||
fprintf(stderr, "\t\ta file containing random data\n");
|
||||
|
||||
fprintf(stderr, "\n");
|
||||
|
||||
fprintf(stderr, "keyset:\n");
|
||||
fprintf(stderr, "\tfile with keyset to be signed (keyset-<name>)\n");
|
||||
fprintf(stderr, "keys:\n");
|
||||
fprintf(stderr, "\tkeyfile (Kname+alg+tag)\n");
|
||||
|
||||
fprintf(stderr, "\n");
|
||||
fprintf(stderr, "Output:\n");
|
||||
fprintf(stderr, "\tsigned keyset (signedkey-<name>)\n");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
static void
|
||||
loadkeys(dns_name_t *name, dns_rdataset_t *rdataset) {
|
||||
dst_key_t *key;
|
||||
dns_rdata_t rdata = DNS_RDATA_INIT;
|
||||
keynode_t *keynode;
|
||||
isc_result_t result;
|
||||
|
||||
ISC_LIST_INIT(keylist);
|
||||
result = dns_rdataset_first(rdataset);
|
||||
check_result(result, "dns_rdataset_first");
|
||||
for (; result == ISC_R_SUCCESS; result = dns_rdataset_next(rdataset)) {
|
||||
dns_rdata_reset(&rdata);
|
||||
dns_rdataset_current(rdataset, &rdata);
|
||||
key = NULL;
|
||||
result = dns_dnssec_keyfromrdata(name, &rdata, mctx, &key);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
continue;
|
||||
if (!dst_key_iszonekey(key)) {
|
||||
dst_key_free(&key);
|
||||
continue;
|
||||
}
|
||||
keynode = isc_mem_get(mctx, sizeof(keynode_t));
|
||||
if (keynode == NULL)
|
||||
fatal("out of memory");
|
||||
keynode->key = key;
|
||||
keynode->verified = ISC_FALSE;
|
||||
ISC_LIST_INITANDAPPEND(keylist, keynode, link);
|
||||
}
|
||||
if (result != ISC_R_NOMORE)
|
||||
fatal("failure traversing key list");
|
||||
}
|
||||
|
||||
static dst_key_t *
|
||||
findkey(dns_rdata_rrsig_t *sig) {
|
||||
keynode_t *keynode;
|
||||
for (keynode = ISC_LIST_HEAD(keylist);
|
||||
keynode != NULL;
|
||||
keynode = ISC_LIST_NEXT(keynode, link))
|
||||
{
|
||||
if (dst_key_id(keynode->key) == sig->keyid &&
|
||||
dst_key_alg(keynode->key) == sig->algorithm) {
|
||||
keynode->verified = ISC_TRUE;
|
||||
return (keynode->key);
|
||||
}
|
||||
}
|
||||
fatal("signature generated by non-zone or missing key");
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char *argv[]) {
|
||||
int i, ch;
|
||||
char *startstr = NULL, *endstr = NULL, *classname = NULL;
|
||||
char tdomain[1025];
|
||||
dns_fixedname_t fdomain;
|
||||
dns_name_t *domain;
|
||||
char *output = NULL;
|
||||
char *endp;
|
||||
unsigned char data[65536];
|
||||
dns_db_t *db;
|
||||
dns_dbnode_t *node;
|
||||
dns_dbversion_t *version;
|
||||
dns_diff_t diff;
|
||||
dns_difftuple_t *tuple;
|
||||
dns_dbiterator_t *dbiter;
|
||||
dns_rdatasetiter_t *rdsiter;
|
||||
dst_key_t *key = NULL;
|
||||
dns_rdata_t rdata = DNS_RDATA_INIT;
|
||||
dns_rdata_t sigrdata = DNS_RDATA_INIT;
|
||||
dns_rdataset_t rdataset, sigrdataset;
|
||||
dns_rdata_rrsig_t sig;
|
||||
isc_result_t result;
|
||||
isc_buffer_t b;
|
||||
isc_log_t *log = NULL;
|
||||
keynode_t *keynode;
|
||||
isc_boolean_t pseudorandom = ISC_FALSE;
|
||||
unsigned int eflags;
|
||||
dns_rdataclass_t rdclass;
|
||||
isc_boolean_t tryverify = ISC_FALSE;
|
||||
isc_boolean_t settime = ISC_FALSE;
|
||||
|
||||
result = isc_mem_create(0, 0, &mctx);
|
||||
check_result(result, "isc_mem_create()");
|
||||
|
||||
dns_result_register();
|
||||
|
||||
while ((ch = isc_commandline_parse(argc, argv, "ac:s:e:pr:v:h")) != -1)
|
||||
{
|
||||
switch (ch) {
|
||||
case 'a':
|
||||
tryverify = ISC_TRUE;
|
||||
break;
|
||||
case 'c':
|
||||
classname = isc_commandline_argument;
|
||||
break;
|
||||
|
||||
case 's':
|
||||
startstr = isc_commandline_argument;
|
||||
break;
|
||||
|
||||
case 'e':
|
||||
endstr = isc_commandline_argument;
|
||||
break;
|
||||
|
||||
case 'p':
|
||||
pseudorandom = ISC_TRUE;
|
||||
break;
|
||||
|
||||
case 'r':
|
||||
setup_entropy(mctx, isc_commandline_argument, &ectx);
|
||||
break;
|
||||
|
||||
case 'v':
|
||||
endp = NULL;
|
||||
verbose = strtol(isc_commandline_argument, &endp, 0);
|
||||
if (*endp != '\0')
|
||||
fatal("verbose level must be numeric");
|
||||
break;
|
||||
|
||||
case 'h':
|
||||
default:
|
||||
usage();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
argc -= isc_commandline_index;
|
||||
argv += isc_commandline_index;
|
||||
|
||||
if (argc < 2)
|
||||
usage();
|
||||
|
||||
rdclass = strtoclass(classname);
|
||||
|
||||
if (ectx == NULL)
|
||||
setup_entropy(mctx, NULL, &ectx);
|
||||
eflags = ISC_ENTROPY_BLOCKING;
|
||||
if (!pseudorandom)
|
||||
eflags |= ISC_ENTROPY_GOODONLY;
|
||||
result = dst_lib_init(mctx, ectx, eflags);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("could not initialize dst: %s",
|
||||
isc_result_totext(result));
|
||||
|
||||
isc_stdtime_get(&now);
|
||||
|
||||
if ((startstr == NULL || endstr == NULL) &&
|
||||
!(startstr == NULL && endstr == NULL))
|
||||
fatal("if -s or -e is specified, both must be");
|
||||
|
||||
if (startstr != NULL) {
|
||||
starttime = strtotime(startstr, now, now);
|
||||
endtime = strtotime(endstr, now, starttime);
|
||||
settime = ISC_TRUE;
|
||||
}
|
||||
|
||||
setup_logging(verbose, mctx, &log);
|
||||
|
||||
if (strlen(argv[0]) < 8U || strncmp(argv[0], "keyset-", 7) != 0)
|
||||
fatal("keyset file '%s' must start with keyset-", argv[0]);
|
||||
|
||||
db = NULL;
|
||||
result = dns_db_create(mctx, "rbt", dns_rootname, dns_dbtype_zone,
|
||||
rdclass, 0, NULL, &db);
|
||||
check_result(result, "dns_db_create()");
|
||||
|
||||
result = dns_db_load(db, argv[0]);
|
||||
if (result != ISC_R_SUCCESS && result != DNS_R_SEENINCLUDE)
|
||||
fatal("failed to load database from '%s': %s", argv[0],
|
||||
isc_result_totext(result));
|
||||
|
||||
dns_fixedname_init(&fdomain);
|
||||
domain = dns_fixedname_name(&fdomain);
|
||||
|
||||
dbiter = NULL;
|
||||
result = dns_db_createiterator(db, ISC_FALSE, &dbiter);
|
||||
check_result(result, "dns_db_createiterator()");
|
||||
|
||||
result = dns_dbiterator_first(dbiter);
|
||||
check_result(result, "dns_dbiterator_first()");
|
||||
while (result == ISC_R_SUCCESS) {
|
||||
node = NULL;
|
||||
dns_dbiterator_current(dbiter, &node, domain);
|
||||
rdsiter = NULL;
|
||||
result = dns_db_allrdatasets(db, node, NULL, 0, &rdsiter);
|
||||
check_result(result, "dns_db_allrdatasets()");
|
||||
result = dns_rdatasetiter_first(rdsiter);
|
||||
dns_rdatasetiter_destroy(&rdsiter);
|
||||
if (result == ISC_R_SUCCESS)
|
||||
break;
|
||||
dns_db_detachnode(db, &node);
|
||||
result = dns_dbiterator_next(dbiter);
|
||||
}
|
||||
dns_dbiterator_destroy(&dbiter);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("failed to find data in keyset file");
|
||||
|
||||
isc_buffer_init(&b, tdomain, sizeof(tdomain) - 1);
|
||||
result = dns_name_tofilenametext(domain, ISC_FALSE, &b);
|
||||
check_result(result, "dns_name_tofilenametext()");
|
||||
isc_buffer_putuint8(&b, 0);
|
||||
|
||||
output = isc_mem_allocate(mctx,
|
||||
strlen("signedkey-") + strlen(tdomain) + 1);
|
||||
if (output == NULL)
|
||||
fatal("out of memory");
|
||||
sprintf(output, "signedkey-%s", tdomain);
|
||||
|
||||
version = NULL;
|
||||
dns_db_newversion(db, &version);
|
||||
|
||||
dns_rdataset_init(&rdataset);
|
||||
dns_rdataset_init(&sigrdataset);
|
||||
result = dns_db_findrdataset(db, node, version, dns_rdatatype_dnskey, 0,
|
||||
0, &rdataset, &sigrdataset);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
char domainstr[DNS_NAME_FORMATSIZE];
|
||||
dns_name_format(domain, domainstr, sizeof(domainstr));
|
||||
fatal("failed to find rdataset '%s KEY': %s",
|
||||
domainstr, isc_result_totext(result));
|
||||
}
|
||||
|
||||
loadkeys(domain, &rdataset);
|
||||
|
||||
dns_diff_init(mctx, &diff);
|
||||
|
||||
if (!dns_rdataset_isassociated(&sigrdataset))
|
||||
fatal("no SIG KEY set present");
|
||||
|
||||
result = dns_rdataset_first(&sigrdataset);
|
||||
check_result(result, "dns_rdataset_first()");
|
||||
do {
|
||||
dns_rdataset_current(&sigrdataset, &sigrdata);
|
||||
result = dns_rdata_tostruct(&sigrdata, &sig, mctx);
|
||||
check_result(result, "dns_rdata_tostruct()");
|
||||
key = findkey(&sig);
|
||||
result = dns_dnssec_verify(domain, &rdataset, key,
|
||||
ISC_TRUE, mctx, &sigrdata);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
char keystr[KEY_FORMATSIZE];
|
||||
key_format(key, keystr, sizeof(keystr));
|
||||
fatal("signature by key '%s' did not verify: %s",
|
||||
keystr, isc_result_totext(result));
|
||||
}
|
||||
if (!settime) {
|
||||
starttime = sig.timesigned;
|
||||
endtime = sig.timeexpire;
|
||||
settime = ISC_TRUE;
|
||||
}
|
||||
dns_rdata_freestruct(&sig);
|
||||
dns_rdata_reset(&sigrdata);
|
||||
result = dns_rdataset_next(&sigrdataset);
|
||||
} while (result == ISC_R_SUCCESS);
|
||||
|
||||
for (keynode = ISC_LIST_HEAD(keylist);
|
||||
keynode != NULL;
|
||||
keynode = ISC_LIST_NEXT(keynode, link))
|
||||
if (!keynode->verified)
|
||||
fatal("not all zone keys self signed the key set");
|
||||
|
||||
argc -= 1;
|
||||
argv += 1;
|
||||
|
||||
for (i = 0; i < argc; i++) {
|
||||
key = NULL;
|
||||
result = dst_key_fromnamedfile(argv[i],
|
||||
DST_TYPE_PUBLIC |
|
||||
DST_TYPE_PRIVATE,
|
||||
mctx, &key);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("failed to read key %s from disk: %s",
|
||||
argv[i], isc_result_totext(result));
|
||||
|
||||
dns_rdata_reset(&rdata);
|
||||
isc_buffer_init(&b, data, sizeof(data));
|
||||
result = dns_dnssec_sign(domain, &rdataset, key,
|
||||
&starttime, &endtime,
|
||||
mctx, &b, &rdata);
|
||||
isc_entropy_stopcallbacksources(ectx);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
char keystr[KEY_FORMATSIZE];
|
||||
key_format(key, keystr, sizeof(keystr));
|
||||
fatal("key '%s' failed to sign data: %s",
|
||||
keystr, isc_result_totext(result));
|
||||
}
|
||||
if (tryverify) {
|
||||
result = dns_dnssec_verify(domain, &rdataset, key,
|
||||
ISC_TRUE, mctx, &rdata);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
char keystr[KEY_FORMATSIZE];
|
||||
key_format(key, keystr, sizeof(keystr));
|
||||
fatal("signature from key '%s' failed to "
|
||||
"verify: %s",
|
||||
keystr, isc_result_totext(result));
|
||||
}
|
||||
}
|
||||
tuple = NULL;
|
||||
result = dns_difftuple_create(mctx, DNS_DIFFOP_ADD,
|
||||
domain, rdataset.ttl,
|
||||
&rdata, &tuple);
|
||||
check_result(result, "dns_difftuple_create");
|
||||
dns_diff_append(&diff, &tuple);
|
||||
dst_key_free(&key);
|
||||
}
|
||||
|
||||
result = dns_db_deleterdataset(db, node, version, dns_rdatatype_rrsig,
|
||||
dns_rdatatype_dnskey);
|
||||
check_result(result, "dns_db_deleterdataset");
|
||||
|
||||
result = dns_diff_apply(&diff, db, version);
|
||||
check_result(result, "dns_diff_apply");
|
||||
dns_diff_clear(&diff);
|
||||
|
||||
dns_db_detachnode(db, &node);
|
||||
dns_db_closeversion(db, &version, ISC_TRUE);
|
||||
result = dns_db_dump(db, version, output);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("failed to write database to '%s': %s",
|
||||
output, isc_result_totext(result));
|
||||
|
||||
printf("%s\n", output);
|
||||
|
||||
dns_rdataset_disassociate(&rdataset);
|
||||
dns_rdataset_disassociate(&sigrdataset);
|
||||
|
||||
dns_db_detach(&db);
|
||||
|
||||
while (!ISC_LIST_EMPTY(keylist)) {
|
||||
keynode = ISC_LIST_HEAD(keylist);
|
||||
ISC_LIST_UNLINK(keylist, keynode, link);
|
||||
dst_key_free(&keynode->key);
|
||||
isc_mem_put(mctx, keynode, sizeof(keynode_t));
|
||||
}
|
||||
|
||||
cleanup_logging(&log);
|
||||
|
||||
isc_mem_free(mctx, output);
|
||||
cleanup_entropy(&ectx);
|
||||
dst_lib_destroy();
|
||||
if (verbose > 10)
|
||||
isc_mem_stats(mctx, stdout);
|
||||
isc_mem_destroy(&mctx);
|
||||
return (0);
|
||||
}
|
||||
@@ -0,0 +1,237 @@
|
||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
|
||||
<!--
|
||||
- Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2001, 2003 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 ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
- AND FITNESS. IN NO EVENT SHALL ISC 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: dnssec-signkey.docbook,v 1.2.2.2.4.2 2004/06/03 02:24:55 marka Exp $ -->
|
||||
|
||||
<refentry>
|
||||
<refentryinfo>
|
||||
<date>June 30, 2000</date>
|
||||
</refentryinfo>
|
||||
|
||||
<refmeta>
|
||||
<refentrytitle><application>dnssec-signkey</application></refentrytitle>
|
||||
<manvolnum>8</manvolnum>
|
||||
<refmiscinfo>BIND9</refmiscinfo>
|
||||
</refmeta>
|
||||
|
||||
<refnamediv>
|
||||
<refname><application>dnssec-signkey</application></refname>
|
||||
<refpurpose>DNSSEC key set signing tool</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis>
|
||||
<command>dnssec-signkey</command>
|
||||
<arg><option>-a</option></arg>
|
||||
<arg><option>-c <replaceable class="parameter">class</replaceable></option></arg>
|
||||
<arg><option>-s <replaceable class="parameter">start-time</replaceable></option></arg>
|
||||
<arg><option>-e <replaceable class="parameter">end-time</replaceable></option></arg>
|
||||
<arg><option>-h</option></arg>
|
||||
<arg><option>-p</option></arg>
|
||||
<arg><option>-r <replaceable class="parameter">randomdev</replaceable></option></arg>
|
||||
<arg><option>-v <replaceable class="parameter">level</replaceable></option></arg>
|
||||
<arg choice="req">keyset</arg>
|
||||
<arg choice="req" rep="repeat">key</arg>
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
|
||||
<refsect1>
|
||||
<title>DESCRIPTION</title>
|
||||
<para>
|
||||
<command>dnssec-signkey</command> signs a keyset. Typically
|
||||
the keyset will be for a child zone, and will have been generated
|
||||
by <command>dnssec-makekeyset</command>. The child zone's keyset
|
||||
is signed with the zone keys for its parent zone. The output file
|
||||
is of the form <filename>signedkey-nnnn.</filename>, where
|
||||
<filename>nnnn</filename> is the zone name.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>OPTIONS</title>
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>-a</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Verify all generated signatures.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-c <replaceable class="parameter">class</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the DNS class of the key sets.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-s <replaceable class="parameter">start-time</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specify the date and time when the generated SIG records
|
||||
become valid. This can be either an absolute or relative
|
||||
time. An absolute start time is indicated by a number
|
||||
in YYYYMMDDHHMMSS notation; 20000530144500 denotes
|
||||
14:45:00 UTC on May 30th, 2000. A relative start time is
|
||||
indicated by +N, which is N seconds from the current time.
|
||||
If no <option>start-time</option> is specified, the current
|
||||
time is used.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-e <replaceable class="parameter">end-time</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specify the date and time when the generated SIG records
|
||||
expire. As with <option>start-time</option>, an absolute
|
||||
time is indicated in YYYYMMDDHHMMSS notation. A time relative
|
||||
to the start time is indicated with +N, which is N seconds from
|
||||
the start time. A time relative to the current time is
|
||||
indicated with now+N. If no <option>end-time</option> is
|
||||
specified, 30 days from the start time is used as a default.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-h</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Prints a short summary of the options and arguments to
|
||||
<command>dnssec-signkey</command>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-p</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Use pseudo-random data when signing the zone. This is faster,
|
||||
but less secure, than using real random data. This option
|
||||
may be useful when signing large zones or when the entropy
|
||||
source is limited.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-r <replaceable class="parameter">randomdev</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the source of randomness. If the operating
|
||||
system does not provide a <filename>/dev/random</filename>
|
||||
or equivalent device, the default source of randomness
|
||||
is keyboard input. <filename>randomdev</filename> specifies
|
||||
the name of a character device or file containing random
|
||||
data to be used instead of the default. The special value
|
||||
<filename>keyboard</filename> indicates that keyboard
|
||||
input should be used.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-v <replaceable class="parameter">level</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Sets the debugging level.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>keyset</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The file containing the child's keyset.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>key</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The keys used to sign the child's keyset.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>EXAMPLE</title>
|
||||
<para>
|
||||
The DNS administrator for a DNSSEC-aware <userinput>.com</userinput>
|
||||
zone would use the following command to sign the
|
||||
<filename>keyset</filename> file for <userinput>example.com</userinput>
|
||||
created by <command>dnssec-makekeyset</command> with a key generated
|
||||
by <command>dnssec-keygen</command>:
|
||||
</para>
|
||||
<para>
|
||||
<userinput>dnssec-signkey keyset-example.com. Kcom.+003+51944</userinput>
|
||||
</para>
|
||||
<para>
|
||||
In this example, <command>dnssec-signkey</command> creates
|
||||
the file <filename>signedkey-example.com.</filename>, which
|
||||
contains the <userinput>example.com</userinput> keys and the
|
||||
signatures by the <userinput>.com</userinput> keys.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>SEE ALSO</title>
|
||||
<para>
|
||||
<citerefentry>
|
||||
<refentrytitle>dnssec-keygen</refentrytitle>
|
||||
<manvolnum>8</manvolnum>
|
||||
</citerefentry>,
|
||||
<citerefentry>
|
||||
<refentrytitle>dnssec-makekeyset</refentrytitle>
|
||||
<manvolnum>8</manvolnum>
|
||||
</citerefentry>,
|
||||
<citerefentry>
|
||||
<refentrytitle>dnssec-signzone</refentrytitle>
|
||||
<manvolnum>8</manvolnum>
|
||||
</citerefentry>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>AUTHOR</title>
|
||||
<para>
|
||||
<corpauthor>Internet Systems Consortium</corpauthor>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!--
|
||||
- Local variables:
|
||||
- mode: sgml
|
||||
- End:
|
||||
-->
|
||||
@@ -0,0 +1,407 @@
|
||||
<!--
|
||||
- Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2001, 2003 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 ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
- AND FITNESS. IN NO EVENT SHALL ISC 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: dnssec-signkey.html,v 1.4.2.1.4.1 2004/03/06 10:21:15 marka Exp $ -->
|
||||
|
||||
<HTML
|
||||
><HEAD
|
||||
><TITLE
|
||||
>dnssec-signkey</TITLE
|
||||
><META
|
||||
NAME="GENERATOR"
|
||||
CONTENT="Modular DocBook HTML Stylesheet Version 1.73
|
||||
"></HEAD
|
||||
><BODY
|
||||
CLASS="REFENTRY"
|
||||
BGCOLOR="#FFFFFF"
|
||||
TEXT="#000000"
|
||||
LINK="#0000FF"
|
||||
VLINK="#840084"
|
||||
ALINK="#0000FF"
|
||||
><H1
|
||||
><A
|
||||
NAME="AEN1"
|
||||
><SPAN
|
||||
CLASS="APPLICATION"
|
||||
>dnssec-signkey</SPAN
|
||||
></A
|
||||
></H1
|
||||
><DIV
|
||||
CLASS="REFNAMEDIV"
|
||||
><A
|
||||
NAME="AEN9"
|
||||
></A
|
||||
><H2
|
||||
>Name</H2
|
||||
><SPAN
|
||||
CLASS="APPLICATION"
|
||||
>dnssec-signkey</SPAN
|
||||
> -- DNSSEC key set signing tool</DIV
|
||||
><DIV
|
||||
CLASS="REFSYNOPSISDIV"
|
||||
><A
|
||||
NAME="AEN13"
|
||||
></A
|
||||
><H2
|
||||
>Synopsis</H2
|
||||
><P
|
||||
><B
|
||||
CLASS="COMMAND"
|
||||
>dnssec-signkey</B
|
||||
> [<TT
|
||||
CLASS="OPTION"
|
||||
>-a</TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-c <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>class</I
|
||||
></TT
|
||||
></TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-s <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>start-time</I
|
||||
></TT
|
||||
></TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-e <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>end-time</I
|
||||
></TT
|
||||
></TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-h</TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-p</TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-r <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>randomdev</I
|
||||
></TT
|
||||
></TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-v <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>level</I
|
||||
></TT
|
||||
></TT
|
||||
>] {keyset} {key...}</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN39"
|
||||
></A
|
||||
><H2
|
||||
>DESCRIPTION</H2
|
||||
><P
|
||||
> <B
|
||||
CLASS="COMMAND"
|
||||
>dnssec-signkey</B
|
||||
> signs a keyset. Typically
|
||||
the keyset will be for a child zone, and will have been generated
|
||||
by <B
|
||||
CLASS="COMMAND"
|
||||
>dnssec-makekeyset</B
|
||||
>. The child zone's keyset
|
||||
is signed with the zone keys for its parent zone. The output file
|
||||
is of the form <TT
|
||||
CLASS="FILENAME"
|
||||
>signedkey-nnnn.</TT
|
||||
>, where
|
||||
<TT
|
||||
CLASS="FILENAME"
|
||||
>nnnn</TT
|
||||
> is the zone name.
|
||||
</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN46"
|
||||
></A
|
||||
><H2
|
||||
>OPTIONS</H2
|
||||
><P
|
||||
></P
|
||||
><DIV
|
||||
CLASS="VARIABLELIST"
|
||||
><DL
|
||||
><DT
|
||||
>-a</DT
|
||||
><DD
|
||||
><P
|
||||
> Verify all generated signatures.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-c <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>class</I
|
||||
></TT
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Specifies the DNS class of the key sets.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-s <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>start-time</I
|
||||
></TT
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Specify the date and time when the generated SIG records
|
||||
become valid. This can be either an absolute or relative
|
||||
time. An absolute start time is indicated by a number
|
||||
in YYYYMMDDHHMMSS notation; 20000530144500 denotes
|
||||
14:45:00 UTC on May 30th, 2000. A relative start time is
|
||||
indicated by +N, which is N seconds from the current time.
|
||||
If no <TT
|
||||
CLASS="OPTION"
|
||||
>start-time</TT
|
||||
> is specified, the current
|
||||
time is used.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-e <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>end-time</I
|
||||
></TT
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Specify the date and time when the generated SIG records
|
||||
expire. As with <TT
|
||||
CLASS="OPTION"
|
||||
>start-time</TT
|
||||
>, an absolute
|
||||
time is indicated in YYYYMMDDHHMMSS notation. A time relative
|
||||
to the start time is indicated with +N, which is N seconds from
|
||||
the start time. A time relative to the current time is
|
||||
indicated with now+N. If no <TT
|
||||
CLASS="OPTION"
|
||||
>end-time</TT
|
||||
> is
|
||||
specified, 30 days from the start time is used as a default.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-h</DT
|
||||
><DD
|
||||
><P
|
||||
> Prints a short summary of the options and arguments to
|
||||
<B
|
||||
CLASS="COMMAND"
|
||||
>dnssec-signkey</B
|
||||
>.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-p</DT
|
||||
><DD
|
||||
><P
|
||||
> Use pseudo-random data when signing the zone. This is faster,
|
||||
but less secure, than using real random data. This option
|
||||
may be useful when signing large zones or when the entropy
|
||||
source is limited.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-r <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>randomdev</I
|
||||
></TT
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Specifies the source of randomness. If the operating
|
||||
system does not provide a <TT
|
||||
CLASS="FILENAME"
|
||||
>/dev/random</TT
|
||||
>
|
||||
or equivalent device, the default source of randomness
|
||||
is keyboard input. <TT
|
||||
CLASS="FILENAME"
|
||||
>randomdev</TT
|
||||
> specifies
|
||||
the name of a character device or file containing random
|
||||
data to be used instead of the default. The special value
|
||||
<TT
|
||||
CLASS="FILENAME"
|
||||
>keyboard</TT
|
||||
> indicates that keyboard
|
||||
input should be used.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-v <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>level</I
|
||||
></TT
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Sets the debugging level.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>keyset</DT
|
||||
><DD
|
||||
><P
|
||||
> The file containing the child's keyset.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>key</DT
|
||||
><DD
|
||||
><P
|
||||
> The keys used to sign the child's keyset.
|
||||
</P
|
||||
></DD
|
||||
></DL
|
||||
></DIV
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN101"
|
||||
></A
|
||||
><H2
|
||||
>EXAMPLE</H2
|
||||
><P
|
||||
> The DNS administrator for a DNSSEC-aware <TT
|
||||
CLASS="USERINPUT"
|
||||
><B
|
||||
>.com</B
|
||||
></TT
|
||||
>
|
||||
zone would use the following command to sign the
|
||||
<TT
|
||||
CLASS="FILENAME"
|
||||
>keyset</TT
|
||||
> file for <TT
|
||||
CLASS="USERINPUT"
|
||||
><B
|
||||
>example.com</B
|
||||
></TT
|
||||
>
|
||||
created by <B
|
||||
CLASS="COMMAND"
|
||||
>dnssec-makekeyset</B
|
||||
> with a key generated
|
||||
by <B
|
||||
CLASS="COMMAND"
|
||||
>dnssec-keygen</B
|
||||
>:
|
||||
</P
|
||||
><P
|
||||
> <TT
|
||||
CLASS="USERINPUT"
|
||||
><B
|
||||
>dnssec-signkey keyset-example.com. Kcom.+003+51944</B
|
||||
></TT
|
||||
>
|
||||
</P
|
||||
><P
|
||||
> In this example, <B
|
||||
CLASS="COMMAND"
|
||||
>dnssec-signkey</B
|
||||
> creates
|
||||
the file <TT
|
||||
CLASS="FILENAME"
|
||||
>signedkey-example.com.</TT
|
||||
>, which
|
||||
contains the <TT
|
||||
CLASS="USERINPUT"
|
||||
><B
|
||||
>example.com</B
|
||||
></TT
|
||||
> keys and the
|
||||
signatures by the <TT
|
||||
CLASS="USERINPUT"
|
||||
><B
|
||||
>.com</B
|
||||
></TT
|
||||
> keys.
|
||||
</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN116"
|
||||
></A
|
||||
><H2
|
||||
>SEE ALSO</H2
|
||||
><P
|
||||
> <SPAN
|
||||
CLASS="CITEREFENTRY"
|
||||
><SPAN
|
||||
CLASS="REFENTRYTITLE"
|
||||
>dnssec-keygen</SPAN
|
||||
>(8)</SPAN
|
||||
>,
|
||||
<SPAN
|
||||
CLASS="CITEREFENTRY"
|
||||
><SPAN
|
||||
CLASS="REFENTRYTITLE"
|
||||
>dnssec-makekeyset</SPAN
|
||||
>(8)</SPAN
|
||||
>,
|
||||
<SPAN
|
||||
CLASS="CITEREFENTRY"
|
||||
><SPAN
|
||||
CLASS="REFENTRYTITLE"
|
||||
>dnssec-signzone</SPAN
|
||||
>(8)</SPAN
|
||||
>.
|
||||
</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN128"
|
||||
></A
|
||||
><H2
|
||||
>AUTHOR</H2
|
||||
><P
|
||||
> Internet Software Consortium
|
||||
</P
|
||||
></DIV
|
||||
></BODY
|
||||
></HTML
|
||||
>
|
||||
@@ -1,162 +1,167 @@
|
||||
.\" Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2000-2003 Internet Software Consortium.
|
||||
.\"
|
||||
.\" Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2000-2003 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 ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
.\" REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
.\" AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
.\" AND FITNESS. IN NO EVENT SHALL ISC 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: dnssec-signzone.8,v 1.23.2.1.4.11 2006/06/29 13:02:30 marka Exp $
|
||||
.\" $Id: dnssec-signzone.8,v 1.23.2.1.4.6 2004/06/11 02:32:46 marka Exp $
|
||||
.\"
|
||||
.hy 0
|
||||
.ad l
|
||||
.\" Title: dnssec\-signzone
|
||||
.\" Author:
|
||||
.\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
|
||||
.\" Date: June 30, 2000
|
||||
.\" Manual: BIND9
|
||||
.\" Source: BIND9
|
||||
.\"
|
||||
.TH "DNSSEC\-SIGNZONE" "8" "June 30, 2000" "BIND9" "BIND9"
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.SH "NAME"
|
||||
dnssec\-signzone \- DNSSEC zone signing tool
|
||||
.SH "SYNOPSIS"
|
||||
.HP 16
|
||||
\fBdnssec\-signzone\fR [\fB\-a\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-d\ \fR\fB\fIdirectory\fR\fR] [\fB\-e\ \fR\fB\fIend\-time\fR\fR] [\fB\-f\ \fR\fB\fIoutput\-file\fR\fR] [\fB\-g\fR] [\fB\-h\fR] [\fB\-k\ \fR\fB\fIkey\fR\fR] [\fB\-l\ \fR\fB\fIdomain\fR\fR] [\fB\-i\ \fR\fB\fIinterval\fR\fR] [\fB\-n\ \fR\fB\fInthreads\fR\fR] [\fB\-o\ \fR\fB\fIorigin\fR\fR] [\fB\-p\fR] [\fB\-r\ \fR\fB\fIrandomdev\fR\fR] [\fB\-s\ \fR\fB\fIstart\-time\fR\fR] [\fB\-t\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] [\fB\-z\fR] {zonefile} [key...]
|
||||
.TH "DNSSEC-SIGNZONE" "8" "June 30, 2000" "BIND9" ""
|
||||
.SH NAME
|
||||
dnssec-signzone \- DNSSEC zone signing tool
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
\fBdnssec-signzone\fR [ \fB-a\fR ] [ \fB-c \fIclass\fB\fR ] [ \fB-d \fIdirectory\fB\fR ] [ \fB-e \fIend-time\fB\fR ] [ \fB-f \fIoutput-file\fB\fR ] [ \fB-g\fR ] [ \fB-h\fR ] [ \fB-k \fIkey\fB\fR ] [ \fB-l \fIdomain\fB\fR ] [ \fB-i \fIinterval\fB\fR ] [ \fB-n \fInthreads\fB\fR ] [ \fB-o \fIorigin\fB\fR ] [ \fB-p\fR ] [ \fB-r \fIrandomdev\fB\fR ] [ \fB-s \fIstart-time\fB\fR ] [ \fB-t\fR ] [ \fB-v \fIlevel\fB\fR ] [ \fB-z\fR ] \fBzonefile\fR [ \fBkey\fR\fI...\fR ]
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
\fBdnssec\-signzone\fR
|
||||
signs a zone. It generates NSEC and RRSIG records and produces a signed version of the zone. The security status of delegations from the signed zone (that is, whether the child zones are secure or not) is determined by the presence or absence of a
|
||||
\fIkeyset\fR
|
||||
file for each child zone.
|
||||
\fBdnssec-signzone\fR signs a zone. It generates
|
||||
NSEC and RRSIG records and produces a signed version of the
|
||||
zone. The security status of delegations from the signed zone
|
||||
(that is, whether the child zones are secure or not) is
|
||||
determined by the presence or absence of a
|
||||
\fIkeyset\fR file for each child zone.
|
||||
.SH "OPTIONS"
|
||||
.TP 3n
|
||||
\-a
|
||||
.TP
|
||||
\fB-a\fR
|
||||
Verify all generated signatures.
|
||||
.TP 3n
|
||||
\-c \fIclass\fR
|
||||
.TP
|
||||
\fB-c \fIclass\fB\fR
|
||||
Specifies the DNS class of the zone.
|
||||
.TP 3n
|
||||
\-k \fIkey\fR
|
||||
Treat specified key as a key signing key ignoring any key flags. This option may be specified multiple times.
|
||||
.TP 3n
|
||||
\-l \fIdomain\fR
|
||||
Generate a DLV set in addition to the key (DNSKEY) and DS sets. The domain is appended to the name of the records.
|
||||
.TP 3n
|
||||
\-d \fIdirectory\fR
|
||||
Look for
|
||||
\fIkeyset\fR
|
||||
files in
|
||||
\fBdirectory\fR
|
||||
as the directory
|
||||
.TP 3n
|
||||
\-g
|
||||
Generate DS records for child zones from keyset files. Existing DS records will be removed.
|
||||
.TP 3n
|
||||
\-s \fIstart\-time\fR
|
||||
Specify the date and time when the generated RRSIG records become valid. This can be either an absolute or relative time. An absolute start time is indicated by a number in YYYYMMDDHHMMSS notation; 20000530144500 denotes 14:45:00 UTC on May 30th, 2000. A relative start time is indicated by +N, which is N seconds from the current time. If no
|
||||
\fBstart\-time\fR
|
||||
is specified, the current time minus 1 hour (to allow for clock skew) is used.
|
||||
.TP 3n
|
||||
\-e \fIend\-time\fR
|
||||
Specify the date and time when the generated RRSIG records expire. As with
|
||||
\fBstart\-time\fR, an absolute time is indicated in YYYYMMDDHHMMSS notation. A time relative to the start time is indicated with +N, which is N seconds from the start time. A time relative to the current time is indicated with now+N. If no
|
||||
\fBend\-time\fR
|
||||
is specified, 30 days from the start time is used as a default.
|
||||
.TP 3n
|
||||
\-f \fIoutput\-file\fR
|
||||
The name of the output file containing the signed zone. The default is to append
|
||||
\fI.signed\fR
|
||||
to the input file.
|
||||
.TP 3n
|
||||
\-h
|
||||
.TP
|
||||
\fB-k \fIkey\fB\fR
|
||||
Treat specified key as a key signing key ignoring any
|
||||
key flags. This option may be specified multiple times.
|
||||
.TP
|
||||
\fB-l \fIdomain\fB\fR
|
||||
Generate a DLV set in addition to the key (DNSKEY) and DS sets.
|
||||
The domain is appended to the name of the records.
|
||||
.TP
|
||||
\fB-d \fIdirectory\fB\fR
|
||||
Look for \fIkeyset\fR files in
|
||||
\fBdirectory\fR as the directory
|
||||
.TP
|
||||
\fB-g\fR
|
||||
Generate DS records for child zones from keyset files.
|
||||
Existing DS records will be removed.
|
||||
.TP
|
||||
\fB-s \fIstart-time\fB\fR
|
||||
Specify the date and time when the generated RRSIG records
|
||||
become valid. This can be either an absolute or relative
|
||||
time. An absolute start time is indicated by a number
|
||||
in YYYYMMDDHHMMSS notation; 20000530144500 denotes
|
||||
14:45:00 UTC on May 30th, 2000. A relative start time is
|
||||
indicated by +N, which is N seconds from the current time.
|
||||
If no \fBstart-time\fR is specified, the current
|
||||
time minus 1 hour (to allow for clock skew) is used.
|
||||
.TP
|
||||
\fB-e \fIend-time\fB\fR
|
||||
Specify the date and time when the generated RRSIG records
|
||||
expire. As with \fBstart-time\fR, an absolute
|
||||
time is indicated in YYYYMMDDHHMMSS notation. A time relative
|
||||
to the start time is indicated with +N, which is N seconds from
|
||||
the start time. A time relative to the current time is
|
||||
indicated with now+N. If no \fBend-time\fR is
|
||||
specified, 30 days from the start time is used as a default.
|
||||
.TP
|
||||
\fB-f \fIoutput-file\fB\fR
|
||||
The name of the output file containing the signed zone. The
|
||||
default is to append \fI.signed\fR to the
|
||||
input file.
|
||||
.TP
|
||||
\fB-h\fR
|
||||
Prints a short summary of the options and arguments to
|
||||
\fBdnssec\-signzone\fR.
|
||||
.TP 3n
|
||||
\-i \fIinterval\fR
|
||||
When a previously signed zone is passed as input, records may be resigned. The
|
||||
\fBinterval\fR
|
||||
option specifies the cycle interval as an offset from the current time (in seconds). If a RRSIG record expires after the cycle interval, it is retained. Otherwise, it is considered to be expiring soon, and it will be replaced.
|
||||
.sp
|
||||
The default cycle interval is one quarter of the difference between the signature end and start times. So if neither
|
||||
\fBend\-time\fR
|
||||
or
|
||||
\fBstart\-time\fR
|
||||
are specified,
|
||||
\fBdnssec\-signzone\fR
|
||||
generates signatures that are valid for 30 days, with a cycle interval of 7.5 days. Therefore, if any existing RRSIG records are due to expire in less than 7.5 days, they would be replaced.
|
||||
.TP 3n
|
||||
\-n \fIncpus\fR
|
||||
Specifies the number of threads to use. By default, one thread is started for each detected CPU.
|
||||
.TP 3n
|
||||
\-o \fIorigin\fR
|
||||
The zone origin. If not specified, the name of the zone file is assumed to be the origin.
|
||||
.TP 3n
|
||||
\-p
|
||||
Use pseudo\-random data when signing the zone. This is faster, but less secure, than using real random data. This option may be useful when signing large zones or when the entropy source is limited.
|
||||
.TP 3n
|
||||
\-r \fIrandomdev\fR
|
||||
Specifies the source of randomness. If the operating system does not provide a
|
||||
\fI/dev/random\fR
|
||||
or equivalent device, the default source of randomness is keyboard input.
|
||||
\fIrandomdev\fR
|
||||
specifies the name of a character device or file containing random data to be used instead of the default. The special value
|
||||
\fIkeyboard\fR
|
||||
indicates that keyboard input should be used.
|
||||
.TP 3n
|
||||
\-t
|
||||
\fBdnssec-signzone\fR.
|
||||
.TP
|
||||
\fB-i \fIinterval\fB\fR
|
||||
When a previously signed zone is passed as input, records
|
||||
may be resigned. The \fBinterval\fR option
|
||||
specifies the cycle interval as an offset from the current
|
||||
time (in seconds). If a RRSIG record expires after the
|
||||
cycle interval, it is retained. Otherwise, it is considered
|
||||
to be expiring soon, and it will be replaced.
|
||||
|
||||
The default cycle interval is one quarter of the difference
|
||||
between the signature end and start times. So if neither
|
||||
\fBend-time\fR or \fBstart-time\fR
|
||||
are specified, \fBdnssec-signzone\fR generates
|
||||
signatures that are valid for 30 days, with a cycle
|
||||
interval of 7.5 days. Therefore, if any existing RRSIG records
|
||||
are due to expire in less than 7.5 days, they would be
|
||||
replaced.
|
||||
.TP
|
||||
\fB-n \fIncpus\fB\fR
|
||||
Specifies the number of threads to use. By default, one
|
||||
thread is started for each detected CPU.
|
||||
.TP
|
||||
\fB-o \fIorigin\fB\fR
|
||||
The zone origin. If not specified, the name of the zone file
|
||||
is assumed to be the origin.
|
||||
.TP
|
||||
\fB-p\fR
|
||||
Use pseudo-random data when signing the zone. This is faster,
|
||||
but less secure, than using real random data. This option
|
||||
may be useful when signing large zones or when the entropy
|
||||
source is limited.
|
||||
.TP
|
||||
\fB-r \fIrandomdev\fB\fR
|
||||
Specifies the source of randomness. If the operating
|
||||
system does not provide a \fI/dev/random\fR
|
||||
or equivalent device, the default source of randomness
|
||||
is keyboard input. \fIrandomdev\fR specifies
|
||||
the name of a character device or file containing random
|
||||
data to be used instead of the default. The special value
|
||||
\fIkeyboard\fR indicates that keyboard
|
||||
input should be used.
|
||||
.TP
|
||||
\fB-t\fR
|
||||
Print statistics at completion.
|
||||
.TP 3n
|
||||
\-v \fIlevel\fR
|
||||
.TP
|
||||
\fB-v \fIlevel\fB\fR
|
||||
Sets the debugging level.
|
||||
.TP 3n
|
||||
\-z
|
||||
.TP
|
||||
\fB-z\fR
|
||||
Ignore KSK flag on key when determining what to sign.
|
||||
.TP 3n
|
||||
zonefile
|
||||
.TP
|
||||
\fBzonefile\fR
|
||||
The file containing the zone to be signed.
|
||||
.TP 3n
|
||||
key
|
||||
The keys used to sign the zone. If no keys are specified, the default all zone keys that have private key files in the current directory.
|
||||
Sets the debugging level.
|
||||
.TP
|
||||
\fBkey\fR
|
||||
The keys used to sign the zone. If no keys are specified, the
|
||||
default all zone keys that have private key files in the
|
||||
current directory.
|
||||
.SH "EXAMPLE"
|
||||
.PP
|
||||
The following command signs the
|
||||
\fBexample.com\fR
|
||||
zone with the DSA key generated in the
|
||||
\fBdnssec\-keygen\fR
|
||||
The following command signs the \fBexample.com\fR
|
||||
zone with the DSA key generated in the \fBdnssec-keygen\fR
|
||||
man page. The zone's keys must be in the zone. If there are
|
||||
\fIkeyset\fR
|
||||
files associated with child zones, they must be in the current directory.
|
||||
\fBexample.com\fR, the following command would be issued:
|
||||
\fIkeyset\fR files associated with child zones,
|
||||
they must be in the current directory.
|
||||
\fBexample.com\fR, the following command would be
|
||||
issued:
|
||||
.PP
|
||||
\fBdnssec\-signzone \-o example.com db.example.com Kexample.com.+003+26160\fR
|
||||
\fBdnssec-signzone -o example.com db.example.com Kexample.com.+003+26160\fR
|
||||
.PP
|
||||
The command would print a string of the form:
|
||||
.PP
|
||||
In this example,
|
||||
\fBdnssec\-signzone\fR
|
||||
creates the file
|
||||
\fIdb.example.com.signed\fR. This file should be referenced in a zone statement in a
|
||||
\fInamed.conf\fR
|
||||
file.
|
||||
In this example, \fBdnssec-signzone\fR creates
|
||||
the file \fIdb.example.com.signed\fR. This file
|
||||
should be referenced in a zone statement in a
|
||||
\fInamed.conf\fR file.
|
||||
.SH "SEE ALSO"
|
||||
.PP
|
||||
\fBdnssec\-keygen\fR(8),
|
||||
BIND 9 Administrator Reference Manual,
|
||||
RFC 2535.
|
||||
\fBdnssec-keygen\fR(8),
|
||||
\fIBIND 9 Administrator Reference Manual\fR,
|
||||
\fIRFC 2535\fR.
|
||||
.SH "AUTHOR"
|
||||
.PP
|
||||
Internet Systems Consortium
|
||||
.SH "COPYRIGHT"
|
||||
Copyright \(co 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Portions Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Portions Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Portions Copyright (C) 1999-2003 Internet Software Consortium.
|
||||
* Portions Copyright (C) 1995-2000 by Network Associates, Inc.
|
||||
*
|
||||
@@ -16,7 +16,7 @@
|
||||
* IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: dnssec-signzone.c,v 1.139.2.2.4.23 2006/01/04 23:50:19 marka Exp $ */
|
||||
/* $Id: dnssec-signzone.c,v 1.139.2.2.4.16 2004/08/28 06:25:29 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
#include <isc/entropy.h>
|
||||
#include <isc/event.h>
|
||||
#include <isc/file.h>
|
||||
#include <isc/hash.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/mutex.h>
|
||||
#include <isc/os.h>
|
||||
@@ -787,6 +786,7 @@ signname(dns_dbnode_t *node, dns_name_t *name) {
|
||||
dns_rdatasetiter_t *rdsiter;
|
||||
isc_boolean_t isdelegation = ISC_FALSE;
|
||||
isc_boolean_t hasds = ISC_FALSE;
|
||||
isc_boolean_t atorigin;
|
||||
isc_boolean_t changed = ISC_FALSE;
|
||||
dns_diff_t del, add;
|
||||
char namestr[DNS_NAME_FORMATSIZE];
|
||||
@@ -794,6 +794,8 @@ signname(dns_dbnode_t *node, dns_name_t *name) {
|
||||
|
||||
dns_name_format(name, namestr, sizeof(namestr));
|
||||
|
||||
atorigin = dns_name_equal(name, gorigin);
|
||||
|
||||
/*
|
||||
* Determine if this is a delegation point.
|
||||
*/
|
||||
@@ -928,16 +930,13 @@ signname(dns_dbnode_t *node, dns_name_t *name) {
|
||||
|
||||
static inline isc_boolean_t
|
||||
active_node(dns_dbnode_t *node) {
|
||||
dns_rdatasetiter_t *rdsiter = NULL;
|
||||
dns_rdatasetiter_t *rdsiter2 = NULL;
|
||||
dns_rdatasetiter_t *rdsiter;
|
||||
isc_boolean_t active = ISC_FALSE;
|
||||
isc_result_t result;
|
||||
dns_rdataset_t rdataset;
|
||||
dns_rdatatype_t type;
|
||||
dns_rdatatype_t covers;
|
||||
isc_boolean_t found;
|
||||
|
||||
dns_rdataset_init(&rdataset);
|
||||
rdsiter = NULL;
|
||||
result = dns_db_allrdatasets(gdb, node, gversion, 0, &rdsiter);
|
||||
check_result(result, "dns_db_allrdatasets()");
|
||||
result = dns_rdatasetiter_first(rdsiter);
|
||||
@@ -958,63 +957,36 @@ active_node(dns_dbnode_t *node) {
|
||||
|
||||
if (!active) {
|
||||
/*
|
||||
* The node is empty of everything but NSEC / RRSIG records.
|
||||
* Make sure there is no NSEC / RRSIG records for
|
||||
* this node.
|
||||
*/
|
||||
result = dns_db_deleterdataset(gdb, node, gversion,
|
||||
dns_rdatatype_nsec, 0);
|
||||
if (result == DNS_R_UNCHANGED)
|
||||
result = ISC_R_SUCCESS;
|
||||
check_result(result, "dns_db_deleterdataset(nsec)");
|
||||
|
||||
result = dns_rdatasetiter_first(rdsiter);
|
||||
for (result = dns_rdatasetiter_first(rdsiter);
|
||||
result == ISC_R_SUCCESS;
|
||||
result = dns_rdatasetiter_next(rdsiter)) {
|
||||
dns_rdatasetiter_current(rdsiter, &rdataset);
|
||||
result = dns_db_deleterdataset(gdb, node, gversion,
|
||||
rdataset.type,
|
||||
rdataset.covers);
|
||||
check_result(result, "dns_db_deleterdataset()");
|
||||
dns_rdataset_disassociate(&rdataset);
|
||||
}
|
||||
if (result != ISC_R_NOMORE)
|
||||
fatal("rdataset iteration failed: %s",
|
||||
isc_result_totext(result));
|
||||
} else {
|
||||
/*
|
||||
* Delete RRSIGs for types that no longer exist.
|
||||
*/
|
||||
result = dns_db_allrdatasets(gdb, node, gversion, 0, &rdsiter2);
|
||||
check_result(result, "dns_db_allrdatasets()");
|
||||
for (result = dns_rdatasetiter_first(rdsiter);
|
||||
result == ISC_R_SUCCESS;
|
||||
result = dns_rdatasetiter_next(rdsiter)) {
|
||||
dns_rdatasetiter_current(rdsiter, &rdataset);
|
||||
type = rdataset.type;
|
||||
covers = rdataset.covers;
|
||||
dns_rdataset_disassociate(&rdataset);
|
||||
if (type != dns_rdatatype_rrsig)
|
||||
continue;
|
||||
found = ISC_FALSE;
|
||||
for (result = dns_rdatasetiter_first(rdsiter2);
|
||||
!found && result == ISC_R_SUCCESS;
|
||||
result = dns_rdatasetiter_next(rdsiter2)) {
|
||||
dns_rdatasetiter_current(rdsiter2, &rdataset);
|
||||
if (rdataset.type == covers)
|
||||
found = ISC_TRUE;
|
||||
dns_rdataset_disassociate(&rdataset);
|
||||
}
|
||||
if (!found) {
|
||||
if (result != ISC_R_NOMORE)
|
||||
fatal("rdataset iteration failed: %s",
|
||||
isc_result_totext(result));
|
||||
if (rdataset.type == dns_rdatatype_rrsig) {
|
||||
dns_rdatatype_t type = rdataset.type;
|
||||
dns_rdatatype_t covers = rdataset.covers;
|
||||
result = dns_db_deleterdataset(gdb, node,
|
||||
gversion, type,
|
||||
covers);
|
||||
if (result == DNS_R_UNCHANGED)
|
||||
result = ISC_R_SUCCESS;
|
||||
check_result(result,
|
||||
"dns_db_deleterdataset(rrsig)");
|
||||
} else if (result != ISC_R_NOMORE &&
|
||||
result != ISC_R_SUCCESS)
|
||||
fatal("rdataset iteration failed: %s",
|
||||
isc_result_totext(result));
|
||||
}
|
||||
dns_rdataset_disassociate(&rdataset);
|
||||
}
|
||||
if (result != ISC_R_NOMORE)
|
||||
fatal("rdataset iteration failed: %s",
|
||||
isc_result_totext(result));
|
||||
dns_rdatasetiter_destroy(&rdsiter2);
|
||||
}
|
||||
dns_rdatasetiter_destroy(&rdsiter);
|
||||
|
||||
@@ -1292,6 +1264,10 @@ nsecify(void) {
|
||||
result = dns_dbiterator_next(dbiter);
|
||||
continue;
|
||||
}
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
dns_db_detachnode(gdb, &nextnode);
|
||||
break;
|
||||
}
|
||||
if (!dns_name_issubdomain(nextname, gorigin) ||
|
||||
(zonecut != NULL &&
|
||||
dns_name_issubdomain(nextname, zonecut)))
|
||||
@@ -1446,6 +1422,7 @@ warnifallksk(dns_db_t *db) {
|
||||
dns_dbnode_t *node = NULL;
|
||||
dns_rdataset_t rdataset;
|
||||
dns_rdata_t rdata = DNS_RDATA_INIT;
|
||||
dst_key_t *pubkey;
|
||||
isc_result_t result;
|
||||
dns_rdata_key_t key;
|
||||
isc_boolean_t have_non_ksk = ISC_FALSE;
|
||||
@@ -1466,6 +1443,7 @@ warnifallksk(dns_db_t *db) {
|
||||
result = dns_rdataset_first(&rdataset);
|
||||
check_result(result, "dns_rdataset_first");
|
||||
while (result == ISC_R_SUCCESS) {
|
||||
pubkey = NULL;
|
||||
dns_rdata_reset(&rdata);
|
||||
dns_rdataset_current(&rdataset, &rdata);
|
||||
result = dns_rdata_tostruct(&rdata, &key, NULL);
|
||||
@@ -1636,9 +1614,9 @@ usage(void) {
|
||||
fprintf(stderr, "\t\tdirectory to find keyset files (.)\n");
|
||||
fprintf(stderr, "\t-g:\t");
|
||||
fprintf(stderr, "generate DS records from keyset files\n");
|
||||
fprintf(stderr, "\t-s [YYYYMMDDHHMMSS|+offset]:\n");
|
||||
fprintf(stderr, "\t-s YYYYMMDDHHMMSS|+offset:\n");
|
||||
fprintf(stderr, "\t\tRRSIG start time - absolute|offset (now - 1 hour)\n");
|
||||
fprintf(stderr, "\t-e [YYYYMMDDHHMMSS|+offset|\"now\"+offset]:\n");
|
||||
fprintf(stderr, "\t-e YYYYMMDDHHMMSS|+offset|\"now\"+offset]:\n");
|
||||
fprintf(stderr, "\t\tRRSIG end time - absolute|from start|from now "
|
||||
"(now + 30 days)\n");
|
||||
fprintf(stderr, "\t-i interval:\n");
|
||||
@@ -1846,11 +1824,6 @@ main(int argc, char *argv[]) {
|
||||
eflags = ISC_ENTROPY_BLOCKING;
|
||||
if (!pseudorandom)
|
||||
eflags |= ISC_ENTROPY_GOODONLY;
|
||||
|
||||
result = isc_hash_create(mctx, ectx, DNS_NAME_MAXWIRE);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("could not create hash context");
|
||||
|
||||
result = dst_lib_init(mctx, ectx, eflags);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("could not initialize dst");
|
||||
@@ -2113,7 +2086,6 @@ main(int argc, char *argv[]) {
|
||||
|
||||
cleanup_logging(&log);
|
||||
dst_lib_destroy();
|
||||
isc_hash_destroy();
|
||||
cleanup_entropy(&ectx);
|
||||
if (verbose > 10)
|
||||
isc_mem_stats(mctx, stdout);
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
|
||||
[<!ENTITY mdash "—">]>
|
||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
|
||||
<!--
|
||||
- Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2000-2003 Internet Software Consortium.
|
||||
- Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2001-2003 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
|
||||
@@ -18,7 +16,7 @@
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
|
||||
<!-- $Id: dnssec-signzone.docbook,v 1.2.2.2.4.11 2005/06/24 00:18:15 marka Exp $ -->
|
||||
<!-- $Id: dnssec-signzone.docbook,v 1.2.2.2.4.8 2004/06/11 01:17:35 marka Exp $ -->
|
||||
|
||||
<refentry>
|
||||
<refentryinfo>
|
||||
@@ -31,21 +29,6 @@
|
||||
<refmiscinfo>BIND9</refmiscinfo>
|
||||
</refmeta>
|
||||
|
||||
<docinfo>
|
||||
<copyright>
|
||||
<year>2004</year>
|
||||
<year>2005</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
<copyright>
|
||||
<year>2000</year>
|
||||
<year>2001</year>
|
||||
<year>2002</year>
|
||||
<year>2003</year>
|
||||
<holder>Internet Software Consortium.</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
<refnamediv>
|
||||
<refname><application>dnssec-signzone</application></refname>
|
||||
<refpurpose>DNSSEC zone signing tool</refpurpose>
|
||||
@@ -307,6 +290,7 @@
|
||||
<listitem>
|
||||
<para>
|
||||
The file containing the zone to be signed.
|
||||
Sets the debugging level.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
@@ -1,220 +1,553 @@
|
||||
<!--
|
||||
- Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2000-2003 Internet Software Consortium.
|
||||
-
|
||||
- Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2001-2003 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 ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
- AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
- AND FITNESS. IN NO EVENT SHALL ISC 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: dnssec-signzone.html,v 1.4.2.1.4.16 2006/06/29 13:02:30 marka Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>dnssec-signzone</title>
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
|
||||
<a name="id2482688"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2>Name</h2>
|
||||
<p><span class="application">dnssec-signzone</span> — DNSSEC zone signing tool</p>
|
||||
</div>
|
||||
<div class="refsynopsisdiv">
|
||||
<h2>Synopsis</h2>
|
||||
<div class="cmdsynopsis"><p><code class="command">dnssec-signzone</code> [<code class="option">-a</code>] [<code class="option">-c <em class="replaceable"><code>class</code></em></code>] [<code class="option">-d <em class="replaceable"><code>directory</code></em></code>] [<code class="option">-e <em class="replaceable"><code>end-time</code></em></code>] [<code class="option">-f <em class="replaceable"><code>output-file</code></em></code>] [<code class="option">-g</code>] [<code class="option">-h</code>] [<code class="option">-k <em class="replaceable"><code>key</code></em></code>] [<code class="option">-l <em class="replaceable"><code>domain</code></em></code>] [<code class="option">-i <em class="replaceable"><code>interval</code></em></code>] [<code class="option">-n <em class="replaceable"><code>nthreads</code></em></code>] [<code class="option">-o <em class="replaceable"><code>origin</code></em></code>] [<code class="option">-p</code>] [<code class="option">-r <em class="replaceable"><code>randomdev</code></em></code>] [<code class="option">-s <em class="replaceable"><code>start-time</code></em></code>] [<code class="option">-t</code>] [<code class="option">-v <em class="replaceable"><code>level</code></em></code>] [<code class="option">-z</code>] {zonefile} [key...]</p></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549544"></a><h2>DESCRIPTION</h2>
|
||||
<p>
|
||||
<span><strong class="command">dnssec-signzone</strong></span> signs a zone. It generates
|
||||
|
||||
<!-- $Id: dnssec-signzone.html,v 1.4.2.1.4.7 2004/08/22 23:38:58 marka Exp $ -->
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<HTML
|
||||
><HEAD
|
||||
><TITLE
|
||||
>dnssec-signzone</TITLE
|
||||
><META
|
||||
NAME="GENERATOR"
|
||||
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"></HEAD
|
||||
><BODY
|
||||
CLASS="REFENTRY"
|
||||
BGCOLOR="#FFFFFF"
|
||||
TEXT="#000000"
|
||||
LINK="#0000FF"
|
||||
VLINK="#840084"
|
||||
ALINK="#0000FF"
|
||||
><H1
|
||||
><A
|
||||
NAME="AEN1"
|
||||
></A
|
||||
><SPAN
|
||||
CLASS="APPLICATION"
|
||||
>dnssec-signzone</SPAN
|
||||
></H1
|
||||
><DIV
|
||||
CLASS="REFNAMEDIV"
|
||||
><A
|
||||
NAME="AEN9"
|
||||
></A
|
||||
><H2
|
||||
>Name</H2
|
||||
><SPAN
|
||||
CLASS="APPLICATION"
|
||||
>dnssec-signzone</SPAN
|
||||
> -- DNSSEC zone signing tool</DIV
|
||||
><DIV
|
||||
CLASS="REFSYNOPSISDIV"
|
||||
><A
|
||||
NAME="AEN13"
|
||||
></A
|
||||
><H2
|
||||
>Synopsis</H2
|
||||
><P
|
||||
><B
|
||||
CLASS="COMMAND"
|
||||
>dnssec-signzone</B
|
||||
> [<VAR
|
||||
CLASS="OPTION"
|
||||
>-a</VAR
|
||||
>] [<VAR
|
||||
CLASS="OPTION"
|
||||
>-c <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>class</VAR
|
||||
></VAR
|
||||
>] [<VAR
|
||||
CLASS="OPTION"
|
||||
>-d <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>directory</VAR
|
||||
></VAR
|
||||
>] [<VAR
|
||||
CLASS="OPTION"
|
||||
>-e <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>end-time</VAR
|
||||
></VAR
|
||||
>] [<VAR
|
||||
CLASS="OPTION"
|
||||
>-f <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>output-file</VAR
|
||||
></VAR
|
||||
>] [<VAR
|
||||
CLASS="OPTION"
|
||||
>-g</VAR
|
||||
>] [<VAR
|
||||
CLASS="OPTION"
|
||||
>-h</VAR
|
||||
>] [<VAR
|
||||
CLASS="OPTION"
|
||||
>-k <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>key</VAR
|
||||
></VAR
|
||||
>] [<VAR
|
||||
CLASS="OPTION"
|
||||
>-l <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>domain</VAR
|
||||
></VAR
|
||||
>] [<VAR
|
||||
CLASS="OPTION"
|
||||
>-i <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>interval</VAR
|
||||
></VAR
|
||||
>] [<VAR
|
||||
CLASS="OPTION"
|
||||
>-n <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>nthreads</VAR
|
||||
></VAR
|
||||
>] [<VAR
|
||||
CLASS="OPTION"
|
||||
>-o <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>origin</VAR
|
||||
></VAR
|
||||
>] [<VAR
|
||||
CLASS="OPTION"
|
||||
>-p</VAR
|
||||
>] [<VAR
|
||||
CLASS="OPTION"
|
||||
>-r <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>randomdev</VAR
|
||||
></VAR
|
||||
>] [<VAR
|
||||
CLASS="OPTION"
|
||||
>-s <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>start-time</VAR
|
||||
></VAR
|
||||
>] [<VAR
|
||||
CLASS="OPTION"
|
||||
>-t</VAR
|
||||
>] [<VAR
|
||||
CLASS="OPTION"
|
||||
>-v <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>level</VAR
|
||||
></VAR
|
||||
>] [<VAR
|
||||
CLASS="OPTION"
|
||||
>-z</VAR
|
||||
>] {zonefile} [key...]</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN66"
|
||||
></A
|
||||
><H2
|
||||
>DESCRIPTION</H2
|
||||
><P
|
||||
> <B
|
||||
CLASS="COMMAND"
|
||||
>dnssec-signzone</B
|
||||
> signs a zone. It generates
|
||||
NSEC and RRSIG records and produces a signed version of the
|
||||
zone. The security status of delegations from the signed zone
|
||||
(that is, whether the child zones are secure or not) is
|
||||
determined by the presence or absence of a
|
||||
<code class="filename">keyset</code> file for each child zone.
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549560"></a><h2>OPTIONS</h2>
|
||||
<div class="variablelist"><dl>
|
||||
<dt><span class="term">-a</span></dt>
|
||||
<dd><p>
|
||||
Verify all generated signatures.
|
||||
</p></dd>
|
||||
<dt><span class="term">-c <em class="replaceable"><code>class</code></em></span></dt>
|
||||
<dd><p>
|
||||
Specifies the DNS class of the zone.
|
||||
</p></dd>
|
||||
<dt><span class="term">-k <em class="replaceable"><code>key</code></em></span></dt>
|
||||
<dd><p>
|
||||
Treat specified key as a key signing key ignoring any
|
||||
<TT
|
||||
CLASS="FILENAME"
|
||||
>keyset</TT
|
||||
> file for each child zone.
|
||||
</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN71"
|
||||
></A
|
||||
><H2
|
||||
>OPTIONS</H2
|
||||
><P
|
||||
></P
|
||||
><DIV
|
||||
CLASS="VARIABLELIST"
|
||||
><DL
|
||||
><DT
|
||||
>-a</DT
|
||||
><DD
|
||||
><P
|
||||
> Verify all generated signatures.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-c <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>class</VAR
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Specifies the DNS class of the zone.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-k <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>key</VAR
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Treat specified key as a key signing key ignoring any
|
||||
key flags. This option may be specified multiple times.
|
||||
</p></dd>
|
||||
<dt><span class="term">-l <em class="replaceable"><code>domain</code></em></span></dt>
|
||||
<dd><p>
|
||||
Generate a DLV set in addition to the key (DNSKEY) and DS sets.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-l <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>domain</VAR
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Generate a DLV set in addition to the key (DNSKEY) and DS sets.
|
||||
The domain is appended to the name of the records.
|
||||
</p></dd>
|
||||
<dt><span class="term">-d <em class="replaceable"><code>directory</code></em></span></dt>
|
||||
<dd><p>
|
||||
Look for <code class="filename">keyset</code> files in
|
||||
<code class="option">directory</code> as the directory
|
||||
</p></dd>
|
||||
<dt><span class="term">-g</span></dt>
|
||||
<dd><p>
|
||||
Generate DS records for child zones from keyset files.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-d <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>directory</VAR
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Look for <TT
|
||||
CLASS="FILENAME"
|
||||
>keyset</TT
|
||||
> files in
|
||||
<VAR
|
||||
CLASS="OPTION"
|
||||
>directory</VAR
|
||||
> as the directory
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-g</DT
|
||||
><DD
|
||||
><P
|
||||
> Generate DS records for child zones from keyset files.
|
||||
Existing DS records will be removed.
|
||||
</p></dd>
|
||||
<dt><span class="term">-s <em class="replaceable"><code>start-time</code></em></span></dt>
|
||||
<dd><p>
|
||||
Specify the date and time when the generated RRSIG records
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-s <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>start-time</VAR
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Specify the date and time when the generated RRSIG records
|
||||
become valid. This can be either an absolute or relative
|
||||
time. An absolute start time is indicated by a number
|
||||
in YYYYMMDDHHMMSS notation; 20000530144500 denotes
|
||||
14:45:00 UTC on May 30th, 2000. A relative start time is
|
||||
indicated by +N, which is N seconds from the current time.
|
||||
If no <code class="option">start-time</code> is specified, the current
|
||||
If no <VAR
|
||||
CLASS="OPTION"
|
||||
>start-time</VAR
|
||||
> is specified, the current
|
||||
time minus 1 hour (to allow for clock skew) is used.
|
||||
</p></dd>
|
||||
<dt><span class="term">-e <em class="replaceable"><code>end-time</code></em></span></dt>
|
||||
<dd><p>
|
||||
Specify the date and time when the generated RRSIG records
|
||||
expire. As with <code class="option">start-time</code>, an absolute
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-e <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>end-time</VAR
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Specify the date and time when the generated RRSIG records
|
||||
expire. As with <VAR
|
||||
CLASS="OPTION"
|
||||
>start-time</VAR
|
||||
>, an absolute
|
||||
time is indicated in YYYYMMDDHHMMSS notation. A time relative
|
||||
to the start time is indicated with +N, which is N seconds from
|
||||
the start time. A time relative to the current time is
|
||||
indicated with now+N. If no <code class="option">end-time</code> is
|
||||
indicated with now+N. If no <VAR
|
||||
CLASS="OPTION"
|
||||
>end-time</VAR
|
||||
> is
|
||||
specified, 30 days from the start time is used as a default.
|
||||
</p></dd>
|
||||
<dt><span class="term">-f <em class="replaceable"><code>output-file</code></em></span></dt>
|
||||
<dd><p>
|
||||
The name of the output file containing the signed zone. The
|
||||
default is to append <code class="filename">.signed</code> to the
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-f <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>output-file</VAR
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> The name of the output file containing the signed zone. The
|
||||
default is to append <TT
|
||||
CLASS="FILENAME"
|
||||
>.signed</TT
|
||||
> to the
|
||||
input file.
|
||||
</p></dd>
|
||||
<dt><span class="term">-h</span></dt>
|
||||
<dd><p>
|
||||
Prints a short summary of the options and arguments to
|
||||
<span><strong class="command">dnssec-signzone</strong></span>.
|
||||
</p></dd>
|
||||
<dt><span class="term">-i <em class="replaceable"><code>interval</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
When a previously signed zone is passed as input, records
|
||||
may be resigned. The <code class="option">interval</code> option
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-h</DT
|
||||
><DD
|
||||
><P
|
||||
> Prints a short summary of the options and arguments to
|
||||
<B
|
||||
CLASS="COMMAND"
|
||||
>dnssec-signzone</B
|
||||
>.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-i <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>interval</VAR
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> When a previously signed zone is passed as input, records
|
||||
may be resigned. The <VAR
|
||||
CLASS="OPTION"
|
||||
>interval</VAR
|
||||
> option
|
||||
specifies the cycle interval as an offset from the current
|
||||
time (in seconds). If a RRSIG record expires after the
|
||||
cycle interval, it is retained. Otherwise, it is considered
|
||||
to be expiring soon, and it will be replaced.
|
||||
</p>
|
||||
<p>
|
||||
The default cycle interval is one quarter of the difference
|
||||
</P
|
||||
><P
|
||||
> The default cycle interval is one quarter of the difference
|
||||
between the signature end and start times. So if neither
|
||||
<code class="option">end-time</code> or <code class="option">start-time</code>
|
||||
are specified, <span><strong class="command">dnssec-signzone</strong></span> generates
|
||||
<VAR
|
||||
CLASS="OPTION"
|
||||
>end-time</VAR
|
||||
> or <VAR
|
||||
CLASS="OPTION"
|
||||
>start-time</VAR
|
||||
>
|
||||
are specified, <B
|
||||
CLASS="COMMAND"
|
||||
>dnssec-signzone</B
|
||||
> generates
|
||||
signatures that are valid for 30 days, with a cycle
|
||||
interval of 7.5 days. Therefore, if any existing RRSIG records
|
||||
are due to expire in less than 7.5 days, they would be
|
||||
replaced.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-n <em class="replaceable"><code>ncpus</code></em></span></dt>
|
||||
<dd><p>
|
||||
Specifies the number of threads to use. By default, one
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-n <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>ncpus</VAR
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Specifies the number of threads to use. By default, one
|
||||
thread is started for each detected CPU.
|
||||
</p></dd>
|
||||
<dt><span class="term">-o <em class="replaceable"><code>origin</code></em></span></dt>
|
||||
<dd><p>
|
||||
The zone origin. If not specified, the name of the zone file
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-o <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>origin</VAR
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> The zone origin. If not specified, the name of the zone file
|
||||
is assumed to be the origin.
|
||||
</p></dd>
|
||||
<dt><span class="term">-p</span></dt>
|
||||
<dd><p>
|
||||
Use pseudo-random data when signing the zone. This is faster,
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-p</DT
|
||||
><DD
|
||||
><P
|
||||
> Use pseudo-random data when signing the zone. This is faster,
|
||||
but less secure, than using real random data. This option
|
||||
may be useful when signing large zones or when the entropy
|
||||
source is limited.
|
||||
</p></dd>
|
||||
<dt><span class="term">-r <em class="replaceable"><code>randomdev</code></em></span></dt>
|
||||
<dd><p>
|
||||
Specifies the source of randomness. If the operating
|
||||
system does not provide a <code class="filename">/dev/random</code>
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-r <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>randomdev</VAR
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Specifies the source of randomness. If the operating
|
||||
system does not provide a <TT
|
||||
CLASS="FILENAME"
|
||||
>/dev/random</TT
|
||||
>
|
||||
or equivalent device, the default source of randomness
|
||||
is keyboard input. <code class="filename">randomdev</code> specifies
|
||||
is keyboard input. <TT
|
||||
CLASS="FILENAME"
|
||||
>randomdev</TT
|
||||
> specifies
|
||||
the name of a character device or file containing random
|
||||
data to be used instead of the default. The special value
|
||||
<code class="filename">keyboard</code> indicates that keyboard
|
||||
<TT
|
||||
CLASS="FILENAME"
|
||||
>keyboard</TT
|
||||
> indicates that keyboard
|
||||
input should be used.
|
||||
</p></dd>
|
||||
<dt><span class="term">-t</span></dt>
|
||||
<dd><p>
|
||||
Print statistics at completion.
|
||||
</p></dd>
|
||||
<dt><span class="term">-v <em class="replaceable"><code>level</code></em></span></dt>
|
||||
<dd><p>
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-t</DT
|
||||
><DD
|
||||
><P
|
||||
> Print statistics at completion.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-v <VAR
|
||||
CLASS="REPLACEABLE"
|
||||
>level</VAR
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Sets the debugging level.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-z</DT
|
||||
><DD
|
||||
><P
|
||||
> Ignore KSK flag on key when determining what to sign.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>zonefile</DT
|
||||
><DD
|
||||
><P
|
||||
> The file containing the zone to be signed.
|
||||
Sets the debugging level.
|
||||
</p></dd>
|
||||
<dt><span class="term">-z</span></dt>
|
||||
<dd><p>
|
||||
Ignore KSK flag on key when determining what to sign.
|
||||
</p></dd>
|
||||
<dt><span class="term">zonefile</span></dt>
|
||||
<dd><p>
|
||||
The file containing the zone to be signed.
|
||||
</p></dd>
|
||||
<dt><span class="term">key</span></dt>
|
||||
<dd><p>
|
||||
The keys used to sign the zone. If no keys are specified, the
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>key</DT
|
||||
><DD
|
||||
><P
|
||||
> The keys used to sign the zone. If no keys are specified, the
|
||||
default all zone keys that have private key files in the
|
||||
current directory.
|
||||
</p></dd>
|
||||
</dl></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2550068"></a><h2>EXAMPLE</h2>
|
||||
<p>
|
||||
The following command signs the <strong class="userinput"><code>example.com</code></strong>
|
||||
zone with the DSA key generated in the <span><strong class="command">dnssec-keygen</strong></span>
|
||||
</P
|
||||
></DD
|
||||
></DL
|
||||
></DIV
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN181"
|
||||
></A
|
||||
><H2
|
||||
>EXAMPLE</H2
|
||||
><P
|
||||
> The following command signs the <KBD
|
||||
CLASS="USERINPUT"
|
||||
>example.com</KBD
|
||||
>
|
||||
zone with the DSA key generated in the <B
|
||||
CLASS="COMMAND"
|
||||
>dnssec-keygen</B
|
||||
>
|
||||
man page. The zone's keys must be in the zone. If there are
|
||||
<code class="filename">keyset</code> files associated with child zones,
|
||||
<TT
|
||||
CLASS="FILENAME"
|
||||
>keyset</TT
|
||||
> files associated with child zones,
|
||||
they must be in the current directory.
|
||||
<strong class="userinput"><code>example.com</code></strong>, the following command would be
|
||||
<KBD
|
||||
CLASS="USERINPUT"
|
||||
>example.com</KBD
|
||||
>, the following command would be
|
||||
issued:
|
||||
</p>
|
||||
<p>
|
||||
<strong class="userinput"><code>dnssec-signzone -o example.com db.example.com Kexample.com.+003+26160</code></strong>
|
||||
</p>
|
||||
<p>
|
||||
The command would print a string of the form:
|
||||
</p>
|
||||
<p>
|
||||
In this example, <span><strong class="command">dnssec-signzone</strong></span> creates
|
||||
the file <code class="filename">db.example.com.signed</code>. This file
|
||||
</P
|
||||
><P
|
||||
> <KBD
|
||||
CLASS="USERINPUT"
|
||||
>dnssec-signzone -o example.com db.example.com Kexample.com.+003+26160</KBD
|
||||
>
|
||||
</P
|
||||
><P
|
||||
> The command would print a string of the form:
|
||||
</P
|
||||
><P
|
||||
> In this example, <B
|
||||
CLASS="COMMAND"
|
||||
>dnssec-signzone</B
|
||||
> creates
|
||||
the file <TT
|
||||
CLASS="FILENAME"
|
||||
>db.example.com.signed</TT
|
||||
>. This file
|
||||
should be referenced in a zone statement in a
|
||||
<code class="filename">named.conf</code> file.
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2550118"></a><h2>SEE ALSO</h2>
|
||||
<p>
|
||||
<span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>,
|
||||
<em class="citetitle">BIND 9 Administrator Reference Manual</em>,
|
||||
<em class="citetitle">RFC 2535</em>.
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2550145"></a><h2>AUTHOR</h2>
|
||||
<p>
|
||||
<span class="corpauthor">Internet Systems Consortium</span>
|
||||
</p>
|
||||
</div>
|
||||
</div></body>
|
||||
</html>
|
||||
<TT
|
||||
CLASS="FILENAME"
|
||||
>named.conf</TT
|
||||
> file.
|
||||
</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN195"
|
||||
></A
|
||||
><H2
|
||||
>SEE ALSO</H2
|
||||
><P
|
||||
> <SPAN
|
||||
CLASS="CITEREFENTRY"
|
||||
><SPAN
|
||||
CLASS="REFENTRYTITLE"
|
||||
>dnssec-keygen</SPAN
|
||||
>(8)</SPAN
|
||||
>,
|
||||
<I
|
||||
CLASS="CITETITLE"
|
||||
>BIND 9 Administrator Reference Manual</I
|
||||
>,
|
||||
<I
|
||||
CLASS="CITETITLE"
|
||||
>RFC 2535</I
|
||||
>.
|
||||
</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN203"
|
||||
></A
|
||||
><H2
|
||||
>AUTHOR</H2
|
||||
><P
|
||||
> Internet Systems Consortium
|
||||
</P
|
||||
></DIV
|
||||
></BODY
|
||||
></HTML
|
||||
>
|
||||
Loaded 100 of 6521 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user