mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-31 04:45:39 +01:00
Compare commits
99
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b06b7e647f | ||
|
|
8c7ff71d35 | ||
|
|
eb302dbc19 | ||
|
|
2ec2a2e9b9 | ||
|
|
bd89ab6fea | ||
|
|
e116dc6401 | ||
|
|
9be442673a | ||
|
|
2d004eec09 | ||
|
|
fa4337308b | ||
|
|
78c5f605d6 | ||
|
|
ad95f32fa8 | ||
|
|
67df32044e | ||
|
|
6a50ad79cf | ||
|
|
66fbe91e01 | ||
|
|
f7883cce14 | ||
|
|
03a95b12f3 | ||
|
|
5399f0d753 | ||
|
|
67072943b9 | ||
|
|
0ee1827916 | ||
|
|
7ebda18cb2 | ||
|
|
07528f6e24 | ||
|
|
b904cda23e | ||
|
|
2c8d95a109 | ||
|
|
b6dd8ce45d | ||
|
|
8a77a62f4e | ||
|
|
7ba27652e5 | ||
|
|
d2f49e812c | ||
|
|
009e7aaa36 | ||
|
|
9f2ff1c7f3 | ||
|
|
375f80570f | ||
|
|
33d4d1ebed | ||
|
|
8161c709ee | ||
|
|
0a4794072c | ||
|
|
85d704f8b6 | ||
|
|
4ca6726079 | ||
|
|
fd0d21b4fd | ||
|
|
cf5f0e1f96 | ||
|
|
e86b89b34b | ||
|
|
bb2a154066 | ||
|
|
3cc4b903a1 | ||
|
|
cc0676581f | ||
|
|
a2f2409ea1 | ||
|
|
51a4ba663a | ||
|
|
b5c01884f4 | ||
|
|
2212159696 | ||
|
|
f998a156a4 | ||
|
|
8abcb78bc9 | ||
|
|
fec769336c | ||
|
|
fc751aec5c | ||
|
|
f81b479042 | ||
|
|
85263293fa | ||
|
|
a2e5f6ff73 | ||
|
|
95694478db | ||
|
|
99a93d59ba | ||
|
|
aa50020434 | ||
|
|
6a60f8a617 | ||
|
|
82807c7c73 | ||
|
|
2318891ec4 | ||
|
|
dc412b00b5 | ||
|
|
fd73ee09e9 | ||
|
|
2fcc072881 | ||
|
|
1121df919e | ||
|
|
46dc671e90 | ||
|
|
4517d526a2 | ||
|
|
9a11dca784 | ||
|
|
9471e2aff3 | ||
|
|
06fe5baafd | ||
|
|
ff12590186 | ||
|
|
57eb02157d | ||
|
|
1b7f455aea | ||
|
|
e4ea187dcb | ||
|
|
82fbce84cc | ||
|
|
58f4b53eca | ||
|
|
c51853ba05 | ||
|
|
732a9a3936 | ||
|
|
5be21ecf7e | ||
|
|
ea2938fd97 | ||
|
|
70027a7adc | ||
|
|
7de120e818 | ||
|
|
0025715929 | ||
|
|
f24c4bfef1 | ||
|
|
bea6412bff | ||
|
|
9b7559478f | ||
|
|
c3f26ccfe5 | ||
|
|
e5d4da4d0f | ||
|
|
0489917303 | ||
|
|
896d2994bc | ||
|
|
2703fe37e0 | ||
|
|
43f2b8537b | ||
|
|
3acb8e70d3 | ||
|
|
3318ba1c74 | ||
|
|
1998538b2b | ||
|
|
5e16ff578b | ||
|
|
a28ab21b40 | ||
|
|
808faf4e3b | ||
|
|
14e377ffe1 | ||
|
|
7c4fc11753 | ||
|
|
8ce5685daf | ||
|
|
5c3d876b2a |
No files matched your search
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"project.name": "S",
|
||||
"repository.callsign" : "S",
|
||||
"phabricator.uri" : "https://reviews.freebsd.org/",
|
||||
"history.immutable" : true
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
{
|
||||
"exclude": "(contrib|crypto)",
|
||||
"linters": {
|
||||
"python": {
|
||||
"type": "pep8",
|
||||
"include": "(\\.py$)"
|
||||
},
|
||||
"spelling": {
|
||||
"type": "spelling"
|
||||
},
|
||||
"chmod": {
|
||||
"type": "chmod"
|
||||
},
|
||||
"merge-conflict": {
|
||||
"type": "merge-conflict"
|
||||
},
|
||||
"filename": {
|
||||
"type": "filename"
|
||||
},
|
||||
"json": {
|
||||
"type": "json",
|
||||
"include": "(\\.arclint|\\.json$)"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@
|
||||
The compilation of software known as FreeBSD is distributed under the
|
||||
following terms:
|
||||
|
||||
Copyright (c) 1992-2016 The FreeBSD Project. All rights reserved.
|
||||
Copyright (c) 1992-2014 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
|
||||
|
||||
@@ -84,6 +84,7 @@ 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.
|
||||
|
||||
@@ -113,8 +113,6 @@ TGTS+= ${BITGTS}
|
||||
.ORDER: buildworld installworld
|
||||
.ORDER: buildworld distributeworld
|
||||
.ORDER: buildworld buildkernel
|
||||
.ORDER: installworld distribution
|
||||
.ORDER: installworld installkernel
|
||||
.ORDER: buildkernel installkernel
|
||||
.ORDER: buildkernel installkernel.debug
|
||||
.ORDER: buildkernel reinstallkernel
|
||||
@@ -424,8 +422,7 @@ universe_kernels: universe_kernconfs
|
||||
TARGET!= uname -m
|
||||
.endif
|
||||
KERNCONFS!= cd ${KERNSRCDIR}/${TARGET}/conf && \
|
||||
find [[:upper:][:digit:]]*[[:upper:][:digit:]] \
|
||||
-type f -maxdepth 0 \
|
||||
find [A-Z0-9]*[A-Z0-9] -type f -maxdepth 0 \
|
||||
! -name DEFAULTS ! -name NOTES
|
||||
universe_kernconfs:
|
||||
.for kernel in ${KERNCONFS}
|
||||
|
||||
+8
-55
@@ -234,7 +234,6 @@ CROSSENV+= GROFF_BIN_PATH=${WORLDTMP}/legacy/usr/bin \
|
||||
GROFF_TMAC_PATH=${WORLDTMP}/legacy/usr/share/tmac
|
||||
.endif
|
||||
|
||||
_BOOTSTRAP_MAKEINFO?= ${MK_INFO}
|
||||
# bootstrap-tools stage
|
||||
BMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \
|
||||
PATH=${BPATH}:${PATH} \
|
||||
@@ -249,7 +248,6 @@ BMAKE= MAKEOBJDIRPREFIX=${WORLDTMP} \
|
||||
SSP_CFLAGS= \
|
||||
-DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT -DWITHOUT_MAN \
|
||||
-DNO_PIC -DWITHOUT_PROFILE -DNO_SHARED \
|
||||
_BOOTSTRAP_MAKEINFO=${_BOOTSTRAP_MAKEINFO} \
|
||||
-DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF -DEARLY_BUILD
|
||||
|
||||
# build-tools stage
|
||||
@@ -562,10 +560,10 @@ build32:
|
||||
-DEARLY_BUILD build-tools
|
||||
.endfor
|
||||
cd ${.CURDIR}; \
|
||||
${LIB32WMAKE} -f Makefile.inc1 -DNO_FSCHG libraries
|
||||
${LIB32WMAKE} -f Makefile.inc1 libraries
|
||||
.for _t in obj depend all
|
||||
cd ${.CURDIR}/libexec/rtld-elf; PROG=ld-elf32.so.1 ${LIB32WMAKE} \
|
||||
-DNO_FSCHG DIRPRFX=libexec/rtld-elf/ ${_t}
|
||||
DIRPRFX=libexec/rtld-elf/ ${_t}
|
||||
cd ${.CURDIR}/usr.bin/ldd; PROG=ldd32 ${LIB32WMAKE} \
|
||||
DIRPRFX=usr.bin/ldd ${_t}
|
||||
.endfor
|
||||
@@ -623,11 +621,6 @@ buildworld_epilogue:
|
||||
buildenvvars:
|
||||
@echo ${WMAKEENV:Q}
|
||||
|
||||
.if ${.TARGETS:Mbuildenv}
|
||||
.if ${.MAKEFLAGS:M-j}
|
||||
.error The buildenv target is incompatible with -j
|
||||
.endif
|
||||
.endif
|
||||
buildenv:
|
||||
@echo Entering world for ${TARGET_ARCH}:${TARGET}
|
||||
@cd ${.CURDIR} && env ${WMAKEENV} ${BUILDENV_SHELL} || true
|
||||
@@ -706,7 +699,7 @@ _nmtree_itools= nmtree
|
||||
ITOOLS= [ awk cap_mkdb cat chflags chmod chown \
|
||||
date echo egrep find grep id install ${_install-info} \
|
||||
ln lockf make mkdir mtree ${_nmtree_itools} mv pwd_mkdb \
|
||||
rm sed sh strip sysctl test true uname wc ${_zoneinfo}
|
||||
rm sed sh sysctl test true uname wc ${_zoneinfo}
|
||||
|
||||
#
|
||||
# distributeworld
|
||||
@@ -731,7 +724,6 @@ MTREE_MAGIC?= mtree 2.0
|
||||
|
||||
distributeworld installworld: installcheck installcheck_UGID
|
||||
mkdir -p ${INSTALLTMP}
|
||||
export PATH=${BPATH}:${PATH} ; \
|
||||
progs=$$(for prog in ${ITOOLS}; do \
|
||||
if progpath=`which $$prog`; then \
|
||||
echo $$progpath; \
|
||||
@@ -1094,8 +1086,6 @@ legacy:
|
||||
#
|
||||
# bootstrap-tools: Build tools needed for compatibility
|
||||
#
|
||||
_bt= _bootstrap-tools
|
||||
|
||||
.if ${MK_GAMES} != "no"
|
||||
_strfile= games/fortune/strfile
|
||||
.endif
|
||||
@@ -1127,15 +1117,11 @@ _lex= usr.bin/lex
|
||||
.if ${BOOTSTRAPPING} < 900006 || ${BOOTSTRAPPING} >= 1000013
|
||||
_yacc= lib/liby \
|
||||
usr.bin/yacc
|
||||
|
||||
${_bt}-usr.bin/yacc: ${_bt}-lib/liby
|
||||
.endif
|
||||
|
||||
.if ${BOOTSTRAPPING} < 1000026
|
||||
_nmtree= lib/libnetbsd \
|
||||
usr.sbin/nmtree
|
||||
|
||||
${_bt}-usr.sbin/nmtree: ${_bt}-lib/libnetbsd
|
||||
.endif
|
||||
|
||||
.if ${BOOTSTRAPPING} < 1000027
|
||||
@@ -1162,39 +1148,24 @@ _clang_tblgen= \
|
||||
lib/clang/libllvmtablegen \
|
||||
usr.bin/clang/tblgen \
|
||||
usr.bin/clang/clang-tblgen
|
||||
|
||||
${_bt}-usr.bin/clang/clang-tblgen: ${_bt}-lib/clang/libllvmtablegen ${_bt}-lib/clang/libllvmsupport
|
||||
${_bt}-usr.bin/clang/tblgen: ${_bt}-lib/clang/libllvmtablegen ${_bt}-lib/clang/libllvmsupport
|
||||
.endif
|
||||
|
||||
.if ${MK_CDDL} != "no" && \
|
||||
((${BOOTSTRAPPING} < 1000034 && \
|
||||
!(${BOOTSTRAPPING} >= 901505 && ${BOOTSTRAPPING} < 999999)) \
|
||||
|| (${MACHINE} != ${TARGET} || ${MACHINE_ARCH} != ${TARGET_ARCH}))
|
||||
_dtrace_tools= cddl/lib/libctf lib/libelf \
|
||||
_dtrace_tools= cddl/usr.bin/sgsmsg cddl/lib/libctf lib/libelf \
|
||||
lib/libdwarf cddl/usr.bin/ctfconvert cddl/usr.bin/ctfmerge
|
||||
|
||||
${_bt}-cddl/usr.bin/ctfconvert: ${_bt}-lib/libelf ${_bt}-lib/libdwarf ${_bt}-cddl/lib/libctf
|
||||
${_bt}-cddl/usr.bin/ctfmerge: ${_bt}-lib/libelf ${_bt}-lib/libdwarf ${_bt}-cddl/lib/libctf
|
||||
.endif
|
||||
|
||||
.if ${MK_FDT} != "no"
|
||||
_dtc= gnu/usr.bin/dtc
|
||||
.endif
|
||||
|
||||
.if ${_BOOTSTRAP_MAKEINFO} != "no"
|
||||
_texinfo= gnu/usr.bin/texinfo/libtxi \
|
||||
gnu/usr.bin/texinfo/makeinfo \
|
||||
gnu/usr.bin/texinfo/install-info
|
||||
|
||||
${_bt}-gnu/usr.bin/texinfo/install-info: ${_bt}-gnu/usr.bin/texinfo/libtxi
|
||||
${_bt}-gnu/usr.bin/texinfo/makeinfo: ${_bt}-gnu/usr.bin/texinfo/libtxi
|
||||
.endif
|
||||
bootstrap-tools: .PHONY
|
||||
|
||||
# Please document (add comment) why something is in 'bootstrap-tools'.
|
||||
# Try to bound the building of the bootstrap-tool to just the
|
||||
# FreeBSD versions that need the tool built at this stage of the build.
|
||||
bootstrap-tools:
|
||||
.for _tool in \
|
||||
${_clang_tblgen} \
|
||||
${_dtrace_tools} \
|
||||
@@ -1212,21 +1183,18 @@ bootstrap-tools: .PHONY
|
||||
${_sed} \
|
||||
${_yacc} \
|
||||
${_lex} \
|
||||
lib/libmd \
|
||||
usr.bin/xinstall \
|
||||
${_gensnmptree} \
|
||||
usr.sbin/config \
|
||||
${_crunchgen} \
|
||||
${_nmtree} \
|
||||
${_texinfo}
|
||||
${_bt}-${_tool}: .PHONY .MAKE
|
||||
${_nmtree}
|
||||
${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \
|
||||
cd ${.CURDIR}/${_tool}; \
|
||||
${MAKE} DIRPRFX=${_tool}/ obj; \
|
||||
${MAKE} DIRPRFX=${_tool}/ depend; \
|
||||
${MAKE} DIRPRFX=${_tool}/ all; \
|
||||
${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy install
|
||||
|
||||
bootstrap-tools: ${_bt}-${_tool}
|
||||
.endfor
|
||||
|
||||
#
|
||||
@@ -1281,7 +1249,6 @@ build-tools:
|
||||
${MAKE} DIRPRFX=${_tool}/ all
|
||||
.endfor
|
||||
|
||||
|
||||
#
|
||||
# cross-tools: Build cross-building tools
|
||||
#
|
||||
@@ -1390,7 +1357,7 @@ _prebuild_libs= ${_kerberos5_lib_libasn1} ${_kerberos5_lib_libhdb} \
|
||||
lib/libkiconv lib/libkvm lib/liblzma lib/libmd \
|
||||
lib/ncurses/ncurses lib/ncurses/ncursesw \
|
||||
lib/libopie lib/libpam ${_lib_libthr} \
|
||||
${_lib_libradius} lib/libsbuf lib/libtacplus \
|
||||
lib/libradius lib/libsbuf lib/libtacplus \
|
||||
${_cddl_lib_libumem} ${_cddl_lib_libnvpair} \
|
||||
${_cddl_lib_libavl} \
|
||||
${_cddl_lib_libzfs_core} \
|
||||
@@ -1402,10 +1369,6 @@ _prebuild_libs= ${_kerberos5_lib_libasn1} ${_kerberos5_lib_libhdb} \
|
||||
_lib_libthr= lib/libthr
|
||||
.endif
|
||||
|
||||
.if ${MK_RADIUS_SUPPORT} != "no"
|
||||
_lib_libradius= lib/libradius
|
||||
.endif
|
||||
|
||||
.if ${MK_OFED} != "no"
|
||||
_ofed_lib= contrib/ofed/usr.lib/
|
||||
.endif
|
||||
@@ -1659,11 +1622,6 @@ delete-old-dirs:
|
||||
elif [ -L "${DESTDIR}/$${dir}" ]; then \
|
||||
echo "${DESTDIR}/$${dir} is a link, please remove everything manually."; \
|
||||
fi; \
|
||||
if [ -d "${DESTDIR}${DEBUGDIR}/$${dir}" ]; then \
|
||||
rmdir -v "${DESTDIR}${DEBUGDIR}/$${dir}" || true; \
|
||||
elif [ -L "${DESTDIR}${DEBUGDIR}/$${dir}" ]; then \
|
||||
echo "${DESTDIR}${DEBUGDIR}/$${dir} is a link, please remove everything manually."; \
|
||||
fi; \
|
||||
done
|
||||
@echo ">>> Old directories removed"
|
||||
|
||||
@@ -1678,11 +1636,6 @@ check-old-dirs:
|
||||
elif [ -L "${DESTDIR}/$${dir}" ]; then \
|
||||
echo "${DESTDIR}/$${dir} is a link, please remove everything manually."; \
|
||||
fi; \
|
||||
if [ -d "${DESTDIR}${DEBUGDIR}/$${dir}" ]; then \
|
||||
echo "${DESTDIR}${DEBUGDIR}/$${dir}"; \
|
||||
elif [ -L "${DESTDIR}${DEBUGDIR}/$${dir}" ]; then \
|
||||
echo "${DESTDIR}${DEBUGDIR}/$${dir} is a link, please remove everything manually."; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
delete-old: delete-old-files delete-old-dirs
|
||||
|
||||
@@ -38,30 +38,8 @@
|
||||
# xargs -n1 | sort | uniq -d;
|
||||
# done
|
||||
|
||||
# 20160723: stale MLINK removed
|
||||
OLD_FILES+=usr/share/man/man9/rman_await_resource.9.gz
|
||||
# 20151025: remove links to removed/unimplemented mbuf(9) macros
|
||||
OLD_FILES+=usr/share/man/man9/MEXT_ADD_REF.9.gz
|
||||
OLD_FILES+=usr/share/man/man9/MEXTFREE.9.gz
|
||||
OLD_FILES+=usr/share/man/man9/MEXT_IS_REF.9.gz
|
||||
OLD_FILES+=usr/share/man/man9/MEXT_REM_REF.9.gz
|
||||
OLD_FILES+=usr/share/man/man9/MFREE.9.gz
|
||||
# 20131023: remove never used iscsi directory
|
||||
OLD_DIRS+=usr/share/examples/iscsi
|
||||
# 20151023: unused sgsmsg utility is removed
|
||||
OLD_FILES+=usr/bin/sgsmsg
|
||||
# 20140922: sleepq_calc_signal_retval.9 and sleepq_catch_signals.9 removed
|
||||
OLD_FILES+=usr/share/man/man9/sleepq_calc_signal_retval.9.gz
|
||||
OLD_FILES+=usr/share/man/man9/sleepq_catch_signals.9.gz
|
||||
# 20140728: Remove an obsolete man page
|
||||
OLD_FILES+=usr/share/man/man9/VOP_GETVOBJECT.9.gz
|
||||
OLD_FILES+=usr/share/man/man9/VOP_CREATEVOBJECT.9.gz
|
||||
OLD_FILES+=usr/share/man/man9/VOP_DESTROYVOBJECT.9.gz
|
||||
# 20140614: send-pr removal
|
||||
OLD_FILES+=usr/bin/sendbug
|
||||
OLD_FILES+=usr/share/info/send-pr.info.gz
|
||||
OLD_FILES+=usr/share/man/man1/send-pr.1.gz
|
||||
OLD_FILES+=usr/share/man/man1/sendbug.1.gz
|
||||
OLD_FILES+=etc/gnats/freefall
|
||||
OLD_DIRS+=etc/gnats
|
||||
# 20140512: new clang import which bumps version from 3.4 to 3.4.1.
|
||||
@@ -2021,7 +1999,6 @@ OLD_FILES+=usr/sbin/zfs
|
||||
OLD_FILES+=usr/sbin/zpool
|
||||
# 20070423: rc.bluetooth (examples) removed
|
||||
OLD_FILES+=usr/share/examples/netgraph/bluetooth/rc.bluetooth
|
||||
OLD_DIRS+=usr/share/examples/netgraph/bluetooth
|
||||
# 20070421: worm.4 removed
|
||||
OLD_FILES+=usr/share/man/man4/worm.4.gz
|
||||
# 20070417: trunk(4) renamed to lagg(4)
|
||||
@@ -2472,202 +2449,6 @@ OLD_FILES+=lib/geom/geom_concat.so.1
|
||||
OLD_FILES+=lib/geom/geom_label.so.1
|
||||
OLD_FILES+=lib/geom/geom_nop.so.1
|
||||
OLD_FILES+=lib/geom/geom_stripe.so.1
|
||||
# 20040728: GCC 3.4.2
|
||||
OLD_DIRS+=usr/include/c++/3.3
|
||||
OLD_FILES+=usr/include/c++/3.3/FlexLexer.h
|
||||
OLD_FILES+=usr/include/c++/3.3/algorithm
|
||||
OLD_FILES+=usr/include/c++/3.3/backward/algo.h
|
||||
OLD_FILES+=usr/include/c++/3.3/backward/algobase.h
|
||||
OLD_FILES+=usr/include/c++/3.3/backward/alloc.h
|
||||
OLD_FILES+=usr/include/c++/3.3/backward/backward_warning.h
|
||||
OLD_FILES+=usr/include/c++/3.3/backward/bvector.h
|
||||
OLD_FILES+=usr/include/c++/3.3/backward/complex.h
|
||||
OLD_FILES+=usr/include/c++/3.3/backward/defalloc.h
|
||||
OLD_FILES+=usr/include/c++/3.3/backward/deque.h
|
||||
OLD_FILES+=usr/include/c++/3.3/backward/fstream.h
|
||||
OLD_FILES+=usr/include/c++/3.3/backward/function.h
|
||||
OLD_FILES+=usr/include/c++/3.3/backward/hash_map.h
|
||||
OLD_FILES+=usr/include/c++/3.3/backward/hash_set.h
|
||||
OLD_FILES+=usr/include/c++/3.3/backward/hashtable.h
|
||||
OLD_FILES+=usr/include/c++/3.3/backward/heap.h
|
||||
OLD_FILES+=usr/include/c++/3.3/backward/iomanip.h
|
||||
OLD_FILES+=usr/include/c++/3.3/backward/iostream.h
|
||||
OLD_FILES+=usr/include/c++/3.3/backward/istream.h
|
||||
OLD_FILES+=usr/include/c++/3.3/backward/iterator.h
|
||||
OLD_FILES+=usr/include/c++/3.3/backward/list.h
|
||||
OLD_FILES+=usr/include/c++/3.3/backward/map.h
|
||||
OLD_FILES+=usr/include/c++/3.3/backward/multimap.h
|
||||
OLD_FILES+=usr/include/c++/3.3/backward/multiset.h
|
||||
OLD_FILES+=usr/include/c++/3.3/backward/new.h
|
||||
OLD_FILES+=usr/include/c++/3.3/backward/ostream.h
|
||||
OLD_FILES+=usr/include/c++/3.3/backward/pair.h
|
||||
OLD_FILES+=usr/include/c++/3.3/backward/queue.h
|
||||
OLD_FILES+=usr/include/c++/3.3/backward/rope.h
|
||||
OLD_FILES+=usr/include/c++/3.3/backward/set.h
|
||||
OLD_FILES+=usr/include/c++/3.3/backward/slist.h
|
||||
OLD_FILES+=usr/include/c++/3.3/backward/stack.h
|
||||
OLD_FILES+=usr/include/c++/3.3/backward/stream.h
|
||||
OLD_FILES+=usr/include/c++/3.3/backward/streambuf.h
|
||||
OLD_FILES+=usr/include/c++/3.3/backward/strstream
|
||||
OLD_FILES+=usr/include/c++/3.3/backward/strstream.h
|
||||
OLD_FILES+=usr/include/c++/3.3/backward/tempbuf.h
|
||||
OLD_FILES+=usr/include/c++/3.3/backward/tree.h
|
||||
OLD_FILES+=usr/include/c++/3.3/backward/vector.h
|
||||
OLD_DIRS+=usr/include/c++/3.3/backward
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/atomicity.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/basic_file.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/basic_ios.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/basic_ios.tcc
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/basic_string.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/basic_string.tcc
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/boost_concept_check.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/c++config.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/c++io.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/c++locale.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/c++locale_internal.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/char_traits.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/cmath.tcc
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/codecvt.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/codecvt_specializations.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/concept_check.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/cpp_type_traits.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/ctype_base.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/ctype_inline.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/ctype_noninline.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/deque.tcc
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/fpos.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/fstream.tcc
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/functexcept.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/generic_shadow.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/gslice.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/gslice_array.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/gthr-default.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/gthr-posix.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/gthr-single.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/gthr.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/indirect_array.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/ios_base.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/istream.tcc
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/list.tcc
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/locale_classes.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/locale_facets.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/locale_facets.tcc
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/localefwd.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/mask_array.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/messages_members.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/os_defines.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/ostream.tcc
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/pthread_allocimpl.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/slice.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/slice_array.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/sstream.tcc
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/stl_algo.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/stl_algobase.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/stl_alloc.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/stl_bvector.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/stl_construct.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/stl_deque.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/stl_function.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/stl_heap.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/stl_iterator.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/stl_iterator_base_funcs.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/stl_iterator_base_types.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/stl_list.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/stl_map.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/stl_multimap.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/stl_multiset.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/stl_numeric.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/stl_pair.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/stl_pthread_alloc.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/stl_queue.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/stl_raw_storage_iter.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/stl_relops.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/stl_set.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/stl_stack.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/stl_tempbuf.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/stl_threads.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/stl_tree.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/stl_uninitialized.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/stl_vector.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/stream_iterator.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/streambuf.tcc
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/streambuf_iterator.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/stringfwd.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/time_members.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/type_traits.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/valarray_array.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/valarray_array.tcc
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/valarray_meta.h
|
||||
OLD_FILES+=usr/include/c++/3.3/bits/vector.tcc
|
||||
OLD_DIRS+=usr/include/c++/3.3/bits
|
||||
OLD_FILES+=usr/include/c++/3.3/bitset
|
||||
OLD_FILES+=usr/include/c++/3.3/cassert
|
||||
OLD_FILES+=usr/include/c++/3.3/cctype
|
||||
OLD_FILES+=usr/include/c++/3.3/cerrno
|
||||
OLD_FILES+=usr/include/c++/3.3/cfloat
|
||||
OLD_FILES+=usr/include/c++/3.3/ciso646
|
||||
OLD_FILES+=usr/include/c++/3.3/climits
|
||||
OLD_FILES+=usr/include/c++/3.3/clocale
|
||||
OLD_FILES+=usr/include/c++/3.3/cmath
|
||||
OLD_FILES+=usr/include/c++/3.3/complex
|
||||
OLD_FILES+=usr/include/c++/3.3/csetjmp
|
||||
OLD_FILES+=usr/include/c++/3.3/csignal
|
||||
OLD_FILES+=usr/include/c++/3.3/cstdarg
|
||||
OLD_FILES+=usr/include/c++/3.3/cstddef
|
||||
OLD_FILES+=usr/include/c++/3.3/cstdio
|
||||
OLD_FILES+=usr/include/c++/3.3/cstdlib
|
||||
OLD_FILES+=usr/include/c++/3.3/cstring
|
||||
OLD_FILES+=usr/include/c++/3.3/ctime
|
||||
OLD_FILES+=usr/include/c++/3.3/cwchar
|
||||
OLD_FILES+=usr/include/c++/3.3/cwctype
|
||||
OLD_FILES+=usr/include/c++/3.3/cxxabi.h
|
||||
OLD_FILES+=usr/include/c++/3.3/deque
|
||||
OLD_FILES+=usr/include/c++/3.3/exception
|
||||
OLD_FILES+=usr/include/c++/3.3/exception_defines.h
|
||||
OLD_FILES+=usr/include/c++/3.3/ext/algorithm
|
||||
OLD_FILES+=usr/include/c++/3.3/ext/enc_filebuf.h
|
||||
OLD_FILES+=usr/include/c++/3.3/ext/functional
|
||||
OLD_FILES+=usr/include/c++/3.3/ext/hash_map
|
||||
OLD_FILES+=usr/include/c++/3.3/ext/hash_set
|
||||
OLD_FILES+=usr/include/c++/3.3/ext/iterator
|
||||
OLD_FILES+=usr/include/c++/3.3/ext/memory
|
||||
OLD_FILES+=usr/include/c++/3.3/ext/numeric
|
||||
OLD_FILES+=usr/include/c++/3.3/ext/rb_tree
|
||||
OLD_FILES+=usr/include/c++/3.3/ext/rope
|
||||
OLD_FILES+=usr/include/c++/3.3/ext/ropeimpl.h
|
||||
OLD_FILES+=usr/include/c++/3.3/ext/slist
|
||||
OLD_FILES+=usr/include/c++/3.3/ext/stdio_filebuf.h
|
||||
OLD_FILES+=usr/include/c++/3.3/ext/stl_hash_fun.h
|
||||
OLD_FILES+=usr/include/c++/3.3/ext/stl_hashtable.h
|
||||
OLD_FILES+=usr/include/c++/3.3/ext/stl_rope.h
|
||||
OLD_DIRS+=usr/include/c++/3.3/ext
|
||||
OLD_FILES+=usr/include/c++/3.3/fstream
|
||||
OLD_FILES+=usr/include/c++/3.3/functional
|
||||
OLD_FILES+=usr/include/c++/3.3/iomanip
|
||||
OLD_FILES+=usr/include/c++/3.3/ios
|
||||
OLD_FILES+=usr/include/c++/3.3/iosfwd
|
||||
OLD_FILES+=usr/include/c++/3.3/iostream
|
||||
OLD_FILES+=usr/include/c++/3.3/istream
|
||||
OLD_FILES+=usr/include/c++/3.3/iterator
|
||||
OLD_FILES+=usr/include/c++/3.3/limits
|
||||
OLD_FILES+=usr/include/c++/3.3/list
|
||||
OLD_FILES+=usr/include/c++/3.3/locale
|
||||
OLD_FILES+=usr/include/c++/3.3/map
|
||||
OLD_FILES+=usr/include/c++/3.3/memory
|
||||
OLD_FILES+=usr/include/c++/3.3/new
|
||||
OLD_FILES+=usr/include/c++/3.3/numeric
|
||||
OLD_FILES+=usr/include/c++/3.3/ostream
|
||||
OLD_FILES+=usr/include/c++/3.3/queue
|
||||
OLD_FILES+=usr/include/c++/3.3/set
|
||||
OLD_FILES+=usr/include/c++/3.3/sstream
|
||||
OLD_FILES+=usr/include/c++/3.3/stack
|
||||
OLD_FILES+=usr/include/c++/3.3/stdexcept
|
||||
OLD_FILES+=usr/include/c++/3.3/streambuf
|
||||
OLD_FILES+=usr/include/c++/3.3/string
|
||||
OLD_FILES+=usr/include/c++/3.3/typeinfo
|
||||
OLD_FILES+=usr/include/c++/3.3/utility
|
||||
OLD_FILES+=usr/include/c++/3.3/valarray
|
||||
OLD_FILES+=usr/include/c++/3.3/vector
|
||||
# 20040713: fla(4) removed.
|
||||
OLD_FILES+=usr/share/man/man4/fla.4.gz
|
||||
# 200407XX
|
||||
@@ -5783,12 +5564,6 @@ OLD_LIBS+=usr/lib/libposix1e.so.2
|
||||
OLD_LIBS+=usr/lib/libskey.so.2
|
||||
OLD_LIBS+=usr/lib/libusbhid.so.0
|
||||
OLD_LIBS+=usr/lib/libvgl.so.2
|
||||
# 20030218: OpenSSL 0.9.7 import
|
||||
OLD_FILES+=usr/include/des.h
|
||||
OLD_FILES+=usr/lib/libdes.a
|
||||
OLD_FILES+=usr/lib/libdes.so
|
||||
OLD_LIBS+=usr/lib/libdes.so.3
|
||||
OLD_FILES+=usr/lib/libdes_p.a
|
||||
# 200302XX
|
||||
OLD_LIBS+=usr/lib/libacl.so.3
|
||||
OLD_LIBS+=usr/lib/libasn1.so.5
|
||||
@@ -5847,8 +5622,6 @@ OLD_LIBS+=usr/lib/libtermcap.so.2
|
||||
OLD_LIBS+=usr/lib/libutil.so.2
|
||||
OLD_LIBS+=usr/lib/libvgl.so.1
|
||||
OLD_LIBS+=usr/lib/libwrap.so.2
|
||||
# 19991216
|
||||
OLD_FILES+=usr/sbin/xntpdc
|
||||
# 199909XX
|
||||
OLD_LIBS+=usr/lib/libc_r.so.3
|
||||
# ???
|
||||
|
||||
@@ -11,39 +11,345 @@ handbook:
|
||||
Items affecting the ports and packages system can be found in
|
||||
/usr/ports/UPDATING. Please read that file before running portupgrade.
|
||||
|
||||
20160229:
|
||||
At svn r296219, the default linux compat kernel ABI has been adjusted
|
||||
to 2.6.18 in support of the linux-c6 compat ports infrastructure
|
||||
update. If you wish to continue using the linux-f10 compat ports,
|
||||
add compat.linux.osrelease=2.6.16 to your local sysctl.conf. Users are
|
||||
encouraged to update their linux-compat packages to linux-c6 during
|
||||
their next update cycle.
|
||||
20161222 p53 FreeBSD-SA-16:39.ntp
|
||||
|
||||
Fix multiple vulnerabilities of ntp.
|
||||
|
||||
20161208 p52 FreeBSD-SA-16:37.libc [revised]
|
||||
|
||||
Fix regressions introduced by SA-16:37.libc.
|
||||
|
||||
20161206 p51 FreeBSD-SA-16:36.telnetd
|
||||
FreeBSD-SA-16:37.libc
|
||||
FreeBSD-EN-16:19.tzcode
|
||||
FreeBSD-EN-16:20.tzdata
|
||||
|
||||
Fix possible login(1) argument injection in telnetd(8). [SA-16:36]
|
||||
Fix link_ntoa(3) buffer overflow in libc. [SA-16:37]
|
||||
Fix warnings about valid time zone abbreviations. [EN-16:19]
|
||||
Update timezone database information. [EN-16:20]
|
||||
|
||||
20161102 p50 FreeBSD-SA-16:34.bind
|
||||
FreeBSD-SA-16:35.openssl
|
||||
|
||||
Fix BIND remote Denial of Service vulnerability. [SA-16:34]
|
||||
|
||||
Fix OpenSSL remote DoS vulnerability. [SA-16:35]
|
||||
|
||||
20161025 p49 FreeBSD-SA-16:15.sysarch [revised]
|
||||
|
||||
Fix incorrect argument validation in sysarch(2). [SA-16:15]
|
||||
|
||||
20161010 p48 FreeBSD-SA-16:28.bind
|
||||
FreeBSD-SA-16:29.bspatch
|
||||
FreeBSD-SA-16:30.portsnap
|
||||
|
||||
Fix BIND remote Denial of Service vulnerability. [SA-16:28]
|
||||
|
||||
Fix bspatch heap overflow vulnerability. [SA-16:29]
|
||||
|
||||
Fix multiple portsnap vulnerabilities. [SA-16:30]
|
||||
|
||||
20160926 p47 FreeBSD-SA-16:26.openssl [revised]
|
||||
|
||||
Fix OpenSSL regression introduced in SA-16:26.
|
||||
|
||||
20160923 p46 FreeBSD-SA-16:26.openssl
|
||||
|
||||
Fix multiple OpenSSL vulnerabilitites.
|
||||
|
||||
20160725 p45 FreeBSD-SA-16:25.bspatch
|
||||
FreeBSD-EN-16:09.freebsd-update
|
||||
|
||||
Fix bspatch heap overflow vulnerability. [SA-16:25]
|
||||
|
||||
Fix freebsd-update(8) support of FreeBSD 11.0 release
|
||||
distribution. [EN-16:09]
|
||||
|
||||
20160604 p44 FreeBSD-SA-16:24.ntp
|
||||
|
||||
Fix multiple vulnerabilities of ntp.
|
||||
|
||||
20160531 p43 FreeBSD-SA-16:20.linux
|
||||
FreeBSD-SA-16:21.43bsd
|
||||
FreeBSD-SA-16:22.libarchive
|
||||
FreeBSD-SA-16:23.libarchive
|
||||
|
||||
Fix kernel stack disclosure in Linux compatibility layer. [SA-16:20]
|
||||
Fix kernel stack disclosure in 4.3BSD compatibility layer. [SA-16:21]
|
||||
Fix directory traversal in cpio(1). [SA-16:22]
|
||||
Fix buffer overflow in libarchive(3). [SA-16:23]
|
||||
|
||||
20160517 p42 FreeBSD-SA-16:18.atkbd
|
||||
|
||||
Fix buffer overflow in keyboard driver. [SA-16:18]
|
||||
|
||||
20160504 p41 FreeBSD-SA-16:17.openssl
|
||||
FreeBSD-EN-16:08.zfs
|
||||
|
||||
Fix multiple OpenSSL vulnerabilitites. [SA-16:17]
|
||||
|
||||
Fix memory leak in ZFS. [EN-16:08]
|
||||
|
||||
20160429 p40 FreeBSD-SA-16:16.ntp
|
||||
|
||||
Fix multiple vulnerabilities of ntp.
|
||||
|
||||
20160316 p39 FreeBSD-SA-16:14.openssh-xauth
|
||||
FreeBSD-SA-16:15.sysarch
|
||||
|
||||
Fix OpenSSH xauth(1) command injection. [SA-16:14]
|
||||
Fix incorrect argument validation in sysarch(2). [SA-16:15]
|
||||
|
||||
20160310 p38 FreeBSD-SA-16:13.bind
|
||||
FreeBSD-SA-16:12.openssl [revised]
|
||||
|
||||
Fix multiple vulnerabilities of BIND. [SA-16:13]
|
||||
|
||||
Fix a regression with OpenSSL patch. [SA-16:12]
|
||||
|
||||
20160303 p37 FreeBSD-SA-16:12.openssl
|
||||
|
||||
Fix multiple vulnerabilities of OpenSSL.
|
||||
|
||||
20160130 p36 FreeBSD-SA-16:11.openssl
|
||||
|
||||
Fix OpenSSL SSLv2 ciphersuite downgrade vulnerability. [SA-16:11]
|
||||
|
||||
20160127 p35 FreeBSD-SA-16:08.bind
|
||||
FreeBSD-SA-16:09.ntp
|
||||
FreeBSD-SA-16:10.linux
|
||||
|
||||
Fix BIND remote denial of service vulnerability. [SA-16:08]
|
||||
|
||||
Fix multiple vulnerabilities of ntp. [SA-16:09]
|
||||
|
||||
Fix Linux compatibility layer issetugid(2) system call
|
||||
vulnerability. [SA-16:10]
|
||||
|
||||
20160114 p34 FreeBSD-SA-16:07.openssh
|
||||
|
||||
Fix OpenSSH client information leak. [SA-16:07]
|
||||
|
||||
20160114 p33 FreeBSD-EN-16:02.pf
|
||||
FreeBSD-EN-16:03.yplib
|
||||
FreeBSD-SA-16:01.sctp
|
||||
FreeBSD-SA-16:02.ntp
|
||||
FreeBSD-SA-16:03.linux
|
||||
FreeBSD-SA-16:04.linux
|
||||
FreeBSD-SA-16:05.tcp
|
||||
FreeBSD-SA-16:06.bsnmpd
|
||||
|
||||
Fix pf(4) generating bad TCP checksums. [EN-16:02]
|
||||
Fix infinite loop in YP/NIS client library. [EN-16:03]
|
||||
Fix remote denial of service in SCTP. [SA-16:01]
|
||||
Update NTP to 4.2.8p5. [SA-16:02]
|
||||
Fix kernel memory diclosure in Linux compatibility layer. [SA-16:03]
|
||||
Fix kernel memory overwrite in Linux compatibility layer. [SA-16:04]
|
||||
Fix crash in TCP MD5 signatures. [SA-16:05]
|
||||
Fix insecure default permissions for snmpd.config. [SA-16:06]
|
||||
|
||||
20151216 p32 FreeBSD-SA-15:27.bind
|
||||
Fix BIND remote denial of service vulnerability. [SA-15:27]
|
||||
|
||||
20151205 p31 FreeBSD-SA-15:26.openssl
|
||||
|
||||
Fix OpenSSL X509_ATTRIBUTE memory leak. [SA-15:26]
|
||||
|
||||
20151104 p30 FreeBSD-SA-15:25.ntp [revised]
|
||||
FreeBSD-EN-15:19.kqueue
|
||||
FreeBSD-EN-15:20.vm
|
||||
|
||||
Fix regression of ntpq(8) utility exiting due to trap 6 in
|
||||
9.3-RELEASE-p29. [SA-15:25]
|
||||
|
||||
Fix regression in ntpd(8) lacking support for RAWDCF reference
|
||||
clock in 9.3-RELEASE-p29. [SA-15:25]
|
||||
|
||||
Fix kqueue write events never fired for files greater 2GB. [EN-15:19]
|
||||
|
||||
Fix applications exiting due to segmentation violation on a correct
|
||||
memory address. [EN-15:20]
|
||||
|
||||
20151026: p29 FreeBSD-SA-15:25.ntp
|
||||
|
||||
Fix multiple NTP vulnerabilities. New NTP version is 4.2.8p4.
|
||||
|
||||
20151026:
|
||||
NTP has been upgraded to 4.2.8p4.
|
||||
The configuration file syntax has been changed, thus mergemaster
|
||||
run is recommended. Now the "kod" parameter requires "limited"
|
||||
parameter. If the ntp.conf is not updated, the ntpd will run
|
||||
run is recommended. Now the "kod" parameter requires "limited"
|
||||
parameter. If the ntp.conf is not updated, the ntpd will run
|
||||
successfully, but with KoD disabled.
|
||||
|
||||
20150624:
|
||||
An additional fix for the issue described in the 20150615 sendmail
|
||||
entry below has been been committed in revision 284788.
|
||||
20151002: p28 FreeBSD-SA-15:24.rpcbind [revised]
|
||||
Revised patch to address a regression that prevents NIS from working.
|
||||
|
||||
20150615:
|
||||
The latest version of openssl rejects TLS handshakes with DH
|
||||
parameters below 768 bits. sendmail releases prior to 8.15.2
|
||||
(not yet released), defaulted to a 512 bit DH parameter setting
|
||||
for client connections. To improve interoperability, the
|
||||
sendmail default for client connections has been raised to
|
||||
1024 bits.
|
||||
20150929: p27 FreeBSD-SA-15:24.rpcbind
|
||||
|
||||
20140717:
|
||||
It is no longer necessary to include the dwarf version in your DEBUG
|
||||
options in your kernel config file. The bug that required it to be
|
||||
placed in the config file has bene fixed. DEBUG should now just
|
||||
contain -g. The build system will automatically update things
|
||||
to do the right thing.
|
||||
Fix rpcbind(8) remote denial of service. [SA-15:24]
|
||||
|
||||
20150916: p26 FreeBSD-EN-15:18.pkg
|
||||
|
||||
Implement pubkey support for pkg(7) bootstrap. [EN-15:18]
|
||||
|
||||
20150902: p25 FreeBSD-SA-15:23.bind
|
||||
|
||||
Fix BIND remote denial of service vulnerability. [SA-15:23]
|
||||
|
||||
20150825: p24 FreeBSD-SA-15:21.amd64
|
||||
FreeBSD-SA-15:22.openssh
|
||||
FreeBSD-EN-15:15.pkg
|
||||
|
||||
Fix local privilege escalation in IRET handler. [SA-15:21]
|
||||
|
||||
Fix OpenSSH multiple vulnerabilities. [SA-15:22]
|
||||
|
||||
Fix insufficient check of unsupported pkg(7) signature methods.
|
||||
[EN-15:15]
|
||||
|
||||
20150818: p23 FreeBSD-SA-15:20.expat
|
||||
|
||||
Fix multiple integer overflows in expat (libbsdxml) XML parser.
|
||||
[SA-15:20]
|
||||
|
||||
20150805: p22 FreeBSD-SA-15:19.routed
|
||||
|
||||
Fix routed remote denial of service vulnerability.
|
||||
|
||||
20150728: p21 FreeBSD-SA-15:15.tcp
|
||||
FreeBSD-SA-15:16.openssh
|
||||
FreeBSD-SA-15:17.bind
|
||||
|
||||
Fix resource exhaustion in TCP reassembly. [SA-15:15]
|
||||
|
||||
Fix OpenSSH multiple vulnerabilities. [SA-15:16]
|
||||
|
||||
Fix BIND remote denial of service vulnerability. [SA-15:17]
|
||||
|
||||
20150721: p20 FreeBSD-SA-15:13.tcp
|
||||
|
||||
Fix resource exhaustion due to sessions stuck in LAST_ACK state.
|
||||
[SA-15:13]
|
||||
|
||||
20150707: p19 FreeBSD-SA-15:11.bind
|
||||
Fix BIND resolver remote denial of service when validating.
|
||||
|
||||
20150630: p18 FreeBSD-EN-15:08.sendmail [revised]
|
||||
FreeBSD-EN-15:09.xlocale
|
||||
|
||||
Improvements to sendmail TLS/DH interoperability. [EN-15:08]
|
||||
|
||||
Fix inconsistency between locale and rune locale states.
|
||||
[EN-15:09]
|
||||
|
||||
20150618: p17 FreeBSD-EN-15:08.sendmail
|
||||
Improvements to sendmail TLS/DH interoperability. [EN-15:08]
|
||||
|
||||
20150612: p16 FreeBSD-SA-15:10.openssl
|
||||
Fix multiple vulnerabilities in OpenSSL. [SA-15:10]
|
||||
|
||||
20150609: p15 FreeBSD-EN-15:06.file
|
||||
|
||||
Updated base system file(1) to 5.22 to address multiple denial
|
||||
of service issues.
|
||||
|
||||
20150513: p14 FreeBSD-EN-15:04.freebsd-update
|
||||
|
||||
Fix bug with freebsd-update(8) that does not ensure the previous
|
||||
upgrade was completed. [EN-15:04]
|
||||
|
||||
20150407: p13 FreeBSD-SA-15:04.igmp [revised]
|
||||
FreeBSD-SA-15:07.ntp
|
||||
FreeBSD-SA-15:09.ipv6
|
||||
|
||||
Improved patch for SA-15:04.igmp.
|
||||
|
||||
Fix multiple vulnerabilities of ntp. [SA-15:07]
|
||||
|
||||
Fix Denial of Service with IPv6 Router Advertisements. [SA-15:09]
|
||||
|
||||
20150320: p12
|
||||
Fix patch for SA-15:06.openssl.
|
||||
|
||||
20150319: p11 FreeBSD-SA-15:06.openssl
|
||||
Fix multiple vulnerabilities in OpenSSL. [SA-15:06]
|
||||
|
||||
20150225: p10 FreeBSD-SA-15:04.igmp
|
||||
FreeBSD-SA-15:05.bind
|
||||
FreeBSD-EN-15:01.vt
|
||||
FreeBSD-EN-15:02.openssl
|
||||
FreeBSD-EN-15:03.freebsd-update
|
||||
|
||||
Fix integer overflow in IGMP protocol. [SA-15:04]
|
||||
|
||||
Fix BIND remote denial of service vulnerability. [SA-15:05]
|
||||
|
||||
Fix vt(4) crash with improper ioctl parameters. [EN-15:01]
|
||||
|
||||
Updated base system OpenSSL to 0.9.8zd. [EN-15:02]
|
||||
|
||||
Fix freebsd-update libraries update ordering issue. [EN-15:03]
|
||||
|
||||
20150127: p9 FreeBSD-SA-15:02.kmem
|
||||
FreeBSD-SA-15:03.sctp
|
||||
|
||||
Fix SCTP SCTP_SS_VALUE kernel memory corruption and disclosure
|
||||
vulnerability. [SA-15:02]
|
||||
|
||||
Fix SCTP stream reset vulnerability. [SA-15:03]
|
||||
|
||||
20150114: p8 FreeBSD-SA-15:01.openssl
|
||||
Fix multiple vulnerabilities in OpenSSL. [SA-15:01]
|
||||
|
||||
20141223: p7 FreeBSD-SA-14:31.ntp
|
||||
FreeBSD-EN-14:13.freebsd-update
|
||||
|
||||
Fix multiple vulnerabilities in NTP suite. [SA-14:31]
|
||||
Fix directory deletion issue in freebsd-update. [EN-14:13]
|
||||
|
||||
20141210: p6 FreeBSD-SA-14:28.file
|
||||
FreeBSD-SA-14:29.bind
|
||||
|
||||
Fix multiple vulnerabilities in file(1) and libmagic(3).
|
||||
[SA-14:28]
|
||||
|
||||
Fix BIND remote denial of service vulnerability. [SA-14:29]
|
||||
|
||||
20141104: p5 FreeBSD-SA-14:25.setlogin
|
||||
FreeBSD-SA-14:26.ftp
|
||||
FreeBSD-EN-14:12.zfs
|
||||
|
||||
Fix kernel stack disclosure in setlogin(2) / getlogin(2).
|
||||
[SA-14:25]
|
||||
|
||||
Fix remote command execution in ftp(1). [SA-14:26]
|
||||
|
||||
Fix NFSv4 and ZFS cache consistency issue. [EN-14:12]
|
||||
|
||||
20141022: p4 FreeBSD-EN-14:10.tzdata
|
||||
FreeBSD-EN-14:11.crypt
|
||||
|
||||
Time zone data file update. [EN-14:10]
|
||||
|
||||
Change crypt(3) default hashing algorithm back to DES. [EN-14:11]
|
||||
|
||||
20141021: p3 FreeBSD-SA-14:20.rtsold
|
||||
FreeBSD-SA-14:21.routed
|
||||
FreeBSD-SA-14:22.namei
|
||||
FreeBSD-SA-14:23.openssl
|
||||
|
||||
Fix rtsold(8) remote buffer overflow vulnerability. [SA-14:20]
|
||||
|
||||
Fix routed(8) remote denial of service vulnerability. [SA-14:21]
|
||||
|
||||
Fix memory leak in sandboxed namei lookup. [SA-14:22]
|
||||
|
||||
Fix OpenSSL multiple vulnerabilities. [SA-14:23]
|
||||
|
||||
20140916: p2 FreeBSD-SA-14:19.tcp
|
||||
Fix Denial of Service in TCP packet processing. [SA-14:19]
|
||||
|
||||
20140909: p1 FreeBSD-SA-14:18.openssl
|
||||
Fix OpenSSL multiple vulnerabilities. [SA-14:18]
|
||||
|
||||
20140716:
|
||||
9.3-RELEASE.
|
||||
|
||||
+4
-9
@@ -32,7 +32,7 @@
|
||||
.\" @(#)cp.1 8.3 (Berkeley) 4/18/94
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd June 6, 2015
|
||||
.Dd September 4, 2012
|
||||
.Dt CP 1
|
||||
.Os
|
||||
.Sh NAME
|
||||
@@ -45,7 +45,7 @@
|
||||
.Op Fl H | Fl L | Fl P
|
||||
.Oc
|
||||
.Op Fl f | i | n
|
||||
.Op Fl alpsvx
|
||||
.Op Fl alpvx
|
||||
.Ar source_file target_file
|
||||
.Nm
|
||||
.Oo
|
||||
@@ -53,7 +53,7 @@
|
||||
.Op Fl H | Fl L | Fl P
|
||||
.Oc
|
||||
.Op Fl f | i | n
|
||||
.Op Fl alpsvx
|
||||
.Op Fl alpvx
|
||||
.Ar source_file ... target_directory
|
||||
.Sh DESCRIPTION
|
||||
In the first synopsis form, the
|
||||
@@ -179,8 +179,6 @@ If the source file has both its set-user-ID and set-group-ID bits on,
|
||||
and either the user ID or group ID cannot be preserved, neither
|
||||
the set-user-ID nor set-group-ID bits are preserved in the copy's
|
||||
permissions.
|
||||
.It Fl s
|
||||
Create symbolic links to regular files in a hierarchy instead of copying.
|
||||
.It Fl v
|
||||
Cause
|
||||
.Nm
|
||||
@@ -279,10 +277,7 @@ differ as they copy special files as normal
|
||||
files while recreating a hierarchy.
|
||||
.Pp
|
||||
The
|
||||
.Fl l,
|
||||
.Fl s,
|
||||
.Fl v,
|
||||
.Fl x
|
||||
.Fl v
|
||||
and
|
||||
.Fl n
|
||||
options are non-standard and their use in scripts is not recommended.
|
||||
|
||||
+45
-24
@@ -75,21 +75,22 @@ __FBSDID("$FreeBSD$");
|
||||
#include "extern.h"
|
||||
|
||||
#define STRIP_TRAILING_SLASH(p) { \
|
||||
while ((p).p_end > (p).p_path + 1 && (p).p_end[-1] == '/') \
|
||||
*--(p).p_end = 0; \
|
||||
while ((p).p_end > (p).p_path + 1 && (p).p_end[-1] == '/') \
|
||||
*--(p).p_end = 0; \
|
||||
}
|
||||
|
||||
static char emptystring[] = "";
|
||||
|
||||
PATH_T to = { to.p_path, emptystring, "" };
|
||||
|
||||
int fflag, iflag, lflag, nflag, pflag, sflag, vflag;
|
||||
int fflag, iflag, lflag, nflag, pflag, vflag;
|
||||
static int Rflag, rflag;
|
||||
volatile sig_atomic_t info;
|
||||
|
||||
enum op { FILE_TO_FILE, FILE_TO_DIR, DIR_TO_DNE };
|
||||
|
||||
static int copy(char *[], enum op, int);
|
||||
static int mastercmp(const FTSENT * const *, const FTSENT * const *);
|
||||
static void siginfo(int __unused);
|
||||
|
||||
int
|
||||
@@ -102,7 +103,7 @@ main(int argc, char *argv[])
|
||||
|
||||
fts_options = FTS_NOCHDIR | FTS_PHYSICAL;
|
||||
Hflag = Lflag = 0;
|
||||
while ((ch = getopt(argc, argv, "HLPRafilnprsvx")) != -1)
|
||||
while ((ch = getopt(argc, argv, "HLPRafilnprvx")) != -1)
|
||||
switch (ch) {
|
||||
case 'H':
|
||||
Hflag = 1;
|
||||
@@ -145,9 +146,6 @@ main(int argc, char *argv[])
|
||||
rflag = Lflag = 1;
|
||||
Hflag = 0;
|
||||
break;
|
||||
case 's':
|
||||
sflag = 1;
|
||||
break;
|
||||
case 'v':
|
||||
vflag = 1;
|
||||
break;
|
||||
@@ -166,8 +164,6 @@ main(int argc, char *argv[])
|
||||
|
||||
if (Rflag && rflag)
|
||||
errx(1, "the -R and -r options may not be specified together");
|
||||
if (lflag && sflag)
|
||||
errx(1, "the -l and -s options may not be specified together");
|
||||
if (rflag)
|
||||
Rflag = 1;
|
||||
if (Rflag) {
|
||||
@@ -188,7 +184,7 @@ main(int argc, char *argv[])
|
||||
if (strlcpy(to.p_path, target, sizeof(to.p_path)) >= sizeof(to.p_path))
|
||||
errx(1, "%s: name too long", target);
|
||||
to.p_end = to.p_path + strlen(to.p_path);
|
||||
if (to.p_path == to.p_end) {
|
||||
if (to.p_path == to.p_end) {
|
||||
*to.p_end++ = '.';
|
||||
*to.p_end = 0;
|
||||
}
|
||||
@@ -245,10 +241,10 @@ main(int argc, char *argv[])
|
||||
type = FILE_TO_FILE;
|
||||
|
||||
if (have_trailing_slash && type == FILE_TO_FILE) {
|
||||
if (r == -1) {
|
||||
if (r == -1)
|
||||
errx(1, "directory %s does not exist",
|
||||
to.p_path);
|
||||
} else
|
||||
to.p_path);
|
||||
else
|
||||
errx(1, "%s is not a directory", to.p_path);
|
||||
}
|
||||
} else
|
||||
@@ -278,7 +274,7 @@ copy(char *argv[], enum op type, int fts_options)
|
||||
mask = ~umask(0777);
|
||||
umask(~mask);
|
||||
|
||||
if ((ftsp = fts_open(argv, fts_options, NULL)) == NULL)
|
||||
if ((ftsp = fts_open(argv, fts_options, mastercmp)) == NULL)
|
||||
err(1, "fts_open");
|
||||
for (badcp = rval = 0; (curr = fts_read(ftsp)) != NULL; badcp = 0) {
|
||||
switch (curr->fts_info) {
|
||||
@@ -299,8 +295,8 @@ copy(char *argv[], enum op type, int fts_options)
|
||||
|
||||
/*
|
||||
* If we are in case (2) or (3) above, we need to append the
|
||||
* source name to the target name.
|
||||
*/
|
||||
* source name to the target name.
|
||||
*/
|
||||
if (type != FILE_TO_FILE) {
|
||||
/*
|
||||
* Need to remember the roots of traversals to create
|
||||
@@ -379,8 +375,7 @@ copy(char *argv[], enum op type, int fts_options)
|
||||
mode = curr->fts_statp->st_mode;
|
||||
if ((mode & (S_ISUID | S_ISGID | S_ISTXT)) ||
|
||||
((mode | S_IRWXU) & mask) != (mode & mask))
|
||||
if (chmod(to.p_path, mode & mask) !=
|
||||
0) {
|
||||
if (chmod(to.p_path, mode & mask) != 0){
|
||||
warn("chmod: %s", to.p_path);
|
||||
rval = 1;
|
||||
}
|
||||
@@ -388,7 +383,7 @@ copy(char *argv[], enum op type, int fts_options)
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Not an error but need to remember it happened. */
|
||||
/* Not an error but need to remember it happened */
|
||||
if (stat(to.p_path, &to_stat) == -1)
|
||||
dne = 1;
|
||||
else {
|
||||
@@ -414,7 +409,7 @@ copy(char *argv[], enum op type, int fts_options)
|
||||
|
||||
switch (curr->fts_statp->st_mode & S_IFMT) {
|
||||
case S_IFLNK:
|
||||
/* Catch special case of a non-dangling symlink. */
|
||||
/* Catch special case of a non-dangling symlink */
|
||||
if ((fts_options & FTS_LOGICAL) ||
|
||||
((fts_options & FTS_COMFOLLOW) &&
|
||||
curr->fts_level == 0)) {
|
||||
@@ -439,7 +434,7 @@ copy(char *argv[], enum op type, int fts_options)
|
||||
* modified by the umask. Trade-off between being
|
||||
* able to write the directory (if from directory is
|
||||
* 555) and not causing a permissions race. If the
|
||||
* umask blocks owner writes, we fail.
|
||||
* umask blocks owner writes, we fail..
|
||||
*/
|
||||
if (dne) {
|
||||
if (mkdir(to.p_path,
|
||||
@@ -458,7 +453,7 @@ copy(char *argv[], enum op type, int fts_options)
|
||||
break;
|
||||
case S_IFBLK:
|
||||
case S_IFCHR:
|
||||
if (Rflag && !sflag) {
|
||||
if (Rflag) {
|
||||
if (copy_special(curr->fts_statp, !dne))
|
||||
badcp = rval = 1;
|
||||
} else {
|
||||
@@ -468,10 +463,10 @@ copy(char *argv[], enum op type, int fts_options)
|
||||
break;
|
||||
case S_IFSOCK:
|
||||
warnx("%s is a socket (not copied).",
|
||||
curr->fts_path);
|
||||
curr->fts_path);
|
||||
break;
|
||||
case S_IFIFO:
|
||||
if (Rflag && !sflag) {
|
||||
if (Rflag) {
|
||||
if (copy_fifo(curr->fts_statp, !dne))
|
||||
badcp = rval = 1;
|
||||
} else {
|
||||
@@ -493,6 +488,32 @@ copy(char *argv[], enum op type, int fts_options)
|
||||
return (rval);
|
||||
}
|
||||
|
||||
/*
|
||||
* mastercmp --
|
||||
* The comparison function for the copy order. The order is to copy
|
||||
* non-directory files before directory files. The reason for this
|
||||
* is because files tend to be in the same cylinder group as their
|
||||
* parent directory, whereas directories tend not to be. Copying the
|
||||
* files first reduces seeking.
|
||||
*/
|
||||
static int
|
||||
mastercmp(const FTSENT * const *a, const FTSENT * const *b)
|
||||
{
|
||||
int a_info, b_info;
|
||||
|
||||
a_info = (*a)->fts_info;
|
||||
if (a_info == FTS_ERR || a_info == FTS_NS || a_info == FTS_DNR)
|
||||
return (0);
|
||||
b_info = (*b)->fts_info;
|
||||
if (b_info == FTS_ERR || b_info == FTS_NS || b_info == FTS_DNR)
|
||||
return (0);
|
||||
if (a_info == FTS_D)
|
||||
return (-1);
|
||||
if (b_info == FTS_D)
|
||||
return (1);
|
||||
return (0);
|
||||
}
|
||||
|
||||
static void
|
||||
siginfo(int sig __unused)
|
||||
{
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ typedef struct {
|
||||
} PATH_T;
|
||||
|
||||
extern PATH_T to;
|
||||
extern int fflag, iflag, lflag, nflag, pflag, sflag, vflag;
|
||||
extern int fflag, iflag, lflag, nflag, pflag, vflag;
|
||||
extern volatile sig_atomic_t info;
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
+49
-65
@@ -57,19 +57,15 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#define cp_pct(x, y) ((y == 0) ? 0 : (int)(100.0 * (x) / (y)))
|
||||
|
||||
/*
|
||||
* Memory strategy threshold, in pages: if physmem is larger then this, use a
|
||||
* large buffer.
|
||||
*/
|
||||
/* Memory strategy threshold, in pages: if physmem is larger then this, use a
|
||||
* large buffer */
|
||||
#define PHYSPAGES_THRESHOLD (32*1024)
|
||||
|
||||
/* Maximum buffer size in bytes - do not allow it to grow larger than this. */
|
||||
/* Maximum buffer size in bytes - do not allow it to grow larger than this */
|
||||
#define BUFSIZE_MAX (2*1024*1024)
|
||||
|
||||
/*
|
||||
* Small (default) buffer size in bytes. It's inefficient for this to be
|
||||
* smaller than MAXPHYS.
|
||||
*/
|
||||
/* Small (default) buffer size in bytes. It's inefficient for this to be
|
||||
* smaller than MAXPHYS */
|
||||
#define BUFSIZE_SMALL (MAXPHYS)
|
||||
|
||||
int
|
||||
@@ -81,15 +77,13 @@ copy_file(const FTSENT *entp, int dne)
|
||||
ssize_t wcount;
|
||||
size_t wresid;
|
||||
off_t wtotal;
|
||||
int ch, checkch, from_fd, rcount, rval, to_fd;
|
||||
int ch, checkch, from_fd = 0, rcount, rval, to_fd = 0;
|
||||
char *bufp;
|
||||
#ifdef VM_AND_BUFFER_CACHE_SYNCHRONIZED
|
||||
char *p;
|
||||
#endif
|
||||
|
||||
from_fd = to_fd = -1;
|
||||
if (!lflag && !sflag &&
|
||||
(from_fd = open(entp->fts_path, O_RDONLY, 0)) == -1) {
|
||||
if ((from_fd = open(entp->fts_path, O_RDONLY, 0)) == -1) {
|
||||
warn("%s", entp->fts_path);
|
||||
return (1);
|
||||
}
|
||||
@@ -109,65 +103,63 @@ copy_file(const FTSENT *entp, int dne)
|
||||
if (nflag) {
|
||||
if (vflag)
|
||||
printf("%s not overwritten\n", to.p_path);
|
||||
rval = 1;
|
||||
goto done;
|
||||
(void)close(from_fd);
|
||||
return (0);
|
||||
} else if (iflag) {
|
||||
(void)fprintf(stderr, "overwrite %s? %s",
|
||||
to.p_path, YESNO);
|
||||
to.p_path, YESNO);
|
||||
checkch = ch = getchar();
|
||||
while (ch != '\n' && ch != EOF)
|
||||
ch = getchar();
|
||||
if (checkch != 'y' && checkch != 'Y') {
|
||||
(void)close(from_fd);
|
||||
(void)fprintf(stderr, "not overwritten\n");
|
||||
rval = 1;
|
||||
goto done;
|
||||
return (1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (fflag) {
|
||||
/*
|
||||
* Remove existing destination file name create a new
|
||||
* file.
|
||||
*/
|
||||
(void)unlink(to.p_path);
|
||||
if (!lflag && !sflag) {
|
||||
to_fd = open(to.p_path,
|
||||
O_WRONLY | O_TRUNC | O_CREAT,
|
||||
fs->st_mode & ~(S_ISUID | S_ISGID));
|
||||
}
|
||||
} else if (!lflag && !sflag) {
|
||||
/* Overwrite existing destination file name. */
|
||||
to_fd = open(to.p_path, O_WRONLY | O_TRUNC, 0);
|
||||
/* remove existing destination file name,
|
||||
* create a new file */
|
||||
(void)unlink(to.p_path);
|
||||
if (!lflag)
|
||||
to_fd = open(to.p_path, O_WRONLY | O_TRUNC | O_CREAT,
|
||||
fs->st_mode & ~(S_ISUID | S_ISGID));
|
||||
} else {
|
||||
if (!lflag)
|
||||
/* overwrite existing destination file name */
|
||||
to_fd = open(to.p_path, O_WRONLY | O_TRUNC, 0);
|
||||
}
|
||||
} else if (!lflag && !sflag) {
|
||||
to_fd = open(to.p_path, O_WRONLY | O_TRUNC | O_CREAT,
|
||||
fs->st_mode & ~(S_ISUID | S_ISGID));
|
||||
} else {
|
||||
if (!lflag)
|
||||
to_fd = open(to.p_path, O_WRONLY | O_TRUNC | O_CREAT,
|
||||
fs->st_mode & ~(S_ISUID | S_ISGID));
|
||||
}
|
||||
|
||||
if (!lflag && !sflag && to_fd == -1) {
|
||||
|
||||
if (to_fd == -1) {
|
||||
warn("%s", to.p_path);
|
||||
rval = 1;
|
||||
goto done;
|
||||
(void)close(from_fd);
|
||||
return (1);
|
||||
}
|
||||
|
||||
rval = 0;
|
||||
|
||||
if (!lflag && !sflag) {
|
||||
if (!lflag) {
|
||||
/*
|
||||
* Mmap and write if less than 8M (the limit is so we don't
|
||||
* totally trash memory on big files. This is really a minor
|
||||
* hack, but it wins some CPU back.
|
||||
* Mmap and write if less than 8M (the limit is so we don't totally
|
||||
* trash memory on big files. This is really a minor hack, but it
|
||||
* wins some CPU back.
|
||||
* Some filesystems, such as smbnetfs, don't support mmap,
|
||||
* so this is a best-effort attempt.
|
||||
*/
|
||||
#ifdef VM_AND_BUFFER_CACHE_SYNCHRONIZED
|
||||
if (S_ISREG(fs->st_mode) && fs->st_size > 0 &&
|
||||
fs->st_size <= 8 * 1024 * 1024 &&
|
||||
fs->st_size <= 8 * 1024 * 1024 &&
|
||||
(p = mmap(NULL, (size_t)fs->st_size, PROT_READ,
|
||||
MAP_SHARED, from_fd, (off_t)0)) != MAP_FAILED) {
|
||||
wtotal = 0;
|
||||
for (bufp = p, wresid = fs->st_size; ;
|
||||
bufp += wcount, wresid -= (size_t)wcount) {
|
||||
bufp += wcount, wresid -= (size_t)wcount) {
|
||||
wcount = write(to_fd, bufp, wresid);
|
||||
if (wcount <= 0)
|
||||
break;
|
||||
@@ -212,7 +204,7 @@ copy_file(const FTSENT *entp, int dne)
|
||||
wtotal = 0;
|
||||
while ((rcount = read(from_fd, buf, bufsize)) > 0) {
|
||||
for (bufp = buf, wresid = rcount; ;
|
||||
bufp += wcount, wresid -= wcount) {
|
||||
bufp += wcount, wresid -= wcount) {
|
||||
wcount = write(to_fd, bufp, wresid);
|
||||
if (wcount <= 0)
|
||||
break;
|
||||
@@ -238,18 +230,13 @@ copy_file(const FTSENT *entp, int dne)
|
||||
rval = 1;
|
||||
}
|
||||
}
|
||||
} else if (lflag) {
|
||||
} else {
|
||||
if (link(entp->fts_path, to.p_path)) {
|
||||
warn("%s", to.p_path);
|
||||
rval = 1;
|
||||
}
|
||||
} else if (sflag) {
|
||||
if (symlink(entp->fts_path, to.p_path)) {
|
||||
warn("%s", to.p_path);
|
||||
rval = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Don't remove the target even after an error. The target might
|
||||
* not be a regular file, or its attributes might be important,
|
||||
@@ -257,7 +244,7 @@ copy_file(const FTSENT *entp, int dne)
|
||||
* to remove it if we created it and its length is 0.
|
||||
*/
|
||||
|
||||
if (!lflag && !sflag) {
|
||||
if (!lflag) {
|
||||
if (pflag && setfile(fs, to_fd))
|
||||
rval = 1;
|
||||
if (pflag && preserve_fd_acls(from_fd, to_fd) != 0)
|
||||
@@ -268,9 +255,8 @@ copy_file(const FTSENT *entp, int dne)
|
||||
}
|
||||
}
|
||||
|
||||
done:
|
||||
if (from_fd != -1)
|
||||
(void)close(from_fd);
|
||||
(void)close(from_fd);
|
||||
|
||||
return (rval);
|
||||
}
|
||||
|
||||
@@ -335,7 +321,7 @@ setfile(struct stat *fs, int fd)
|
||||
fdval = fd != -1;
|
||||
islink = !fdval && S_ISLNK(fs->st_mode);
|
||||
fs->st_mode &= S_ISUID | S_ISGID | S_ISVTX |
|
||||
S_IRWXU | S_IRWXG | S_IRWXO;
|
||||
S_IRWXU | S_IRWXG | S_IRWXO;
|
||||
|
||||
TIMESPEC_TO_TIMEVAL(&tv[0], &fs->st_atim);
|
||||
TIMESPEC_TO_TIMEVAL(&tv[1], &fs->st_mtim);
|
||||
@@ -349,7 +335,7 @@ setfile(struct stat *fs, int fd)
|
||||
else {
|
||||
gotstat = 1;
|
||||
ts.st_mode &= S_ISUID | S_ISGID | S_ISVTX |
|
||||
S_IRWXU | S_IRWXG | S_IRWXO;
|
||||
S_IRWXU | S_IRWXG | S_IRWXO;
|
||||
}
|
||||
/*
|
||||
* Changing the ownership probably won't succeed, unless we're root
|
||||
@@ -473,7 +459,7 @@ preserve_dir_acls(struct stat *fs, char *source_dir, char *dest_dir)
|
||||
return (0);
|
||||
|
||||
/*
|
||||
* If the file is a link we will not follow it.
|
||||
* If the file is a link we will not follow it
|
||||
*/
|
||||
if (S_ISLNK(fs->st_mode)) {
|
||||
aclgetf = acl_get_link_np;
|
||||
@@ -532,10 +518,8 @@ usage(void)
|
||||
{
|
||||
|
||||
(void)fprintf(stderr, "%s\n%s\n",
|
||||
"usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpsvx] "
|
||||
"source_file target_file",
|
||||
" cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpsvx] "
|
||||
"source_file ... "
|
||||
"target_directory");
|
||||
"usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpvx] source_file target_file",
|
||||
" cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpvx] source_file ... "
|
||||
"target_directory");
|
||||
exit(EX_USAGE);
|
||||
}
|
||||
@@ -36,9 +36,9 @@
|
||||
#undef iconv_close
|
||||
|
||||
#define ICONVLIB "libiconv.so"
|
||||
#define ICONV_ENGINE "libiconv"
|
||||
#define ICONV_OPEN "libiconv_open"
|
||||
#define ICONV_CLOSE "libiconv_close"
|
||||
#define ICONV_ENGINE "iconv"
|
||||
#define ICONV_OPEN "iconv_open"
|
||||
#define ICONV_CLOSE "iconv_close"
|
||||
|
||||
typedef iconv_t iconv_open_t(const char *, const char *);
|
||||
|
||||
|
||||
+6
-3
@@ -96,13 +96,16 @@ void
|
||||
init_des_cipher(void)
|
||||
{
|
||||
#ifdef DES
|
||||
int i;
|
||||
|
||||
des_ct = des_n = 0;
|
||||
|
||||
/* initialize the initialization vector */
|
||||
MEMZERO(ivec, 8);
|
||||
|
||||
/* initialize the padding vector */
|
||||
arc4random_buf(pvec, sizeof(pvec));
|
||||
for (i = 0; i < 8; i++)
|
||||
pvec[i] = (char) (arc4random() % 256);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -167,7 +170,7 @@ get_keyword(void)
|
||||
/*
|
||||
* get the key
|
||||
*/
|
||||
if ((p = getpass("Enter key: ")) != NULL && *p != '\0') {
|
||||
if (*(p = getpass("Enter key: "))) {
|
||||
|
||||
/*
|
||||
* copy it, nul-padded, into the key area
|
||||
@@ -260,7 +263,7 @@ expand_des_key(char *obuf, char *kbuf)
|
||||
/*
|
||||
* now translate it, bombing on any illegal binary digit
|
||||
*/
|
||||
for (i = 0; i < 16 && kbuf[i]; i++)
|
||||
for (i = 0; kbuf[i] && i < 16; i++)
|
||||
if ((nbuf[i] = hex_to_binary((int) kbuf[i], 2)) == -1)
|
||||
des_error("bad binary digit in key");
|
||||
while (i < 64)
|
||||
|
||||
+4
-6
@@ -504,8 +504,7 @@ exec_command(void)
|
||||
return ERR;
|
||||
else if (open_sbuf() < 0)
|
||||
return FATAL;
|
||||
if (*fnp && *fnp != '!')
|
||||
strlcpy(old_filename, fnp, PATH_MAX);
|
||||
if (*fnp && *fnp != '!') strcpy(old_filename, fnp);
|
||||
#ifdef BACKWARDS
|
||||
if (*fnp == '\0' && *old_filename == '\0') {
|
||||
errmsg = "no current filename";
|
||||
@@ -532,8 +531,7 @@ exec_command(void)
|
||||
return ERR;
|
||||
}
|
||||
GET_COMMAND_SUFFIX();
|
||||
if (*fnp)
|
||||
strlcpy(old_filename, fnp, PATH_MAX);
|
||||
if (*fnp) strcpy(old_filename, fnp);
|
||||
printf("%s\n", strip_escapes(old_filename));
|
||||
break;
|
||||
case 'g':
|
||||
@@ -664,7 +662,7 @@ exec_command(void)
|
||||
GET_COMMAND_SUFFIX();
|
||||
if (!isglobal) clear_undo_stack();
|
||||
if (*old_filename == '\0' && *fnp != '!')
|
||||
strlcpy(old_filename, fnp, PATH_MAX);
|
||||
strcpy(old_filename, fnp);
|
||||
#ifdef BACKWARDS
|
||||
if (*fnp == '\0' && *old_filename == '\0') {
|
||||
errmsg = "no current filename";
|
||||
@@ -798,7 +796,7 @@ exec_command(void)
|
||||
return ERR;
|
||||
GET_COMMAND_SUFFIX();
|
||||
if (*old_filename == '\0' && *fnp != '!')
|
||||
strlcpy(old_filename, fnp, PATH_MAX);
|
||||
strcpy(old_filename, fnp);
|
||||
#ifdef BACKWARDS
|
||||
if (*fnp == '\0' && *old_filename == '\0') {
|
||||
errmsg = "no current filename";
|
||||
|
||||
@@ -4,7 +4,4 @@ PROG= expr
|
||||
SRCS= expr.y
|
||||
YFLAGS=
|
||||
|
||||
# expr relies on signed integer wrapping
|
||||
CFLAGS+= -fwrapv
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
+9
-8
@@ -29,7 +29,7 @@
|
||||
.\" @(#)symlink.7 8.3 (Berkeley) 3/31/94
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd December 29, 2014
|
||||
.Dd April 25, 2010
|
||||
.Dt SYMLINK 7
|
||||
.Os
|
||||
.Sh NAME
|
||||
@@ -219,7 +219,7 @@ would change the ownership of
|
||||
.Dq Li slink
|
||||
itself.
|
||||
.Pp
|
||||
There are five exceptions to this rule.
|
||||
There are four exceptions to this rule.
|
||||
The
|
||||
.Xr mv 1
|
||||
and
|
||||
@@ -262,12 +262,13 @@ a file tree.)
|
||||
.Pp
|
||||
The
|
||||
.Xr file 1
|
||||
and
|
||||
.Xr stat 1
|
||||
commands are also exceptions to this rule.
|
||||
These
|
||||
commands do not follow symbolic links named as argument by default,
|
||||
but do follow symbolic links named as argument if the
|
||||
command is also an exception to this rule.
|
||||
The
|
||||
.Xr file 1
|
||||
command does not follow symbolic links named as argument by default.
|
||||
The
|
||||
.Xr file 1
|
||||
command does follow symbolic links named as argument if
|
||||
.Fl L
|
||||
option is specified.
|
||||
.Pp
|
||||
|
||||
+1
-4
@@ -853,13 +853,10 @@ buf_fill(void)
|
||||
|
||||
/*
|
||||
* errors require resync, EOF goes to next archive
|
||||
* but in case we have not determined yet the format,
|
||||
* this means that we have a very short file, so we
|
||||
* are done again.
|
||||
*/
|
||||
if (cnt < 0)
|
||||
break;
|
||||
if (frmt == NULL || ar_next() < 0) {
|
||||
if (ar_next() < 0) {
|
||||
fini = 1;
|
||||
return(0);
|
||||
}
|
||||
|
||||
+1
-1
@@ -880,7 +880,7 @@ rep_name(char *name, int *nlen, int prnt)
|
||||
* (the user already saw that substitution go by)
|
||||
*/
|
||||
pt = rephead;
|
||||
(void)strlcpy(buf1, name, sizeof(buf1));
|
||||
(void)strcpy(buf1, name);
|
||||
inpt = buf1;
|
||||
outpt = nname;
|
||||
endpt = outpt + PAXPATHLEN;
|
||||
|
||||
@@ -87,10 +87,7 @@ static VAR var[] = {
|
||||
{"etimes", "ELAPSED", NULL, USER, elapseds, 0, CHAR, NULL, 0},
|
||||
{"euid", "", "uid", 0, NULL, 0, CHAR, NULL, 0},
|
||||
{"f", "F", NULL, 0, kvar, KOFF(ki_flag), INT, "x", 0},
|
||||
{"f2", "F2", NULL, 0, kvar, KOFF(ki_flag2), INT, "08x", 0},
|
||||
{"fib", "FIB", NULL, 0, kvar, KOFF(ki_fibnum), INT, "d", 0},
|
||||
{"flags", "", "f", 0, NULL, 0, CHAR, NULL, 0},
|
||||
{"flags2", "", "f2", 0, NULL, 0, CHAR, NULL, 0},
|
||||
{"gid", "GID", NULL, 0, kvar, KOFF(ki_groups), UINT, UIDFMT, 0},
|
||||
{"group", "GROUP", NULL, LJUST, egroupname, 0, CHAR, NULL, 0},
|
||||
{"ignored", "", "sigignore", 0, NULL, 0, CHAR, NULL, 0},
|
||||
|
||||
+32
-46
@@ -29,7 +29,7 @@
|
||||
.\" @(#)ps.1 8.3 (Berkeley) 4/18/94
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd August 7, 2014
|
||||
.Dd May 2, 2014
|
||||
.Dt PS 1
|
||||
.Os
|
||||
.Sh NAME
|
||||
@@ -307,47 +307,39 @@ The flags associated with the process as in
|
||||
the include file
|
||||
.In sys/proc.h :
|
||||
.Bl -column P_SINGLE_BOUNDARY 0x40000000
|
||||
.It Dv "P_ADVLOCK" Ta No "0x00001" Ta "Process may hold a POSIX advisory lock"
|
||||
.It Dv "P_CONTROLT" Ta No "0x00002" Ta "Has a controlling terminal"
|
||||
.It Dv "P_KTHREAD" Ta No "0x00004" Ta "Kernel thread"
|
||||
.It Dv "P_FOLLOWFORK" Ta No "0x00008" Ta "Attach debugger to new children"
|
||||
.It Dv "P_PPWAIT" Ta No "0x00010" Ta "Parent is waiting for child to exec/exit"
|
||||
.It Dv "P_PROFIL" Ta No "0x00020" Ta "Has started profiling"
|
||||
.It Dv "P_STOPPROF" Ta No "0x00040" Ta "Has thread in requesting to stop prof"
|
||||
.It Dv "P_HADTHREADS" Ta No "0x00080" Ta "Has had threads (no cleanup shortcuts)"
|
||||
.It Dv "P_SUGID" Ta No "0x00100" Ta "Had set id privileges since last exec"
|
||||
.It Dv "P_SYSTEM" Ta No "0x00200" Ta "System proc: no sigs, stats or swapping"
|
||||
.It Dv "P_SINGLE_EXIT" Ta No "0x00400" Ta "Threads suspending should exit, not wait"
|
||||
.It Dv "P_TRACED" Ta No "0x00800" Ta "Debugged process being traced"
|
||||
.It Dv "P_WAITED" Ta No "0x01000" Ta "Someone is waiting for us"
|
||||
.It Dv "P_WEXIT" Ta No "0x02000" Ta "Working on exiting"
|
||||
.It Dv "P_EXEC" Ta No "0x04000" Ta "Process called exec"
|
||||
.It Dv "P_WKILLED" Ta No "0x08000" Ta "Killed, shall go to kernel/user boundary ASAP"
|
||||
.It Dv "P_CONTINUED" Ta No "0x10000" Ta "Proc has continued from a stopped state"
|
||||
.It Dv "P_STOPPED_SIG" Ta No "0x20000" Ta "Stopped due to SIGSTOP/SIGTSTP"
|
||||
.It Dv "P_STOPPED_TRACE" Ta No "0x40000" Ta "Stopped because of tracing"
|
||||
.It Dv "P_STOPPED_SINGLE" Ta No "0x80000" Ta "Only one thread can continue"
|
||||
.It Dv "P_PROTECTED" Ta No "0x100000" Ta "Do not kill on memory overcommit"
|
||||
.It Dv "P_SIGEVENT" Ta No "0x200000" Ta "Process pending signals changed"
|
||||
.It Dv "P_SINGLE_BOUNDARY" Ta No "0x400000" Ta "Threads should suspend at user boundary"
|
||||
.It Dv "P_HWPMC" Ta No "0x800000" Ta "Process is using HWPMCs"
|
||||
.It Dv "P_JAILED" Ta No "0x1000000" Ta "Process is in jail"
|
||||
.It Dv "P_INEXEC" Ta No "0x4000000" Ta "Process is in execve()"
|
||||
.It Dv "P_STATCHILD" Ta No "0x8000000" Ta "Child process stopped or exited"
|
||||
.It Dv "P_INMEM" Ta No "0x10000000" Ta "Loaded into memory"
|
||||
.It Dv "P_SWAPPINGOUT" Ta No "0x20000000" Ta "Process is being swapped out"
|
||||
.It Dv "P_SWAPPINGIN" Ta No "0x40000000" Ta "Process is being swapped in"
|
||||
.It Dv "P_ADVLOCK" Ta No "0x00001 Process may hold a POSIX advisory lock"
|
||||
.It Dv "P_CONTROLT" Ta No "0x00002 Has a controlling terminal"
|
||||
.It Dv "P_KTHREAD" Ta No "0x00004 Kernel thread"
|
||||
.It Dv "P_FOLLOWFORK" Ta No "0x00008 Attach debugger to new children"
|
||||
.It Dv "P_PPWAIT" Ta No "0x00010 Parent is waiting for child to exec/exit"
|
||||
.It Dv "P_PROFIL" Ta No "0x00020 Has started profiling"
|
||||
.It Dv "P_STOPPROF" Ta No "0x00040 Has thread in requesting to stop prof"
|
||||
.It Dv "P_HADTHREADS" Ta No "0x00080 Has had threads (no cleanup shortcuts)"
|
||||
.It Dv "P_SUGID" Ta No "0x00100 Had set id privileges since last exec"
|
||||
.It Dv "P_SYSTEM" Ta No "0x00200 System proc: no sigs, stats or swapping"
|
||||
.It Dv "P_SINGLE_EXIT" Ta No "0x00400 Threads suspending should exit, not wait"
|
||||
.It Dv "P_TRACED" Ta No "0x00800 Debugged process being traced"
|
||||
.It Dv "P_WAITED" Ta No "0x01000 Someone is waiting for us"
|
||||
.It Dv "P_WEXIT" Ta No "0x02000 Working on exiting"
|
||||
.It Dv "P_EXEC" Ta No "0x04000 Process called exec"
|
||||
.It Dv "P_WKILLED" Ta No "0x08000 Killed, shall go to kernel/user boundary ASAP"
|
||||
.It Dv "P_CONTINUED" Ta No "0x10000 Proc has continued from a stopped state"
|
||||
.It Dv "P_STOPPED_SIG" Ta No "0x20000 Stopped due to SIGSTOP/SIGTSTP"
|
||||
.It Dv "P_STOPPED_TRACE" Ta No "0x40000 Stopped because of tracing"
|
||||
.It Dv "P_STOPPED_SINGLE" Ta No "0x80000 Only one thread can continue"
|
||||
.It Dv "P_PROTECTED" Ta No "0x100000 Do not kill on memory overcommit"
|
||||
.It Dv "P_SIGEVENT" Ta No "0x200000 Process pending signals changed"
|
||||
.It Dv "P_SINGLE_BOUNDARY" Ta No "0x400000 Threads should suspend at user boundary"
|
||||
.It Dv "P_HWPMC" Ta No "0x800000 Process is using HWPMCs"
|
||||
.It Dv "P_JAILED" Ta No "0x1000000 Process is in jail"
|
||||
.It Dv "P_ORPHAN" Ta No "0x2000000 Orphaned by original parent, reparented to debugger"
|
||||
.It Dv "P_INEXEC" Ta No "0x4000000 Process is in execve()"
|
||||
.It Dv "P_STATCHILD" Ta No "0x8000000 Child process stopped or exited"
|
||||
.It Dv "P_INMEM" Ta No "0x10000000 Loaded into memory"
|
||||
.It Dv "P_SWAPPINGOUT" Ta No "0x20000000 Process is being swapped out"
|
||||
.It Dv "P_SWAPPINGIN" Ta No "0x40000000 Process is being swapped in"
|
||||
.It Dv "P_PPTRACE" Ta No "0x80000000" Ta "Vforked child issued ptrace(PT_TRACEME)"
|
||||
.El
|
||||
.It Cm flags2
|
||||
The flags kept in
|
||||
.Va p_flag2
|
||||
associated with the process as in
|
||||
the include file
|
||||
.In sys/proc.h :
|
||||
.Bl -column P2_INHERIT_PROTECTED 0x00000001
|
||||
.It Dv "P2_INHERIT_PROTECTED" Ta No "0x00000001" Ta "New children get P_PROTECTED"
|
||||
.El
|
||||
.It Cm label
|
||||
The MAC label of the process.
|
||||
.It Cm lim
|
||||
@@ -531,15 +523,9 @@ elapsed running time, format
|
||||
minutes:seconds.
|
||||
.It Cm etimes
|
||||
elapsed running time, in decimal integer seconds
|
||||
.It Cm fib
|
||||
default FIB number, see
|
||||
.Xr setfib 1
|
||||
.It Cm flags
|
||||
the process flags, in hexadecimal (alias
|
||||
.Cm f )
|
||||
.It Cm flags2
|
||||
the additional set of process flags, in hexadecimal (alias
|
||||
.Cm f2 )
|
||||
.It Cm gid
|
||||
effective group ID (alias
|
||||
.Cm egid )
|
||||
|
||||
+1
-1
@@ -329,7 +329,7 @@ err:
|
||||
warn("%s", p->fts_path);
|
||||
eval = 1;
|
||||
}
|
||||
if (!fflag && errno)
|
||||
if (errno)
|
||||
err(1, "fts_read");
|
||||
fts_close(fts);
|
||||
}
|
||||
|
||||
+2
-3
@@ -1982,9 +1982,8 @@ getprompt(void *unused __unused)
|
||||
gethostname(&ps[i], PROMPTLEN - i);
|
||||
/* Skip to end of hostname. */
|
||||
trim = (*fmt == 'h') ? '.' : '\0';
|
||||
while ((ps[i] != '\0') && (ps[i] != trim))
|
||||
while ((ps[i+1] != '\0') && (ps[i+1] != trim))
|
||||
i++;
|
||||
--i;
|
||||
break;
|
||||
|
||||
/*
|
||||
@@ -1996,7 +1995,7 @@ getprompt(void *unused __unused)
|
||||
case 'W':
|
||||
case 'w':
|
||||
pwd = lookupvar("PWD");
|
||||
if (pwd == NULL || *pwd == '\0')
|
||||
if (pwd == NULL)
|
||||
pwd = "?";
|
||||
if (*fmt == 'W' &&
|
||||
*pwd == '/' && pwd[1] != '\0')
|
||||
|
||||
+3
-5
@@ -32,7 +32,7 @@
|
||||
.\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd November 7, 2014
|
||||
.Dd January 3, 2014
|
||||
.Dt SH 1
|
||||
.Os
|
||||
.Sh NAME
|
||||
@@ -569,8 +569,7 @@ the following actions:
|
||||
Leading words of the form
|
||||
.Dq Li name=value
|
||||
are stripped off and assigned to the environment of
|
||||
the simple command
|
||||
(they do not affect expansions).
|
||||
the simple command.
|
||||
Redirection operators and
|
||||
their arguments (as described below) are stripped
|
||||
off and saved for processing.
|
||||
@@ -2473,8 +2472,7 @@ and so on,
|
||||
decreasing the value of
|
||||
.Li $#
|
||||
by one.
|
||||
For portability, shifting if there are zero positional parameters
|
||||
should be avoided, since the shell may abort.
|
||||
If there are zero positional parameters, shifting does not do anything.
|
||||
.It Ic test
|
||||
A built-in equivalent of
|
||||
.Xr test 1 .
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
* Use is subject to license terms.
|
||||
*/
|
||||
|
||||
#pragma ident "%Z%%M% %I% %E% SMI"
|
||||
|
||||
/*
|
||||
* ASSERTION:
|
||||
* Checks that setting "bufresize" to "auto" will cause buffer
|
||||
@@ -32,8 +34,14 @@
|
||||
* SECTION: Buffers and Buffering/Buffer Resizing Policy;
|
||||
* Options and Tunables/bufsize;
|
||||
* Options and Tunables/bufresize
|
||||
*
|
||||
* NOTES:
|
||||
* We use the undocumented "preallocate" option to make sure dtrace(1M)
|
||||
* has enough space in its heap to allocate a buffer as large as the
|
||||
* kernel's trace buffer.
|
||||
*/
|
||||
|
||||
#pragma D option preallocate=100t
|
||||
#pragma D option bufresize=auto
|
||||
#pragma D option bufsize=100t
|
||||
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
* Use is subject to license terms.
|
||||
*/
|
||||
|
||||
#pragma ident "%Z%%M% %I% %E% SMI"
|
||||
|
||||
/*
|
||||
* ASSERTION:
|
||||
* Checks that setting "bufresize" to "auto" will cause buffer
|
||||
@@ -32,8 +34,14 @@
|
||||
* SECTION: Buffers and Buffering/Buffer Resizing Policy;
|
||||
* Options and Tunables/aggsize;
|
||||
* Options and Tunables/bufresize
|
||||
*
|
||||
* NOTES:
|
||||
* We use the undocumented "preallocate" option to make sure dtrace(1M)
|
||||
* has enough space in its heap to allocate a buffer as large as the
|
||||
* kernel's trace buffer.
|
||||
*/
|
||||
|
||||
#pragma D option preallocate=100t
|
||||
#pragma D option bufresize=auto
|
||||
#pragma D option aggsize=100t
|
||||
|
||||
|
||||
@@ -158,22 +158,14 @@ static ls_event_info_t g_event_info[LS_MAX_EVENTS] = {
|
||||
"lockstat:::rw-block", "arg2 != 0 && arg3 == 1" },
|
||||
{ 'C', "Lock", "R/W reader blocked by write wanted", "nsec",
|
||||
"lockstat:::rw-block", "arg2 != 0 && arg3 == 0 && arg4" },
|
||||
{ 'C', "Lock", "R/W writer spin on writer", "nsec",
|
||||
"lockstat:::rw-spin", "arg2 == 0 && arg3 == 1" },
|
||||
{ 'C', "Lock", "R/W writer spin on readers", "nsec",
|
||||
"lockstat:::rw-spin", "arg2 == 0 && arg3 == 0 && arg4" },
|
||||
{ 'C', "Lock", "R/W reader spin on writer", "nsec",
|
||||
"lockstat:::rw-spin", "arg2 != 0 && arg3 == 1" },
|
||||
{ 'C', "Lock", "R/W reader spin on write wanted", "nsec",
|
||||
"lockstat:::rw-spin", "arg2 != 0 && arg3 == 0 && arg4" },
|
||||
{ 'C', "Lock", "SX exclusive block", "nsec",
|
||||
"lockstat:::sx-block", "arg2 == 0" },
|
||||
{ 'C', "Lock", "SX shared block", "nsec",
|
||||
"lockstat:::sx-block", "arg2 != 0" },
|
||||
{ 'C', "Lock", "SX exclusive spin", "nsec",
|
||||
"lockstat:::sx-spin", "arg2 == 0" },
|
||||
{ 'C', "Lock", "SX shared spin", "nsec",
|
||||
"lockstat:::sx-spin", "arg2 != 0" },
|
||||
{ 'C', "Lock", "Unknown event (type 8)", "units" },
|
||||
{ 'C', "Lock", "Unknown event (type 9)", "units" },
|
||||
{ 'C', "Lock", "Unknown event (type 10)", "units" },
|
||||
{ 'C', "Lock", "Unknown event (type 11)", "units" },
|
||||
{ 'C', "Lock", "Unknown event (type 12)", "units" },
|
||||
{ 'C', "Lock", "Unknown event (type 13)", "units" },
|
||||
{ 'C', "Lock", "Unknown event (type 14)", "units" },
|
||||
{ 'C', "Lock", "Unknown event (type 15)", "units" },
|
||||
{ 'C', "Lock", "Unknown event (type 16)", "units" },
|
||||
{ 'C', "Lock", "Unknown event (type 17)", "units" },
|
||||
{ 'C', "Lock", "Unknown event (type 18)", "units" },
|
||||
@@ -197,17 +189,13 @@ static ls_event_info_t g_event_info[LS_MAX_EVENTS] = {
|
||||
"lockstat:::spin-release", NULL,
|
||||
"lockstat:::spin-acquire" },
|
||||
{ 'H', "Lock", "R/W writer hold", "nsec",
|
||||
"lockstat::rw_wunlock:rw-release", NULL,
|
||||
"lockstat::rw_wlock:rw-acquire" },
|
||||
"lockstat:::rw-release", "arg1 == 0",
|
||||
"lockstat:::rw-acquire" },
|
||||
{ 'H', "Lock", "R/W reader hold", "nsec",
|
||||
"lockstat::rw_runlock:rw-release", NULL,
|
||||
"lockstat::rw_rlock:rw-acquire" },
|
||||
{ 'H', "Lock", "SX shared hold", "nsec",
|
||||
"lockstat::sx_sunlock:sx-release", NULL,
|
||||
"lockstat::sx_slock:sx-acquire" },
|
||||
{ 'H', "Lock", "SX exclusive hold", "nsec",
|
||||
"lockstat::sx_xunlock:sx-release", NULL,
|
||||
"lockstat::sx_xlock:sx-acquire" },
|
||||
"lockstat:::rw-release", "arg1 != 0",
|
||||
"lockstat:::rw-acquire" },
|
||||
{ 'H', "Lock", "Unknown event (type 36)", "units" },
|
||||
{ 'H', "Lock", "Unknown event (type 37)", "units" },
|
||||
{ 'H', "Lock", "Unknown event (type 38)", "units" },
|
||||
{ 'H', "Lock", "Unknown event (type 39)", "units" },
|
||||
{ 'H', "Lock", "Unknown event (type 40)", "units" },
|
||||
|
||||
@@ -0,0 +1,126 @@
|
||||
/*
|
||||
* CDDL HEADER START
|
||||
*
|
||||
* The contents of this file are subject to the terms of the
|
||||
* Common Development and Distribution License (the "License").
|
||||
* You may not use this file except in compliance with the License.
|
||||
*
|
||||
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
|
||||
* or http://www.opensolaris.org/os/licensing.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
*
|
||||
* When distributing Covered Code, include this CDDL HEADER in each
|
||||
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
|
||||
* If applicable, add the following below this CDDL HEADER, with the
|
||||
* fields enclosed by brackets "[]" replaced with your own identifying
|
||||
* information: Portions Copyright [yyyy] [name of copyright owner]
|
||||
*
|
||||
* CDDL HEADER END
|
||||
*/
|
||||
/*
|
||||
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
|
||||
* Use is subject to license terms.
|
||||
*/
|
||||
|
||||
#ifndef __STRING_TABLE_DOT_H
|
||||
#define __STRING_TABLE_DOT_H
|
||||
|
||||
#pragma ident "%Z%%M% %I% %E% SMI"
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/avl.h>
|
||||
#include <string_table.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* A string is represented in a string table using two values: length, and
|
||||
* value. Grouping all the strings of a given length together allows for
|
||||
* efficient matching of tail strings, as each input string value is hashed.
|
||||
* Each string table uses a 2-level AVL tree of AVL trees to represent this
|
||||
* organization.
|
||||
*
|
||||
* The outer (main) AVL tree contains LenNode structures. The search key for
|
||||
* nodes on this main tree is the string length. Each such node represents
|
||||
* all strings of a given length, and all strings of that length are found
|
||||
* within.
|
||||
*
|
||||
* The strings within each LenNode are maintained using a secondary AVL tree
|
||||
* of StrNode structures. The search key for this inner tree is the string
|
||||
* itself. The strings are maintained in lexical order.
|
||||
*/
|
||||
typedef struct {
|
||||
avl_node_t sn_avlnode; /* AVL book-keeping */
|
||||
const char *sn_str; /* string */
|
||||
size_t sn_refcnt; /* reference count */
|
||||
} StrNode;
|
||||
|
||||
typedef struct {
|
||||
avl_node_t ln_avlnode; /* AVL book-keeping */
|
||||
avl_tree_t *ln_strtree; /* AVL tree of associated strings */
|
||||
size_t ln_strlen; /* length of associated strings */
|
||||
} LenNode;
|
||||
|
||||
/*
|
||||
* Define a master string data item. Other strings may be suffixes of this
|
||||
* string. The final string table will consist of the master string values,
|
||||
* laid end to end, with the other strings referencing their tails.
|
||||
*/
|
||||
typedef struct str_master Str_master;
|
||||
|
||||
struct str_master {
|
||||
const char *sm_str; /* pointer to master string */
|
||||
Str_master *sm_next; /* used for tracking master strings */
|
||||
size_t sm_strlen; /* length of master string */
|
||||
uint_t sm_hashval; /* hashval of master string */
|
||||
size_t sm_stroff; /* offset into destination strtab */
|
||||
};
|
||||
|
||||
/*
|
||||
* Define a hash data item. This item represents an individual string that has
|
||||
* been input into the String hash table. The string may either be a suffix of
|
||||
* another string, or a master string.
|
||||
*/
|
||||
typedef struct str_hash Str_hash;
|
||||
|
||||
struct str_hash {
|
||||
size_t hi_strlen; /* string length */
|
||||
size_t hi_refcnt; /* number of references to str */
|
||||
uint_t hi_hashval; /* hash for string */
|
||||
Str_master *hi_mstr; /* pointer to master string */
|
||||
Str_hash *hi_next; /* next entry in hash bucket */
|
||||
};
|
||||
|
||||
/*
|
||||
* Controlling data structure for a String Table.
|
||||
*/
|
||||
struct str_tbl {
|
||||
avl_tree_t *st_lentree; /* AVL tree of string lengths */
|
||||
char *st_strbuf; /* string buffer */
|
||||
Str_hash **st_hashbcks; /* hash buckets */
|
||||
Str_master *st_mstrlist; /* list of all master strings */
|
||||
size_t st_fullstrsize; /* uncompressed table size */
|
||||
size_t st_nextoff; /* next available string */
|
||||
size_t st_strsize; /* compressed size */
|
||||
size_t st_strcnt; /* number of strings */
|
||||
uint_t st_hbckcnt; /* number of buckets in */
|
||||
/* hashlist */
|
||||
uint_t st_flags;
|
||||
};
|
||||
|
||||
#define FLG_STTAB_COMPRESS 0x01 /* compressed string table */
|
||||
#define FLG_STTAB_COOKED 0x02 /* offset has been assigned */
|
||||
|
||||
/*
|
||||
* Starting value for use with string hashing functions inside of string_table.c
|
||||
*/
|
||||
#define HASHSEED 5381
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __STRING_TABLE_DOT_H */
|
||||
@@ -0,0 +1,280 @@
|
||||
/*
|
||||
* CDDL HEADER START
|
||||
*
|
||||
* The contents of this file are subject to the terms of the
|
||||
* Common Development and Distribution License (the "License").
|
||||
* You may not use this file except in compliance with the License.
|
||||
*
|
||||
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
|
||||
* or http://www.opensolaris.org/os/licensing.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
*
|
||||
* When distributing Covered Code, include this CDDL HEADER in each
|
||||
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
|
||||
* If applicable, add the following below this CDDL HEADER, with the
|
||||
* fields enclosed by brackets "[]" replaced with your own identifying
|
||||
* information: Portions Copyright [yyyy] [name of copyright owner]
|
||||
*
|
||||
* CDDL HEADER END
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
|
||||
* Use is subject to license terms.
|
||||
*
|
||||
* Define an Alist, a list maintained as a reallocable array, and a for() loop
|
||||
* macro to generalize its traversal. Note that the array can be reallocated
|
||||
* as it is being traversed, thus the offset of each element is recomputed from
|
||||
* the start of the structure.
|
||||
*/
|
||||
|
||||
#ifndef _ALIST_H
|
||||
#define _ALIST_H
|
||||
|
||||
#pragma ident "%Z%%M% %I% %E% SMI"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#if defined(sun)
|
||||
#include <sys/machelf.h>
|
||||
#else
|
||||
#include <sys/elf.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* An Alist implements array lists. The functionality is similar to
|
||||
* that of a linked list. However, an Alist is represented by a single
|
||||
* contigious allocation of memory. The head of the memory is a header
|
||||
* that contains control information for the list. Following the header
|
||||
* is an array used to hold the user data. In the type definitions that
|
||||
* follow, we define these as an array with a single element, but when
|
||||
* we allocate the memory, we actually allocate the amount of memory needed.
|
||||
*
|
||||
* There are two "flavors" of array list:
|
||||
*
|
||||
* Alist - Contain arbitrary data, usually structs.
|
||||
* APlist - Contain pointers to data allocated elsewhere.
|
||||
*
|
||||
* This differentiation is useful, because pointer lists are heavily
|
||||
* used, and support a slightly different set of operations that are
|
||||
* unique to their purpose.
|
||||
*
|
||||
* Array lists are initially represented by a NULL pointer. The memory
|
||||
* for the list is only allocated if an item is inserted. This is very
|
||||
* efficient for data structures that may or may not be needed for a
|
||||
* given linker operation --- you only pay for what you use. In addition:
|
||||
*
|
||||
* - Array lists grow as needed (memory is reallocated as necessary)
|
||||
* - Data is kept contiguously (no unused holes in between elements)
|
||||
* at the beginning of the data area. This locality has
|
||||
* good cache behavior, as access to adjacent items are
|
||||
* highly likely to be in the same page of memory.
|
||||
* - Insert/Delete operations at the end of the list are very
|
||||
* efficient. However, insert/delete operations elsewhere
|
||||
* will cause a relatively expensive overlapped memory
|
||||
* copy of the data following the insert/delete location.
|
||||
* - As with any generic memory alloctor (i.e. malloc()/free()),
|
||||
* array lists are not type safe for the data they contain.
|
||||
* Data is managed as (void *) pointers to data of a given
|
||||
* length, so the Alist module cannot prevent the caller from
|
||||
* inserting/extracting the wrong type of data. The caller
|
||||
* must guard against this.
|
||||
* - To free an array list, simply call the standard free() function
|
||||
* on the list pointer.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Aliste is used to represent list indexes, offsets, and sizes.
|
||||
*/
|
||||
typedef size_t Aliste;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Alist is used to hold non-pointer items --- usually structs:
|
||||
* - There must be an even number of Aliste fields before the
|
||||
* al_data field. This ensures that al_data will have
|
||||
* an alignment of 8, no matter whether sizeof(Aliste)
|
||||
* is 4 or 8. That means that al_data will have sufficient
|
||||
* alignment for any use, just like memory allocated via
|
||||
* malloc().
|
||||
* - al_nitems and al_next are redundant, in that they are
|
||||
* directly related:
|
||||
* al_next = al_nitems * al_size
|
||||
* We do this to make ALIST_TRAVERSE_BYOFFSET maximally
|
||||
* efficient. This doesn't waste space, because of the
|
||||
* requirement to have an even # of Alist fields (above).
|
||||
*
|
||||
* Note that Alists allow the data to be referenced by 0 based array
|
||||
* index, or by their byte offset from the start of the Alist memory
|
||||
* allocation. The index form is preferred for most use, as it is simpler.
|
||||
* However, by-offset access is used by rtld link maps, and this ability
|
||||
* is convenient in that case.
|
||||
*/
|
||||
typedef struct {
|
||||
Aliste al_arritems; /* # of items in al_data allocation */
|
||||
Aliste al_nitems; /* # items (index of next avail item) */
|
||||
Aliste al_next; /* offset of next available al_data[] */
|
||||
Aliste al_size; /* size of each al_data[] item */
|
||||
void *al_data[1]; /* data (can grow) */
|
||||
} Alist;
|
||||
|
||||
/*
|
||||
* APlist is a variant of Alist that contains pointers. There are several
|
||||
* benefits to this special type:
|
||||
* - API is simpler
|
||||
* - Pointers are used directly, instead of requiring a
|
||||
* pointer-to-pointer double indirection.
|
||||
* - The implementation is slightly more efficient.
|
||||
* - Operations that make particular sense for pointers
|
||||
* can be supported without confusing the API for the
|
||||
* regular Alists.
|
||||
*/
|
||||
typedef struct {
|
||||
Aliste apl_arritems; /* # of items in apl_data allocation */
|
||||
Aliste apl_nitems; /* # items (index of next avail item) */
|
||||
void *apl_data[1]; /* data area: (arrcnt * size) bytes */
|
||||
} APlist;
|
||||
|
||||
|
||||
/*
|
||||
* The ALIST_OFF_DATA and APLIST_OFF_DATA macros give the byte offset
|
||||
* from the start of an array list to the first byte of the data area
|
||||
* used to hold user data. The same trick used by the standard offsetof()
|
||||
* macro is used.
|
||||
*/
|
||||
#define ALIST_OFF_DATA ((size_t)(((Alist *)0)->al_data))
|
||||
#define APLIST_OFF_DATA ((size_t)(((APlist *)0)->apl_data))
|
||||
|
||||
|
||||
/*
|
||||
* The TRAVERSE macros are intended to be used within a for(), and
|
||||
* cause the resulting loop to iterate over each item in the loop,
|
||||
* in order.
|
||||
* ALIST_TRAVERSE: Traverse over the items in an Alist,
|
||||
* using the zero based item array index to refer to
|
||||
* each item.
|
||||
* ALIST_TRAVERSE_BY_OFFSET: Traverse over the items in an
|
||||
* Alist using the byte offset from the head of the
|
||||
* Alist pointer to refer to each item. It should be noted
|
||||
* that the first such offset is given by ALIST_OFF_DATA,
|
||||
* and as such, there will never be a 0 offset. Some code
|
||||
* uses this fact to treat 0 as a reserved value with
|
||||
* special meaning.
|
||||
*
|
||||
* By-offset access is convenient for some parts of
|
||||
* rtld, where a value of 0 is used to indicate an
|
||||
* uninitialized link map control.
|
||||
*
|
||||
* APLIST_TRAVERSE: Traverse over the pointers in an APlist, using
|
||||
* the zero based item array index to refer to each pointer.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Within the loop:
|
||||
*
|
||||
* LIST - Pointer to Alist structure for list
|
||||
* IDX - The current item index
|
||||
* OFF - The current item offset
|
||||
* DATA - Pointer to item
|
||||
*/
|
||||
#define ALIST_TRAVERSE(LIST, IDX, DATA) \
|
||||
(IDX) = 0, \
|
||||
((LIST) != NULL) && ((DATA) = (void *)(LIST)->al_data); \
|
||||
\
|
||||
((LIST) != NULL) && ((IDX) < (LIST)->al_nitems); \
|
||||
\
|
||||
(IDX)++, \
|
||||
(DATA) = (void *) (((LIST)->al_size * (IDX)) + (char *)(LIST)->al_data)
|
||||
|
||||
#define ALIST_TRAVERSE_BY_OFFSET(LIST, OFF, DATA) \
|
||||
(((LIST) != NULL) && ((OFF) = ALIST_OFF_DATA) && \
|
||||
(((DATA) = (void *)((char *)(LIST) + (OFF))))); \
|
||||
\
|
||||
(((LIST) != NULL) && ((OFF) < (LIST)->al_next)); \
|
||||
\
|
||||
(((OFF) += ((LIST)->al_size)), \
|
||||
((DATA) = (void *)((char *)(LIST) + (OFF))))
|
||||
|
||||
/*
|
||||
* Within the loop:
|
||||
*
|
||||
* LIST - Pointer to APlist structure for list
|
||||
* IDX - The current item index
|
||||
* PTR - item value
|
||||
*
|
||||
* Note that this macro is designed to ensure that PTR retains the
|
||||
* value of the final pointer in the list after exiting the for loop,
|
||||
* and to avoid dereferencing an out of range address. This is done by
|
||||
* doing the dereference in the middle expression, using the comma
|
||||
* operator to ensure that a NULL pointer won't stop the loop.
|
||||
*/
|
||||
#define APLIST_TRAVERSE(LIST, IDX, PTR) \
|
||||
(IDX) = 0; \
|
||||
\
|
||||
((LIST) != NULL) && ((IDX) < (LIST)->apl_nitems) && \
|
||||
(((PTR) = ((LIST)->apl_data)[IDX]), 1); \
|
||||
\
|
||||
(IDX)++
|
||||
|
||||
|
||||
/*
|
||||
* Possible values returned by aplist_test()
|
||||
*/
|
||||
typedef enum {
|
||||
ALE_ALLOCFAIL = 0, /* Memory allocation error */
|
||||
ALE_EXISTS = 1, /* alist entry already exists */
|
||||
ALE_NOTFND = 2, /* item not found and insert not required */
|
||||
ALE_CREATE = 3 /* alist entry created */
|
||||
} aplist_test_t;
|
||||
|
||||
|
||||
/*
|
||||
* Access to an Alist item by index or offset. This is needed because the
|
||||
* size of an item in an Alist is not known by the C compiler, and we
|
||||
* have to do the indexing arithmetic explicitly.
|
||||
*
|
||||
* For an APlist, index the apl_data field directly --- No macro is needed.
|
||||
*/
|
||||
#define alist_item(_lp, _idx) \
|
||||
((void *)(ALIST_OFF_DATA + ((_idx) * (_lp)->al_size) + (char *)(_lp)))
|
||||
#define alist_item_by_offset(_lp, _off) \
|
||||
((void *)((_off) + (char *)(_lp)))
|
||||
|
||||
/*
|
||||
* # of items currently found in a list. These macros handle the case
|
||||
* where the list has not been allocated yet.
|
||||
*/
|
||||
#define alist_nitems(_lp) (((_lp) == NULL) ? 0 : (_lp)->al_nitems)
|
||||
#define aplist_nitems(_lp) (((_lp) == NULL) ? 0 : (_lp)->apl_nitems)
|
||||
|
||||
|
||||
extern void *alist_append(Alist **, const void *, size_t, Aliste);
|
||||
extern void alist_delete(Alist *, Aliste *);
|
||||
extern void alist_delete_by_offset(Alist *, Aliste *);
|
||||
extern void *alist_insert(Alist **, const void *, size_t,
|
||||
Aliste, Aliste);
|
||||
extern void *alist_insert_by_offset(Alist **, const void *, size_t,
|
||||
Aliste, Aliste);
|
||||
extern void alist_reset(Alist *);
|
||||
|
||||
|
||||
extern void *aplist_append(APlist **, const void *, Aliste);
|
||||
extern void aplist_delete(APlist *, Aliste *);
|
||||
extern int aplist_delete_value(APlist *, const void *);
|
||||
extern void *aplist_insert(APlist **, const void *,
|
||||
Aliste, Aliste idx);
|
||||
extern void aplist_reset(APlist *);
|
||||
extern aplist_test_t aplist_test(APlist **, const void *, Aliste);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _ALIST_H */
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,296 @@
|
||||
/*
|
||||
* CDDL HEADER START
|
||||
*
|
||||
* The contents of this file are subject to the terms of the
|
||||
* Common Development and Distribution License (the "License").
|
||||
* You may not use this file except in compliance with the License.
|
||||
*
|
||||
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
|
||||
* or http://www.opensolaris.org/os/licensing.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
*
|
||||
* When distributing Covered Code, include this CDDL HEADER in each
|
||||
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
|
||||
* If applicable, add the following below this CDDL HEADER, with the
|
||||
* fields enclosed by brackets "[]" replaced with your own identifying
|
||||
* information: Portions Copyright [yyyy] [name of copyright owner]
|
||||
*
|
||||
* CDDL HEADER END
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 AT&T
|
||||
* All Rights Reserved
|
||||
*
|
||||
*
|
||||
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
|
||||
* Use is subject to license terms.
|
||||
*
|
||||
* Global include file for all sgs.
|
||||
*/
|
||||
|
||||
#ifndef _SGS_H
|
||||
#define _SGS_H
|
||||
|
||||
#pragma ident "%Z%%M% %I% %E% SMI"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* <assert.h> keys off of NDEBUG */
|
||||
#ifdef DEBUG
|
||||
#undef NDEBUG
|
||||
#else
|
||||
#define NDEBUG
|
||||
#endif
|
||||
|
||||
#ifndef _ASM
|
||||
#include <sys/types.h>
|
||||
#if defined(sun)
|
||||
#include <sys/machelf.h>
|
||||
#else
|
||||
#include <elf.h>
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#include <libelf.h>
|
||||
#include <assert.h>
|
||||
#include <alist.h>
|
||||
#endif /* _ASM */
|
||||
|
||||
/*
|
||||
* Software identification.
|
||||
*/
|
||||
#define SGS ""
|
||||
#define SGU_PKG "Software Generation Utilities"
|
||||
#define SGU_REL "(SGU) Solaris-ELF (4.0)"
|
||||
|
||||
|
||||
#ifndef _ASM
|
||||
|
||||
/*
|
||||
* link_ver_string[] contains a version string for use by the link-editor
|
||||
* and all other linker components. It is found in libconv, and is
|
||||
* generated by sgs/libconv/common/bld_vernote.ksh. That script produces
|
||||
* libconv/{plat}/vernote.s, which is in turn assembled/linked into
|
||||
* libconv.
|
||||
*/
|
||||
extern const char link_ver_string[];
|
||||
/*
|
||||
* Macro to round to next double word boundary.
|
||||
*/
|
||||
#define S_DROUND(x) (((x) + sizeof (double) - 1) & ~(sizeof (double) - 1))
|
||||
|
||||
/*
|
||||
* General align and round macros.
|
||||
*/
|
||||
#define S_ALIGN(x, a) ((x) & ~(((a) ? (a) : 1) - 1))
|
||||
#define S_ROUND(x, a) ((x) + (((a) ? (a) : 1) - 1) & ~(((a) ? (a) : 1) - 1))
|
||||
|
||||
/*
|
||||
* Bit manipulation macros; generic bit mask and is `v' in the range
|
||||
* supportable in `n' bits?
|
||||
*/
|
||||
#define S_MASK(n) ((1 << (n)) -1)
|
||||
#define S_INRANGE(v, n) (((-(1 << (n)) - 1) < (v)) && ((v) < (1 << (n))))
|
||||
|
||||
|
||||
/*
|
||||
* Yet another definition of the OFFSETOF macro, used with the AVL routines.
|
||||
*/
|
||||
#define SGSOFFSETOF(s, m) ((size_t)(&(((s *)0)->m)))
|
||||
|
||||
/*
|
||||
* When casting between integer and pointer types, gcc will complain
|
||||
* if the integer type used is not large enough to hold the pointer
|
||||
* value without loss. Although a dubious practice in general, this
|
||||
* is sometimes done by design. In those cases, the general solution
|
||||
* is to introduce an intermediate cast to widen the integer value. The
|
||||
* CAST_PTRINT macro does this, and its use documents the fact that
|
||||
* the programmer is doing that sort of cast.
|
||||
*/
|
||||
#ifdef __GNUC__
|
||||
#define CAST_PTRINT(cast, value) ((cast)(uintptr_t)value)
|
||||
#else
|
||||
#define CAST_PTRINT(cast, value) ((cast)value)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* General typedefs.
|
||||
*/
|
||||
typedef enum {
|
||||
FALSE = 0,
|
||||
TRUE = 1
|
||||
} Boolean;
|
||||
|
||||
/*
|
||||
* Types of errors (used by eprintf()), together with a generic error return
|
||||
* value.
|
||||
*/
|
||||
typedef enum {
|
||||
ERR_NONE,
|
||||
ERR_WARNING,
|
||||
ERR_FATAL,
|
||||
ERR_ELF,
|
||||
ERR_NUM /* Must be last */
|
||||
} Error;
|
||||
|
||||
#if defined(_LP64) && !defined(_ELF64)
|
||||
#define S_ERROR (~(uint_t)0)
|
||||
#else
|
||||
#define S_ERROR (~(uintptr_t)0)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* LIST_TRAVERSE() is used as the only "argument" of a "for" loop to
|
||||
* traverse a linked list. The node pointer `node' is set to each node in
|
||||
* turn and the corresponding data pointer is copied to `data'. The macro
|
||||
* is used as in
|
||||
* for (LIST_TRAVERSE(List *list, Listnode *node, void *data)) {
|
||||
* process(data);
|
||||
* }
|
||||
*/
|
||||
#define LIST_TRAVERSE(L, N, D) \
|
||||
(void) (((N) = (L)->head) != NULL && ((D) = (N)->data) != NULL); \
|
||||
(N) != NULL; \
|
||||
(void) (((N) = (N)->next) != NULL && ((D) = (N)->data) != NULL)
|
||||
|
||||
typedef struct listnode Listnode;
|
||||
typedef struct list List;
|
||||
|
||||
struct listnode { /* a node on a linked list */
|
||||
void *data; /* the data item */
|
||||
Listnode *next; /* the next element */
|
||||
};
|
||||
|
||||
struct list { /* a linked list */
|
||||
Listnode *head; /* the first element */
|
||||
Listnode *tail; /* the last element */
|
||||
};
|
||||
|
||||
|
||||
#ifdef _SYSCALL32
|
||||
typedef struct listnode32 Listnode32;
|
||||
typedef struct list32 List32;
|
||||
|
||||
struct listnode32 { /* a node on a linked list */
|
||||
Elf32_Addr data; /* the data item */
|
||||
Elf32_Addr next; /* the next element */
|
||||
};
|
||||
|
||||
struct list32 { /* a linked list */
|
||||
Elf32_Addr head; /* the first element */
|
||||
Elf32_Addr tail; /* the last element */
|
||||
};
|
||||
#endif /* _SYSCALL32 */
|
||||
|
||||
|
||||
/*
|
||||
* Structure to maintain rejected files elf information. Files that are not
|
||||
* applicable to the present link-edit are rejected and a search for an
|
||||
* appropriate file may be resumed. The first rejected files information is
|
||||
* retained so that a better error diagnostic can be given should an appropriate
|
||||
* file not be located.
|
||||
*/
|
||||
typedef struct {
|
||||
ushort_t rej_type; /* SGS_REJ_ value */
|
||||
ushort_t rej_flag; /* additional information */
|
||||
uint_t rej_info; /* numeric and string information */
|
||||
const char *rej_str; /* associated with error */
|
||||
const char *rej_name; /* object name - expanded library */
|
||||
/* name and archive members */
|
||||
} Rej_desc;
|
||||
|
||||
#define SGS_REJ_NONE 0
|
||||
#define SGS_REJ_MACH 1 /* wrong ELF machine type */
|
||||
#define SGS_REJ_CLASS 2 /* wrong ELF class (32-bit/64-bit) */
|
||||
#define SGS_REJ_DATA 3 /* wrong ELF data format (MSG/LSB) */
|
||||
#define SGS_REJ_TYPE 4 /* bad ELF type */
|
||||
#define SGS_REJ_BADFLAG 5 /* bad ELF flags value */
|
||||
#define SGS_REJ_MISFLAG 6 /* mismatched ELF flags value */
|
||||
#define SGS_REJ_VERSION 7 /* mismatched ELF/lib version */
|
||||
#define SGS_REJ_HAL 8 /* HAL R1 extensions required */
|
||||
#define SGS_REJ_US3 9 /* Sun UltraSPARC III extensions */
|
||||
/* required */
|
||||
#define SGS_REJ_STR 10 /* generic error - info is a string */
|
||||
#define SGS_REJ_UNKFILE 11 /* unknown file type */
|
||||
#define SGS_REJ_HWCAP_1 12 /* hardware capabilities mismatch */
|
||||
|
||||
/*
|
||||
* For those source files used both inside and outside of the
|
||||
* libld source base (tools/common/string_table.c) we can
|
||||
* automatically switch between the allocation models
|
||||
* based off of the 'cc -DUSE_LIBLD_MALLOC' flag.
|
||||
*/
|
||||
#ifdef USE_LIBLD_MALLOC
|
||||
#define calloc(x, a) libld_malloc(((size_t)x) * ((size_t)a))
|
||||
#define free libld_free
|
||||
#define malloc libld_malloc
|
||||
#define realloc libld_realloc
|
||||
|
||||
#define libld_calloc(x, a) libld_malloc(((size_t)x) * ((size_t)a))
|
||||
extern void libld_free(void *);
|
||||
extern void *libld_malloc(size_t);
|
||||
extern void *libld_realloc(void *, size_t);
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Data structures (defined in libld.h).
|
||||
*/
|
||||
typedef struct ent_desc Ent_desc;
|
||||
typedef struct group_desc Group_desc;
|
||||
typedef struct ifl_desc Ifl_desc;
|
||||
typedef struct is_desc Is_desc;
|
||||
typedef struct isa_desc Isa_desc;
|
||||
typedef struct isa_opt Isa_opt;
|
||||
typedef struct mv_desc Mv_desc;
|
||||
typedef struct ofl_desc Ofl_desc;
|
||||
typedef struct os_desc Os_desc;
|
||||
typedef struct rel_cache Rel_cache;
|
||||
typedef struct sdf_desc Sdf_desc;
|
||||
typedef struct sdv_desc Sdv_desc;
|
||||
typedef struct sg_desc Sg_desc;
|
||||
typedef struct sort_desc Sort_desc;
|
||||
typedef struct sec_order Sec_order;
|
||||
typedef struct sym_desc Sym_desc;
|
||||
typedef struct sym_aux Sym_aux;
|
||||
typedef struct sym_avlnode Sym_avlnode;
|
||||
typedef struct uts_desc Uts_desc;
|
||||
typedef struct ver_desc Ver_desc;
|
||||
typedef struct ver_index Ver_index;
|
||||
typedef struct audit_desc Audit_desc;
|
||||
typedef struct audit_info Audit_info;
|
||||
typedef struct audit_list Audit_list;
|
||||
|
||||
/*
|
||||
* Data structures defined in machrel.h.
|
||||
*/
|
||||
typedef struct rel_desc Rel_desc;
|
||||
|
||||
/*
|
||||
* Data structures defined in rtld.h.
|
||||
*/
|
||||
typedef struct lm_list Lm_list;
|
||||
#ifdef _SYSCALL32
|
||||
typedef struct lm_list32 Lm_list32;
|
||||
#endif /* _SYSCALL32 */
|
||||
|
||||
/*
|
||||
* For the various utilities that include sgs.h
|
||||
*/
|
||||
extern int assfail(const char *, const char *, int);
|
||||
extern void eprintf(Lm_list *, Error, const char *, ...);
|
||||
extern char *sgs_demangle(char *);
|
||||
extern uint_t sgs_str_hash(const char *);
|
||||
extern uint_t findprime(uint_t);
|
||||
|
||||
#endif /* _ASM */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* _SGS_H */
|
||||
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* CDDL HEADER START
|
||||
*
|
||||
* The contents of this file are subject to the terms of the
|
||||
* Common Development and Distribution License (the "License").
|
||||
* You may not use this file except in compliance with the License.
|
||||
*
|
||||
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
|
||||
* or http://www.opensolaris.org/os/licensing.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
*
|
||||
* When distributing Covered Code, include this CDDL HEADER in each
|
||||
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
|
||||
* If applicable, add the following below this CDDL HEADER, with the
|
||||
* fields enclosed by brackets "[]" replaced with your own identifying
|
||||
* information: Portions Copyright [yyyy] [name of copyright owner]
|
||||
*
|
||||
* CDDL HEADER END
|
||||
*/
|
||||
/*
|
||||
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
|
||||
* Use is subject to license terms.
|
||||
*/
|
||||
|
||||
#ifndef _STRING_TABLE_DOT_H
|
||||
#define _STRING_TABLE_DOT_H
|
||||
|
||||
#pragma ident "%Z%%M% %I% %E% SMI"
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Exported, opaque string table handle.
|
||||
*/
|
||||
typedef struct str_tbl Str_tbl;
|
||||
|
||||
/*
|
||||
* Exported string table functions.
|
||||
*/
|
||||
extern int st_delstring(Str_tbl *, const char *);
|
||||
extern void st_destroy(Str_tbl *);
|
||||
extern size_t st_getstrtab_sz(Str_tbl *);
|
||||
extern const char *st_getstrbuf(Str_tbl *);
|
||||
extern int st_insert(Str_tbl *, const char *);
|
||||
extern Str_tbl *st_new(uint_t);
|
||||
extern int st_setstrbuf(Str_tbl *, char *, size_t);
|
||||
extern int st_setstring(Str_tbl *, const char *, size_t *);
|
||||
|
||||
/*
|
||||
* Exported flags values for st_new().
|
||||
*/
|
||||
#define FLG_STNEW_COMPRESS 0x01 /* compressed string table */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _STRING_TABLE_DOT_H */
|
||||
@@ -0,0 +1,62 @@
|
||||
#
|
||||
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# CDDL HEADER START
|
||||
#
|
||||
# The contents of this file are subject to the terms of the
|
||||
# Common Development and Distribution License (the "License").
|
||||
# You may not use this file except in compliance with the License.
|
||||
#
|
||||
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
|
||||
# or http://www.opensolaris.org/os/licensing.
|
||||
# See the License for the specific language governing permissions
|
||||
# and limitations under the License.
|
||||
#
|
||||
# When distributing Covered Code, include this CDDL HEADER in each
|
||||
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
|
||||
# If applicable, add the following below this CDDL HEADER, with the
|
||||
# fields enclosed by brackets "[]" replaced with your own identifying
|
||||
# information: Portions Copyright [yyyy] [name of copyright owner]
|
||||
#
|
||||
# CDDL HEADER END
|
||||
#
|
||||
# ident "%Z%%M% %I% %E% SMI"
|
||||
#
|
||||
#
|
||||
# Global message identifiers for the sgs utilities. This information is read
|
||||
# by sgsmsg(1l) using the -i option.
|
||||
# Each utilities message file references one of the `MSGID' identifiers. Its
|
||||
# associated numeric setid is used when creating catgets(3c) messages, the
|
||||
# string domain is used when creating gettext(3i) messages.
|
||||
#
|
||||
|
||||
mesgid setid domain
|
||||
|
||||
MSG_ID_RTLD 1 SUNW_OST_SGS /* sgs/rtld */
|
||||
MSG_ID_LIBRTLD 2 SUNW_OST_SGS /* sgs/librtld */
|
||||
MSG_ID_LIBLD 3 SUNW_OST_SGS /* sgs/libld */
|
||||
MSG_ID_LIBLDDBG 4 SUNW_OST_SGS /* sgs/liblddbg */
|
||||
MSG_ID_LIBLDSTAB 5 SUNW_OST_SGS /* sgs/libldstab */
|
||||
MSG_ID_LIBRTLD_DB 6 SUNW_OST_SGS /* sgs/librtld_db */
|
||||
MSG_ID_LIBPROF 7 SUNW_OST_SGS /* sgs/libprof */
|
||||
MSG_ID_LIBCRLE 8 SUNW_OST_SGS /* sgs/libcrle */
|
||||
|
||||
MSG_ID_LIBELF 10 SUNW_OST_SGS /* sgs/libelf */
|
||||
|
||||
MSG_ID_LD 20 SUNW_OST_SGS /* sgs/ld */
|
||||
MSG_ID_LDD 21 SUNW_OST_SGS /* sgs/ldd */
|
||||
MSG_ID_PVS 22 SUNW_OST_SGS /* sgs/pvs */
|
||||
MSG_ID_CRLE 23 SUNW_OST_SGS /* sgs/crle */
|
||||
MSG_ID_ELFDUMP 24 SUNW_OST_SGS /* sgs/elfdump */
|
||||
MSG_ID_MOE 25 SUNW_OST_SGS /* sgs/moe */
|
||||
MSG_ID_ELFEDIT 26 SUNW_OST_SGS /* sgs/elfedit */
|
||||
MSG_ID_ELFEDIT_CAP 27 SUNW_OST_SGS /* cap: */
|
||||
MSG_ID_ELFEDIT_DYN 27 SUNW_OST_SGS /* dyn: */
|
||||
MSG_ID_ELFEDIT_EHDR 27 SUNW_OST_SGS /* ehdr: */
|
||||
MSG_ID_ELFEDIT_PHDR 27 SUNW_OST_SGS /* phdr: */
|
||||
MSG_ID_ELFEDIT_SHDR 27 SUNW_OST_SGS /* shdr: */
|
||||
MSG_ID_ELFEDIT_STR 27 SUNW_OST_SGS /* str: */
|
||||
MSG_ID_ELFEDIT_SYM 27 SUNW_OST_SGS /* sym: */
|
||||
MSG_ID_ELFEDIT_SYMINFO 27 SUNW_OST_SGS /* syminfo: */
|
||||
MSG_ID_ELFWRAP 28 SUNW_OST_SGS /* sgs/elfwrap */
|
||||
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
* CDDL HEADER START
|
||||
*
|
||||
* The contents of this file are subject to the terms of the
|
||||
* Common Development and Distribution License, Version 1.0 only
|
||||
* (the "License"). You may not use this file except in compliance
|
||||
* with the License.
|
||||
*
|
||||
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
|
||||
* or http://www.opensolaris.org/os/licensing.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
*
|
||||
* When distributing Covered Code, include this CDDL HEADER in each
|
||||
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
|
||||
* If applicable, add the following below this CDDL HEADER, with the
|
||||
* fields enclosed by brackets "[]" replaced with your own identifying
|
||||
* information: Portions Copyright [yyyy] [name of copyright owner]
|
||||
*
|
||||
* CDDL HEADER END
|
||||
*/
|
||||
/*
|
||||
* Copyright 2003 Sun Microsystems, Inc. All rights reserved.
|
||||
* Use is subject to license terms.
|
||||
*/
|
||||
|
||||
#pragma ident "%Z%%M% %I% %E% SMI"
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sgs.h>
|
||||
|
||||
/*
|
||||
* function that will find a prime'ish number. Usefull for
|
||||
* hashbuckets and related things.
|
||||
*/
|
||||
uint_t
|
||||
findprime(uint_t count)
|
||||
{
|
||||
uint_t h, f;
|
||||
|
||||
if (count <= 3)
|
||||
return (3);
|
||||
|
||||
|
||||
/*
|
||||
* Check to see if divisible by two, if so
|
||||
* increment.
|
||||
*/
|
||||
if ((count & 0x1) == 0)
|
||||
count++;
|
||||
|
||||
for (h = count, f = 2; f * f <= h; f++)
|
||||
if ((h % f) == 0)
|
||||
h += f = 1;
|
||||
return (h);
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,685 @@
|
||||
/*
|
||||
* CDDL HEADER START
|
||||
*
|
||||
* The contents of this file are subject to the terms of the
|
||||
* Common Development and Distribution License (the "License").
|
||||
* You may not use this file except in compliance with the License.
|
||||
*
|
||||
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
|
||||
* or http://www.opensolaris.org/os/licensing.
|
||||
* See the License for the specific language governing permissions
|
||||
* and limitations under the License.
|
||||
*
|
||||
* When distributing Covered Code, include this CDDL HEADER in each
|
||||
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
|
||||
* If applicable, add the following below this CDDL HEADER, with the
|
||||
* fields enclosed by brackets "[]" replaced with your own identifying
|
||||
* information: Portions Copyright [yyyy] [name of copyright owner]
|
||||
*
|
||||
* CDDL HEADER END
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
|
||||
* Use is subject to license terms.
|
||||
*/
|
||||
|
||||
#pragma ident "%Z%%M% %I% %E% SMI"
|
||||
|
||||
#include <_string_table.h>
|
||||
#include <strings.h>
|
||||
#include <sgs.h>
|
||||
#include <stdio.h>
|
||||
|
||||
/*
|
||||
* This file provides the interfaces to build a Str_tbl suitable for use by
|
||||
* either the sgsmsg message system, or a standard ELF string table (SHT_STRTAB)
|
||||
* as created by ld(1).
|
||||
*
|
||||
* There are two modes which can be used when constructing a string table:
|
||||
*
|
||||
* st_new(0)
|
||||
* standard string table - no compression. This is the
|
||||
* traditional, fast method.
|
||||
*
|
||||
* st_new(FLG_STTAB_COMPRESS)
|
||||
* builds a compressed string table which both eliminates
|
||||
* duplicate strings, and permits strings with common suffixes
|
||||
* (atexit vs. exit) to overlap in the table. This provides space
|
||||
* savings for many string tables. Although more work than the
|
||||
* traditional method, the algorithms used are designed to scale
|
||||
* and keep any overhead at a minimum.
|
||||
*
|
||||
* These string tables are built with a common interface in a two-pass manner.
|
||||
* The first pass finds all of the strings required for the string-table and
|
||||
* calculates the size required for the final string table.
|
||||
*
|
||||
* The second pass allocates the string table, populates the strings into the
|
||||
* table and returns the offsets the strings have been assigned.
|
||||
*
|
||||
* The calling sequence to build and populate a string table is:
|
||||
*
|
||||
* st_new(); // initialize strtab
|
||||
*
|
||||
* st_insert(st1); // first pass of strings ...
|
||||
* // calculates size required for
|
||||
* // string table
|
||||
*
|
||||
* st_delstring(st?); // remove string previously
|
||||
* // inserted
|
||||
* st_insert(stN);
|
||||
*
|
||||
* st_getstrtab_sz(); // freezes strtab and computes
|
||||
* // size of table.
|
||||
*
|
||||
* st_setstrbuf(); // associates a final destination
|
||||
* // for the string table
|
||||
*
|
||||
* st_setstring(st1); // populate the string table
|
||||
* ... // offsets are based off of second
|
||||
* // pass through the string table
|
||||
* st_setstring(stN);
|
||||
*
|
||||
* st_destroy(); // tear down string table
|
||||
* // structures.
|
||||
*
|
||||
* String Suffix Compression Algorithm:
|
||||
*
|
||||
* Here's a quick high level overview of the Suffix String
|
||||
* compression algorithm used. First - the heart of the algorithm
|
||||
* is a Hash table list which represents a dictionary of all unique
|
||||
* strings inserted into the string table. The hash function for
|
||||
* this table is a standard string hash except that the hash starts
|
||||
* at the last character in the string (&str[n - 1]) and works towards
|
||||
* the first character in the function (&str[0]). As we compute the
|
||||
* HASH value for a given string, we also compute the hash values
|
||||
* for all of the possible suffix strings for that string.
|
||||
*
|
||||
* As we compute the hash - at each character see if the current
|
||||
* suffix string for that hash is already present in the table. If
|
||||
* it is, and the string is a master string. Then change that
|
||||
* string to a suffix string of the new string being inserted.
|
||||
*
|
||||
* When the final hash value is found (hash for str[0...n]), check
|
||||
* to see if it is in the hash table - if so increment the reference
|
||||
* count for the string. If it is not yet in the table, insert a
|
||||
* new hash table entry for a master string.
|
||||
*
|
||||
* The above method will find all suffixes of a given string given
|
||||
* that the strings are inserted from shortest to longest. That is
|
||||
* why this is a two phase method, we first collect all of the
|
||||
* strings and store them based off of their length in an AVL tree.
|
||||
* Once all of the strings have been submitted we then start the
|
||||
* hash table build by traversing the AVL tree in order and
|
||||
* inserting the strings from shortest to longest as described
|
||||
* above.
|
||||
*/
|
||||
|
||||
/* LINTLIBRARY */
|
||||
|
||||
static int
|
||||
avl_len_compare(const void *n1, const void *n2)
|
||||
{
|
||||
size_t len1, len2;
|
||||
|
||||
len1 = ((LenNode *)n1)->ln_strlen;
|
||||
len2 = ((LenNode *)n2)->ln_strlen;
|
||||
|
||||
if (len1 == len2)
|
||||
return (0);
|
||||
if (len2 < len1)
|
||||
return (1);
|
||||
return (-1);
|
||||
}
|
||||
|
||||
static int
|
||||
avl_str_compare(const void *n1, const void *n2)
|
||||
{
|
||||
const char *str1, *str2;
|
||||
int rc;
|
||||
|
||||
str1 = ((StrNode *)n1)->sn_str;
|
||||
str2 = ((StrNode *)n2)->sn_str;
|
||||
|
||||
rc = strcmp(str1, str2);
|
||||
if (rc > 0)
|
||||
return (1);
|
||||
if (rc < 0)
|
||||
return (-1);
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Return an initialized Str_tbl - returns NULL on failure.
|
||||
*
|
||||
* flags:
|
||||
* FLG_STTAB_COMPRESS - build a compressed string table
|
||||
*/
|
||||
Str_tbl *
|
||||
st_new(uint_t flags)
|
||||
{
|
||||
Str_tbl *stp;
|
||||
|
||||
if ((stp = calloc(sizeof (Str_tbl), 1)) == NULL)
|
||||
return (NULL);
|
||||
|
||||
/*
|
||||
* Start with a leading '\0' - it's tradition.
|
||||
*/
|
||||
stp->st_strsize = stp->st_fullstrsize = stp->st_nextoff = 1;
|
||||
|
||||
/*
|
||||
* Do we compress this string table?
|
||||
*/
|
||||
stp->st_flags = flags;
|
||||
if ((stp->st_flags & FLG_STTAB_COMPRESS) == 0)
|
||||
return (stp);
|
||||
|
||||
if ((stp->st_lentree = calloc(sizeof (avl_tree_t), 1)) == NULL)
|
||||
return (NULL);
|
||||
|
||||
avl_create(stp->st_lentree, &avl_len_compare, sizeof (LenNode),
|
||||
SGSOFFSETOF(LenNode, ln_avlnode));
|
||||
|
||||
return (stp);
|
||||
}
|
||||
|
||||
/*
|
||||
* Insert a new string into the Str_tbl. There are two AVL trees used.
|
||||
*
|
||||
* . The first LenNode AVL tree maintains a tree of nodes based on string
|
||||
* sizes.
|
||||
* . Each LenNode maintains a StrNode AVL tree for each string. Large
|
||||
* applications have been known to contribute thousands of strings of
|
||||
* the same size. Should strings need to be removed (-z ignore), then
|
||||
* the string AVL tree makes this removal efficient and scalable.
|
||||
*/
|
||||
int
|
||||
st_insert(Str_tbl *stp, const char *str)
|
||||
{
|
||||
size_t len;
|
||||
StrNode *snp, sn = { 0 };
|
||||
LenNode *lnp, ln = { 0 };
|
||||
avl_index_t where;
|
||||
|
||||
/*
|
||||
* String table can't have been cooked
|
||||
*/
|
||||
assert((stp->st_flags & FLG_STTAB_COOKED) == 0);
|
||||
|
||||
/*
|
||||
* Null strings always point to the head of the string
|
||||
* table - no reason to keep searching.
|
||||
*/
|
||||
if ((len = strlen(str)) == 0)
|
||||
return (0);
|
||||
|
||||
stp->st_fullstrsize += len + 1;
|
||||
stp->st_strcnt++;
|
||||
|
||||
if ((stp->st_flags & FLG_STTAB_COMPRESS) == 0)
|
||||
return (0);
|
||||
|
||||
/*
|
||||
* From the controlling string table, determine which LenNode AVL node
|
||||
* provides for this string length. If the node doesn't exist, insert
|
||||
* a new node to represent this string length.
|
||||
*/
|
||||
ln.ln_strlen = len;
|
||||
if ((lnp = avl_find(stp->st_lentree, &ln, &where)) == NULL) {
|
||||
if ((lnp = calloc(sizeof (LenNode), 1)) == NULL)
|
||||
return (-1);
|
||||
lnp->ln_strlen = len;
|
||||
avl_insert(stp->st_lentree, lnp, where);
|
||||
|
||||
if ((lnp->ln_strtree = calloc(sizeof (avl_tree_t), 1)) == NULL)
|
||||
return (0);
|
||||
|
||||
avl_create(lnp->ln_strtree, &avl_str_compare, sizeof (StrNode),
|
||||
SGSOFFSETOF(StrNode, sn_avlnode));
|
||||
}
|
||||
|
||||
/*
|
||||
* From the string length AVL node determine whether a StrNode AVL node
|
||||
* provides this string. If the node doesn't exist, insert a new node
|
||||
* to represent this string.
|
||||
*/
|
||||
sn.sn_str = str;
|
||||
if ((snp = avl_find(lnp->ln_strtree, &sn, &where)) == NULL) {
|
||||
if ((snp = calloc(sizeof (StrNode), 1)) == NULL)
|
||||
return (-1);
|
||||
snp->sn_str = str;
|
||||
avl_insert(lnp->ln_strtree, snp, where);
|
||||
}
|
||||
snp->sn_refcnt++;
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Remove a previously inserted string from the Str_tbl.
|
||||
*/
|
||||
int
|
||||
st_delstring(Str_tbl *stp, const char *str)
|
||||
{
|
||||
size_t len;
|
||||
LenNode *lnp, ln = { 0 };
|
||||
StrNode *snp, sn = { 0 };
|
||||
|
||||
/*
|
||||
* String table can't have been cooked
|
||||
*/
|
||||
assert((stp->st_flags & FLG_STTAB_COOKED) == 0);
|
||||
|
||||
len = strlen(str);
|
||||
stp->st_fullstrsize -= len + 1;
|
||||
|
||||
if ((stp->st_flags & FLG_STTAB_COMPRESS) == 0)
|
||||
return (0);
|
||||
|
||||
/*
|
||||
* Determine which LenNode AVL node provides for this string length.
|
||||
*/
|
||||
ln.ln_strlen = len;
|
||||
if ((lnp = avl_find(stp->st_lentree, &ln, 0)) != NULL) {
|
||||
sn.sn_str = str;
|
||||
if ((snp = avl_find(lnp->ln_strtree, &sn, 0)) != NULL) {
|
||||
/*
|
||||
* Reduce the reference count, and if zero remove the
|
||||
* node.
|
||||
*/
|
||||
if (--snp->sn_refcnt == 0)
|
||||
avl_remove(lnp->ln_strtree, snp);
|
||||
return (0);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* No strings of this length, or no string itself - someone goofed.
|
||||
*/
|
||||
return (-1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Tear down a String_Table structure.
|
||||
*/
|
||||
void
|
||||
st_destroy(Str_tbl *stp)
|
||||
{
|
||||
Str_hash *sthash, *psthash;
|
||||
Str_master *mstr, *pmstr;
|
||||
uint_t i;
|
||||
|
||||
/*
|
||||
* cleanup the master strings
|
||||
*/
|
||||
for (mstr = stp->st_mstrlist, pmstr = 0; mstr;
|
||||
mstr = mstr->sm_next) {
|
||||
if (pmstr)
|
||||
free(pmstr);
|
||||
pmstr = mstr;
|
||||
}
|
||||
if (pmstr)
|
||||
free(pmstr);
|
||||
|
||||
if (stp->st_hashbcks) {
|
||||
for (i = 0; i < stp->st_hbckcnt; i++) {
|
||||
for (sthash = stp->st_hashbcks[i], psthash = 0;
|
||||
sthash; sthash = sthash->hi_next) {
|
||||
if (psthash)
|
||||
free(psthash);
|
||||
psthash = sthash;
|
||||
}
|
||||
if (psthash)
|
||||
free(psthash);
|
||||
}
|
||||
free(stp->st_hashbcks);
|
||||
}
|
||||
free(stp);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* For a given string - copy it into the buffer associated with
|
||||
* the string table - and return the offset it has been assigned.
|
||||
*
|
||||
* If a value of '-1' is returned - the string was not found in
|
||||
* the Str_tbl.
|
||||
*/
|
||||
int
|
||||
st_setstring(Str_tbl *stp, const char *str, size_t *stoff)
|
||||
{
|
||||
size_t stlen;
|
||||
uint_t hashval;
|
||||
Str_hash *sthash;
|
||||
Str_master *mstr;
|
||||
int i;
|
||||
|
||||
/*
|
||||
* String table *must* have been previously cooked
|
||||
*/
|
||||
assert(stp->st_strbuf);
|
||||
|
||||
assert(stp->st_flags & FLG_STTAB_COOKED);
|
||||
stlen = strlen(str);
|
||||
/*
|
||||
* Null string always points to head of string table
|
||||
*/
|
||||
if (stlen == 0) {
|
||||
*stoff = 0;
|
||||
return (0);
|
||||
}
|
||||
|
||||
if ((stp->st_flags & FLG_STTAB_COMPRESS) == 0) {
|
||||
size_t _stoff;
|
||||
|
||||
stlen++; /* count for trailing '\0' */
|
||||
_stoff = stp->st_nextoff;
|
||||
/*
|
||||
* Have we overflowed our assigned buffer?
|
||||
*/
|
||||
if ((_stoff + stlen) > stp->st_fullstrsize)
|
||||
return (-1);
|
||||
memcpy(stp->st_strbuf + _stoff, str, stlen);
|
||||
*stoff = _stoff;
|
||||
stp->st_nextoff += stlen;
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Calculate reverse hash for string.
|
||||
*/
|
||||
hashval = HASHSEED;
|
||||
for (i = stlen; i >= 0; i--) {
|
||||
hashval = ((hashval << 5) + hashval) +
|
||||
str[i]; /* h = ((h * 33) + c) */
|
||||
}
|
||||
|
||||
for (sthash = stp->st_hashbcks[hashval % stp->st_hbckcnt]; sthash;
|
||||
sthash = sthash->hi_next) {
|
||||
const char *hstr;
|
||||
|
||||
if (sthash->hi_hashval != hashval)
|
||||
continue;
|
||||
|
||||
hstr = &sthash->hi_mstr->sm_str[sthash->hi_mstr->sm_strlen -
|
||||
sthash->hi_strlen];
|
||||
if (strcmp(str, hstr) == 0)
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* Did we find the string?
|
||||
*/
|
||||
if (sthash == 0)
|
||||
return (-1);
|
||||
|
||||
/*
|
||||
* Has this string been copied into the string table?
|
||||
*/
|
||||
mstr = sthash->hi_mstr;
|
||||
if (mstr->sm_stroff == 0) {
|
||||
size_t mstrlen = mstr->sm_strlen + 1;
|
||||
|
||||
mstr->sm_stroff = stp->st_nextoff;
|
||||
|
||||
/*
|
||||
* Have we overflowed our assigned buffer?
|
||||
*/
|
||||
if ((mstr->sm_stroff + mstrlen) > stp->st_fullstrsize)
|
||||
return (-1);
|
||||
|
||||
(void) memcpy(stp->st_strbuf + mstr->sm_stroff,
|
||||
mstr->sm_str, mstrlen);
|
||||
stp->st_nextoff += mstrlen;
|
||||
}
|
||||
|
||||
/*
|
||||
* Calculate offset of (sub)string.
|
||||
*/
|
||||
*stoff = mstr->sm_stroff + mstr->sm_strlen - sthash->hi_strlen;
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
st_hash_insert(Str_tbl *stp, const char *str, size_t len)
|
||||
{
|
||||
int i;
|
||||
uint_t hashval = HASHSEED;
|
||||
uint_t bckcnt = stp->st_hbckcnt;
|
||||
Str_hash **hashbcks = stp->st_hashbcks;
|
||||
Str_hash *sthash;
|
||||
Str_master *mstr = 0;
|
||||
|
||||
/*
|
||||
* We use a classic 'Bernstein k=33' hash function. But
|
||||
* instead of hashing from the start of the string to the
|
||||
* end, we do it in reverse.
|
||||
*
|
||||
* This way - we are essentially building all of the
|
||||
* suffix hashvalues as we go. We can check to see if
|
||||
* any suffixes already exist in the tree as we generate
|
||||
* the hash.
|
||||
*/
|
||||
for (i = len; i >= 0; i--) {
|
||||
hashval = ((hashval << 5) + hashval) +
|
||||
str[i]; /* h = ((h * 33) + c) */
|
||||
|
||||
for (sthash = hashbcks[hashval % bckcnt];
|
||||
sthash; sthash = sthash->hi_next) {
|
||||
const char *hstr;
|
||||
Str_master *_mstr;
|
||||
|
||||
if (sthash->hi_hashval != hashval)
|
||||
continue;
|
||||
|
||||
_mstr = sthash->hi_mstr;
|
||||
hstr = &_mstr->sm_str[_mstr->sm_strlen -
|
||||
sthash->hi_strlen];
|
||||
|
||||
if (strcmp(&str[i], hstr))
|
||||
continue;
|
||||
|
||||
if (i == 0) {
|
||||
/*
|
||||
* Entry already in table, increment refcnt and
|
||||
* get out.
|
||||
*/
|
||||
sthash->hi_refcnt++;
|
||||
return (0);
|
||||
} else {
|
||||
/*
|
||||
* If this 'suffix' is presently a 'master
|
||||
* string, then take over it's record.
|
||||
*/
|
||||
if (sthash->hi_strlen == _mstr->sm_strlen) {
|
||||
/*
|
||||
* we should only do this once.
|
||||
*/
|
||||
assert(mstr == 0);
|
||||
mstr = _mstr;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Do we need a new master string, or can we take over
|
||||
* one we already found in the table?
|
||||
*/
|
||||
if (mstr == 0) {
|
||||
/*
|
||||
* allocate a new master string
|
||||
*/
|
||||
if ((mstr = calloc(sizeof (Str_hash), 1)) == 0)
|
||||
return (-1);
|
||||
mstr->sm_next = stp->st_mstrlist;
|
||||
stp->st_mstrlist = mstr;
|
||||
stp->st_strsize += len + 1;
|
||||
} else {
|
||||
/*
|
||||
* We are taking over a existing master string, the string size
|
||||
* only increments by the difference between the current string
|
||||
* and the previous master.
|
||||
*/
|
||||
assert(len > mstr->sm_strlen);
|
||||
stp->st_strsize += len - mstr->sm_strlen;
|
||||
}
|
||||
|
||||
if ((sthash = calloc(sizeof (Str_hash), 1)) == 0)
|
||||
return (-1);
|
||||
|
||||
mstr->sm_hashval = sthash->hi_hashval = hashval;
|
||||
mstr->sm_strlen = sthash->hi_strlen = len;
|
||||
mstr->sm_str = str;
|
||||
sthash->hi_refcnt = 1;
|
||||
sthash->hi_mstr = mstr;
|
||||
|
||||
/*
|
||||
* Insert string element into head of hash list
|
||||
*/
|
||||
hashval = hashval % bckcnt;
|
||||
sthash->hi_next = hashbcks[hashval];
|
||||
hashbcks[hashval] = sthash;
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Return amount of space required for the string table.
|
||||
*/
|
||||
size_t
|
||||
st_getstrtab_sz(Str_tbl *stp)
|
||||
{
|
||||
assert(stp->st_fullstrsize > 0);
|
||||
|
||||
if ((stp->st_flags & FLG_STTAB_COMPRESS) == 0) {
|
||||
stp->st_flags |= FLG_STTAB_COOKED;
|
||||
return (stp->st_fullstrsize);
|
||||
}
|
||||
|
||||
if ((stp->st_flags & FLG_STTAB_COOKED) == 0) {
|
||||
LenNode *lnp;
|
||||
void *cookie;
|
||||
|
||||
stp->st_flags |= FLG_STTAB_COOKED;
|
||||
/*
|
||||
* allocate a hash table about the size of # of
|
||||
* strings input.
|
||||
*/
|
||||
stp->st_hbckcnt = findprime(stp->st_strcnt);
|
||||
if ((stp->st_hashbcks =
|
||||
calloc(sizeof (Str_hash), stp->st_hbckcnt)) == NULL)
|
||||
return (0);
|
||||
|
||||
/*
|
||||
* We now walk all of the strings in the list, from shortest to
|
||||
* longest, and insert them into the hashtable.
|
||||
*/
|
||||
if ((lnp = avl_first(stp->st_lentree)) == NULL) {
|
||||
/*
|
||||
* Is it possible we have an empty string table, if so,
|
||||
* the table still contains '\0', so return the size.
|
||||
*/
|
||||
if (avl_numnodes(stp->st_lentree) == 0) {
|
||||
assert(stp->st_strsize == 1);
|
||||
return (stp->st_strsize);
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
||||
while (lnp) {
|
||||
StrNode *snp;
|
||||
|
||||
/*
|
||||
* Walk the string lists and insert them into the hash
|
||||
* list. Once a string is inserted we no longer need
|
||||
* it's entry, so the string can be freed.
|
||||
*/
|
||||
for (snp = avl_first(lnp->ln_strtree); snp;
|
||||
snp = AVL_NEXT(lnp->ln_strtree, snp)) {
|
||||
if (st_hash_insert(stp, snp->sn_str,
|
||||
lnp->ln_strlen) == -1)
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Now that the strings have been copied, walk the
|
||||
* StrNode tree and free all the AVL nodes. Note,
|
||||
* avl_destroy_nodes() beats avl_remove() as the
|
||||
* latter balances the nodes as they are removed.
|
||||
* We just want to tear the whole thing down fast.
|
||||
*/
|
||||
cookie = NULL;
|
||||
while ((snp = avl_destroy_nodes(lnp->ln_strtree,
|
||||
&cookie)) != NULL)
|
||||
free(snp);
|
||||
avl_destroy(lnp->ln_strtree);
|
||||
free(lnp->ln_strtree);
|
||||
lnp->ln_strtree = NULL;
|
||||
|
||||
/*
|
||||
* Move on to the next LenNode.
|
||||
*/
|
||||
lnp = AVL_NEXT(stp->st_lentree, lnp);
|
||||
}
|
||||
|
||||
/*
|
||||
* Now that all of the strings have been freed, walk the
|
||||
* LenNode tree and free all of the AVL nodes. Note,
|
||||
* avl_destroy_nodes() beats avl_remove() as the latter
|
||||
* balances the nodes as they are removed. We just want to
|
||||
* tear the whole thing down fast.
|
||||
*/
|
||||
cookie = NULL;
|
||||
while ((lnp = avl_destroy_nodes(stp->st_lentree,
|
||||
&cookie)) != NULL)
|
||||
free(lnp);
|
||||
avl_destroy(stp->st_lentree);
|
||||
free(stp->st_lentree);
|
||||
stp->st_lentree = 0;
|
||||
}
|
||||
|
||||
assert(stp->st_strsize > 0);
|
||||
assert(stp->st_fullstrsize >= stp->st_strsize);
|
||||
|
||||
return (stp->st_strsize);
|
||||
}
|
||||
|
||||
/*
|
||||
* Associate a buffer with a string table.
|
||||
*/
|
||||
const char *
|
||||
st_getstrbuf(Str_tbl *stp)
|
||||
{
|
||||
return (stp->st_strbuf);
|
||||
}
|
||||
|
||||
int
|
||||
st_setstrbuf(Str_tbl *stp, char *stbuf, size_t bufsize)
|
||||
{
|
||||
assert(stp->st_flags & FLG_STTAB_COOKED);
|
||||
|
||||
if ((stp->st_flags & FLG_STTAB_COMPRESS) == 0) {
|
||||
if (bufsize < stp->st_fullstrsize)
|
||||
return (-1);
|
||||
} else {
|
||||
if (bufsize < stp->st_strsize)
|
||||
return (-1);
|
||||
}
|
||||
|
||||
stp->st_strbuf = stbuf;
|
||||
#ifdef DEBUG
|
||||
/*
|
||||
* for debug builds - start with a stringtable filled in
|
||||
* with '0xff'. This makes it very easy to find wholes
|
||||
* which we failed to fill in - in the strtab.
|
||||
*/
|
||||
memset(stbuf, 0xff, bufsize);
|
||||
stbuf[0] = '\0';
|
||||
#else
|
||||
memset(stbuf, 0x0, bufsize);
|
||||
#endif
|
||||
return (0);
|
||||
}
|
||||
@@ -85,17 +85,6 @@ pool, and is inherently unstable.
|
||||
The precise output of most invocations is not documented, a knowledge of ZFS
|
||||
internals is assumed.
|
||||
.Pp
|
||||
If the
|
||||
.Ar dataset
|
||||
argument does not contain any
|
||||
.Sy /
|
||||
or
|
||||
.Sy @
|
||||
characters, it is interpreted as a pool name.
|
||||
The root dataset can be specified as
|
||||
.Pa pool Ns Sy /
|
||||
(pool name followed by a slash).
|
||||
.Pp
|
||||
When operating on an imported and active pool it is possible, though unlikely,
|
||||
that zdb may interpret inconsistent pool data and behave erratically.
|
||||
.Sh OPTIONS
|
||||
|
||||
@@ -3273,23 +3273,12 @@ main(int argc, char **argv)
|
||||
nvlist_t *policy = NULL;
|
||||
uint64_t max_txg = UINT64_MAX;
|
||||
int rewind = ZPOOL_NEVER_REWIND;
|
||||
char *spa_config_path_env;
|
||||
boolean_t target_is_spa = B_TRUE;
|
||||
|
||||
(void) setrlimit(RLIMIT_NOFILE, &rl);
|
||||
(void) enable_extended_FILE_stdio(-1, -1);
|
||||
|
||||
dprintf_setup(&argc, argv);
|
||||
|
||||
/*
|
||||
* If there is an environment variable SPA_CONFIG_PATH it overrides
|
||||
* default spa_config_path setting. If -U flag is specified it will
|
||||
* override this environment variable settings once again.
|
||||
*/
|
||||
spa_config_path_env = getenv("SPA_CONFIG_PATH");
|
||||
if (spa_config_path_env != NULL)
|
||||
spa_config_path = spa_config_path_env;
|
||||
|
||||
while ((c = getopt(argc, argv, "bcdhilmM:suCDRSAFLXevp:t:U:P")) != -1) {
|
||||
switch (c) {
|
||||
case 'b':
|
||||
@@ -3435,23 +3424,8 @@ main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
if (strpbrk(target, "/@") != NULL) {
|
||||
size_t targetlen;
|
||||
|
||||
target_is_spa = B_FALSE;
|
||||
/*
|
||||
* Remove any trailing slash. Later code would get confused
|
||||
* by it, but we want to allow it so that "pool/" can
|
||||
* indicate that we want to dump the topmost filesystem,
|
||||
* rather than the whole pool.
|
||||
*/
|
||||
targetlen = strlen(target);
|
||||
if (targetlen != 0 && target[targetlen - 1] == '/')
|
||||
target[targetlen - 1] = '\0';
|
||||
}
|
||||
|
||||
if (error == 0) {
|
||||
if (target_is_spa || dump_opt['R']) {
|
||||
if (strpbrk(target, "/@") == NULL || dump_opt['R']) {
|
||||
error = spa_open_rewind(target, &spa, FTAG, policy,
|
||||
NULL);
|
||||
if (error) {
|
||||
|
||||
@@ -27,11 +27,10 @@
|
||||
.\" Copyright (c) 2014, Joyent, Inc. All rights reserved.
|
||||
.\" Copyright (c) 2013, Steven Hartland <[email protected]>
|
||||
.\" Copyright (c) 2014, Xin LI <[email protected]>
|
||||
.\" Copyright (c) 2015, The FreeBSD Foundation, All Rights Reserved.
|
||||
.\"
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd July 30, 2015
|
||||
.Dd April 23, 2014
|
||||
.Dt ZFS 8
|
||||
.Os
|
||||
.Sh NAME
|
||||
@@ -931,7 +930,7 @@ not be used by any other dataset.
|
||||
Disabling checksums is
|
||||
.Em NOT
|
||||
a recommended practice.
|
||||
.It Sy compression Ns = Ns Cm on | off | lzjb | gzip | gzip- Ns Ar N | Cm zle | Cm lz4
|
||||
.It Sy compression Ns = Ns Cm on | off | lzjb | gzip | gzip- Ns Ar N | zle | Cm lz4
|
||||
Controls the compression algorithm used for this dataset. The
|
||||
.CM lzjb
|
||||
compression algorithm is optimized for performance while providing decent data
|
||||
@@ -2611,7 +2610,7 @@ option to verify the name the receive operation would use.
|
||||
Force a rollback of the file system to the most recent snapshot before
|
||||
performing the receive operation. If receiving an incremental replication
|
||||
stream (for example, one generated by
|
||||
.Qq Nm Cm send Fl R Bro Fl i | Fl I Brc ) ,
|
||||
.Qq Nm Cm send Fl R Fi iI ) ,
|
||||
destroy snapshots and file systems that do not exist on the sending side.
|
||||
.El
|
||||
.It Xo
|
||||
|
||||
@@ -588,17 +588,6 @@ finish_progress(char *done)
|
||||
free(pt_header);
|
||||
pt_header = NULL;
|
||||
}
|
||||
/*
|
||||
* Check if the dataset is mountable and should be automatically mounted.
|
||||
*/
|
||||
static boolean_t
|
||||
should_auto_mount(zfs_handle_t *zhp)
|
||||
{
|
||||
if (!zfs_prop_valid_for_type(ZFS_PROP_CANMOUNT, zfs_get_type(zhp)))
|
||||
return (B_FALSE);
|
||||
return (zfs_prop_get_int(zhp, ZFS_PROP_CANMOUNT) == ZFS_CANMOUNT_ON);
|
||||
}
|
||||
|
||||
/*
|
||||
* zfs clone [-p] [-o prop=value] ... <snap> <fs | vol>
|
||||
*
|
||||
@@ -684,22 +673,9 @@ zfs_do_clone(int argc, char **argv)
|
||||
|
||||
clone = zfs_open(g_zfs, argv[1], ZFS_TYPE_DATASET);
|
||||
if (clone != NULL) {
|
||||
/*
|
||||
* If the user doesn't want the dataset
|
||||
* automatically mounted, then skip the mount/share
|
||||
* step.
|
||||
*/
|
||||
if (should_auto_mount(clone)) {
|
||||
if ((ret = zfs_mount(clone, NULL, 0)) != 0) {
|
||||
(void) fprintf(stderr, gettext("clone "
|
||||
"successfully created, "
|
||||
"but not mounted\n"));
|
||||
} else if ((ret = zfs_share(clone)) != 0) {
|
||||
(void) fprintf(stderr, gettext("clone "
|
||||
"successfully created, "
|
||||
"but not shared\n"));
|
||||
}
|
||||
}
|
||||
if (zfs_get_type(clone) != ZFS_TYPE_VOLUME)
|
||||
if ((ret = zfs_mount(clone, NULL, 0)) == 0)
|
||||
ret = zfs_share(clone);
|
||||
zfs_close(clone);
|
||||
}
|
||||
}
|
||||
@@ -745,6 +721,7 @@ zfs_do_create(int argc, char **argv)
|
||||
int ret = 1;
|
||||
nvlist_t *props;
|
||||
uint64_t intval;
|
||||
int canmount = ZFS_CANMOUNT_OFF;
|
||||
|
||||
if (nvlist_alloc(&props, NV_UNIQUE_NAME, 0) != 0)
|
||||
nomem();
|
||||
@@ -876,15 +853,19 @@ zfs_do_create(int argc, char **argv)
|
||||
goto error;
|
||||
|
||||
ret = 0;
|
||||
/*
|
||||
* if the user doesn't want the dataset automatically mounted,
|
||||
* then skip the mount/share step
|
||||
*/
|
||||
if (zfs_prop_valid_for_type(ZFS_PROP_CANMOUNT, type))
|
||||
canmount = zfs_prop_get_int(zhp, ZFS_PROP_CANMOUNT);
|
||||
|
||||
/*
|
||||
* Mount and/or share the new filesystem as appropriate. We provide a
|
||||
* verbose error message to let the user know that their filesystem was
|
||||
* in fact created, even if we failed to mount or share it.
|
||||
* If the user doesn't want the dataset automatically mounted,
|
||||
* then skip the mount/share step altogether.
|
||||
*/
|
||||
if (should_auto_mount(zhp)) {
|
||||
if (canmount == ZFS_CANMOUNT_ON) {
|
||||
if (zfs_mount(zhp, NULL, 0) != 0) {
|
||||
(void) fprintf(stderr, gettext("filesystem "
|
||||
"successfully created, but not mounted\n"));
|
||||
@@ -1678,7 +1659,7 @@ zfs_do_get(int argc, char **argv)
|
||||
default:
|
||||
(void) fprintf(stderr,
|
||||
gettext("invalid column name "
|
||||
"'%s'\n"), suboptarg);
|
||||
"'%s'\n"), value);
|
||||
usage(B_FALSE);
|
||||
}
|
||||
}
|
||||
@@ -1715,7 +1696,7 @@ zfs_do_get(int argc, char **argv)
|
||||
default:
|
||||
(void) fprintf(stderr,
|
||||
gettext("invalid source "
|
||||
"'%s'\n"), suboptarg);
|
||||
"'%s'\n"), value);
|
||||
usage(B_FALSE);
|
||||
}
|
||||
}
|
||||
@@ -1751,7 +1732,7 @@ zfs_do_get(int argc, char **argv)
|
||||
default:
|
||||
(void) fprintf(stderr,
|
||||
gettext("invalid type '%s'\n"),
|
||||
suboptarg);
|
||||
value);
|
||||
usage(B_FALSE);
|
||||
}
|
||||
}
|
||||
@@ -3115,7 +3096,7 @@ zfs_do_list(int argc, char **argv)
|
||||
default:
|
||||
(void) fprintf(stderr,
|
||||
gettext("invalid type '%s'\n"),
|
||||
suboptarg);
|
||||
value);
|
||||
usage(B_FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1347,7 +1347,7 @@ The
|
||||
.Ar device
|
||||
must not be part of an active pool configuration.
|
||||
.Bl -tag -width indent
|
||||
.It Fl f
|
||||
.It Fl v
|
||||
Treat exported or foreign devices as inactive.
|
||||
.El
|
||||
.It Xo
|
||||
|
||||
@@ -5293,7 +5293,7 @@ zpool_do_get(int argc, char **argv)
|
||||
default:
|
||||
(void) fprintf(stderr,
|
||||
gettext("invalid column name "
|
||||
"'%s'\n"), suboptarg);
|
||||
"'%s'\n"), value);
|
||||
usage(B_FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -273,7 +273,7 @@ ctf_fdopen(int fd, int *errp)
|
||||
*/
|
||||
if (nbytes >= (ssize_t) sizeof (Elf32_Ehdr) &&
|
||||
bcmp(&hdr.e32.e_ident[EI_MAG0], ELFMAG, SELFMAG) == 0) {
|
||||
#if BYTE_ORDER == _BIG_ENDIAN
|
||||
#ifdef _BIG_ENDIAN
|
||||
uchar_t order = ELFDATA2MSB;
|
||||
#else
|
||||
uchar_t order = ELFDATA2LSB;
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
*/
|
||||
/*
|
||||
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
|
||||
* Copyright 2013 Voxer Inc. All rights reserved.
|
||||
* Use is subject to license terms.
|
||||
*/
|
||||
|
||||
@@ -145,8 +144,7 @@ dtrace_dof_init(void)
|
||||
Lmid_t lmid;
|
||||
#else
|
||||
u_long lmid = 0;
|
||||
dof_sec_t *sec, *secstart, *dofstrtab, *dofprobes;
|
||||
dof_provider_t *dofprovider;
|
||||
dof_sec_t *sec;
|
||||
size_t i;
|
||||
#endif
|
||||
int fd;
|
||||
@@ -154,16 +152,14 @@ dtrace_dof_init(void)
|
||||
#if !defined(sun)
|
||||
Elf *e;
|
||||
Elf_Scn *scn = NULL;
|
||||
Elf_Data *symtabdata = NULL, *dynsymdata = NULL, *dofdata = NULL;
|
||||
dof_hdr_t *dof_next = NULL;
|
||||
Elf_Data *symtabdata = NULL, *dynsymdata = NULL;
|
||||
GElf_Shdr shdr;
|
||||
int efd, nprobes;
|
||||
char *s;
|
||||
char *dofstrtabraw;
|
||||
size_t shstridx, symtabidx = 0, dynsymidx = 0;
|
||||
unsigned char *dofstrtab = NULL;
|
||||
unsigned char *buf;
|
||||
int fixedprobes;
|
||||
uint64_t aligned_filesz;
|
||||
int fixedprobes = 0;
|
||||
#endif
|
||||
|
||||
if (getenv("DTRACE_DOF_INIT_DISABLE") != NULL)
|
||||
@@ -213,8 +209,7 @@ dtrace_dof_init(void)
|
||||
} else if (shdr.sh_type == SHT_PROGBITS) {
|
||||
s = elf_strptr(e, shstridx, shdr.sh_name);
|
||||
if (s && strcmp(s, ".SUNW_dof") == 0) {
|
||||
dofdata = elf_getdata(scn, NULL);
|
||||
dof = dofdata->d_buf;
|
||||
dof = elf_getdata(scn, NULL)->d_buf;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -224,12 +219,6 @@ dtrace_dof_init(void)
|
||||
close(efd);
|
||||
return;
|
||||
}
|
||||
|
||||
while ((char *) dof < (char *) dofdata->d_buf + dofdata->d_size) {
|
||||
fixedprobes = 0;
|
||||
aligned_filesz = (shdr.sh_addralign == 0 ? dof->dofh_filesz :
|
||||
roundup2(dof->dofh_filesz, shdr.sh_addralign));
|
||||
dof_next = (void *) ((char *) dof + aligned_filesz);
|
||||
#endif
|
||||
|
||||
if (dof->dofh_ident[DOF_ID_MAG0] != DOF_MAG_MAG0 ||
|
||||
@@ -301,49 +290,34 @@ dtrace_dof_init(void)
|
||||
* We are assuming the number of probes is less than the number of
|
||||
* symbols (libc can have 4k symbols, for example).
|
||||
*/
|
||||
secstart = sec = (dof_sec_t *)(dof + 1);
|
||||
sec = (dof_sec_t *)(dof + 1);
|
||||
buf = (char *)dof;
|
||||
for (i = 0; i < dof->dofh_secnum; i++, sec++) {
|
||||
if (sec->dofs_type != DOF_SECT_PROVIDER)
|
||||
continue;
|
||||
|
||||
dofprovider = (void *) (buf + sec->dofs_offset);
|
||||
dofstrtab = secstart + dofprovider->dofpv_strtab;
|
||||
dofprobes = secstart + dofprovider->dofpv_probes;
|
||||
|
||||
if (dofstrtab->dofs_type != DOF_SECT_STRTAB) {
|
||||
fprintf(stderr, "WARNING: expected STRTAB section, but got %d\n",
|
||||
dofstrtab->dofs_type);
|
||||
if (sec->dofs_type == DOF_SECT_STRTAB)
|
||||
dofstrtab = (unsigned char *)(buf + sec->dofs_offset);
|
||||
else if (sec->dofs_type == DOF_SECT_PROBES && dofstrtab)
|
||||
break;
|
||||
}
|
||||
if (dofprobes->dofs_type != DOF_SECT_PROBES) {
|
||||
fprintf(stderr, "WARNING: expected PROBES section, but got %d\n",
|
||||
dofprobes->dofs_type);
|
||||
break;
|
||||
}
|
||||
|
||||
dprintf(1, "found provider %p\n", dofprovider);
|
||||
dofstrtabraw = (char *)(buf + dofstrtab->dofs_offset);
|
||||
nprobes = dofprobes->dofs_size / dofprobes->dofs_entsize;
|
||||
fixsymbol(e, symtabdata, symtabidx, nprobes, buf, dofprobes, &fixedprobes,
|
||||
dofstrtabraw);
|
||||
if (fixedprobes != nprobes) {
|
||||
/*
|
||||
* If we haven't fixed all the probes using the
|
||||
* symtab section, look inside the dynsym
|
||||
* section.
|
||||
*/
|
||||
fixsymbol(e, dynsymdata, dynsymidx, nprobes, buf, dofprobes,
|
||||
&fixedprobes, dofstrtabraw);
|
||||
}
|
||||
if (fixedprobes != nprobes) {
|
||||
fprintf(stderr, "WARNING: number of probes "
|
||||
"fixed does not match the number of "
|
||||
"defined probes (%d != %d, "
|
||||
"respectively)\n", fixedprobes, nprobes);
|
||||
fprintf(stderr, "WARNING: some probes might "
|
||||
"not fire or your program might crash\n");
|
||||
}
|
||||
|
||||
}
|
||||
nprobes = sec->dofs_size / sec->dofs_entsize;
|
||||
fixsymbol(e, symtabdata, symtabidx, nprobes, buf, sec, &fixedprobes,
|
||||
dofstrtab);
|
||||
if (fixedprobes != nprobes) {
|
||||
/*
|
||||
* If we haven't fixed all the probes using the
|
||||
* symtab section, look inside the dynsym
|
||||
* section.
|
||||
*/
|
||||
fixsymbol(e, dynsymdata, dynsymidx, nprobes, buf, sec,
|
||||
&fixedprobes, dofstrtab);
|
||||
}
|
||||
if (fixedprobes != nprobes) {
|
||||
fprintf(stderr, "WARNING: number of probes "
|
||||
"fixed does not match the number of "
|
||||
"defined probes (%d != %d, "
|
||||
"respectively)\n", fixedprobes, nprobes);
|
||||
fprintf(stderr, "WARNING: some probes might "
|
||||
"not fire or your program might crash\n");
|
||||
}
|
||||
#endif
|
||||
if ((gen = ioctl(fd, DTRACEHIOC_ADDDOF, &dh)) == -1)
|
||||
@@ -356,12 +330,7 @@ dtrace_dof_init(void)
|
||||
}
|
||||
|
||||
(void) close(fd);
|
||||
|
||||
#if !defined(sun)
|
||||
/* End of while loop */
|
||||
dof = dof_next;
|
||||
}
|
||||
|
||||
elf_end(e);
|
||||
(void) close(efd);
|
||||
#endif
|
||||
|
||||
@@ -2555,7 +2555,7 @@ dt_get_buf(dtrace_hdl_t *dtp, int cpu, dtrace_bufdesc_t **bufp)
|
||||
{
|
||||
dtrace_optval_t size;
|
||||
dtrace_bufdesc_t *buf = dt_zalloc(dtp, sizeof (*buf));
|
||||
int error, rval;
|
||||
int error;
|
||||
|
||||
if (buf == NULL)
|
||||
return (-1);
|
||||
@@ -2574,6 +2574,7 @@ dt_get_buf(dtrace_hdl_t *dtp, int cpu, dtrace_bufdesc_t **bufp)
|
||||
#else
|
||||
if (dt_ioctl(dtp, DTRACEIOC_BUFSNAP, &buf) == -1) {
|
||||
#endif
|
||||
dt_put_buf(dtp, buf);
|
||||
/*
|
||||
* If we failed with ENOENT, it may be because the
|
||||
* CPU was unconfigured -- this is okay. Any other
|
||||
@@ -2581,12 +2582,10 @@ dt_get_buf(dtrace_hdl_t *dtp, int cpu, dtrace_bufdesc_t **bufp)
|
||||
*/
|
||||
if (errno == ENOENT) {
|
||||
*bufp = NULL;
|
||||
rval = 0;
|
||||
} else
|
||||
rval = dt_set_errno(dtp, errno);
|
||||
return (0);
|
||||
}
|
||||
|
||||
dt_put_buf(dtp, buf);
|
||||
return (rval);
|
||||
return (dt_set_errno(dtp, errno));
|
||||
}
|
||||
|
||||
error = dt_unring_buf(dtp, buf);
|
||||
|
||||
@@ -204,8 +204,6 @@
|
||||
%type <l_tok> unary_operator
|
||||
%type <l_tok> struct_or_union
|
||||
|
||||
%type <l_str> dtrace_keyword_ident
|
||||
|
||||
%%
|
||||
|
||||
dtrace_program: d_expression DT_TOK_EOF { return (dt_node_root($1)); }
|
||||
@@ -390,18 +388,12 @@ postfix_expression:
|
||||
| postfix_expression DT_TOK_DOT DT_TOK_TNAME {
|
||||
$$ = OP2(DT_TOK_DOT, $1, dt_node_ident($3));
|
||||
}
|
||||
| postfix_expression DT_TOK_DOT dtrace_keyword_ident {
|
||||
$$ = OP2(DT_TOK_DOT, $1, dt_node_ident($3));
|
||||
}
|
||||
| postfix_expression DT_TOK_PTR DT_TOK_IDENT {
|
||||
$$ = OP2(DT_TOK_PTR, $1, dt_node_ident($3));
|
||||
}
|
||||
| postfix_expression DT_TOK_PTR DT_TOK_TNAME {
|
||||
$$ = OP2(DT_TOK_PTR, $1, dt_node_ident($3));
|
||||
}
|
||||
| postfix_expression DT_TOK_PTR dtrace_keyword_ident {
|
||||
$$ = OP2(DT_TOK_PTR, $1, dt_node_ident($3));
|
||||
}
|
||||
| postfix_expression DT_TOK_ADDADD {
|
||||
$$ = OP1(DT_TOK_POSTINC, $1);
|
||||
}
|
||||
@@ -416,10 +408,6 @@ postfix_expression:
|
||||
DT_TOK_TNAME DT_TOK_RPAR {
|
||||
$$ = dt_node_offsetof($3, $5);
|
||||
}
|
||||
| DT_TOK_OFFSETOF DT_TOK_LPAR type_name DT_TOK_COMMA
|
||||
dtrace_keyword_ident DT_TOK_RPAR {
|
||||
$$ = dt_node_offsetof($3, $5);
|
||||
}
|
||||
| DT_TOK_XLATE DT_TOK_LT type_name DT_TOK_GT
|
||||
DT_TOK_LPAR expression DT_TOK_RPAR {
|
||||
$$ = OP2(DT_TOK_XLATE, dt_node_type($3), $6);
|
||||
@@ -843,15 +831,4 @@ function_parameters:
|
||||
| parameter_type_list { $$ = $1; }
|
||||
;
|
||||
|
||||
dtrace_keyword_ident:
|
||||
DT_KEY_PROBE { $$ = DUP("probe"); }
|
||||
| DT_KEY_PROVIDER { $$ = DUP("provider"); }
|
||||
| DT_KEY_SELF { $$ = DUP("self"); }
|
||||
| DT_KEY_STRING { $$ = DUP("string"); }
|
||||
| DT_TOK_STRINGOF { $$ = DUP("stringof"); }
|
||||
| DT_KEY_USERLAND { $$ = DUP("userland"); }
|
||||
| DT_TOK_XLATE { $$ = DUP("xlate"); }
|
||||
| DT_KEY_XLATOR { $$ = DUP("translator"); }
|
||||
;
|
||||
|
||||
%%
|
||||
@@ -1790,7 +1790,7 @@ dtrace_program_link(dtrace_hdl_t *dtp, dtrace_prog_t *pgp, uint_t dflags,
|
||||
* Arches which default to 64-bit need to explicitly use
|
||||
* the 32-bit library path.
|
||||
*/
|
||||
int use_32 = (dtp->dt_oflags & DTRACE_O_ILP32);
|
||||
int use_32 = !(dtp->dt_oflags & DTRACE_O_LP64);
|
||||
#else
|
||||
/*
|
||||
* Arches which are 32-bit only just use the normal
|
||||
@@ -1805,7 +1805,9 @@ dtrace_program_link(dtrace_hdl_t *dtp, dtrace_prog_t *pgp, uint_t dflags,
|
||||
len = snprintf(&tmp, 1, fmt, dtp->dt_ld_path, file, tfile,
|
||||
drti) + 1;
|
||||
|
||||
#if !defined(sun)
|
||||
len *= 2;
|
||||
#endif
|
||||
cmd = alloca(len);
|
||||
|
||||
(void) snprintf(cmd, len, fmt, dtp->dt_ld_path, file,
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
static int
|
||||
dt_strdata_add(dtrace_hdl_t *dtp, dtrace_recdesc_t *rec, void ***data, int *max)
|
||||
{
|
||||
int maxformat, rval;
|
||||
int maxformat;
|
||||
dtrace_fmtdesc_t fmt;
|
||||
void *result;
|
||||
|
||||
@@ -63,9 +63,8 @@ dt_strdata_add(dtrace_hdl_t *dtp, dtrace_recdesc_t *rec, void ***data, int *max)
|
||||
return (dt_set_errno(dtp, EDT_NOMEM));
|
||||
|
||||
if (dt_ioctl(dtp, DTRACEIOC_FORMAT, &fmt) == -1) {
|
||||
rval = dt_set_errno(dtp, errno);
|
||||
free(fmt.dtfd_string);
|
||||
return (rval);
|
||||
return (dt_set_errno(dtp, errno));
|
||||
}
|
||||
|
||||
while (rec->dtrd_format > (maxformat = *max)) {
|
||||
|
||||
@@ -970,13 +970,13 @@ dt_module_update(dtrace_hdl_t *dtp, struct kld_file_stat *k_stat)
|
||||
#if defined(__FreeBSD__)
|
||||
if (sh.sh_size == 0)
|
||||
continue;
|
||||
if (sh.sh_type == SHT_PROGBITS || sh.sh_type == SHT_NOBITS) {
|
||||
if (is_elf_obj && (sh.sh_type == SHT_PROGBITS ||
|
||||
sh.sh_type == SHT_NOBITS)) {
|
||||
alignmask = sh.sh_addralign - 1;
|
||||
mapbase += alignmask;
|
||||
mapbase &= ~alignmask;
|
||||
sh.sh_addr = mapbase;
|
||||
if (is_elf_obj)
|
||||
dmp->dm_sec_offsets[elf_ndxscn(sp)] = sh.sh_addr;
|
||||
dmp->dm_sec_offsets[elf_ndxscn(sp)] = sh.sh_addr;
|
||||
mapbase += sh.sh_size;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -311,10 +311,6 @@ static const dt_ident_t _dtrace_globals[] = {
|
||||
&dt_idops_func, "void(@)" },
|
||||
{ "memref", DT_IDENT_FUNC, 0, DIF_SUBR_MEMREF, DT_ATTR_STABCMN, DT_VERS_1_1,
|
||||
&dt_idops_func, "uintptr_t *(void *, size_t)" },
|
||||
#if !defined(sun)
|
||||
{ "memstr", DT_IDENT_FUNC, 0, DIF_SUBR_MEMSTR, DT_ATTR_STABCMN, DT_VERS_1_0,
|
||||
&dt_idops_func, "string(void *, char, size_t)" },
|
||||
#endif
|
||||
{ "min", DT_IDENT_AGGFUNC, 0, DTRACEAGG_MIN, DT_ATTR_STABCMN, DT_VERS_1_0,
|
||||
&dt_idops_func, "void(@)" },
|
||||
{ "mod", DT_IDENT_ACTFUNC, 0, DT_ACT_MOD, DT_ATTR_STABCMN,
|
||||
@@ -487,16 +483,22 @@ static const dt_ident_t _dtrace_globals[] = {
|
||||
DT_VERS_1_0, &dt_idops_func, "void(...)" },
|
||||
{ "typeref", DT_IDENT_FUNC, 0, DIF_SUBR_TYPEREF, DT_ATTR_STABCMN, DT_VERS_1_1,
|
||||
&dt_idops_func, "uintptr_t *(void *, size_t, string, size_t)" },
|
||||
#if defined(sun)
|
||||
{ "uaddr", DT_IDENT_ACTFUNC, 0, DT_ACT_UADDR, DT_ATTR_STABCMN,
|
||||
DT_VERS_1_2, &dt_idops_func, "_usymaddr(uintptr_t)" },
|
||||
#endif
|
||||
{ "ucaller", DT_IDENT_SCALAR, 0, DIF_VAR_UCALLER, DT_ATTR_STABCMN,
|
||||
DT_VERS_1_2, &dt_idops_type, "uint64_t" },
|
||||
#if defined(sun)
|
||||
{ "ufunc", DT_IDENT_ACTFUNC, 0, DT_ACT_USYM, DT_ATTR_STABCMN,
|
||||
DT_VERS_1_2, &dt_idops_func, "_usymaddr(uintptr_t)" },
|
||||
#endif
|
||||
{ "uid", DT_IDENT_SCALAR, 0, DIF_VAR_UID, DT_ATTR_STABCMN, DT_VERS_1_0,
|
||||
&dt_idops_type, "uid_t" },
|
||||
#if defined(sun)
|
||||
{ "umod", DT_IDENT_ACTFUNC, 0, DT_ACT_UMOD, DT_ATTR_STABCMN,
|
||||
DT_VERS_1_2, &dt_idops_func, "_usymaddr(uintptr_t)" },
|
||||
#endif
|
||||
{ "uregs", DT_IDENT_ARRAY, 0, DIF_VAR_UREGS, DT_ATTR_STABCMN, DT_VERS_1_0,
|
||||
&dt_idops_regs, NULL },
|
||||
{ "ustack", DT_IDENT_ACTFUNC, 0, DT_ACT_USTACK, DT_ATTR_STABCMN, DT_VERS_1_0,
|
||||
@@ -504,8 +506,10 @@ static const dt_ident_t _dtrace_globals[] = {
|
||||
{ "ustackdepth", DT_IDENT_SCALAR, 0, DIF_VAR_USTACKDEPTH,
|
||||
DT_ATTR_STABCMN, DT_VERS_1_2,
|
||||
&dt_idops_type, "uint32_t" },
|
||||
#if defined(sun)
|
||||
{ "usym", DT_IDENT_ACTFUNC, 0, DT_ACT_USYM, DT_ATTR_STABCMN,
|
||||
DT_VERS_1_2, &dt_idops_func, "_usymaddr(uintptr_t)" },
|
||||
#endif
|
||||
{ "vtimestamp", DT_IDENT_SCALAR, 0, DIF_VAR_VTIMESTAMP,
|
||||
DT_ATTR_STABCMN, DT_VERS_1_0,
|
||||
&dt_idops_type, "uint64_t" },
|
||||
@@ -1128,7 +1132,7 @@ alloc:
|
||||
#if defined(sun)
|
||||
dtp->dt_prcmode = DT_PROC_STOP_PREINIT;
|
||||
#else
|
||||
dtp->dt_prcmode = DT_PROC_STOP_POSTINIT;
|
||||
dtp->dt_prcmode = DT_PROC_STOP_MAIN;
|
||||
#endif
|
||||
dtp->dt_linkmode = DT_LINK_KERNEL;
|
||||
dtp->dt_linktype = DT_LTYP_ELF;
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
* Use is subject to license terms.
|
||||
*/
|
||||
|
||||
#pragma ident "%Z%%M% %I% %E% SMI"
|
||||
|
||||
/*
|
||||
* Copyright (c) 2012 by Delphix. All rights reserved.
|
||||
*/
|
||||
@@ -904,6 +906,30 @@ dt_options_load(dtrace_hdl_t *dtp)
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
static int
|
||||
dt_opt_preallocate(dtrace_hdl_t *dtp, const char *arg, uintptr_t option)
|
||||
{
|
||||
dtrace_optval_t size;
|
||||
void *p;
|
||||
|
||||
if (arg == NULL || dt_optval_parse(arg, &size) != 0)
|
||||
return (dt_set_errno(dtp, EDT_BADOPTVAL));
|
||||
|
||||
if (size > SIZE_MAX)
|
||||
size = SIZE_MAX;
|
||||
|
||||
if ((p = dt_zalloc(dtp, size)) == NULL) {
|
||||
do {
|
||||
size /= 2;
|
||||
} while ((p = dt_zalloc(dtp, size)) == NULL);
|
||||
}
|
||||
|
||||
dt_free(dtp, p);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
typedef struct dt_option {
|
||||
const char *o_name;
|
||||
int (*o_func)(dtrace_hdl_t *, const char *, uintptr_t);
|
||||
@@ -942,6 +968,7 @@ static const dt_option_t _dtrace_ctoptions[] = {
|
||||
{ "linktype", dt_opt_linktype },
|
||||
{ "nolibs", dt_opt_cflags, DTRACE_C_NOLIBS },
|
||||
{ "pgmax", dt_opt_pgmax },
|
||||
{ "preallocate", dt_opt_preallocate },
|
||||
{ "pspec", dt_opt_cflags, DTRACE_C_PSPEC },
|
||||
{ "setenv", dt_opt_setenv, 1 },
|
||||
{ "stdc", dt_opt_stdc },
|
||||
|
||||
@@ -167,7 +167,7 @@ print_bitfield(dt_printarg_t *pap, ulong_t off, ctf_encoding_t *ep)
|
||||
* to the lowest 'size' bytes in 'value', and we need to shift based on
|
||||
* the offset from the end of the data, not the offset of the start.
|
||||
*/
|
||||
#if BYTE_ORDER == _BIG_ENDIAN
|
||||
#ifdef _BIG_ENDIAN
|
||||
buf += sizeof (value) - size;
|
||||
off += ep->cte_bits;
|
||||
#endif
|
||||
@@ -178,7 +178,7 @@ print_bitfield(dt_printarg_t *pap, ulong_t off, ctf_encoding_t *ep)
|
||||
* Offsets are counted from opposite ends on little- and
|
||||
* big-endian machines.
|
||||
*/
|
||||
#if BYTE_ORDER == _BIG_ENDIAN
|
||||
#ifdef _BIG_ENDIAN
|
||||
shift = NBBY - shift;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -694,13 +694,8 @@ static const dt_pfconv_t _dtrace_conversions[] = {
|
||||
{ "S", "s", pfproto_cstr, pfcheck_str, pfprint_estr },
|
||||
{ "T", "s", "int64_t", pfcheck_time, pfprint_time822 },
|
||||
{ "u", "u", pfproto_xint, pfcheck_xint, pfprint_uint },
|
||||
#if defined(sun)
|
||||
{ "wc", "wc", "int", pfcheck_type, pfprint_sint }, /* a.k.a. wchar_t */
|
||||
{ "ws", "ws", pfproto_wstr, pfcheck_wstr, pfprint_wstr },
|
||||
#else
|
||||
{ "wc", "lc", "int", pfcheck_type, pfprint_sint }, /* a.k.a. wchar_t */
|
||||
{ "ws", "ls", pfproto_wstr, pfcheck_wstr, pfprint_wstr },
|
||||
#endif
|
||||
{ "x", "x", pfproto_xint, pfcheck_xint, pfprint_uint },
|
||||
{ "X", "X", pfproto_xint, pfcheck_xint, pfprint_uint },
|
||||
{ "Y", "s", "int64_t", pfcheck_time, pfprint_time },
|
||||
@@ -1348,7 +1343,6 @@ dt_printf_format(dtrace_hdl_t *dtp, FILE *fp, const dt_pfargv_t *pfv,
|
||||
dtrace_aggdesc_t *agg;
|
||||
caddr_t lim = (caddr_t)buf + len, limit;
|
||||
char format[64] = "%";
|
||||
size_t ret;
|
||||
int i, aggrec, curagg = -1;
|
||||
uint64_t normal;
|
||||
|
||||
@@ -1380,9 +1374,7 @@ dt_printf_format(dtrace_hdl_t *dtp, FILE *fp, const dt_pfargv_t *pfv,
|
||||
int prec = pfd->pfd_prec;
|
||||
int rval;
|
||||
|
||||
const char *start;
|
||||
char *f = format + 1; /* skip initial '%' */
|
||||
size_t fmtsz = sizeof(format) - 1;
|
||||
const dtrace_recdesc_t *rec;
|
||||
dt_pfprint_f *func;
|
||||
caddr_t addr;
|
||||
@@ -1539,7 +1531,6 @@ dt_printf_format(dtrace_hdl_t *dtp, FILE *fp, const dt_pfargv_t *pfv,
|
||||
break;
|
||||
}
|
||||
|
||||
start = f;
|
||||
if (pfd->pfd_flags & DT_PFCONV_ALT)
|
||||
*f++ = '#';
|
||||
if (pfd->pfd_flags & DT_PFCONV_ZPAD)
|
||||
@@ -1552,7 +1543,6 @@ dt_printf_format(dtrace_hdl_t *dtp, FILE *fp, const dt_pfargv_t *pfv,
|
||||
*f++ = '\'';
|
||||
if (pfd->pfd_flags & DT_PFCONV_SPACE)
|
||||
*f++ = ' ';
|
||||
fmtsz -= f - start;
|
||||
|
||||
/*
|
||||
* If we're printing a stack and DT_PFCONV_LEFT is set, we
|
||||
@@ -1563,20 +1553,13 @@ dt_printf_format(dtrace_hdl_t *dtp, FILE *fp, const dt_pfargv_t *pfv,
|
||||
if (func == pfprint_stack && (pfd->pfd_flags & DT_PFCONV_LEFT))
|
||||
width = 0;
|
||||
|
||||
if (width != 0) {
|
||||
ret = snprintf(f, fmtsz, "%d", ABS(width));
|
||||
f += ret;
|
||||
fmtsz = MAX(0, fmtsz - ret);
|
||||
}
|
||||
if (width != 0)
|
||||
f += snprintf(f, sizeof (format), "%d", ABS(width));
|
||||
|
||||
if (prec > 0) {
|
||||
ret = snprintf(f, fmtsz, ".%d", prec);
|
||||
f += ret;
|
||||
fmtsz = MAX(0, fmtsz - ret);
|
||||
}
|
||||
if (prec > 0)
|
||||
f += snprintf(f, sizeof (format), ".%d", prec);
|
||||
|
||||
if (strlcpy(f, pfd->pfd_fmt, fmtsz) >= fmtsz)
|
||||
return (dt_set_errno(dtp, EDT_COMPILER));
|
||||
(void) strcpy(f, pfd->pfd_fmt);
|
||||
pfd->pfd_rec = rec;
|
||||
|
||||
if (func(dtp, fp, format, pfd, addr, size, normal) < 0)
|
||||
|
||||
@@ -184,7 +184,7 @@ dtrace_go(dtrace_hdl_t *dtp)
|
||||
{
|
||||
dtrace_enable_io_t args;
|
||||
void *dof;
|
||||
int error, r;
|
||||
int err;
|
||||
|
||||
if (dtp->dt_active)
|
||||
return (dt_set_errno(dtp, EINVAL));
|
||||
@@ -206,12 +206,11 @@ dtrace_go(dtrace_hdl_t *dtp)
|
||||
|
||||
args.dof = dof;
|
||||
args.n_matched = 0;
|
||||
r = dt_ioctl(dtp, DTRACEIOC_ENABLE, &args);
|
||||
error = errno;
|
||||
err = dt_ioctl(dtp, DTRACEIOC_ENABLE, &args);
|
||||
dtrace_dof_destroy(dtp, dof);
|
||||
|
||||
if (r == -1 && (error != ENOTTY || dtp->dt_vector == NULL))
|
||||
return (dt_set_errno(dtp, error));
|
||||
if (err == -1 && (errno != ENOTTY || dtp->dt_vector == NULL))
|
||||
return (dt_set_errno(dtp, errno));
|
||||
|
||||
if (dt_ioctl(dtp, DTRACEIOC_GO, &dtp->dt_beganon) == -1) {
|
||||
if (errno == EACCES)
|
||||
|
||||
@@ -793,7 +793,6 @@ dump_nvlist(nvlist_t *list, int indent)
|
||||
{
|
||||
nvpair_t *elem = NULL;
|
||||
boolean_t bool_value;
|
||||
boolean_t *bool_array_value;
|
||||
nvlist_t *nvlist_value;
|
||||
nvlist_t **nvlist_array_value;
|
||||
uint_t i, count;
|
||||
@@ -854,16 +853,6 @@ dump_nvlist(nvlist_t *list, int indent)
|
||||
NVP(elem, string, char *, char *, "'%s'");
|
||||
break;
|
||||
|
||||
case DATA_TYPE_BOOLEAN_ARRAY:
|
||||
(void) nvpair_value_boolean_array(elem,
|
||||
&bool_array_value, &count);
|
||||
for (i = 0; i < count; i++) {
|
||||
(void) printf("%*s%s[%d]: %s\n", indent, "",
|
||||
nvpair_name(elem), i,
|
||||
bool_array_value[i] ? "true" : "false");
|
||||
}
|
||||
break;
|
||||
|
||||
case DATA_TYPE_BYTE_ARRAY:
|
||||
NVPA(elem, byte_array, uchar_t, int, "%u");
|
||||
break;
|
||||
|
||||
@@ -3086,7 +3086,7 @@ zfs_create(libzfs_handle_t *hdl, const char *path, zfs_type_t type,
|
||||
uint64_t blocksize = zfs_prop_default_numeric(ZFS_PROP_VOLBLOCKSIZE);
|
||||
char errbuf[1024];
|
||||
uint64_t zoned;
|
||||
enum lzc_dataset_type ost;
|
||||
dmu_objset_type_t ost;
|
||||
|
||||
(void) snprintf(errbuf, sizeof (errbuf), dgettext(TEXT_DOMAIN,
|
||||
"cannot create '%s'"), path);
|
||||
@@ -3113,9 +3113,9 @@ zfs_create(libzfs_handle_t *hdl, const char *path, zfs_type_t type,
|
||||
}
|
||||
|
||||
if (type == ZFS_TYPE_VOLUME)
|
||||
ost = LZC_DATSET_TYPE_ZVOL;
|
||||
ost = DMU_OST_ZVOL;
|
||||
else
|
||||
ost = LZC_DATSET_TYPE_ZFS;
|
||||
ost = DMU_OST_ZFS;
|
||||
|
||||
if (props && (props = zfs_valid_proplist(hdl, type, props,
|
||||
zoned, NULL, errbuf)) == 0)
|
||||
|
||||
@@ -18,12 +18,10 @@
|
||||
*
|
||||
* CDDL HEADER END
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright 2015 Nexenta Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012 by Delphix. All rights reserved.
|
||||
* Copyright 2015 RackTop Systems.
|
||||
* Copyright 2014 Nexenta Systems, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -196,10 +194,8 @@ fix_paths(nvlist_t *nv, name_entry_t *names)
|
||||
if ((devid = get_devid(best->ne_name)) == NULL) {
|
||||
(void) nvlist_remove_all(nv, ZPOOL_CONFIG_DEVID);
|
||||
} else {
|
||||
if (nvlist_add_string(nv, ZPOOL_CONFIG_DEVID, devid) != 0) {
|
||||
devid_str_free(devid);
|
||||
if (nvlist_add_string(nv, ZPOOL_CONFIG_DEVID, devid) != 0)
|
||||
return (-1);
|
||||
}
|
||||
devid_str_free(devid);
|
||||
}
|
||||
|
||||
@@ -665,10 +661,8 @@ get_configs(libzfs_handle_t *hdl, pool_list_t *pl, boolean_t active_ok)
|
||||
nvlist_add_uint64(holey,
|
||||
ZPOOL_CONFIG_ID, c) != 0 ||
|
||||
nvlist_add_uint64(holey,
|
||||
ZPOOL_CONFIG_GUID, 0ULL) != 0) {
|
||||
nvlist_free(holey);
|
||||
ZPOOL_CONFIG_GUID, 0ULL) != 0)
|
||||
goto nomem;
|
||||
}
|
||||
child[c] = holey;
|
||||
}
|
||||
}
|
||||
@@ -1091,7 +1085,11 @@ zpool_open_func(void *arg)
|
||||
}
|
||||
(void) close(fd);
|
||||
|
||||
|
||||
rn->rn_config = config;
|
||||
if (config != NULL) {
|
||||
assert(rn->rn_nozpool == B_FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1116,10 +1114,8 @@ zpool_clear_label(int fd)
|
||||
|
||||
for (l = 0; l < VDEV_LABELS; l++) {
|
||||
if (pwrite64(fd, label, sizeof (vdev_label_t),
|
||||
label_offset(size, l)) != sizeof (vdev_label_t)) {
|
||||
free(label);
|
||||
label_offset(size, l)) != sizeof (vdev_label_t))
|
||||
return (-1);
|
||||
}
|
||||
}
|
||||
|
||||
free(label);
|
||||
@@ -1137,6 +1133,7 @@ static nvlist_t *
|
||||
zpool_find_import_impl(libzfs_handle_t *hdl, importargs_t *iarg)
|
||||
{
|
||||
int i, dirs = iarg->paths;
|
||||
DIR *dirp = NULL;
|
||||
struct dirent64 *dp;
|
||||
char path[MAXPATHLEN];
|
||||
char *end, **dir = iarg->path;
|
||||
@@ -1166,8 +1163,6 @@ zpool_find_import_impl(libzfs_handle_t *hdl, importargs_t *iarg)
|
||||
tpool_t *t;
|
||||
char *rdsk;
|
||||
int dfd;
|
||||
boolean_t config_failed = B_FALSE;
|
||||
DIR *dirp;
|
||||
|
||||
/* use realpath to normalize the path */
|
||||
if (realpath(dir[i], path) == 0) {
|
||||
@@ -1192,8 +1187,6 @@ zpool_find_import_impl(libzfs_handle_t *hdl, importargs_t *iarg)
|
||||
|
||||
if ((dfd = open64(rdsk, O_RDONLY)) < 0 ||
|
||||
(dirp = fdopendir(dfd)) == NULL) {
|
||||
if (dfd >= 0)
|
||||
(void) close(dfd);
|
||||
zfs_error_aux(hdl, strerror(errno));
|
||||
(void) zfs_error_fmt(hdl, EZFS_BADPATH,
|
||||
dgettext(TEXT_DOMAIN, "cannot open '%s'"),
|
||||
@@ -1275,7 +1268,7 @@ skipdir:
|
||||
cookie = NULL;
|
||||
while ((slice = avl_destroy_nodes(&slice_cache,
|
||||
&cookie)) != NULL) {
|
||||
if (slice->rn_config != NULL && !config_failed) {
|
||||
if (slice->rn_config != NULL) {
|
||||
nvlist_t *config = slice->rn_config;
|
||||
boolean_t matched = B_TRUE;
|
||||
|
||||
@@ -1296,16 +1289,13 @@ skipdir:
|
||||
}
|
||||
if (!matched) {
|
||||
nvlist_free(config);
|
||||
} else {
|
||||
/*
|
||||
* use the non-raw path for the config
|
||||
*/
|
||||
(void) strlcpy(end, slice->rn_name,
|
||||
pathleft);
|
||||
if (add_config(hdl, &pools, path,
|
||||
config) != 0)
|
||||
config_failed = B_TRUE;
|
||||
config = NULL;
|
||||
continue;
|
||||
}
|
||||
/* use the non-raw path for the config */
|
||||
(void) strlcpy(end, slice->rn_name, pathleft);
|
||||
if (add_config(hdl, &pools, path, config) != 0)
|
||||
goto error;
|
||||
}
|
||||
free(slice->rn_name);
|
||||
free(slice);
|
||||
@@ -1313,9 +1303,7 @@ skipdir:
|
||||
avl_destroy(&slice_cache);
|
||||
|
||||
(void) closedir(dirp);
|
||||
|
||||
if (config_failed)
|
||||
goto error;
|
||||
dirp = NULL;
|
||||
}
|
||||
|
||||
ret = get_configs(hdl, &pools, iarg->can_be_active);
|
||||
@@ -1338,10 +1326,14 @@ error:
|
||||
|
||||
for (ne = pools.names; ne != NULL; ne = nenext) {
|
||||
nenext = ne->ne_next;
|
||||
free(ne->ne_name);
|
||||
if (ne->ne_name)
|
||||
free(ne->ne_name);
|
||||
free(ne);
|
||||
}
|
||||
|
||||
if (dirp)
|
||||
(void) closedir(dirp);
|
||||
|
||||
return (ret);
|
||||
}
|
||||
|
||||
@@ -1705,9 +1697,9 @@ zpool_in_use(libzfs_handle_t *hdl, int fd, pool_state_t *state, char **namestr,
|
||||
cb.cb_type = ZPOOL_CONFIG_SPARES;
|
||||
if (zpool_iter(hdl, find_aux, &cb) == 1) {
|
||||
name = (char *)zpool_get_name(cb.cb_zhp);
|
||||
ret = B_TRUE;
|
||||
ret = TRUE;
|
||||
} else {
|
||||
ret = B_FALSE;
|
||||
ret = FALSE;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1721,9 +1713,9 @@ zpool_in_use(libzfs_handle_t *hdl, int fd, pool_state_t *state, char **namestr,
|
||||
cb.cb_type = ZPOOL_CONFIG_L2CACHE;
|
||||
if (zpool_iter(hdl, find_aux, &cb) == 1) {
|
||||
name = (char *)zpool_get_name(cb.cb_zhp);
|
||||
ret = B_TRUE;
|
||||
ret = TRUE;
|
||||
} else {
|
||||
ret = B_FALSE;
|
||||
ret = FALSE;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright 2015 Nexenta Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2013 by Delphix. All rights reserved.
|
||||
* Copyright (c) 2013, Joyent, Inc. All rights reserved.
|
||||
*/
|
||||
@@ -1699,7 +1699,7 @@ zpool_import_props(libzfs_handle_t *hdl, nvlist_t *config, const char *newname,
|
||||
thename = origname;
|
||||
}
|
||||
|
||||
if (props != NULL) {
|
||||
if (props) {
|
||||
uint64_t version;
|
||||
prop_flags_t flags = { .create = B_FALSE, .import = B_TRUE };
|
||||
|
||||
@@ -1707,13 +1707,12 @@ zpool_import_props(libzfs_handle_t *hdl, nvlist_t *config, const char *newname,
|
||||
&version) == 0);
|
||||
|
||||
if ((props = zpool_valid_proplist(hdl, origname,
|
||||
props, version, flags, errbuf)) == NULL)
|
||||
props, version, flags, errbuf)) == NULL) {
|
||||
return (-1);
|
||||
if (zcmd_write_src_nvlist(hdl, &zc, props) != 0) {
|
||||
} else if (zcmd_write_src_nvlist(hdl, &zc, props) != 0) {
|
||||
nvlist_free(props);
|
||||
return (-1);
|
||||
}
|
||||
nvlist_free(props);
|
||||
}
|
||||
|
||||
(void) strlcpy(zc.zc_name, thename, sizeof (zc.zc_name));
|
||||
@@ -1722,11 +1721,11 @@ zpool_import_props(libzfs_handle_t *hdl, nvlist_t *config, const char *newname,
|
||||
&zc.zc_guid) == 0);
|
||||
|
||||
if (zcmd_write_conf_nvlist(hdl, &zc, config) != 0) {
|
||||
zcmd_free_nvlists(&zc);
|
||||
nvlist_free(props);
|
||||
return (-1);
|
||||
}
|
||||
if (zcmd_alloc_dst_nvlist(hdl, &zc, zc.zc_nvlist_conf_size * 2) != 0) {
|
||||
zcmd_free_nvlists(&zc);
|
||||
nvlist_free(props);
|
||||
return (-1);
|
||||
}
|
||||
|
||||
@@ -1742,9 +1741,6 @@ zpool_import_props(libzfs_handle_t *hdl, nvlist_t *config, const char *newname,
|
||||
error = errno;
|
||||
|
||||
(void) zcmd_read_dst_nvlist(hdl, &zc, &nv);
|
||||
|
||||
zcmd_free_nvlists(&zc);
|
||||
|
||||
zpool_get_rewind_policy(config, &policy);
|
||||
|
||||
if (error) {
|
||||
@@ -1850,6 +1846,9 @@ zpool_import_props(libzfs_handle_t *hdl, nvlist_t *config, const char *newname,
|
||||
return (0);
|
||||
}
|
||||
|
||||
zcmd_free_nvlists(&zc);
|
||||
nvlist_free(props);
|
||||
|
||||
return (ret);
|
||||
}
|
||||
|
||||
@@ -3311,10 +3310,8 @@ devid_to_path(char *devid_str)
|
||||
if (ret != 0)
|
||||
return (NULL);
|
||||
|
||||
/*
|
||||
* In a case the strdup() fails, we will just return NULL below.
|
||||
*/
|
||||
path = strdup(list[0].devname);
|
||||
if ((path = strdup(list[0].devname)) == NULL)
|
||||
return (NULL);
|
||||
|
||||
devid_free_nmlist(list);
|
||||
|
||||
|
||||
@@ -3105,8 +3105,7 @@ zfs_receive_one(libzfs_handle_t *hdl, int infd, const char *tosnap,
|
||||
}
|
||||
|
||||
if (clp) {
|
||||
if (!flags->nomount)
|
||||
err |= changelist_postfix(clp);
|
||||
err |= changelist_postfix(clp);
|
||||
changelist_free(clp);
|
||||
}
|
||||
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
#include "zfs_prop.h"
|
||||
#include "zfeature_common.h"
|
||||
|
||||
int aok;
|
||||
|
||||
int
|
||||
libzfs_errno(libzfs_handle_t *hdl)
|
||||
|
||||
@@ -217,11 +217,11 @@ out:
|
||||
}
|
||||
|
||||
int
|
||||
lzc_create(const char *fsname, enum lzc_dataset_type type, nvlist_t *props)
|
||||
lzc_create(const char *fsname, dmu_objset_type_t type, nvlist_t *props)
|
||||
{
|
||||
int error;
|
||||
nvlist_t *args = fnvlist_alloc();
|
||||
fnvlist_add_int32(args, "type", (dmu_objset_type_t)type);
|
||||
fnvlist_add_int32(args, "type", type);
|
||||
if (props != NULL)
|
||||
fnvlist_add_nvlist(args, "props", props);
|
||||
error = lzc_ioctl(ZFS_IOC_CREATE, fsname, args, NULL);
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include <libnvpair.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/fs/zfs.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -38,16 +39,8 @@ extern "C" {
|
||||
int libzfs_core_init(void);
|
||||
void libzfs_core_fini(void);
|
||||
|
||||
/*
|
||||
* NB: this type should be kept binary compatible with dmu_objset_type_t.
|
||||
*/
|
||||
enum lzc_dataset_type {
|
||||
LZC_DATSET_TYPE_ZFS = 2,
|
||||
LZC_DATSET_TYPE_ZVOL
|
||||
};
|
||||
|
||||
int lzc_snapshot(nvlist_t *, nvlist_t *, nvlist_t **);
|
||||
int lzc_create(const char *, enum lzc_dataset_type, nvlist_t *);
|
||||
int lzc_create(const char *, dmu_objset_type_t, nvlist_t *);
|
||||
int lzc_clone(const char *, const char *, nvlist_t *);
|
||||
int lzc_destroy_snaps(nvlist_t *, boolean_t, nvlist_t **);
|
||||
int lzc_bookmark(nvlist_t *, nvlist_t **);
|
||||
|
||||
@@ -44,9 +44,7 @@
|
||||
* Emulation of kernel services in userland.
|
||||
*/
|
||||
|
||||
#ifndef __FreeBSD__
|
||||
int aok;
|
||||
#endif
|
||||
uint64_t physmem;
|
||||
vnode_t *rootdir = (vnode_t *)0xabcd1234;
|
||||
char hw_serial[HW_HOSTID_LEN];
|
||||
|
||||
@@ -108,7 +108,7 @@ show_vdev_stats(const char *desc, const char *ctype, nvlist_t *nv, int indent)
|
||||
(void) printf("%*s%s%*s%*s%*s %5s %5s %5s %5s %5s %5s %5s\n",
|
||||
indent, "",
|
||||
prefix,
|
||||
(int)(indent + strlen(prefix) - 25 - (vs->vs_space ? 0 : 12)),
|
||||
indent + strlen(prefix) - 25 - (vs->vs_space ? 0 : 12),
|
||||
desc,
|
||||
vs->vs_space ? 6 : 0, vs->vs_space ? used : "",
|
||||
vs->vs_space ? 6 : 0, vs->vs_space ? avail : "",
|
||||
|
||||
@@ -411,7 +411,7 @@ write_type(void *arg1, void *arg2)
|
||||
|
||||
if (i > CTF_MAX_VLEN) {
|
||||
terminate("function %s has too many args: %d > %d\n",
|
||||
tdesc_name(tp), i, CTF_MAX_VLEN);
|
||||
i, CTF_MAX_VLEN);
|
||||
}
|
||||
|
||||
ctt.ctt_info = CTF_TYPE_INFO(CTF_K_FUNCTION, isroot, i);
|
||||
|
||||
@@ -26,9 +26,4 @@ _drti= drti
|
||||
_libdtrace= libdtrace
|
||||
.endif
|
||||
|
||||
SUBDIR_DEPEND_libdtrace= libctf
|
||||
SUBDIR_DEPEND_libzfs= libavl libnvpair libumem libuutil libzfs_core
|
||||
|
||||
SUBDIR_PARALLEL=
|
||||
|
||||
.include <bsd.subdir.mk>
|
||||
@@ -56,8 +56,7 @@ translator psinfo_t < struct proc *T > {
|
||||
pr_gid = T->p_ucred->cr_rgid;
|
||||
pr_egid = T->p_ucred->cr_groups[0];
|
||||
pr_addr = 0;
|
||||
pr_psargs = (T->p_args->ar_args == 0) ? "" :
|
||||
memstr(T->p_args->ar_args, ' ', T->p_args->ar_length);
|
||||
pr_psargs = stringof(T->p_args->ar_args);
|
||||
pr_arglen = T->p_args->ar_length;
|
||||
};
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@ SRCS+= libzfs_changelist.c \
|
||||
zfs_comutil.c \
|
||||
zfs_deleg.c \
|
||||
zfs_fletcher.c \
|
||||
zfs_ioctl_compat.c \
|
||||
zfs_namecheck.c \
|
||||
zfs_prop.c \
|
||||
zpool_prop.c \
|
||||
|
||||
@@ -11,8 +11,7 @@ DPADD= ${LIBNVPAIR}
|
||||
LDADD= -lnvpair
|
||||
|
||||
SRCS= libzfs_core.c \
|
||||
libzfs_core_compat.c \
|
||||
zfs_ioctl_compat.c
|
||||
libzfs_core_compat.c
|
||||
|
||||
SRCS+= libzfs_compat.c
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ SUBDIR= \
|
||||
ctfconvert \
|
||||
ctfdump \
|
||||
ctfmerge \
|
||||
sgsmsg \
|
||||
${_zinject} \
|
||||
${_zlook} \
|
||||
${_zstreamdump} \
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/cmd/sgs/tools/common
|
||||
.PATH: ${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/avl
|
||||
|
||||
# This program is required as a bootstrap tool for 'make buildworld'
|
||||
PROG= sgsmsg
|
||||
NO_MAN=
|
||||
SRCS= avl.c sgsmsg.c string_table.c findprime.c
|
||||
|
||||
WARNS?= 0
|
||||
CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris \
|
||||
-I${.CURDIR}/../../../cddl/compat/opensolaris/include \
|
||||
-I${OPENSOLARIS_USR_DISTDIR}/cmd/sgs/include \
|
||||
-I${OPENSOLARIS_SYS_DISTDIR}/uts/common
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
@@ -1113,7 +1113,7 @@ amfs_generic_mount_child(am_node *new_mp, int *error_return)
|
||||
new_mp->am_transp = (SVCXPRT *) xmalloc(sizeof(SVCXPRT));
|
||||
*(new_mp->am_transp) = *current_transp;
|
||||
}
|
||||
if (error && new_mp->am_mnt && (new_mp->am_mnt->mf_ops == &amfs_error_ops))
|
||||
if (error && (new_mp->am_mnt->mf_ops == &amfs_error_ops))
|
||||
new_mp->am_error = error;
|
||||
|
||||
if (new_mp->am_error > 0)
|
||||
|
||||
@@ -494,7 +494,7 @@ readent:
|
||||
buf[0] = '\0';
|
||||
fgets(buf, 256, passwd_fp);
|
||||
passwd_line++;
|
||||
if (buf[0] == '\0')
|
||||
if (!buf || buf[0] == '\0')
|
||||
goto readent;
|
||||
|
||||
/* read user name */
|
||||
|
||||
+73
-1395
File diff suppressed because it is too large.
Load diff
@@ -1,4 +1,4 @@
|
||||
Copyright (C) 2004-2016 Internet Systems Consortium, Inc. ("ISC")
|
||||
Copyright (C) 2004-2014 Internet Systems Consortium, Inc. ("ISC")
|
||||
Copyright (C) 1996-2003 Internet Software Consortium.
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
|
||||
+11
-8
@@ -1,5 +1,8 @@
|
||||
Copyright ? 2000-2010, 2013-2016 Internet Systems Consortium, Inc.
|
||||
("ISC")
|
||||
Frequently Asked Questions about BIND 9
|
||||
|
||||
Copyright © 2004-2010, 2013 Internet Systems Consortium, Inc. ("ISC")
|
||||
|
||||
Copyright © 2000-2003 Internet Software Consortium.
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
|
||||
@@ -25,8 +28,8 @@ A: Short Answer: No.
|
||||
What addresses to listen on? For a laptop on the move a lot you may
|
||||
only want to listen on the loop back interfaces.
|
||||
|
||||
To whom do you offer recursive service? Is there a firewall to
|
||||
consider? If so, is it stateless or stateful? Are you directly on the
|
||||
Who do you offer recursive service to? Is there are firewall to
|
||||
consider? If so is it stateless or stateful. Are you directly on the
|
||||
Internet? Are you on a private network? Are you on a NAT'd network? The
|
||||
answers to all these questions change how you configure even a caching
|
||||
name server.
|
||||
@@ -90,7 +93,7 @@ Q: I'm trying to use TSIG to authenticate dynamic updates or zone
|
||||
rejecting the TSIG. Why?
|
||||
|
||||
A: This may be a clock skew problem. Check that the the clocks on the
|
||||
client and server are properly synchronized (e.g., using ntp).
|
||||
client and server are properly synchronised (e.g., using ntp).
|
||||
|
||||
Q: I see a log message like the following. Why?
|
||||
|
||||
@@ -101,8 +104,8 @@ A: You are most likely running named as a non-root user, and that user
|
||||
fixing this are to create a /var/run/named directory owned by the named
|
||||
user and set pid-file to "/var/run/named/named.pid", or set pid-file to
|
||||
"named.pid", which will put the file in the directory specified by the
|
||||
directory option (which, in this case, must be writable by the user
|
||||
named is running as).
|
||||
directory option (which, in this case, must be writable by the named
|
||||
user).
|
||||
|
||||
Q: I can query the nameserver from the nameserver but not from other
|
||||
machines. Why?
|
||||
@@ -261,7 +264,7 @@ Q: I get a error message like "zone wireless.ietf56.ietf.org/IN: loading
|
||||
master file primaries/wireless.ietf56.ietf.org: no owner".
|
||||
|
||||
A: This error is produced when a line in the master file contains leading
|
||||
white space (tab/space) but there is no current record owner name to
|
||||
white space (tab/space) but the is no current record owner name to
|
||||
inherit the name from. Usually this is the result of putting white
|
||||
space before a comment, forgetting the "@" for the SOA record, or
|
||||
indenting the master file.
|
||||
|
||||
+85
-82
@@ -1,5 +1,7 @@
|
||||
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" []>
|
||||
<!--
|
||||
- Copyright (C) 2004-2010, 2013-2016 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2004-2010, 2013 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2000-2003 Internet Software Consortium.
|
||||
-
|
||||
- Permission to use, copy, modify, and/or distribute this software for any
|
||||
@@ -15,9 +17,10 @@
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
|
||||
<!-- Converted by db4-upgrade version 1.0 -->
|
||||
<article xmlns="http://docbook.org/ns/docbook" version="5.0" class="faq">
|
||||
<!-- $Id: FAQ.xml,v 1.54 2010/01/19 23:48:55 tbox Exp $ -->
|
||||
|
||||
<article class="faq">
|
||||
<title>Frequently Asked Questions about BIND 9</title>
|
||||
<articleinfo>
|
||||
<copyright>
|
||||
<year>2004</year>
|
||||
@@ -28,9 +31,6 @@
|
||||
<year>2009</year>
|
||||
<year>2010</year>
|
||||
<year>2013</year>
|
||||
<year>2014</year>
|
||||
<year>2015</year>
|
||||
<year>2016</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
<copyright>
|
||||
@@ -41,10 +41,10 @@
|
||||
<holder>Internet Software Consortium.</holder>
|
||||
</copyright>
|
||||
</articleinfo>
|
||||
<qandaset defaultlabel="qanda">
|
||||
|
||||
<qandadiv><title>Compilation and Installation Questions</title>
|
||||
|
||||
<qandaset defaultlabel='qanda'>
|
||||
|
||||
<qandadiv><title>Compilation and Installation Questions</title>
|
||||
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>
|
||||
@@ -60,7 +60,7 @@
|
||||
</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>
|
||||
@@ -69,7 +69,7 @@
|
||||
</question>
|
||||
<answer>
|
||||
<para>
|
||||
Short Answer: No.
|
||||
Short Answer: No.
|
||||
</para>
|
||||
<para>
|
||||
Long Answer: There really isn't a default configuration which fits
|
||||
@@ -83,8 +83,8 @@
|
||||
you may only want to listen on the loop back interfaces.
|
||||
</para>
|
||||
<para>
|
||||
To whom do you offer recursive service? Is there a firewall
|
||||
to consider? If so, is it stateless or stateful? Are you
|
||||
Who do you offer recursive service to? Is there are firewall
|
||||
to consider? If so is it stateless or stateful. Are you
|
||||
directly on the Internet? Are you on a private network? Are
|
||||
you on a NAT'd network? The answers
|
||||
to all these questions change how you configure even a
|
||||
@@ -92,9 +92,9 @@
|
||||
</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
|
||||
</qandadiv> <!-- Compilation and Installation Questions -->
|
||||
|
||||
|
||||
<qandadiv><title>Configuration and Setup Questions</title>
|
||||
|
||||
<qandaentry>
|
||||
@@ -124,7 +124,7 @@ example.com. 86400 IN SOA ns hostmaster ( 1 3600 1800 1814400 3600 )</programlis
|
||||
</informalexample>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
|
||||
<qandaentry>
|
||||
<!-- configuration -->
|
||||
<question>
|
||||
@@ -222,7 +222,7 @@ view "chaos" chaos {
|
||||
<answer>
|
||||
<para>
|
||||
This may be a clock skew problem. Check that the the clocks
|
||||
on the client and server are properly synchronized (e.g.,
|
||||
on the client and server are properly synchronised (e.g.,
|
||||
using ntp).
|
||||
</para>
|
||||
</answer>
|
||||
@@ -246,11 +246,11 @@ view "chaos" chaos {
|
||||
"/var/run/named/named.pid", or set pid-file to "named.pid",
|
||||
which will put the file in the directory specified by the
|
||||
directory option (which, in this case, must be writable by
|
||||
the user named is running as).
|
||||
the named user).
|
||||
</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>
|
||||
@@ -265,7 +265,7 @@ view "chaos" chaos {
|
||||
</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>
|
||||
@@ -358,7 +358,7 @@ Slave 10.0.1.2:
|
||||
</informalexample>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>
|
||||
@@ -391,7 +391,7 @@ named-checkzone example.com tmp</programlisting>
|
||||
</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>
|
||||
@@ -415,7 +415,7 @@ named-checkzone example.com tmp</programlisting>
|
||||
</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>
|
||||
@@ -480,7 +480,7 @@ Master 10.0.1.1:
|
||||
<answer>
|
||||
<para>
|
||||
This error is produced when a line in the master file
|
||||
contains leading white space (tab/space) but there is no
|
||||
contains leading white space (tab/space) but the is no
|
||||
current record owner name to inherit the name from. Usually
|
||||
this is the result of putting white space before a comment,
|
||||
forgetting the "@" for the SOA record, or indenting the master
|
||||
@@ -500,7 +500,7 @@ Master 10.0.1.1:
|
||||
You are running chrooted (-t) and have not supplied local timezone
|
||||
information in the chroot area.
|
||||
</para>
|
||||
<simplelist type="vert">
|
||||
<simplelist>
|
||||
<member>FreeBSD: /etc/localtime</member>
|
||||
<member>Solaris: /etc/TIMEZONE and /usr/share/lib/zoneinfo</member>
|
||||
<member>OSF: /etc/zoneinfo/localtime</member>
|
||||
@@ -510,7 +510,7 @@ Master 10.0.1.1:
|
||||
</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>
|
||||
@@ -550,7 +550,7 @@ Master 10.0.1.1:
|
||||
</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>
|
||||
@@ -602,7 +602,7 @@ zone "example.net" {
|
||||
</informalexample>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>
|
||||
@@ -693,9 +693,9 @@ server ::/0 { bogus yes; };
|
||||
</programlisting>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
|
||||
</qandadiv> <!-- Configuration and Setup Questions -->
|
||||
|
||||
|
||||
<qandadiv><title>Operations Questions</title>
|
||||
|
||||
<qandaentry>
|
||||
@@ -767,7 +767,7 @@ server ::/0 { bogus yes; };
|
||||
</qandadiv> <!-- Operations Questions -->
|
||||
|
||||
<qandadiv><title>General Questions</title>
|
||||
|
||||
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>
|
||||
@@ -806,13 +806,14 @@ server ::/0 { bogus yes; };
|
||||
of sending dynamic update requests to DNS servers without
|
||||
being specifically configured to do so. If the update
|
||||
requests are coming from a Windows 2000 machine, see
|
||||
<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://support.microsoft.com/support/kb/articles/q246/8/04.asp">
|
||||
<http://support.microsoft.com/support/kb/articles/q246/8/04.asp></link>
|
||||
<ulink
|
||||
url="http://support.microsoft.com/support/kb/articles/q246/8/04.asp">
|
||||
<http://support.microsoft.com/support/kb/articles/q246/8/04.asp></ulink>
|
||||
for information about how to turn them off.
|
||||
</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>
|
||||
@@ -847,7 +848,7 @@ server ::/0 { bogus yes; };
|
||||
</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>
|
||||
@@ -865,7 +866,7 @@ server ::/0 { bogus yes; };
|
||||
</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>
|
||||
@@ -881,7 +882,7 @@ server ::/0 { bogus yes; };
|
||||
</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>
|
||||
@@ -908,7 +909,7 @@ serial-query-rate 5; // default 20</programlisting>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<qandaentry>
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>
|
||||
I don't get RRSIG's returned when I use "dig +dnssec".
|
||||
@@ -920,7 +921,7 @@ serial-query-rate 5; // default 20</programlisting>
|
||||
</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>
|
||||
@@ -957,7 +958,7 @@ serial-query-rate 5; // default 20</programlisting>
|
||||
usage rules and are leaking queries to the Internet. You
|
||||
should establish your own zones for these addresses to prevent
|
||||
you querying the Internet's name servers for these addresses.
|
||||
Please see <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://as112.net/"><http://as112.net/></link>
|
||||
Please see <ulink url="http://as112.net/"><http://as112.net/></ulink>
|
||||
for details of the problems you are causing and the counter
|
||||
measures that have had to be deployed.
|
||||
</para>
|
||||
@@ -1004,7 +1005,7 @@ empty:
|
||||
</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>
|
||||
@@ -1081,9 +1082,9 @@ empty:
|
||||
</qandaentry>
|
||||
|
||||
</qandadiv> <!-- General Questions -->
|
||||
|
||||
|
||||
<qandadiv><title>Operating-System Specific Questions</title>
|
||||
|
||||
|
||||
<qandadiv><title>HPUX</title>
|
||||
|
||||
<qandaentry>
|
||||
@@ -1111,9 +1112,9 @@ configure: error: need either working unistd.h or sys/select.h</programlisting>
|
||||
</qandadiv> <!-- HPUX -->
|
||||
|
||||
<qandadiv><title>Linux</title>
|
||||
|
||||
|
||||
<qandaentry>
|
||||
<question>
|
||||
<question>
|
||||
<para>
|
||||
Why do I get the following errors:
|
||||
<programlisting>general: errno2result.c:109: unexpected error:
|
||||
@@ -1127,7 +1128,7 @@ client: UDP client handler shutting down due to fatal receive error: unexpected
|
||||
</para>
|
||||
<para>
|
||||
See:
|
||||
<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://marc.theaimsgroup.com/?l=linux-netdev&m=113081708031466&w=2"><http://marc.theaimsgroup.com/?l=linux-netdev&m=113081708031466&w=2></link>
|
||||
<ulink url="http://marc.theaimsgroup.com/?l=linux-netdev&m=113081708031466&w=2"><http://marc.theaimsgroup.com/?l=linux-netdev&m=113081708031466&w=2></ulink>
|
||||
</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
@@ -1144,9 +1145,9 @@ client: UDP client handler shutting down due to fatal receive error: unexpected
|
||||
non-blocking is ignored. It is reported that setting
|
||||
xfrm_larval_drop to 1 helps but this may have negative side effects.
|
||||
See:
|
||||
<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://bugzilla.redhat.com/show_bug.cgi?id=427629"><https://bugzilla.redhat.com/show_bug.cgi?id=427629></link>
|
||||
<ulink url="https://bugzilla.redhat.com/show_bug.cgi?id=427629"><https://bugzilla.redhat.com/show_bug.cgi?id=427629></ulink>
|
||||
and
|
||||
<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://lkml.org/lkml/2007/12/4/260"><http://lkml.org/lkml/2007/12/4/260></link>.
|
||||
<ulink url="http://lkml.org/lkml/2007/12/4/260"><http://lkml.org/lkml/2007/12/4/260></ulink>.
|
||||
</para>
|
||||
<para>
|
||||
xfrm_larval_drop can be set to 1 by the following procedure:
|
||||
@@ -1176,7 +1177,7 @@ echo "1" > proc/sys/net/core/xfrm_larval_drop</programlisting>
|
||||
</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>
|
||||
@@ -1195,7 +1196,7 @@ echo "1" > proc/sys/net/core/xfrm_larval_drop</programlisting>
|
||||
</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>
|
||||
@@ -1216,7 +1217,7 @@ modprobe capability</programlisting>
|
||||
</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>
|
||||
@@ -1242,7 +1243,8 @@ modprobe capability</programlisting>
|
||||
|
||||
<para>
|
||||
Red Hat have adopted the National Security Agency's
|
||||
SELinux security policy (see <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.nsa.gov/selinux"><http://www.nsa.gov/selinux></link>)
|
||||
SELinux security policy (see <ulink
|
||||
url="http://www.nsa.gov/selinux"><http://www.nsa.gov/selinux></ulink>)
|
||||
and recommendations for BIND security , which are more
|
||||
secure than running named in a chroot and make use of
|
||||
the bind-chroot environment unnecessary .
|
||||
@@ -1276,7 +1278,7 @@ $ROOTDIR/var/tmp
|
||||
able to write or create files except in the directories
|
||||
above, with SELinux in Enforcing mode.
|
||||
</para>
|
||||
|
||||
|
||||
<para>
|
||||
So, to allow named to update slave or DDNS zone files,
|
||||
it is best to locate them in $ROOTDIR/var/named/slaves,
|
||||
@@ -1287,7 +1289,7 @@ zone "slave.zone." IN {
|
||||
type slave;
|
||||
file "slaves/slave.zone.db";
|
||||
...
|
||||
};
|
||||
};
|
||||
zone "ddns.zone." IN {
|
||||
type master;
|
||||
allow-updates {...};
|
||||
@@ -1320,13 +1322,13 @@ options {
|
||||
system-config-securitylevel GUI, using the 'setsebool'
|
||||
command, or in /etc/selinux/targeted/booleans.
|
||||
</para>
|
||||
|
||||
|
||||
<para>
|
||||
You can disable SELinux protection for named entirely by
|
||||
setting the 'named_disable_trans=1' SELinux tunable boolean
|
||||
parameter.
|
||||
</para>
|
||||
|
||||
|
||||
<para>
|
||||
The SELinux named policy defines these SELinux contexts for named:
|
||||
<informalexample>
|
||||
@@ -1337,7 +1339,7 @@ named_cache_t: for files modifiable by named - $ROOTDIR/var/{tmp,named/{slaves,d
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
</para>
|
||||
|
||||
|
||||
<para>
|
||||
If you want to retain use of the SELinux policy for named,
|
||||
and put named files in different locations, you can do
|
||||
@@ -1355,7 +1357,7 @@ named_cache_t: for files modifiable by named - $ROOTDIR/var/{tmp,named/{slaves,d
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
</para>
|
||||
|
||||
|
||||
<para>
|
||||
To create a custom modifiable named data location, e.g.
|
||||
'/var/log/named' for a log file, do:
|
||||
@@ -1365,7 +1367,7 @@ named_cache_t: for files modifiable by named - $ROOTDIR/var/{tmp,named/{slaves,d
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
</para>
|
||||
|
||||
|
||||
<para>
|
||||
To create a custom zone file location, e.g. /root/zones/, do:
|
||||
<informalexample>
|
||||
@@ -1374,7 +1376,7 @@ named_cache_t: for files modifiable by named - $ROOTDIR/var/{tmp,named/{slaves,d
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
</para>
|
||||
|
||||
|
||||
<para>
|
||||
See these man-pages for more information : selinux(8),
|
||||
named_selinux(8), chcon(1), setsebool(8)
|
||||
@@ -1400,8 +1402,8 @@ named_cache_t: for files modifiable by named - $ROOTDIR/var/{tmp,named/{slaves,d
|
||||
</question>
|
||||
<answer>
|
||||
<para>
|
||||
Ubuntu uses AppArmor <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://en.wikipedia.org/wiki/AppArmor">
|
||||
<http://en.wikipedia.org/wiki/AppArmor></link> in
|
||||
Ubuntu uses AppArmor <ulink url="http://en.wikipedia.org/wiki/AppArmor">
|
||||
<http://en.wikipedia.org/wiki/AppArmor></ulink> in
|
||||
addition to normal file system permissions to protect the system.
|
||||
</para>
|
||||
<para>
|
||||
@@ -1435,11 +1437,11 @@ proc /var/named/proc proc defaults 0 0</programlisting>
|
||||
</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
|
||||
</qandadiv> <!-- Linux -->
|
||||
|
||||
|
||||
<qandadiv><title>Windows</title>
|
||||
|
||||
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>
|
||||
@@ -1460,7 +1462,7 @@ proc /var/named/proc proc defaults 0 0</programlisting>
|
||||
</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>
|
||||
@@ -1486,11 +1488,11 @@ options {
|
||||
</informalexample>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
|
||||
</qandadiv> <!-- Windows -->
|
||||
|
||||
|
||||
<qandadiv><title>FreeBSD</title>
|
||||
|
||||
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>
|
||||
@@ -1510,16 +1512,16 @@ rand_irqs="3 14 15"</programlisting>
|
||||
</informalexample>
|
||||
<para>
|
||||
See also
|
||||
<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://people.freebsd.org/~dougb/randomness.html">
|
||||
<http://people.freebsd.org/~dougb/randomness.html></link>.
|
||||
<ulink url="http://people.freebsd.org/~dougb/randomness.html">
|
||||
<http://people.freebsd.org/~dougb/randomness.html></ulink>.
|
||||
</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
|
||||
</qandadiv> <!-- FreeBSD -->
|
||||
|
||||
|
||||
<qandadiv><title>Solaris</title>
|
||||
|
||||
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>
|
||||
@@ -1531,14 +1533,15 @@ rand_irqs="3 14 15"</programlisting>
|
||||
Sun has a blog entry describing how to do this.
|
||||
</para>
|
||||
<para>
|
||||
<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://blogs.sun.com/roller/page/anay/Weblog?catname=%2FSolaris">
|
||||
<ulink
|
||||
url="http://blogs.sun.com/roller/page/anay/Weblog?catname=%2FSolaris">
|
||||
<http://blogs.sun.com/roller/page/anay/Weblog?catname=%2FSolaris>
|
||||
</link>
|
||||
</ulink>
|
||||
</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
</qandadiv> <!-- Solaris -->
|
||||
|
||||
</qandadiv>
|
||||
|
||||
<qandadiv><title>Apple Mac OS X</title>
|
||||
|
||||
@@ -1554,7 +1557,7 @@ rand_irqs="3 14 15"</programlisting>
|
||||
</para>
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
% sudo rndc-confgen > /etc/rndc.conf</programlisting>
|
||||
% sudo rndc-confgen > /etc/rndc.conf</programlisting>
|
||||
</informalexample>
|
||||
<para>
|
||||
Copy the key statement from /etc/rndc.conf into /etc/rndc.key, e.g.:
|
||||
@@ -1602,8 +1605,8 @@ key "rndc-key" {
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
</qandadiv> <!-- Apple Mac OS X -->
|
||||
|
||||
</qandadiv>
|
||||
|
||||
</qandadiv> <!-- Operating-System Specific Questions -->
|
||||
|
||||
</qandaset>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2004-2009, 2011-2015 Internet Systems Consortium, Inc. ("ISC")
|
||||
# Copyright (C) 2004-2009, 2011-2014 Internet Systems Consortium, Inc. ("ISC")
|
||||
# Copyright (C) 1998-2002 Internet Software Consortium.
|
||||
#
|
||||
# Permission to use, copy, modify, and/or distribute this software for any
|
||||
@@ -19,7 +19,7 @@ srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
|
||||
VERSION=@BIND9_VERSION@
|
||||
@BIND9_VERSION@
|
||||
|
||||
SUBDIRS = make unit lib bin doc @LIBEXPORT@
|
||||
TARGETS =
|
||||
@@ -32,9 +32,6 @@ MANOBJS = ${MANPAGES} ${HTMLPAGES}
|
||||
|
||||
@BIND9_MAKE_RULES@
|
||||
|
||||
newrr:
|
||||
cd lib/dns; ${MAKE} newrr
|
||||
|
||||
distclean::
|
||||
rm -f config.cache config.h config.log config.status TAGS
|
||||
rm -f libtool isc-config.sh configure.lineno
|
||||
|
||||
+13
-102
@@ -51,79 +51,6 @@ BIND 9
|
||||
For up-to-date release notes and errata, see
|
||||
http://www.isc.org/software/bind9/releasenotes
|
||||
|
||||
BIND 9.9.9-P4
|
||||
|
||||
This version contains a fix for CVE-2016-8864.
|
||||
|
||||
BIND 9.9.9-P3
|
||||
|
||||
This version contains a fix for CVE-2016-2776.
|
||||
|
||||
BIND 9.9.9-P2
|
||||
|
||||
This version contains a fix for CVE-2016-2775 and addresses
|
||||
two regressions introduced with BIND 9.9.9.
|
||||
|
||||
BIND 9.9.9-P1
|
||||
|
||||
This version contains two urgent fixes to BIND 9.9.9:
|
||||
1) Windows installation was failing without manual updating
|
||||
of BINDinstall's attributes.
|
||||
2) A race condition was causing instability in the rbt
|
||||
tree state.
|
||||
|
||||
BIND 9.9.9
|
||||
|
||||
BIND 9.9.9 is a maintenance release and addresses bugs found
|
||||
in BIND 9.9.8 and earlier, as well as the security flaws
|
||||
described in CVE-2015-8000, CVE-2015-8461, CVE-2015-8704,
|
||||
CVE-2016-1285, and CVE-2016-1286.
|
||||
|
||||
BIND 9.9.8
|
||||
|
||||
BIND 9.9.8 is a maintenance release and addresses bugs
|
||||
found in BIND 9.9.7 and earlier, as well as the security
|
||||
flaws described in CVE-2015-4620, CVE-2015-5477,
|
||||
CVE-2015-5722, and CVE-2015-5986.
|
||||
|
||||
It also makes the following new features available via a
|
||||
compile-time option:
|
||||
|
||||
- New "fetchlimit" quotas are now available for the use of
|
||||
recursive resolvers that are are under high query load for
|
||||
domains whose authoritative servers are nonresponsive or are
|
||||
experiencing a denial of service attack.
|
||||
|
||||
+ "fetches-per-server" limits the number of simultaneous queries
|
||||
that can be sent to any single authoritative server. The
|
||||
configured value is a starting point; it is automatically
|
||||
adjusted downward if the server is partially or completely
|
||||
non-responsive. The algorithm used to adjust the quota can be
|
||||
configured via the "fetch-quota-params" option.
|
||||
+ "fetches-per-zone" limits the number of simultaneous queries
|
||||
that can be sent for names within a single domain. (Note:
|
||||
Unlike "fetches-per-server", this value is not self-tuning.)
|
||||
+ New stats counters have been added to count
|
||||
queries spilled due to these quotas.
|
||||
|
||||
NOTE: These options are NOT built in by default; use
|
||||
"configure --enable-fetchlimit" to enable them.
|
||||
|
||||
BIND 9.9.7
|
||||
|
||||
BIND 9.9.7 is a maintenance release and addresses bugs
|
||||
found in BIND 9.9.6 and earlier, as well as the security
|
||||
flaws described in CVE-2014-8500 and CVE-2015-1349.
|
||||
|
||||
BIND 9.9.6
|
||||
|
||||
BIND 9.9.6 is a maintenance release, and also includes
|
||||
the following new functionality.
|
||||
|
||||
- The former behavior with respect to capitalization of names
|
||||
(prior to BIND 9.9.5) can be restored for specific clients via
|
||||
the new "no-case-compress" ACL.
|
||||
|
||||
BIND 9.9.5
|
||||
|
||||
BIND 9.9.5 is a maintenance release, and patches the security
|
||||
@@ -283,7 +210,7 @@ Building
|
||||
-DDIG_SIGCHASE_BU=1)
|
||||
Disable dropping queries from particular well known ports.
|
||||
-DNS_CLIENT_DROPPORT=0
|
||||
Sibling glue checking in named-checkzone is enabled by default.
|
||||
Sibling glue checking in named-checkzone is enabled by default.
|
||||
To disable the default check set. -DCHECK_SIBLING=0
|
||||
named-checkzone checks out-of-zone addresses by default.
|
||||
To disable this default set. -DCHECK_LOCAL=0
|
||||
@@ -319,7 +246,7 @@ Building
|
||||
a nonstandard prefix, you can tell configure where to
|
||||
look for it using "--with-openssl=/prefix".
|
||||
|
||||
On some platforms it is necessary to explicitly request large
|
||||
On some platforms it is necessary to explictly request large
|
||||
file support to handle files bigger than 2GB. This can be
|
||||
done by "--enable-largefile" on the configure command line.
|
||||
|
||||
@@ -422,7 +349,7 @@ Change Log
|
||||
[security] Fix for a significant security flaw
|
||||
|
||||
[experimental] Used for new features when the syntax
|
||||
or other aspects of the design are still
|
||||
or other aspects of the design are still
|
||||
in flux and may change
|
||||
|
||||
[port] Portability enhancement
|
||||
@@ -431,11 +358,9 @@ Change Log
|
||||
server addresses and keys
|
||||
|
||||
[tuning] Changes to built-in configuration defaults
|
||||
and constants to improve performance
|
||||
and constants to improve performanceo
|
||||
|
||||
[performance] Other changes to improve server performance
|
||||
|
||||
[protocol] Updates to the DNS protocol such as new
|
||||
[protocol] Updates to the DNS protocol such as new
|
||||
RR types
|
||||
|
||||
[test] Changes to the automatic tests, not
|
||||
@@ -445,14 +370,6 @@ Change Log
|
||||
|
||||
[doc] Documentation
|
||||
|
||||
[contrib] Changes to the contributed tools and
|
||||
libraries in the 'contrib' subdirectory
|
||||
|
||||
[placeholder] Used in the master development branch to
|
||||
reserve change numbers for use in other
|
||||
branches, e.g. when fixing a bug that only
|
||||
exists in older releases
|
||||
|
||||
In general, [func] and [experimental] tags will only appear
|
||||
in new-feature releases (i.e., those with version numbers
|
||||
ending in zero). Some new functionality may be backported to
|
||||
@@ -462,28 +379,22 @@ Change Log
|
||||
|
||||
Bug Reports and Mailing Lists
|
||||
|
||||
Bug reports should be sent to:
|
||||
Bugs reports should be sent to
|
||||
|
||||
[email protected]
|
||||
|
||||
Feature requests can be sent to:
|
||||
To join the BIND Users mailing list, send mail to
|
||||
|
||||
bind-sugg[email protected]
|
||||
bind-users-requ[email protected]
|
||||
|
||||
To join or view the archives of the BIND Users mailing list,
|
||||
visit:
|
||||
archives of which can be found via
|
||||
|
||||
https://lists.isc.org/mailman/listinfo/bind-users
|
||||
http://www.isc.org/ops/lists/
|
||||
|
||||
If you're planning on making changes to the BIND 9 source
|
||||
code, you may also want to join the BIND Workers mailing
|
||||
list:
|
||||
code, you might want to join the BIND Workers mailing list.
|
||||
Send mail to
|
||||
|
||||
https://lists.isc.org/mailman/listinfo/bind-workers
|
||||
|
||||
Information on read-only Git access, coding style and developer
|
||||
guidelines can be found at:
|
||||
|
||||
http://www.isc.org/git/
|
||||
[email protected]
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004, 2005, 2007, 2008, 2012, 2014, 2016 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004, 2005, 2007, 2008, 2012 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 1999-2003 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
@@ -73,9 +73,6 @@
|
||||
/** define if arc4random() exists */
|
||||
#undef HAVE_ARC4RANDOM
|
||||
|
||||
/** define if arc4random_addrandom() exists */
|
||||
#undef HAVE_ARC4RANDOM_ADDRANDOM
|
||||
|
||||
/**
|
||||
* define if pthread_setconcurrency() should be called to tell the
|
||||
* OS how many threads we might want to run.
|
||||
@@ -149,6 +146,3 @@ int sigwait(const unsigned int *set, int *sig);
|
||||
|
||||
/* Define if threads need PTHREAD_SCOPE_SYSTEM */
|
||||
#undef NEED_PTHREAD_SCOPE_SYSTEM
|
||||
|
||||
/* Define to 1 if you have the uname library function. */
|
||||
#undef HAVE_UNAME
|
||||
Vendored
-12
@@ -3,15 +3,3 @@ sinclude(libtool.m4/ltoptions.m4)dnl
|
||||
sinclude(libtool.m4/ltsugar.m4)dnl
|
||||
sinclude(libtool.m4/ltversion.m4)dnl
|
||||
sinclude(libtool.m4/lt~obsolete.m4)dnl
|
||||
|
||||
m4_divert_text(HELP_CANON, [[
|
||||
NOTE: If PREFIX is not set, then the default values for --sysconfdir
|
||||
and --localstatedir are /etc and /var, respectively.]])
|
||||
m4_divert_text(HELP_END, [[
|
||||
Professional support for BIND is provided by Internet Systems Consortium,
|
||||
Inc. Information about paid support and training options is available at
|
||||
https://www.isc.org/support.
|
||||
|
||||
Help can also often be found on the BIND Users mailing list
|
||||
(https://lists.isc.org/mailman/listinfo/bind-users) or in the #bind
|
||||
channel of the Freenode IRC service.]])
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2004-2007, 2009, 2012, 2014, 2015 Internet Systems Consortium, Inc. ("ISC")
|
||||
# Copyright (C) 2004-2007, 2009, 2012 Internet Systems Consortium, Inc. ("ISC")
|
||||
# Copyright (C) 2000-2003 Internet Software Consortium.
|
||||
#
|
||||
# Permission to use, copy, modify, and/or distribute this software for any
|
||||
@@ -19,7 +19,7 @@ srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
|
||||
VERSION=@BIND9_VERSION@
|
||||
@BIND9_VERSION@
|
||||
|
||||
@BIND9_MAKE_INCLUDES@
|
||||
|
||||
@@ -70,7 +70,7 @@ named-checkzone.@O@: named-checkzone.c
|
||||
-c ${srcdir}/named-checkzone.c
|
||||
|
||||
named-checkconf@EXEEXT@: named-checkconf.@O@ check-tool.@O@ ${ISCDEPLIBS} \
|
||||
${DNSDEPLIBS} ${ISCCFGDEPLIBS} ${BIND9DEPLIBS}
|
||||
${ISCCFGDEPLIBS} ${BIND9DEPLIBS}
|
||||
export BASEOBJS="named-checkconf.@O@ check-tool.@O@"; \
|
||||
export LIBS0="${BIND9LIBS} ${ISCCFGLIBS} ${DNSLIBS}"; \
|
||||
${FINALBUILDCMD}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2012, 2015 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004-2012 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2000-2002 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
@@ -33,7 +33,6 @@
|
||||
#include <isc/mem.h>
|
||||
#include <isc/netdb.h>
|
||||
#include <isc/net.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/region.h>
|
||||
#include <isc/stdio.h>
|
||||
#include <isc/string.h>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.\" Copyright (C) 2004, 2005, 2007, 2009, 2014, 2015 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2004, 2005, 2007, 2009, 2014 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2000-2002 Internet Software Consortium.
|
||||
.\"
|
||||
.\" Permission to use, copy, modify, and/or distribute this software for any
|
||||
@@ -13,131 +13,115 @@
|
||||
.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
.\" PERFORMANCE OF THIS SOFTWARE.
|
||||
.\"
|
||||
.\" $Id$
|
||||
.\"
|
||||
.hy 0
|
||||
.ad l
|
||||
'\" t
|
||||
.\" Title: named-checkconf
|
||||
.\" Title: named\-checkconf
|
||||
.\" Author:
|
||||
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
|
||||
.\" Date: 2014-01-10
|
||||
.\" Generator: DocBook XSL Stylesheets v1.71.1 <http://docbook.sf.net/>
|
||||
.\" Date: June 14, 2000
|
||||
.\" Manual: BIND9
|
||||
.\" Source: ISC
|
||||
.\" Language: English
|
||||
.\" Source: BIND9
|
||||
.\"
|
||||
.TH "NAMED\-CHECKCONF" "8" "2014\-01\-10" "ISC" "BIND9"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.TH "NAMED\-CHECKCONF" "8" "June 14, 2000" "BIND9" "BIND9"
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
.SH "NAME"
|
||||
named-checkconf \- named configuration file syntax checking tool
|
||||
named\-checkconf \- named configuration file syntax checking tool
|
||||
.SH "SYNOPSIS"
|
||||
.HP \w'\fBnamed\-checkconf\fR\ 'u
|
||||
.HP 16
|
||||
\fBnamed\-checkconf\fR [\fB\-h\fR] [\fB\-v\fR] [\fB\-j\fR] [\fB\-t\ \fR\fB\fIdirectory\fR\fR] {filename} [\fB\-p\fR] [\fB\-x\fR] [\fB\-z\fR]
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
\fBnamed\-checkconf\fR
|
||||
checks the syntax, but not the semantics, of a
|
||||
\fBnamed\fR
|
||||
configuration file\&. The file is parsed and checked for syntax errors, along with all files included by it\&. If no file is specified,
|
||||
/etc/named\&.conf
|
||||
is read by default\&.
|
||||
configuration file. The file is parsed and checked for syntax errors, along with all files included by it. If no file is specified,
|
||||
\fI/etc/named.conf\fR
|
||||
is read by default.
|
||||
.PP
|
||||
Note: files that
|
||||
\fBnamed\fR
|
||||
reads in separate parser contexts, such as
|
||||
rndc\&.key
|
||||
\fIrndc.key\fR
|
||||
and
|
||||
bind\&.keys, are not automatically read by
|
||||
\fBnamed\-checkconf\fR\&. Configuration errors in these files may cause
|
||||
\fIbind.keys\fR, are not automatically read by
|
||||
\fBnamed\-checkconf\fR. Configuration errors in these files may cause
|
||||
\fBnamed\fR
|
||||
to fail to run, even if
|
||||
\fBnamed\-checkconf\fR
|
||||
was successful\&.
|
||||
was successful.
|
||||
\fBnamed\-checkconf\fR
|
||||
can be run on these files explicitly, however\&.
|
||||
can be run on these files explicitly, however.
|
||||
.SH "OPTIONS"
|
||||
.PP
|
||||
\-h
|
||||
.RS 4
|
||||
Print the usage summary and exit\&.
|
||||
Print the usage summary and exit.
|
||||
.RE
|
||||
.PP
|
||||
\-t \fIdirectory\fR
|
||||
.RS 4
|
||||
Chroot to
|
||||
directory
|
||||
so that include directives in the configuration file are processed as if run by a similarly chrooted named\&.
|
||||
\fIdirectory\fR
|
||||
so that include directives in the configuration file are processed as if run by a similarly chrooted named.
|
||||
.RE
|
||||
.PP
|
||||
\-v
|
||||
.RS 4
|
||||
Print the version of the
|
||||
\fBnamed\-checkconf\fR
|
||||
program and exit\&.
|
||||
program and exit.
|
||||
.RE
|
||||
.PP
|
||||
\-p
|
||||
.RS 4
|
||||
Print out the
|
||||
named\&.conf
|
||||
and included files in canonical form if no errors were detected\&.
|
||||
\fInamed.conf\fR
|
||||
and included files in canonical form if no errors were detected.
|
||||
.RE
|
||||
.PP
|
||||
\-x
|
||||
.RS 4
|
||||
When printing the configuration files in canonical form, obscure shared secrets by replacing them with strings of question marks (\*(Aq?\*(Aq)\&. This allows the contents of
|
||||
named\&.conf
|
||||
and related files to be shared \(em for example, when submitting bug reports \(em without compromising private data\&. This option cannot be used without
|
||||
\fB\-p\fR\&.
|
||||
When printing the configuration files in canonical form, obscure shared secrets by replacing them with strings of question marks ('?'). This allows the contents of
|
||||
\fInamed.conf\fR
|
||||
and related files to be shared \(em for example, when submitting bug reports \(em without compromising private data. This option cannot be used without
|
||||
\fB\-p\fR.
|
||||
.RE
|
||||
.PP
|
||||
\-z
|
||||
.RS 4
|
||||
Perform a test load of all master zones found in
|
||||
named\&.conf\&.
|
||||
\fInamed.conf\fR.
|
||||
.RE
|
||||
.PP
|
||||
\-j
|
||||
.RS 4
|
||||
When loading a zonefile read the journal if it exists\&.
|
||||
When loading a zonefile read the journal if it exists.
|
||||
.RE
|
||||
.PP
|
||||
filename
|
||||
.RS 4
|
||||
The name of the configuration file to be checked\&. If not specified, it defaults to
|
||||
/etc/named\&.conf\&.
|
||||
The name of the configuration file to be checked. If not specified, it defaults to
|
||||
\fI/etc/named.conf\fR.
|
||||
.RE
|
||||
.SH "RETURN VALUES"
|
||||
.PP
|
||||
\fBnamed\-checkconf\fR
|
||||
returns an exit status of 1 if errors were detected and 0 otherwise\&.
|
||||
returns an exit status of 1 if errors were detected and 0 otherwise.
|
||||
.SH "SEE ALSO"
|
||||
.PP
|
||||
\fBnamed\fR(8),
|
||||
\fBnamed-checkzone\fR(8),
|
||||
BIND 9 Administrator Reference Manual\&.
|
||||
\fBnamed\-checkzone\fR(8),
|
||||
BIND 9 Administrator Reference Manual.
|
||||
.SH "AUTHOR"
|
||||
.PP
|
||||
\fBInternet Systems Consortium, Inc\&.\fR
|
||||
Internet Systems Consortium
|
||||
.SH "COPYRIGHT"
|
||||
Copyright \(co 2004, 2005, 2007, 2009, 2014 Internet Systems Consortium, Inc. ("ISC")
|
||||
.br
|
||||
Copyright \(co 2004, 2005, 2007, 2009, 2014, 2015 Internet Systems Consortium, Inc. ("ISC")
|
||||
.br
|
||||
Copyright \(co 2000-2002 Internet Software Consortium.
|
||||
Copyright \(co 2000\-2002 Internet Software Consortium.
|
||||
.br
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2007, 2009-2016 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004-2007, 2009-2014 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 1999-2002 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
@@ -31,7 +31,6 @@
|
||||
#include <isc/hash.h>
|
||||
#include <isc/log.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
@@ -143,6 +142,18 @@ get_checknames(const cfg_obj_t **maps, const cfg_obj_t **obj) {
|
||||
}
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
config_get(const cfg_obj_t **maps, const char *name, const cfg_obj_t **obj) {
|
||||
int i;
|
||||
|
||||
for (i = 0;; i++) {
|
||||
if (maps[i] == NULL)
|
||||
return (ISC_R_NOTFOUND);
|
||||
if (cfg_map_get(maps[i], name, obj) == ISC_R_SUCCESS)
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
configure_hint(const char *zfile, const char *zclass, isc_mem_t *mctx) {
|
||||
isc_result_t result;
|
||||
@@ -179,7 +190,6 @@ configure_zone(const char *vclass, const char *view,
|
||||
const char *zname;
|
||||
const char *zfile = NULL;
|
||||
const cfg_obj_t *maps[4];
|
||||
const cfg_obj_t *mastersobj = NULL;
|
||||
const cfg_obj_t *zoptions = NULL;
|
||||
const cfg_obj_t *classobj = NULL;
|
||||
const cfg_obj_t *typeobj = NULL;
|
||||
@@ -213,15 +223,6 @@ configure_zone(const char *vclass, const char *view,
|
||||
if (typeobj == NULL)
|
||||
return (ISC_R_FAILURE);
|
||||
|
||||
/*
|
||||
* Skip checks when using an alternate data source.
|
||||
*/
|
||||
cfg_map_get(zoptions, "database", &dbobj);
|
||||
if (dbobj != NULL &&
|
||||
strcmp("rbt", cfg_obj_asstring(dbobj)) != 0 &&
|
||||
strcmp("rbt64", cfg_obj_asstring(dbobj)) != 0)
|
||||
return (ISC_R_SUCCESS);
|
||||
|
||||
cfg_map_get(zoptions, "file", &fileobj);
|
||||
if (fileobj != NULL)
|
||||
zfile = cfg_obj_asstring(fileobj);
|
||||
@@ -237,18 +238,13 @@ configure_zone(const char *vclass, const char *view,
|
||||
(strcasecmp(cfg_obj_asstring(typeobj), "redirect") != 0))
|
||||
return (ISC_R_SUCCESS);
|
||||
|
||||
/*
|
||||
* Is the redirect zone configured as a slave?
|
||||
*/
|
||||
if (strcasecmp(cfg_obj_asstring(typeobj), "redirect") == 0) {
|
||||
cfg_map_get(zoptions, "masters", &mastersobj);
|
||||
if (mastersobj != NULL)
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
if (zfile == NULL)
|
||||
return (ISC_R_FAILURE);
|
||||
|
||||
cfg_map_get(zoptions, "database", &dbobj);
|
||||
if (dbobj != NULL)
|
||||
return (ISC_R_SUCCESS);
|
||||
|
||||
obj = NULL;
|
||||
if (get_maps(maps, "check-dup-records", &obj)) {
|
||||
if (strcasecmp(cfg_obj_asstring(obj), "warn") == 0) {
|
||||
@@ -370,7 +366,8 @@ configure_zone(const char *vclass, const char *view,
|
||||
|
||||
masterformat = dns_masterformat_text;
|
||||
fmtobj = NULL;
|
||||
if (get_maps(maps, "masterfile-format", &fmtobj)) {
|
||||
result = config_get(maps, "masterfile-format", &fmtobj);
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
const char *masterformatstr = cfg_obj_asstring(fmtobj);
|
||||
if (strcasecmp(masterformatstr, "text") == 0)
|
||||
masterformat = dns_masterformat_text;
|
||||
@@ -421,27 +418,15 @@ configure_view(const char *vclass, const char *view, const cfg_obj_t *config,
|
||||
return (result);
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
config_getclass(const cfg_obj_t *classobj, dns_rdataclass_t defclass,
|
||||
dns_rdataclass_t *classp)
|
||||
{
|
||||
isc_textregion_t r;
|
||||
|
||||
if (!cfg_obj_isstring(classobj)) {
|
||||
*classp = defclass;
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
DE_CONST(cfg_obj_asstring(classobj), r.base);
|
||||
r.length = strlen(r.base);
|
||||
return (dns_rdataclass_fromtext(classp, &r));
|
||||
}
|
||||
|
||||
/*% load zones from the configuration */
|
||||
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;
|
||||
const char *vclass;
|
||||
isc_result_t result = ISC_R_SUCCESS;
|
||||
isc_result_t tresult;
|
||||
|
||||
@@ -452,24 +437,17 @@ load_zones_fromconfig(const cfg_obj_t *config, isc_mem_t *mctx) {
|
||||
element != NULL;
|
||||
element = cfg_list_next(element))
|
||||
{
|
||||
const cfg_obj_t *classobj;
|
||||
dns_rdataclass_t viewclass;
|
||||
const char *vname;
|
||||
char buf[sizeof("CLASS65535")];
|
||||
|
||||
vclass = "IN";
|
||||
vconfig = cfg_listelt_value(element);
|
||||
if (vconfig == NULL)
|
||||
continue;
|
||||
|
||||
classobj = cfg_tuple_get(vconfig, "class");
|
||||
CHECK(config_getclass(classobj, dns_rdataclass_in,
|
||||
&viewclass));
|
||||
if (dns_rdataclass_ismeta(viewclass))
|
||||
CHECK(ISC_R_FAILURE);
|
||||
|
||||
dns_rdataclass_format(viewclass, buf, sizeof(buf));
|
||||
if (vconfig != NULL) {
|
||||
classobj = cfg_tuple_get(vconfig, "class");
|
||||
if (cfg_obj_isstring(classobj))
|
||||
vclass = cfg_obj_asstring(classobj);
|
||||
}
|
||||
vname = cfg_obj_asstring(cfg_tuple_get(vconfig, "name"));
|
||||
tresult = configure_view(buf, vname, config, vconfig, mctx);
|
||||
tresult = configure_view(vclass, vname, config, vconfig, mctx);
|
||||
if (tresult != ISC_R_SUCCESS)
|
||||
result = tresult;
|
||||
}
|
||||
@@ -479,8 +457,6 @@ load_zones_fromconfig(const cfg_obj_t *config, isc_mem_t *mctx) {
|
||||
if (tresult != ISC_R_SUCCESS)
|
||||
result = tresult;
|
||||
}
|
||||
|
||||
cleanup:
|
||||
return (result);
|
||||
}
|
||||
|
||||
@@ -510,33 +486,7 @@ main(int argc, char **argv) {
|
||||
|
||||
isc_commandline_errprint = ISC_FALSE;
|
||||
|
||||
/*
|
||||
* Process memory debugging argument first.
|
||||
*/
|
||||
#define CMDLINE_FLAGS "dhjm:t:pvxz"
|
||||
while ((c = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != -1) {
|
||||
switch (c) {
|
||||
case 'm':
|
||||
if (strcasecmp(isc_commandline_argument, "record") == 0)
|
||||
isc_mem_debugging |= ISC_MEM_DEBUGRECORD;
|
||||
if (strcasecmp(isc_commandline_argument, "trace") == 0)
|
||||
isc_mem_debugging |= ISC_MEM_DEBUGTRACE;
|
||||
if (strcasecmp(isc_commandline_argument, "usage") == 0)
|
||||
isc_mem_debugging |= ISC_MEM_DEBUGUSAGE;
|
||||
if (strcasecmp(isc_commandline_argument, "size") == 0)
|
||||
isc_mem_debugging |= ISC_MEM_DEBUGSIZE;
|
||||
if (strcasecmp(isc_commandline_argument, "mctx") == 0)
|
||||
isc_mem_debugging |= ISC_MEM_DEBUGCTX;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
isc_commandline_reset = ISC_TRUE;
|
||||
|
||||
RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
|
||||
|
||||
while ((c = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != EOF) {
|
||||
while ((c = isc_commandline_parse(argc, argv, "dhjt:pvxz")) != EOF) {
|
||||
switch (c) {
|
||||
case 'd':
|
||||
debug++;
|
||||
@@ -546,9 +496,6 @@ main(int argc, char **argv) {
|
||||
nomerge = ISC_FALSE;
|
||||
break;
|
||||
|
||||
case 'm':
|
||||
break;
|
||||
|
||||
case 't':
|
||||
result = isc_dir_chroot(isc_commandline_argument);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
@@ -608,6 +555,8 @@ main(int argc, char **argv) {
|
||||
InitSockets();
|
||||
#endif
|
||||
|
||||
RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
|
||||
|
||||
RUNTIME_CHECK(setup_logging(mctx, stdout, &logc) == ISC_R_SUCCESS);
|
||||
|
||||
RUNTIME_CHECK(isc_entropy_create(mctx, &ectx) == ISC_R_SUCCESS);
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<!DOCTYPE book [
|
||||
<!ENTITY mdash "—">]>
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
|
||||
[<!ENTITY mdash "—">]>
|
||||
<!--
|
||||
- Copyright (C) 2004, 2005, 2007, 2009, 2014, 2015 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2004, 2005, 2007, 2009, 2014 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2000-2002 Internet Software Consortium.
|
||||
-
|
||||
- Permission to use, copy, modify, and/or distribute this software for any
|
||||
@@ -17,14 +18,10 @@
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
|
||||
<!-- Converted by db4-upgrade version 1.0 -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="man.named-checkconf">
|
||||
<info>
|
||||
<date>2014-01-10</date>
|
||||
</info>
|
||||
<!-- $Id: named-checkconf.docbook,v 1.22 2009/12/28 23:21:16 each Exp $ -->
|
||||
<refentry id="man.named-checkconf">
|
||||
<refentryinfo>
|
||||
<corpname>ISC</corpname>
|
||||
<corpauthor>Internet Systems Consortium, Inc.</corpauthor>
|
||||
<date>June 14, 2000</date>
|
||||
</refentryinfo>
|
||||
|
||||
<refmeta>
|
||||
@@ -40,7 +37,6 @@
|
||||
<year>2007</year>
|
||||
<year>2009</year>
|
||||
<year>2014</year>
|
||||
<year>2015</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
<copyright>
|
||||
@@ -57,21 +53,21 @@
|
||||
</refnamediv>
|
||||
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis sepchar=" ">
|
||||
<cmdsynopsis>
|
||||
<command>named-checkconf</command>
|
||||
<arg choice="opt" rep="norepeat"><option>-h</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-v</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-j</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-t <replaceable class="parameter">directory</replaceable></option></arg>
|
||||
<arg choice="req" rep="norepeat">filename</arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-p</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-x</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-z</option></arg>
|
||||
<arg><option>-h</option></arg>
|
||||
<arg><option>-v</option></arg>
|
||||
<arg><option>-j</option></arg>
|
||||
<arg><option>-t <replaceable class="parameter">directory</replaceable></option></arg>
|
||||
<arg choice="req">filename</arg>
|
||||
<arg><option>-p</option></arg>
|
||||
<arg><option>-x</option></arg>
|
||||
<arg><option>-z</option></arg>
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
|
||||
<refsection><info><title>DESCRIPTION</title></info>
|
||||
|
||||
<refsect1>
|
||||
<title>DESCRIPTION</title>
|
||||
<para><command>named-checkconf</command>
|
||||
checks the syntax, but not the semantics, of a
|
||||
<command>named</command> configuration file. The file is parsed
|
||||
@@ -89,10 +85,10 @@
|
||||
successful. <command>named-checkconf</command> can be run
|
||||
on these files explicitly, however.
|
||||
</para>
|
||||
</refsection>
|
||||
|
||||
<refsection><info><title>OPTIONS</title></info>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>OPTIONS</title>
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
@@ -181,18 +177,18 @@
|
||||
|
||||
</variablelist>
|
||||
|
||||
</refsection>
|
||||
|
||||
<refsection><info><title>RETURN VALUES</title></info>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>RETURN VALUES</title>
|
||||
<para><command>named-checkconf</command>
|
||||
returns an exit status of 1 if
|
||||
errors were detected and 0 otherwise.
|
||||
</para>
|
||||
</refsection>
|
||||
|
||||
<refsection><info><title>SEE ALSO</title></info>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>SEE ALSO</title>
|
||||
<para><citerefentry>
|
||||
<refentrytitle>named</refentrytitle><manvolnum>8</manvolnum>
|
||||
</citerefentry>,
|
||||
@@ -201,5 +197,16 @@
|
||||
</citerefentry>,
|
||||
<citetitle>BIND 9 Administrator Reference Manual</citetitle>.
|
||||
</para>
|
||||
</refsection>
|
||||
</refentry>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>AUTHOR</title>
|
||||
<para><corpauthor>Internet Systems Consortium</corpauthor>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry><!--
|
||||
- Local variables:
|
||||
- mode: sgml
|
||||
- End:
|
||||
-->
|
||||
@@ -1,5 +1,5 @@
|
||||
<!--
|
||||
- Copyright (C) 2004, 2005, 2007, 2009, 2014, 2015 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2004, 2005, 2007, 2009, 2014 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2000-2002 Internet Software Consortium.
|
||||
-
|
||||
- Permission to use, copy, modify, and/or distribute this software for any
|
||||
@@ -14,13 +14,14 @@
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
<!-- $Id$ -->
|
||||
<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.78.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry">
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
|
||||
<a name="man.named-checkconf"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2>Name</h2>
|
||||
@@ -30,29 +31,29 @@
|
||||
<h2>Synopsis</h2>
|
||||
<div class="cmdsynopsis"><p><code class="command">named-checkconf</code> [<code class="option">-h</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">-p</code>] [<code class="option">-x</code>] [<code class="option">-z</code>]</p></div>
|
||||
</div>
|
||||
<div class="refsection">
|
||||
<a name="id-1.7"></a><h2>DESCRIPTION</h2>
|
||||
<p><span class="command"><strong>named-checkconf</strong></span>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2543403"></a><h2>DESCRIPTION</h2>
|
||||
<p><span><strong class="command">named-checkconf</strong></span>
|
||||
checks the syntax, but not the semantics, of a
|
||||
<span class="command"><strong>named</strong></span> configuration file. The file is parsed
|
||||
<span><strong class="command">named</strong></span> configuration file. The file is parsed
|
||||
and checked for syntax errors, along with all files included by it.
|
||||
If no file is specified, <code class="filename">/etc/named.conf</code> is read
|
||||
by default.
|
||||
</p>
|
||||
<p>
|
||||
Note: files that <span class="command"><strong>named</strong></span> reads in separate
|
||||
Note: files that <span><strong class="command">named</strong></span> reads in separate
|
||||
parser contexts, such as <code class="filename">rndc.key</code> and
|
||||
<code class="filename">bind.keys</code>, are not automatically read
|
||||
by <span class="command"><strong>named-checkconf</strong></span>. Configuration
|
||||
errors in these files may cause <span class="command"><strong>named</strong></span> to
|
||||
fail to run, even if <span class="command"><strong>named-checkconf</strong></span> was
|
||||
successful. <span class="command"><strong>named-checkconf</strong></span> can be run
|
||||
by <span><strong class="command">named-checkconf</strong></span>. Configuration
|
||||
errors in these files may cause <span><strong class="command">named</strong></span> to
|
||||
fail to run, even if <span><strong class="command">named-checkconf</strong></span> was
|
||||
successful. <span><strong class="command">named-checkconf</strong></span> can be run
|
||||
on these files explicitly, however.
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsection">
|
||||
<a name="id-1.8"></a><h2>OPTIONS</h2>
|
||||
<div class="variablelist"><dl class="variablelist">
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2543452"></a><h2>OPTIONS</h2>
|
||||
<div class="variablelist"><dl>
|
||||
<dt><span class="term">-h</span></dt>
|
||||
<dd><p>
|
||||
Print the usage summary and exit.
|
||||
@@ -65,7 +66,7 @@
|
||||
</p></dd>
|
||||
<dt><span class="term">-v</span></dt>
|
||||
<dd><p>
|
||||
Print the version of the <span class="command"><strong>named-checkconf</strong></span>
|
||||
Print the version of the <span><strong class="command">named-checkconf</strong></span>
|
||||
program and exit.
|
||||
</p></dd>
|
||||
<dt><span class="term">-p</span></dt>
|
||||
@@ -99,19 +100,24 @@
|
||||
</p></dd>
|
||||
</dl></div>
|
||||
</div>
|
||||
<div class="refsection">
|
||||
<a name="id-1.9"></a><h2>RETURN VALUES</h2>
|
||||
<p><span class="command"><strong>named-checkconf</strong></span>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2543596"></a><h2>RETURN VALUES</h2>
|
||||
<p><span><strong class="command">named-checkconf</strong></span>
|
||||
returns an exit status of 1 if
|
||||
errors were detected and 0 otherwise.
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsection">
|
||||
<a name="id-1.10"></a><h2>SEE ALSO</h2>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2543608"></a><h2>SEE ALSO</h2>
|
||||
<p><span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>,
|
||||
<span class="citerefentry"><span class="refentrytitle">named-checkzone</span>(8)</span>,
|
||||
<em class="citetitle">BIND 9 Administrator Reference Manual</em>.
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2543638"></a><h2>AUTHOR</h2>
|
||||
<p><span class="corpauthor">Internet Systems Consortium</span>
|
||||
</p>
|
||||
</div>
|
||||
</div></body>
|
||||
</html>
|
||||
@@ -1,4 +1,4 @@
|
||||
.\" Copyright (C) 2004-2007, 2009-2011, 2013-2015 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2004-2007, 2009-2011, 2013 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2000-2002 Internet Software Consortium.
|
||||
.\"
|
||||
.\" Permission to use, copy, modify, and/or distribute this software for any
|
||||
@@ -13,121 +13,106 @@
|
||||
.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
.\" PERFORMANCE OF THIS SOFTWARE.
|
||||
.\"
|
||||
.\" $Id$
|
||||
.\"
|
||||
.hy 0
|
||||
.ad l
|
||||
'\" t
|
||||
.\" Title: named-checkzone
|
||||
.\" Title: named\-checkzone
|
||||
.\" Author:
|
||||
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
|
||||
.\" Date: 2013-04-29
|
||||
.\" Generator: DocBook XSL Stylesheets v1.71.1 <http://docbook.sf.net/>
|
||||
.\" Date: June 13, 2000
|
||||
.\" Manual: BIND9
|
||||
.\" Source: ISC
|
||||
.\" Language: English
|
||||
.\" Source: BIND9
|
||||
.\"
|
||||
.TH "NAMED\-CHECKZONE" "8" "2013\-04\-29" "ISC" "BIND9"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.TH "NAMED\-CHECKZONE" "8" "June 13, 2000" "BIND9" "BIND9"
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
.SH "NAME"
|
||||
named-checkzone, named-compilezone \- zone file validity checking or converting tool
|
||||
named\-checkzone, named\-compilezone \- zone file validity checking or converting tool
|
||||
.SH "SYNOPSIS"
|
||||
.HP \w'\fBnamed\-checkzone\fR\ 'u
|
||||
.HP 16
|
||||
\fBnamed\-checkzone\fR [\fB\-d\fR] [\fB\-h\fR] [\fB\-j\fR] [\fB\-q\fR] [\fB\-v\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-f\ \fR\fB\fIformat\fR\fR] [\fB\-F\ \fR\fB\fIformat\fR\fR] [\fB\-i\ \fR\fB\fImode\fR\fR] [\fB\-k\ \fR\fB\fImode\fR\fR] [\fB\-m\ \fR\fB\fImode\fR\fR] [\fB\-M\ \fR\fB\fImode\fR\fR] [\fB\-n\ \fR\fB\fImode\fR\fR] [\fB\-L\ \fR\fB\fIserial\fR\fR] [\fB\-o\ \fR\fB\fIfilename\fR\fR] [\fB\-r\ \fR\fB\fImode\fR\fR] [\fB\-s\ \fR\fB\fIstyle\fR\fR] [\fB\-S\ \fR\fB\fImode\fR\fR] [\fB\-t\ \fR\fB\fIdirectory\fR\fR] [\fB\-T\ \fR\fB\fImode\fR\fR] [\fB\-w\ \fR\fB\fIdirectory\fR\fR] [\fB\-D\fR] [\fB\-W\ \fR\fB\fImode\fR\fR] {zonename} {filename}
|
||||
.HP \w'\fBnamed\-compilezone\fR\ 'u
|
||||
.HP 18
|
||||
\fBnamed\-compilezone\fR [\fB\-d\fR] [\fB\-j\fR] [\fB\-q\fR] [\fB\-v\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-C\ \fR\fB\fImode\fR\fR] [\fB\-f\ \fR\fB\fIformat\fR\fR] [\fB\-F\ \fR\fB\fIformat\fR\fR] [\fB\-i\ \fR\fB\fImode\fR\fR] [\fB\-k\ \fR\fB\fImode\fR\fR] [\fB\-m\ \fR\fB\fImode\fR\fR] [\fB\-n\ \fR\fB\fImode\fR\fR] [\fB\-L\ \fR\fB\fIserial\fR\fR] [\fB\-r\ \fR\fB\fImode\fR\fR] [\fB\-s\ \fR\fB\fIstyle\fR\fR] [\fB\-t\ \fR\fB\fIdirectory\fR\fR] [\fB\-T\ \fR\fB\fImode\fR\fR] [\fB\-w\ \fR\fB\fIdirectory\fR\fR] [\fB\-D\fR] [\fB\-W\ \fR\fB\fImode\fR\fR] {\fB\-o\ \fR\fB\fIfilename\fR\fR} {zonename} {filename}
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
\fBnamed\-checkzone\fR
|
||||
checks the syntax and integrity of a zone file\&. It performs the same checks as
|
||||
checks the syntax and integrity of a zone file. It performs the same checks as
|
||||
\fBnamed\fR
|
||||
does when loading a zone\&. This makes
|
||||
does when loading a zone. This makes
|
||||
\fBnamed\-checkzone\fR
|
||||
useful for checking zone files before configuring them into a name server\&.
|
||||
useful for checking zone files before configuring them into a name server.
|
||||
.PP
|
||||
\fBnamed\-compilezone\fR
|
||||
is similar to
|
||||
\fBnamed\-checkzone\fR, but it always dumps the zone contents to a specified file in a specified format\&. Additionally, it applies stricter check levels by default, since the dump output will be used as an actual zone file loaded by
|
||||
\fBnamed\fR\&. When manually specified otherwise, the check levels must at least be as strict as those specified in the
|
||||
\fBnamed\-checkzone\fR, but it always dumps the zone contents to a specified file in a specified format. Additionally, it applies stricter check levels by default, since the dump output will be used as an actual zone file loaded by
|
||||
\fBnamed\fR. When manually specified otherwise, the check levels must at least be as strict as those specified in the
|
||||
\fBnamed\fR
|
||||
configuration file\&.
|
||||
configuration file.
|
||||
.SH "OPTIONS"
|
||||
.PP
|
||||
\-d
|
||||
.RS 4
|
||||
Enable debugging\&.
|
||||
Enable debugging.
|
||||
.RE
|
||||
.PP
|
||||
\-h
|
||||
.RS 4
|
||||
Print the usage summary and exit\&.
|
||||
Print the usage summary and exit.
|
||||
.RE
|
||||
.PP
|
||||
\-q
|
||||
.RS 4
|
||||
Quiet mode \- exit code only\&.
|
||||
Quiet mode \- exit code only.
|
||||
.RE
|
||||
.PP
|
||||
\-v
|
||||
.RS 4
|
||||
Print the version of the
|
||||
\fBnamed\-checkzone\fR
|
||||
program and exit\&.
|
||||
program and exit.
|
||||
.RE
|
||||
.PP
|
||||
\-j
|
||||
.RS 4
|
||||
When loading the zone file read the journal if it exists\&.
|
||||
When loading the zone file read the journal if it exists.
|
||||
.RE
|
||||
.PP
|
||||
\-c \fIclass\fR
|
||||
.RS 4
|
||||
Specify the class of the zone\&. If not specified, "IN" is assumed\&.
|
||||
Specify the class of the zone. If not specified, "IN" is assumed.
|
||||
.RE
|
||||
.PP
|
||||
\-i \fImode\fR
|
||||
.RS 4
|
||||
Perform post\-load zone integrity checks\&. Possible modes are
|
||||
Perform post\-load zone integrity checks. Possible modes are
|
||||
\fB"full"\fR
|
||||
(default),
|
||||
\fB"full\-sibling"\fR,
|
||||
\fB"local"\fR,
|
||||
\fB"local\-sibling"\fR
|
||||
and
|
||||
\fB"none"\fR\&.
|
||||
\fB"none"\fR.
|
||||
.sp
|
||||
Mode
|
||||
\fB"full"\fR
|
||||
checks that MX records refer to A or AAAA record (both in\-zone and out\-of\-zone hostnames)\&. Mode
|
||||
checks that MX records refer to A or AAAA record (both in\-zone and out\-of\-zone hostnames). Mode
|
||||
\fB"local"\fR
|
||||
only checks MX records which refer to in\-zone hostnames\&.
|
||||
only checks MX records which refer to in\-zone hostnames.
|
||||
.sp
|
||||
Mode
|
||||
\fB"full"\fR
|
||||
checks that SRV records refer to A or AAAA record (both in\-zone and out\-of\-zone hostnames)\&. Mode
|
||||
checks that SRV records refer to A or AAAA record (both in\-zone and out\-of\-zone hostnames). Mode
|
||||
\fB"local"\fR
|
||||
only checks SRV records which refer to in\-zone hostnames\&.
|
||||
only checks SRV records which refer to in\-zone hostnames.
|
||||
.sp
|
||||
Mode
|
||||
\fB"full"\fR
|
||||
checks that delegation NS records refer to A or AAAA record (both in\-zone and out\-of\-zone hostnames)\&. It also checks that glue address records in the zone match those advertised by the child\&. Mode
|
||||
checks that delegation NS records refer to A or AAAA record (both in\-zone and out\-of\-zone hostnames). It also checks that glue address records in the zone match those advertised by the child. Mode
|
||||
\fB"local"\fR
|
||||
only checks NS records which refer to in\-zone hostnames or that some required glue exists, that is when the nameserver is in a child zone\&.
|
||||
only checks NS records which refer to in\-zone hostnames or that some required glue exists, that is when the nameserver is in a child zone.
|
||||
.sp
|
||||
Mode
|
||||
\fB"full\-sibling"\fR
|
||||
@@ -137,25 +122,25 @@ disable sibling glue checks but are otherwise the same as
|
||||
\fB"full"\fR
|
||||
and
|
||||
\fB"local"\fR
|
||||
respectively\&.
|
||||
respectively.
|
||||
.sp
|
||||
Mode
|
||||
\fB"none"\fR
|
||||
disables the checks\&.
|
||||
disables the checks.
|
||||
.RE
|
||||
.PP
|
||||
\-f \fIformat\fR
|
||||
.RS 4
|
||||
Specify the format of the zone file\&. Possible formats are
|
||||
Specify the format of the zone file. Possible formats are
|
||||
\fB"text"\fR
|
||||
(default) and
|
||||
\fB"raw"\fR\&.
|
||||
\fB"raw"\fR.
|
||||
.RE
|
||||
.PP
|
||||
\-F \fIformat\fR
|
||||
.RS 4
|
||||
Specify the format of the output file specified\&. For
|
||||
\fBnamed\-checkzone\fR, this does not cause any effects unless it dumps the zone contents\&.
|
||||
Specify the format of the output file specified. For
|
||||
\fBnamed\-checkzone\fR, this does not cause any effects unless it dumps the zone contents.
|
||||
.sp
|
||||
Possible formats are
|
||||
\fB"text"\fR
|
||||
@@ -163,162 +148,161 @@ Possible formats are
|
||||
\fB"raw"\fR
|
||||
or
|
||||
\fB"raw=N"\fR, which store the zone in a binary format for rapid loading by
|
||||
\fBnamed\fR\&.
|
||||
\fBnamed\fR.
|
||||
\fB"raw=N"\fR
|
||||
specifies the format version of the raw zone file: if N is 0, the raw file can be read by any version of
|
||||
\fBnamed\fR; if N is 1, the file can be read by release 9\&.9\&.0 or higher\&. The default is 1\&.
|
||||
\fBnamed\fR; if N is 1, the file can be read by release 9.9.0 or higher. The default is 1.
|
||||
.RE
|
||||
.PP
|
||||
\-k \fImode\fR
|
||||
.RS 4
|
||||
Perform
|
||||
\fB"check\-names"\fR
|
||||
checks with the specified failure mode\&. Possible modes are
|
||||
checks with the specified failure mode. Possible modes are
|
||||
\fB"fail"\fR
|
||||
(default for
|
||||
\fBnamed\-compilezone\fR),
|
||||
\fB"warn"\fR
|
||||
(default for
|
||||
\fBnamed\-checkzone\fR) and
|
||||
\fB"ignore"\fR\&.
|
||||
\fB"ignore"\fR.
|
||||
.RE
|
||||
.PP
|
||||
\-L \fIserial\fR
|
||||
.RS 4
|
||||
When compiling a zone to \*(Aqraw\*(Aq format, set the "source serial" value in the header to the specified serial number\&. (This is expected to be used primarily for testing purposes\&.)
|
||||
When compiling a zone to 'raw' format, set the "source serial" value in the header to the specified serial number. (This is expected to be used primarily for testing purposes.)
|
||||
.RE
|
||||
.PP
|
||||
\-m \fImode\fR
|
||||
.RS 4
|
||||
Specify whether MX records should be checked to see if they are addresses\&. Possible modes are
|
||||
Specify whether MX records should be checked to see if they are addresses. Possible modes are
|
||||
\fB"fail"\fR,
|
||||
\fB"warn"\fR
|
||||
(default) and
|
||||
\fB"ignore"\fR\&.
|
||||
\fB"ignore"\fR.
|
||||
.RE
|
||||
.PP
|
||||
\-M \fImode\fR
|
||||
.RS 4
|
||||
Check if a MX record refers to a CNAME\&. Possible modes are
|
||||
Check if a MX record refers to a CNAME. Possible modes are
|
||||
\fB"fail"\fR,
|
||||
\fB"warn"\fR
|
||||
(default) and
|
||||
\fB"ignore"\fR\&.
|
||||
\fB"ignore"\fR.
|
||||
.RE
|
||||
.PP
|
||||
\-n \fImode\fR
|
||||
.RS 4
|
||||
Specify whether NS records should be checked to see if they are addresses\&. Possible modes are
|
||||
Specify whether NS records should be checked to see if they are addresses. Possible modes are
|
||||
\fB"fail"\fR
|
||||
(default for
|
||||
\fBnamed\-compilezone\fR),
|
||||
\fB"warn"\fR
|
||||
(default for
|
||||
\fBnamed\-checkzone\fR) and
|
||||
\fB"ignore"\fR\&.
|
||||
\fB"ignore"\fR.
|
||||
.RE
|
||||
.PP
|
||||
\-o \fIfilename\fR
|
||||
.RS 4
|
||||
Write zone output to
|
||||
filename\&. If
|
||||
filename
|
||||
\fIfilename\fR. If
|
||||
\fIfilename\fR
|
||||
is
|
||||
\-
|
||||
then write to standard out\&. This is mandatory for
|
||||
\fBnamed\-compilezone\fR\&.
|
||||
\fI\-\fR
|
||||
then write to standard out. This is mandatory for
|
||||
\fBnamed\-compilezone\fR.
|
||||
.RE
|
||||
.PP
|
||||
\-r \fImode\fR
|
||||
.RS 4
|
||||
Check for records that are treated as different by DNSSEC but are semantically equal in plain DNS\&. Possible modes are
|
||||
Check for records that are treated as different by DNSSEC but are semantically equal in plain DNS. Possible modes are
|
||||
\fB"fail"\fR,
|
||||
\fB"warn"\fR
|
||||
(default) and
|
||||
\fB"ignore"\fR\&.
|
||||
\fB"ignore"\fR.
|
||||
.RE
|
||||
.PP
|
||||
\-s \fIstyle\fR
|
||||
.RS 4
|
||||
Specify the style of the dumped zone file\&. Possible styles are
|
||||
Specify the style of the dumped zone file. Possible styles are
|
||||
\fB"full"\fR
|
||||
(default) and
|
||||
\fB"relative"\fR\&. The full format is most suitable for processing automatically by a separate script\&. On the other hand, the relative format is more human\-readable and is thus suitable for editing by hand\&. For
|
||||
\fB"relative"\fR. The full format is most suitable for processing automatically by a separate script. On the other hand, the relative format is more human\-readable and is thus suitable for editing by hand. For
|
||||
\fBnamed\-checkzone\fR
|
||||
this does not cause any effects unless it dumps the zone contents\&. It also does not have any meaning if the output format is not text\&.
|
||||
this does not cause any effects unless it dumps the zone contents. It also does not have any meaning if the output format is not text.
|
||||
.RE
|
||||
.PP
|
||||
\-S \fImode\fR
|
||||
.RS 4
|
||||
Check if a SRV record refers to a CNAME\&. Possible modes are
|
||||
Check if a SRV record refers to a CNAME. Possible modes are
|
||||
\fB"fail"\fR,
|
||||
\fB"warn"\fR
|
||||
(default) and
|
||||
\fB"ignore"\fR\&.
|
||||
\fB"ignore"\fR.
|
||||
.RE
|
||||
.PP
|
||||
\-t \fIdirectory\fR
|
||||
.RS 4
|
||||
Chroot to
|
||||
directory
|
||||
so that include directives in the configuration file are processed as if run by a similarly chrooted named\&.
|
||||
\fIdirectory\fR
|
||||
so that include directives in the configuration file are processed as if run by a similarly chrooted named.
|
||||
.RE
|
||||
.PP
|
||||
\-T \fImode\fR
|
||||
.RS 4
|
||||
Check if Sender Policy Framework (SPF) records exist and issues a warning if an SPF\-formatted TXT record is not also present\&. Possible modes are
|
||||
Check if Sender Policy Framework records (TXT and SPF) both exist or both don't exist. A warning is issued if they don't match. Possible modes are
|
||||
\fB"warn"\fR
|
||||
(default),
|
||||
\fB"ignore"\fR\&.
|
||||
\fB"ignore"\fR.
|
||||
.RE
|
||||
.PP
|
||||
\-w \fIdirectory\fR
|
||||
.RS 4
|
||||
chdir to
|
||||
directory
|
||||
so that relative filenames in master file $INCLUDE directives work\&. This is similar to the directory clause in
|
||||
named\&.conf\&.
|
||||
\fIdirectory\fR
|
||||
so that relative filenames in master file $INCLUDE directives work. This is similar to the directory clause in
|
||||
\fInamed.conf\fR.
|
||||
.RE
|
||||
.PP
|
||||
\-D
|
||||
.RS 4
|
||||
Dump zone file in canonical format\&. This is always enabled for
|
||||
\fBnamed\-compilezone\fR\&.
|
||||
Dump zone file in canonical format. This is always enabled for
|
||||
\fBnamed\-compilezone\fR.
|
||||
.RE
|
||||
.PP
|
||||
\-W \fImode\fR
|
||||
.RS 4
|
||||
Specify whether to check for non\-terminal wildcards\&. Non\-terminal wildcards are almost always the result of a failure to understand the wildcard matching algorithm (RFC 1034)\&. Possible modes are
|
||||
Specify whether to check for non\-terminal wildcards. Non\-terminal wildcards are almost always the result of a failure to understand the wildcard matching algorithm (RFC 1034). Possible modes are
|
||||
\fB"warn"\fR
|
||||
(default) and
|
||||
\fB"ignore"\fR\&.
|
||||
\fB"ignore"\fR.
|
||||
.RE
|
||||
.PP
|
||||
zonename
|
||||
.RS 4
|
||||
The domain name of the zone being checked\&.
|
||||
The domain name of the zone being checked.
|
||||
.RE
|
||||
.PP
|
||||
filename
|
||||
.RS 4
|
||||
The name of the zone file\&.
|
||||
The name of the zone file.
|
||||
.RE
|
||||
.SH "RETURN VALUES"
|
||||
.PP
|
||||
\fBnamed\-checkzone\fR
|
||||
returns an exit status of 1 if errors were detected and 0 otherwise\&.
|
||||
returns an exit status of 1 if errors were detected and 0 otherwise.
|
||||
.SH "SEE ALSO"
|
||||
.PP
|
||||
\fBnamed\fR(8),
|
||||
\fBnamed-checkconf\fR(8),
|
||||
\fBnamed\-checkconf\fR(8),
|
||||
RFC 1035,
|
||||
BIND 9 Administrator Reference Manual\&.
|
||||
BIND 9 Administrator Reference Manual.
|
||||
.SH "AUTHOR"
|
||||
.PP
|
||||
\fBInternet Systems Consortium, Inc\&.\fR
|
||||
Internet Systems Consortium
|
||||
.SH "COPYRIGHT"
|
||||
Copyright \(co 2004\-2007, 2009\-2011, 2013 Internet Systems Consortium, Inc. ("ISC")
|
||||
.br
|
||||
Copyright \(co 2004-2007, 2009-2011, 2013-2015 Internet Systems Consortium, Inc. ("ISC")
|
||||
.br
|
||||
Copyright \(co 2000-2002 Internet Software Consortium.
|
||||
Copyright \(co 2000\-2002 Internet Software Consortium.
|
||||
.br
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2013, 2015 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004-2013 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 1999-2003 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
@@ -30,7 +30,6 @@
|
||||
#include <isc/hash.h>
|
||||
#include <isc/log.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/socket.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/task.h>
|
||||
@@ -58,7 +57,7 @@ dns_zone_t *zone = NULL;
|
||||
dns_zonetype_t zonetype = dns_zone_master;
|
||||
static int dumpzone = 0;
|
||||
static const char *output_filename;
|
||||
static const char *prog_name = NULL;
|
||||
static char *prog_name = NULL;
|
||||
static const dns_master_style_t *outputstyle = NULL;
|
||||
static enum { progmode_check, progmode_compile } progmode;
|
||||
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
|
||||
[<!ENTITY mdash "—">]>
|
||||
<!--
|
||||
- Copyright (C) 2004-2007, 2009-2011, 2013-2015 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2004-2007, 2009-2011, 2013 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2000-2002 Internet Software Consortium.
|
||||
-
|
||||
- Permission to use, copy, modify, and/or distribute this software for any
|
||||
@@ -15,14 +18,10 @@
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
|
||||
<!-- Converted by db4-upgrade version 1.0 -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="man.named-checkzone">
|
||||
<info>
|
||||
<date>2013-04-29</date>
|
||||
</info>
|
||||
<!-- $Id: named-checkzone.docbook,v 1.44 2011/12/22 07:32:39 each Exp $ -->
|
||||
<refentry id="man.named-checkzone">
|
||||
<refentryinfo>
|
||||
<corpname>ISC</corpname>
|
||||
<corpauthor>Internet Systems Consortium, Inc.</corpauthor>
|
||||
<date>June 13, 2000</date>
|
||||
</refentryinfo>
|
||||
|
||||
<refmeta>
|
||||
@@ -41,8 +40,6 @@
|
||||
<year>2010</year>
|
||||
<year>2011</year>
|
||||
<year>2013</year>
|
||||
<year>2014</year>
|
||||
<year>2015</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
<copyright>
|
||||
@@ -60,64 +57,64 @@
|
||||
</refnamediv>
|
||||
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis sepchar=" ">
|
||||
<cmdsynopsis>
|
||||
<command>named-checkzone</command>
|
||||
<arg choice="opt" rep="norepeat"><option>-d</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-h</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-j</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-q</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-v</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-c <replaceable class="parameter">class</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-f <replaceable class="parameter">format</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-F <replaceable class="parameter">format</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-i <replaceable class="parameter">mode</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-k <replaceable class="parameter">mode</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-m <replaceable class="parameter">mode</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-M <replaceable class="parameter">mode</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-n <replaceable class="parameter">mode</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-L <replaceable class="parameter">serial</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-o <replaceable class="parameter">filename</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-r <replaceable class="parameter">mode</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-s <replaceable class="parameter">style</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-S <replaceable class="parameter">mode</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-t <replaceable class="parameter">directory</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-T <replaceable class="parameter">mode</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-w <replaceable class="parameter">directory</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-D</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-W <replaceable class="parameter">mode</replaceable></option></arg>
|
||||
<arg choice="req" rep="norepeat">zonename</arg>
|
||||
<arg choice="req" rep="norepeat">filename</arg>
|
||||
<arg><option>-d</option></arg>
|
||||
<arg><option>-h</option></arg>
|
||||
<arg><option>-j</option></arg>
|
||||
<arg><option>-q</option></arg>
|
||||
<arg><option>-v</option></arg>
|
||||
<arg><option>-c <replaceable class="parameter">class</replaceable></option></arg>
|
||||
<arg><option>-f <replaceable class="parameter">format</replaceable></option></arg>
|
||||
<arg><option>-F <replaceable class="parameter">format</replaceable></option></arg>
|
||||
<arg><option>-i <replaceable class="parameter">mode</replaceable></option></arg>
|
||||
<arg><option>-k <replaceable class="parameter">mode</replaceable></option></arg>
|
||||
<arg><option>-m <replaceable class="parameter">mode</replaceable></option></arg>
|
||||
<arg><option>-M <replaceable class="parameter">mode</replaceable></option></arg>
|
||||
<arg><option>-n <replaceable class="parameter">mode</replaceable></option></arg>
|
||||
<arg><option>-L <replaceable class="parameter">serial</replaceable></option></arg>
|
||||
<arg><option>-o <replaceable class="parameter">filename</replaceable></option></arg>
|
||||
<arg><option>-r <replaceable class="parameter">mode</replaceable></option></arg>
|
||||
<arg><option>-s <replaceable class="parameter">style</replaceable></option></arg>
|
||||
<arg><option>-S <replaceable class="parameter">mode</replaceable></option></arg>
|
||||
<arg><option>-t <replaceable class="parameter">directory</replaceable></option></arg>
|
||||
<arg><option>-T <replaceable class="parameter">mode</replaceable></option></arg>
|
||||
<arg><option>-w <replaceable class="parameter">directory</replaceable></option></arg>
|
||||
<arg><option>-D</option></arg>
|
||||
<arg><option>-W <replaceable class="parameter">mode</replaceable></option></arg>
|
||||
<arg choice="req">zonename</arg>
|
||||
<arg choice="req">filename</arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis sepchar=" ">
|
||||
<cmdsynopsis>
|
||||
<command>named-compilezone</command>
|
||||
<arg choice="opt" rep="norepeat"><option>-d</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-j</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-q</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-v</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-c <replaceable class="parameter">class</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-C <replaceable class="parameter">mode</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-f <replaceable class="parameter">format</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-F <replaceable class="parameter">format</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-i <replaceable class="parameter">mode</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-k <replaceable class="parameter">mode</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-m <replaceable class="parameter">mode</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-n <replaceable class="parameter">mode</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-L <replaceable class="parameter">serial</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-r <replaceable class="parameter">mode</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-s <replaceable class="parameter">style</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-t <replaceable class="parameter">directory</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-T <replaceable class="parameter">mode</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-w <replaceable class="parameter">directory</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-D</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-W <replaceable class="parameter">mode</replaceable></option></arg>
|
||||
<arg choice="req" rep="norepeat"><option>-o <replaceable class="parameter">filename</replaceable></option></arg>
|
||||
<arg choice="req" rep="norepeat">zonename</arg>
|
||||
<arg choice="req" rep="norepeat">filename</arg>
|
||||
<arg><option>-d</option></arg>
|
||||
<arg><option>-j</option></arg>
|
||||
<arg><option>-q</option></arg>
|
||||
<arg><option>-v</option></arg>
|
||||
<arg><option>-c <replaceable class="parameter">class</replaceable></option></arg>
|
||||
<arg><option>-C <replaceable class="parameter">mode</replaceable></option></arg>
|
||||
<arg><option>-f <replaceable class="parameter">format</replaceable></option></arg>
|
||||
<arg><option>-F <replaceable class="parameter">format</replaceable></option></arg>
|
||||
<arg><option>-i <replaceable class="parameter">mode</replaceable></option></arg>
|
||||
<arg><option>-k <replaceable class="parameter">mode</replaceable></option></arg>
|
||||
<arg><option>-m <replaceable class="parameter">mode</replaceable></option></arg>
|
||||
<arg><option>-n <replaceable class="parameter">mode</replaceable></option></arg>
|
||||
<arg><option>-L <replaceable class="parameter">serial</replaceable></option></arg>
|
||||
<arg><option>-r <replaceable class="parameter">mode</replaceable></option></arg>
|
||||
<arg><option>-s <replaceable class="parameter">style</replaceable></option></arg>
|
||||
<arg><option>-t <replaceable class="parameter">directory</replaceable></option></arg>
|
||||
<arg><option>-T <replaceable class="parameter">mode</replaceable></option></arg>
|
||||
<arg><option>-w <replaceable class="parameter">directory</replaceable></option></arg>
|
||||
<arg><option>-D</option></arg>
|
||||
<arg><option>-W <replaceable class="parameter">mode</replaceable></option></arg>
|
||||
<arg choice="req"><option>-o <replaceable class="parameter">filename</replaceable></option></arg>
|
||||
<arg choice="req">zonename</arg>
|
||||
<arg choice="req">filename</arg>
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
|
||||
<refsection><info><title>DESCRIPTION</title></info>
|
||||
|
||||
<refsect1>
|
||||
<title>DESCRIPTION</title>
|
||||
<para><command>named-checkzone</command>
|
||||
checks the syntax and integrity of a zone file. It performs the
|
||||
same checks as <command>named</command> does when loading a
|
||||
@@ -135,10 +132,10 @@
|
||||
least be as strict as those specified in the
|
||||
<command>named</command> configuration file.
|
||||
</para>
|
||||
</refsection>
|
||||
|
||||
<refsection><info><title>OPTIONS</title></info>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>OPTIONS</title>
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
@@ -292,7 +289,7 @@
|
||||
<term>-L <replaceable class="parameter">serial</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
When compiling a zone to 'raw' format, set the "source serial"
|
||||
When compiling a zone to 'raw' format, set the "source serial"
|
||||
value in the header to the specified serial number. (This is
|
||||
expected to be used primarily for testing purposes.)
|
||||
</para>
|
||||
@@ -355,7 +352,7 @@
|
||||
<listitem>
|
||||
<para>
|
||||
Check for records that are treated as different by DNSSEC but
|
||||
are semantically equal in plain DNS.
|
||||
are semantically equal in plain DNS.
|
||||
Possible modes are <command>"fail"</command>,
|
||||
<command>"warn"</command> (default) and
|
||||
<command>"ignore"</command>.
|
||||
@@ -411,10 +408,10 @@
|
||||
<term>-T <replaceable class="parameter">mode</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Check if Sender Policy Framework (SPF) records exist
|
||||
and issues a warning if an SPF-formatted TXT record is
|
||||
not also present. Possible modes are <command>"warn"</command>
|
||||
(default), <command>"ignore"</command>.
|
||||
Check if Sender Policy Framework records (TXT and SPF)
|
||||
both exist or both don't exist. A warning is issued
|
||||
if they don't match. Possible modes are
|
||||
<command>"warn"</command> (default), <command>"ignore"</command>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@@ -476,27 +473,37 @@
|
||||
|
||||
</variablelist>
|
||||
|
||||
</refsection>
|
||||
|
||||
<refsection><info><title>RETURN VALUES</title></info>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>RETURN VALUES</title>
|
||||
<para><command>named-checkzone</command>
|
||||
returns an exit status of 1 if
|
||||
errors were detected and 0 otherwise.
|
||||
</para>
|
||||
</refsection>
|
||||
|
||||
<refsection><info><title>SEE ALSO</title></info>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>SEE ALSO</title>
|
||||
<para><citerefentry>
|
||||
<refentrytitle>named</refentrytitle><manvolnum>8</manvolnum>
|
||||
</citerefentry>,
|
||||
<citerefentry>
|
||||
<refentrytitle>named-checkconf</refentrytitle><manvolnum>8</manvolnum>
|
||||
<refentrytitle>named-checkconf</refentrytitle><manvolnum>8</manvolnum>
|
||||
</citerefentry>,
|
||||
<citetitle>RFC 1035</citetitle>,
|
||||
<citetitle>BIND 9 Administrator Reference Manual</citetitle>.
|
||||
</para>
|
||||
</refsection>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
<refsect1>
|
||||
<title>AUTHOR</title>
|
||||
<para><corpauthor>Internet Systems Consortium</corpauthor>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry><!--
|
||||
- Local variables:
|
||||
- mode: sgml
|
||||
- End:
|
||||
-->
|
||||
@@ -1,5 +1,5 @@
|
||||
<!--
|
||||
- Copyright (C) 2004-2007, 2009-2011, 2013-2015 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2004-2007, 2009-2011, 2013 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2000-2002 Internet Software Consortium.
|
||||
-
|
||||
- Permission to use, copy, modify, and/or distribute this software for any
|
||||
@@ -14,13 +14,14 @@
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
<!-- $Id$ -->
|
||||
<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.78.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry">
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
|
||||
<a name="man.named-checkzone"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2>Name</h2>
|
||||
@@ -31,29 +32,29 @@
|
||||
<div class="cmdsynopsis"><p><code class="command">named-checkzone</code> [<code class="option">-d</code>] [<code class="option">-h</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">-f <em class="replaceable"><code>format</code></em></code>] [<code class="option">-F <em class="replaceable"><code>format</code></em></code>] [<code class="option">-i <em class="replaceable"><code>mode</code></em></code>] [<code class="option">-k <em class="replaceable"><code>mode</code></em></code>] [<code class="option">-m <em class="replaceable"><code>mode</code></em></code>] [<code class="option">-M <em class="replaceable"><code>mode</code></em></code>] [<code class="option">-n <em class="replaceable"><code>mode</code></em></code>] [<code class="option">-L <em class="replaceable"><code>serial</code></em></code>] [<code class="option">-o <em class="replaceable"><code>filename</code></em></code>] [<code class="option">-r <em class="replaceable"><code>mode</code></em></code>] [<code class="option">-s <em class="replaceable"><code>style</code></em></code>] [<code class="option">-S <em class="replaceable"><code>mode</code></em></code>] [<code class="option">-t <em class="replaceable"><code>directory</code></em></code>] [<code class="option">-T <em class="replaceable"><code>mode</code></em></code>] [<code class="option">-w <em class="replaceable"><code>directory</code></em></code>] [<code class="option">-D</code>] [<code class="option">-W <em class="replaceable"><code>mode</code></em></code>] {zonename} {filename}</p></div>
|
||||
<div class="cmdsynopsis"><p><code class="command">named-compilezone</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">-C <em class="replaceable"><code>mode</code></em></code>] [<code class="option">-f <em class="replaceable"><code>format</code></em></code>] [<code class="option">-F <em class="replaceable"><code>format</code></em></code>] [<code class="option">-i <em class="replaceable"><code>mode</code></em></code>] [<code class="option">-k <em class="replaceable"><code>mode</code></em></code>] [<code class="option">-m <em class="replaceable"><code>mode</code></em></code>] [<code class="option">-n <em class="replaceable"><code>mode</code></em></code>] [<code class="option">-L <em class="replaceable"><code>serial</code></em></code>] [<code class="option">-r <em class="replaceable"><code>mode</code></em></code>] [<code class="option">-s <em class="replaceable"><code>style</code></em></code>] [<code class="option">-t <em class="replaceable"><code>directory</code></em></code>] [<code class="option">-T <em class="replaceable"><code>mode</code></em></code>] [<code class="option">-w <em class="replaceable"><code>directory</code></em></code>] [<code class="option">-D</code>] [<code class="option">-W <em class="replaceable"><code>mode</code></em></code>] {<code class="option">-o <em class="replaceable"><code>filename</code></em></code>} {zonename} {filename}</p></div>
|
||||
</div>
|
||||
<div class="refsection">
|
||||
<a name="id-1.7"></a><h2>DESCRIPTION</h2>
|
||||
<p><span class="command"><strong>named-checkzone</strong></span>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2543736"></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 class="command"><strong>named</strong></span> does when loading a
|
||||
zone. This makes <span class="command"><strong>named-checkzone</strong></span> useful for
|
||||
same checks as <span><strong class="command">named</strong></span> does when loading a
|
||||
zone. This makes <span><strong class="command">named-checkzone</strong></span> useful for
|
||||
checking zone files before configuring them into a name server.
|
||||
</p>
|
||||
<p>
|
||||
<span class="command"><strong>named-compilezone</strong></span> is similar to
|
||||
<span class="command"><strong>named-checkzone</strong></span>, but it always dumps the
|
||||
<span><strong class="command">named-compilezone</strong></span> is similar to
|
||||
<span><strong class="command">named-checkzone</strong></span>, but it always dumps the
|
||||
zone contents to a specified file in a specified format.
|
||||
Additionally, it applies stricter check levels by default,
|
||||
since the dump output will be used as an actual zone file
|
||||
loaded by <span class="command"><strong>named</strong></span>.
|
||||
loaded by <span><strong class="command">named</strong></span>.
|
||||
When manually specified otherwise, the check levels must at
|
||||
least be as strict as those specified in the
|
||||
<span class="command"><strong>named</strong></span> configuration file.
|
||||
<span><strong class="command">named</strong></span> configuration file.
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsection">
|
||||
<a name="id-1.8"></a><h2>OPTIONS</h2>
|
||||
<div class="variablelist"><dl class="variablelist">
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2543771"></a><h2>OPTIONS</h2>
|
||||
<div class="variablelist"><dl>
|
||||
<dt><span class="term">-d</span></dt>
|
||||
<dd><p>
|
||||
Enable debugging.
|
||||
@@ -68,7 +69,7 @@
|
||||
</p></dd>
|
||||
<dt><span class="term">-v</span></dt>
|
||||
<dd><p>
|
||||
Print the version of the <span class="command"><strong>named-checkzone</strong></span>
|
||||
Print the version of the <span><strong class="command">named-checkzone</strong></span>
|
||||
program and exit.
|
||||
</p></dd>
|
||||
<dt><span class="term">-j</span></dt>
|
||||
@@ -83,133 +84,133 @@
|
||||
<dd>
|
||||
<p>
|
||||
Perform post-load zone integrity checks. Possible modes are
|
||||
<span class="command"><strong>"full"</strong></span> (default),
|
||||
<span class="command"><strong>"full-sibling"</strong></span>,
|
||||
<span class="command"><strong>"local"</strong></span>,
|
||||
<span class="command"><strong>"local-sibling"</strong></span> and
|
||||
<span class="command"><strong>"none"</strong></span>.
|
||||
<span><strong class="command">"full"</strong></span> (default),
|
||||
<span><strong class="command">"full-sibling"</strong></span>,
|
||||
<span><strong class="command">"local"</strong></span>,
|
||||
<span><strong class="command">"local-sibling"</strong></span> and
|
||||
<span><strong class="command">"none"</strong></span>.
|
||||
</p>
|
||||
<p>
|
||||
Mode <span class="command"><strong>"full"</strong></span> checks that MX records
|
||||
Mode <span><strong class="command">"full"</strong></span> checks that MX records
|
||||
refer to A or AAAA record (both in-zone and out-of-zone
|
||||
hostnames). Mode <span class="command"><strong>"local"</strong></span> only
|
||||
hostnames). Mode <span><strong class="command">"local"</strong></span> only
|
||||
checks MX records which refer to in-zone hostnames.
|
||||
</p>
|
||||
<p>
|
||||
Mode <span class="command"><strong>"full"</strong></span> checks that SRV records
|
||||
Mode <span><strong class="command">"full"</strong></span> checks that SRV records
|
||||
refer to A or AAAA record (both in-zone and out-of-zone
|
||||
hostnames). Mode <span class="command"><strong>"local"</strong></span> only
|
||||
hostnames). Mode <span><strong class="command">"local"</strong></span> only
|
||||
checks SRV records which refer to in-zone hostnames.
|
||||
</p>
|
||||
<p>
|
||||
Mode <span class="command"><strong>"full"</strong></span> checks that delegation NS
|
||||
Mode <span><strong class="command">"full"</strong></span> checks that delegation NS
|
||||
records refer to A or AAAA record (both in-zone and out-of-zone
|
||||
hostnames). It also checks that glue address records
|
||||
in the zone match those advertised by the child.
|
||||
Mode <span class="command"><strong>"local"</strong></span> only checks NS records which
|
||||
Mode <span><strong class="command">"local"</strong></span> only checks NS records which
|
||||
refer to in-zone hostnames or that some required glue exists,
|
||||
that is when the nameserver is in a child zone.
|
||||
</p>
|
||||
<p>
|
||||
Mode <span class="command"><strong>"full-sibling"</strong></span> and
|
||||
<span class="command"><strong>"local-sibling"</strong></span> disable sibling glue
|
||||
checks but are otherwise the same as <span class="command"><strong>"full"</strong></span>
|
||||
and <span class="command"><strong>"local"</strong></span> respectively.
|
||||
Mode <span><strong class="command">"full-sibling"</strong></span> and
|
||||
<span><strong class="command">"local-sibling"</strong></span> disable sibling glue
|
||||
checks but are otherwise the same as <span><strong class="command">"full"</strong></span>
|
||||
and <span><strong class="command">"local"</strong></span> respectively.
|
||||
</p>
|
||||
<p>
|
||||
Mode <span class="command"><strong>"none"</strong></span> disables the checks.
|
||||
Mode <span><strong class="command">"none"</strong></span> disables the checks.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-f <em class="replaceable"><code>format</code></em></span></dt>
|
||||
<dd><p>
|
||||
Specify the format of the zone file.
|
||||
Possible formats are <span class="command"><strong>"text"</strong></span> (default)
|
||||
and <span class="command"><strong>"raw"</strong></span>.
|
||||
Possible formats are <span><strong class="command">"text"</strong></span> (default)
|
||||
and <span><strong class="command">"raw"</strong></span>.
|
||||
</p></dd>
|
||||
<dt><span class="term">-F <em class="replaceable"><code>format</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Specify the format of the output file specified.
|
||||
For <span class="command"><strong>named-checkzone</strong></span>,
|
||||
For <span><strong class="command">named-checkzone</strong></span>,
|
||||
this does not cause any effects unless it dumps the zone
|
||||
contents.
|
||||
</p>
|
||||
<p>
|
||||
Possible formats are <span class="command"><strong>"text"</strong></span> (default)
|
||||
and <span class="command"><strong>"raw"</strong></span> or <span class="command"><strong>"raw=N"</strong></span>,
|
||||
Possible formats are <span><strong class="command">"text"</strong></span> (default)
|
||||
and <span><strong class="command">"raw"</strong></span> or <span><strong class="command">"raw=N"</strong></span>,
|
||||
which store the zone in a binary format for rapid loading
|
||||
by <span class="command"><strong>named</strong></span>. <span class="command"><strong>"raw=N"</strong></span>
|
||||
by <span><strong class="command">named</strong></span>. <span><strong class="command">"raw=N"</strong></span>
|
||||
specifies the format version of the raw zone file: if N
|
||||
is 0, the raw file can be read by any version of
|
||||
<span class="command"><strong>named</strong></span>; if N is 1, the file can be read
|
||||
<span><strong class="command">named</strong></span>; if N is 1, the file can be read
|
||||
by release 9.9.0 or higher. The default is 1.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-k <em class="replaceable"><code>mode</code></em></span></dt>
|
||||
<dd><p>
|
||||
Perform <span class="command"><strong>"check-names"</strong></span> checks with the
|
||||
Perform <span><strong class="command">"check-names"</strong></span> checks with the
|
||||
specified failure mode.
|
||||
Possible modes are <span class="command"><strong>"fail"</strong></span>
|
||||
(default for <span class="command"><strong>named-compilezone</strong></span>),
|
||||
<span class="command"><strong>"warn"</strong></span>
|
||||
(default for <span class="command"><strong>named-checkzone</strong></span>) and
|
||||
<span class="command"><strong>"ignore"</strong></span>.
|
||||
Possible modes are <span><strong class="command">"fail"</strong></span>
|
||||
(default for <span><strong class="command">named-compilezone</strong></span>),
|
||||
<span><strong class="command">"warn"</strong></span>
|
||||
(default for <span><strong class="command">named-checkzone</strong></span>) and
|
||||
<span><strong class="command">"ignore"</strong></span>.
|
||||
</p></dd>
|
||||
<dt><span class="term">-L <em class="replaceable"><code>serial</code></em></span></dt>
|
||||
<dd><p>
|
||||
When compiling a zone to 'raw' format, set the "source serial"
|
||||
When compiling a zone to 'raw' format, set the "source serial"
|
||||
value in the header to the specified serial number. (This is
|
||||
expected to be used primarily for testing purposes.)
|
||||
</p></dd>
|
||||
<dt><span class="term">-m <em class="replaceable"><code>mode</code></em></span></dt>
|
||||
<dd><p>
|
||||
Specify whether MX records should be checked to see if they
|
||||
are addresses. Possible modes are <span class="command"><strong>"fail"</strong></span>,
|
||||
<span class="command"><strong>"warn"</strong></span> (default) and
|
||||
<span class="command"><strong>"ignore"</strong></span>.
|
||||
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">-M <em class="replaceable"><code>mode</code></em></span></dt>
|
||||
<dd><p>
|
||||
Check if a MX record refers to a CNAME.
|
||||
Possible modes are <span class="command"><strong>"fail"</strong></span>,
|
||||
<span class="command"><strong>"warn"</strong></span> (default) and
|
||||
<span class="command"><strong>"ignore"</strong></span>.
|
||||
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 class="command"><strong>"fail"</strong></span>
|
||||
(default for <span class="command"><strong>named-compilezone</strong></span>),
|
||||
<span class="command"><strong>"warn"</strong></span>
|
||||
(default for <span class="command"><strong>named-checkzone</strong></span>) and
|
||||
<span class="command"><strong>"ignore"</strong></span>.
|
||||
Possible modes are <span><strong class="command">"fail"</strong></span>
|
||||
(default for <span><strong class="command">named-compilezone</strong></span>),
|
||||
<span><strong class="command">"warn"</strong></span>
|
||||
(default for <span><strong class="command">named-checkzone</strong></span>) 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>.
|
||||
If <code class="filename">filename</code> is <code class="filename">-</code> then
|
||||
write to standard out.
|
||||
This is mandatory for <span class="command"><strong>named-compilezone</strong></span>.
|
||||
This is mandatory for <span><strong class="command">named-compilezone</strong></span>.
|
||||
</p></dd>
|
||||
<dt><span class="term">-r <em class="replaceable"><code>mode</code></em></span></dt>
|
||||
<dd><p>
|
||||
Check for records that are treated as different by DNSSEC but
|
||||
are semantically equal in plain DNS.
|
||||
Possible modes are <span class="command"><strong>"fail"</strong></span>,
|
||||
<span class="command"><strong>"warn"</strong></span> (default) and
|
||||
<span class="command"><strong>"ignore"</strong></span>.
|
||||
are semantically equal in plain DNS.
|
||||
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">-s <em class="replaceable"><code>style</code></em></span></dt>
|
||||
<dd><p>
|
||||
Specify the style of the dumped zone file.
|
||||
Possible styles are <span class="command"><strong>"full"</strong></span> (default)
|
||||
and <span class="command"><strong>"relative"</strong></span>.
|
||||
Possible styles are <span><strong class="command">"full"</strong></span> (default)
|
||||
and <span><strong class="command">"relative"</strong></span>.
|
||||
The full format is most suitable for processing
|
||||
automatically by a separate script.
|
||||
On the other hand, the relative format is more
|
||||
human-readable and is thus suitable for editing by hand.
|
||||
For <span class="command"><strong>named-checkzone</strong></span>
|
||||
For <span><strong class="command">named-checkzone</strong></span>
|
||||
this does not cause any effects unless it dumps the zone
|
||||
contents.
|
||||
It also does not have any meaning if the output format
|
||||
@@ -218,9 +219,9 @@
|
||||
<dt><span class="term">-S <em class="replaceable"><code>mode</code></em></span></dt>
|
||||
<dd><p>
|
||||
Check if a SRV record refers to a CNAME.
|
||||
Possible modes are <span class="command"><strong>"fail"</strong></span>,
|
||||
<span class="command"><strong>"warn"</strong></span> (default) and
|
||||
<span class="command"><strong>"ignore"</strong></span>.
|
||||
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">-t <em class="replaceable"><code>directory</code></em></span></dt>
|
||||
<dd><p>
|
||||
@@ -231,10 +232,10 @@
|
||||
</p></dd>
|
||||
<dt><span class="term">-T <em class="replaceable"><code>mode</code></em></span></dt>
|
||||
<dd><p>
|
||||
Check if Sender Policy Framework (SPF) records exist
|
||||
and issues a warning if an SPF-formatted TXT record is
|
||||
not also present. Possible modes are <span class="command"><strong>"warn"</strong></span>
|
||||
(default), <span class="command"><strong>"ignore"</strong></span>.
|
||||
Check if Sender Policy Framework records (TXT and SPF)
|
||||
both exist or both don't exist. A warning is issued
|
||||
if they don't match. Possible modes are
|
||||
<span><strong class="command">"warn"</strong></span> (default), <span><strong class="command">"ignore"</strong></span>.
|
||||
</p></dd>
|
||||
<dt><span class="term">-w <em class="replaceable"><code>directory</code></em></span></dt>
|
||||
<dd><p>
|
||||
@@ -247,16 +248,16 @@
|
||||
<dt><span class="term">-D</span></dt>
|
||||
<dd><p>
|
||||
Dump zone file in canonical format.
|
||||
This is always enabled for <span class="command"><strong>named-compilezone</strong></span>.
|
||||
This is always enabled for <span><strong class="command">named-compilezone</strong></span>.
|
||||
</p></dd>
|
||||
<dt><span class="term">-W <em class="replaceable"><code>mode</code></em></span></dt>
|
||||
<dd><p>
|
||||
Specify whether to check for non-terminal wildcards.
|
||||
Non-terminal wildcards are almost always the result of a
|
||||
failure to understand the wildcard matching algorithm (RFC 1034).
|
||||
Possible modes are <span class="command"><strong>"warn"</strong></span> (default)
|
||||
Possible modes are <span><strong class="command">"warn"</strong></span> (default)
|
||||
and
|
||||
<span class="command"><strong>"ignore"</strong></span>.
|
||||
<span><strong class="command">"ignore"</strong></span>.
|
||||
</p></dd>
|
||||
<dt><span class="term">zonename</span></dt>
|
||||
<dd><p>
|
||||
@@ -268,20 +269,25 @@
|
||||
</p></dd>
|
||||
</dl></div>
|
||||
</div>
|
||||
<div class="refsection">
|
||||
<a name="id-1.9"></a><h2>RETURN VALUES</h2>
|
||||
<p><span class="command"><strong>named-checkzone</strong></span>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2544612"></a><h2>RETURN VALUES</h2>
|
||||
<p><span><strong class="command">named-checkzone</strong></span>
|
||||
returns an exit status of 1 if
|
||||
errors were detected and 0 otherwise.
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsection">
|
||||
<a name="id-1.10"></a><h2>SEE ALSO</h2>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2544624"></a><h2>SEE ALSO</h2>
|
||||
<p><span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>,
|
||||
<span class="citerefentry"><span class="refentrytitle">named-checkconf</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="id2544657"></a><h2>AUTHOR</h2>
|
||||
<p><span class="corpauthor">Internet Systems Consortium</span>
|
||||
</p>
|
||||
</div>
|
||||
</div></body>
|
||||
</html>
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2009, 2012, 2015 Internet Systems Consortium, Inc. ("ISC")
|
||||
# Copyright (C) 2009, 2012 Internet Systems Consortium, Inc. ("ISC")
|
||||
#
|
||||
# Permission to use, copy, modify, and/or distribute this software for any
|
||||
# purpose with or without fee is hereby granted, provided that the above
|
||||
@@ -18,7 +18,7 @@ srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
|
||||
VERSION=@BIND9_VERSION@
|
||||
@BIND9_VERSION@
|
||||
|
||||
@BIND9_MAKE_INCLUDES@
|
||||
|
||||
@@ -74,11 +74,11 @@ rndc-confgen.@O@: rndc-confgen.c
|
||||
ddns-confgen.@O@: ddns-confgen.c
|
||||
${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} -c ${srcdir}/ddns-confgen.c
|
||||
|
||||
rndc-confgen@EXEEXT@: rndc-confgen.@O@ util.@O@ keygen.@O@ ${UOBJS} ${CONFDEPLIBS}
|
||||
rndc-confgen@EXEEXT@: rndc-confgen.@O@ util.@O@ keygen.@O@ ${UOBJS} ${CONFDEPLIBS}
|
||||
export BASEOBJS="rndc-confgen.@O@ util.@O@ keygen.@O@ ${UOBJS}"; \
|
||||
${FINALBUILDCMD}
|
||||
|
||||
ddns-confgen@EXEEXT@: ddns-confgen.@O@ util.@O@ keygen.@O@ ${UOBJS} ${CONFDEPLIBS}
|
||||
ddns-confgen@EXEEXT@: ddns-confgen.@O@ util.@O@ keygen.@O@ ${UOBJS} ${CONFDEPLIBS}
|
||||
export BASEOBJS="ddns-confgen.@O@ util.@O@ keygen.@O@ ${UOBJS}"; \
|
||||
${FINALBUILDCMD}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.\" Copyright (C) 2009, 2014, 2015 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2009 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\"
|
||||
.\" Permission to use, copy, modify, and/or distribute this software for any
|
||||
.\" purpose with or without fee is hereby granted, provided that the above
|
||||
@@ -12,41 +12,26 @@
|
||||
.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
.\" PERFORMANCE OF THIS SOFTWARE.
|
||||
.\"
|
||||
.\" $Id$
|
||||
.\"
|
||||
.hy 0
|
||||
.ad l
|
||||
'\" t
|
||||
.\" Title: ddns-confgen
|
||||
.\" Title: ddns\-confgen
|
||||
.\" Author:
|
||||
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
|
||||
.\" Date: 2009-09-18
|
||||
.\" Generator: DocBook XSL Stylesheets v1.71.1 <http://docbook.sf.net/>
|
||||
.\" Date: Jan 29, 2009
|
||||
.\" Manual: BIND9
|
||||
.\" Source: ISC
|
||||
.\" Language: English
|
||||
.\" Source: BIND9
|
||||
.\"
|
||||
.TH "DDNS\-CONFGEN" "8" "2009\-09\-18" "ISC" "BIND9"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.TH "DDNS\-CONFGEN" "8" "Jan 29, 2009" "BIND9" "BIND9"
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
.SH "NAME"
|
||||
ddns-confgen \- ddns key generation tool
|
||||
ddns\-confgen \- ddns key generation tool
|
||||
.SH "SYNOPSIS"
|
||||
.HP \w'\fBddns\-confgen\fR\ 'u
|
||||
.HP 13
|
||||
\fBddns\-confgen\fR [\fB\-a\ \fR\fB\fIalgorithm\fR\fR] [\fB\-h\fR] [\fB\-k\ \fR\fB\fIkeyname\fR\fR] [\fB\-r\ \fR\fB\fIrandomfile\fR\fR] [\-s\ \fIname\fR | \-z\ \fIzone\fR] [\fB\-q\fR] [name]
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
@@ -54,46 +39,46 @@ ddns-confgen \- ddns key generation tool
|
||||
generates a key for use by
|
||||
\fBnsupdate\fR
|
||||
and
|
||||
\fBnamed\fR\&. It simplifies configuration of dynamic zones by generating a key and providing the
|
||||
\fBnamed\fR. It simplifies configuration of dynamic zones by generating a key and providing the
|
||||
\fBnsupdate\fR
|
||||
and
|
||||
\fBnamed\&.conf\fR
|
||||
\fBnamed.conf\fR
|
||||
syntax that will be needed to use it, including an example
|
||||
\fBupdate\-policy\fR
|
||||
statement\&.
|
||||
statement.
|
||||
.PP
|
||||
If a domain name is specified on the command line, it will be used in the name of the generated key and in the sample
|
||||
\fBnamed\&.conf\fR
|
||||
syntax\&. For example,
|
||||
\fBddns\-confgen example\&.com\fR
|
||||
would generate a key called "ddns\-key\&.example\&.com", and sample
|
||||
\fBnamed\&.conf\fR
|
||||
command that could be used in the zone definition for "example\&.com"\&.
|
||||
\fBnamed.conf\fR
|
||||
syntax. For example,
|
||||
\fBddns\-confgen example.com\fR
|
||||
would generate a key called "ddns\-key.example.com", and sample
|
||||
\fBnamed.conf\fR
|
||||
command that could be used in the zone definition for "example.com".
|
||||
.PP
|
||||
Note that
|
||||
\fBnamed\fR
|
||||
itself can configure a local DDNS key for use with
|
||||
\fBnsupdate \-l\fR\&.
|
||||
\fBnsupdate \-l\fR.
|
||||
\fBddns\-confgen\fR
|
||||
is only needed when a more elaborate configuration is required: for instance, if
|
||||
\fBnsupdate\fR
|
||||
is to be used from a remote system\&.
|
||||
is to be used from a remote system.
|
||||
.SH "OPTIONS"
|
||||
.PP
|
||||
\-a \fIalgorithm\fR
|
||||
.RS 4
|
||||
Specifies the algorithm to use for the TSIG key\&. Available choices are: hmac\-md5, hmac\-sha1, hmac\-sha224, hmac\-sha256, hmac\-sha384 and hmac\-sha512\&. The default is hmac\-sha256\&.
|
||||
Specifies the algorithm to use for the TSIG key. Available choices are: hmac\-md5, hmac\-sha1, hmac\-sha224, hmac\-sha256, hmac\-sha384 and hmac\-sha512. The default is hmac\-sha256.
|
||||
.RE
|
||||
.PP
|
||||
\-h
|
||||
.RS 4
|
||||
Prints a short summary of the options and arguments to
|
||||
\fBddns\-confgen\fR\&.
|
||||
\fBddns\-confgen\fR.
|
||||
.RE
|
||||
.PP
|
||||
\-k \fIkeyname\fR
|
||||
.RS 4
|
||||
Specifies the key name of the DDNS authentication key\&. The default is
|
||||
Specifies the key name of the DDNS authentication key. The default is
|
||||
\fBddns\-key\fR
|
||||
when neither the
|
||||
\fB\-s\fR
|
||||
@@ -101,59 +86,58 @@ nor
|
||||
\fB\-z\fR
|
||||
option is specified; otherwise, the default is
|
||||
\fBddns\-key\fR
|
||||
as a separate label followed by the argument of the option, e\&.g\&.,
|
||||
\fBddns\-key\&.example\&.com\&.\fR
|
||||
The key name must have the format of a valid domain name, consisting of letters, digits, hyphens and periods\&.
|
||||
as a separate label followed by the argument of the option, e.g.,
|
||||
\fBddns\-key.example.com.\fR
|
||||
The key name must have the format of a valid domain name, consisting of letters, digits, hyphens and periods.
|
||||
.RE
|
||||
.PP
|
||||
\-q
|
||||
.RS 4
|
||||
Quiet mode: Print only the key, with no explanatory text or usage examples\&.
|
||||
Quiet mode: Print only the key, with no explanatory text or usage examples.
|
||||
.RE
|
||||
.PP
|
||||
\-r \fIrandomfile\fR
|
||||
.RS 4
|
||||
Specifies a source of random data for generating the authorization\&. If the operating system does not provide a
|
||||
/dev/random
|
||||
or equivalent device, the default source of randomness is keyboard input\&.
|
||||
randomdev
|
||||
specifies the name of a character device or file containing random data to be used instead of the default\&. The special value
|
||||
keyboard
|
||||
indicates that keyboard input should be used\&.
|
||||
Specifies a source of random data for generating the authorization. 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.
|
||||
.RE
|
||||
.PP
|
||||
\-s \fIname\fR
|
||||
.RS 4
|
||||
Single host mode: The example
|
||||
\fBnamed\&.conf\fR
|
||||
\fBnamed.conf\fR
|
||||
text shows how to set an update policy for the specified
|
||||
\fIname\fR
|
||||
using the "name" nametype\&. The default key name is ddns\-key\&.\fIname\fR\&. Note that the "self" nametype cannot be used, since the name to be updated may differ from the key name\&. This option cannot be used with the
|
||||
using the "name" nametype. The default key name is ddns\-key.\fIname\fR. Note that the "self" nametype cannot be used, since the name to be updated may differ from the key name. This option cannot be used with the
|
||||
\fB\-z\fR
|
||||
option\&.
|
||||
option.
|
||||
.RE
|
||||
.PP
|
||||
\-z \fIzone\fR
|
||||
.RS 4
|
||||
zone mode: The example
|
||||
\fBnamed\&.conf\fR
|
||||
\fBnamed.conf\fR
|
||||
text shows how to set an update policy for the specified
|
||||
\fIzone\fR
|
||||
using the "zonesub" nametype, allowing updates to all subdomain names within that
|
||||
\fIzone\fR\&. This option cannot be used with the
|
||||
\fIzone\fR. This option cannot be used with the
|
||||
\fB\-s\fR
|
||||
option\&.
|
||||
option.
|
||||
.RE
|
||||
.SH "SEE ALSO"
|
||||
.PP
|
||||
\fBnsupdate\fR(1),
|
||||
\fBnamed.conf\fR(5),
|
||||
\fBnamed\fR(8),
|
||||
BIND 9 Administrator Reference Manual\&.
|
||||
BIND 9 Administrator Reference Manual.
|
||||
.SH "AUTHOR"
|
||||
.PP
|
||||
\fBInternet Systems Consortium, Inc\&.\fR
|
||||
Internet Systems Consortium
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
Copyright \(co 2009, 2014, 2015 Internet Systems Consortium, Inc. ("ISC")
|
||||
Copyright \(co 2009 Internet Systems Consortium, Inc. ("ISC")
|
||||
.br
|
||||
@@ -46,7 +46,6 @@
|
||||
|
||||
#include <dns/keyvalues.h>
|
||||
#include <dns/name.h>
|
||||
#include <dns/result.h>
|
||||
|
||||
#include <dst/dst.h>
|
||||
#include <confgen/os.h>
|
||||
@@ -100,8 +99,6 @@ main(int argc, char **argv) {
|
||||
int len = 0;
|
||||
int ch;
|
||||
|
||||
dns_result_register();
|
||||
|
||||
result = isc_file_progname(*argv, program, sizeof(program));
|
||||
if (result != ISC_R_SUCCESS)
|
||||
memmove(program, "ddns-confgen", 13);
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
|
||||
[<!ENTITY mdash "—">]>
|
||||
<!--
|
||||
- Copyright (C) 2009, 2014, 2015 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2009 Internet Systems Consortium, Inc. ("ISC")
|
||||
-
|
||||
- Permission to use, copy, modify, and/or distribute this software for any
|
||||
- purpose with or without fee is hereby granted, provided that the above
|
||||
@@ -14,14 +17,10 @@
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
|
||||
<!-- Converted by db4-upgrade version 1.0 -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="man.ddns-confgen">
|
||||
<info>
|
||||
<date>2009-09-18</date>
|
||||
</info>
|
||||
<!-- $Id: ddns-confgen.docbook,v 1.6 2009/09/18 22:08:55 fdupont Exp $ -->
|
||||
<refentry id="man.ddns-confgen">
|
||||
<refentryinfo>
|
||||
<corpname>ISC</corpname>
|
||||
<corpauthor>Internet Systems Consortium, Inc.</corpauthor>
|
||||
<date>Jan 29, 2009</date>
|
||||
</refentryinfo>
|
||||
|
||||
<refmeta>
|
||||
@@ -38,30 +37,28 @@
|
||||
<docinfo>
|
||||
<copyright>
|
||||
<year>2009</year>
|
||||
<year>2014</year>
|
||||
<year>2015</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis sepchar=" ">
|
||||
<cmdsynopsis>
|
||||
<command>ddns-confgen</command>
|
||||
<arg choice="opt" rep="norepeat"><option>-a <replaceable class="parameter">algorithm</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-h</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-k <replaceable class="parameter">keyname</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-r <replaceable class="parameter">randomfile</replaceable></option></arg>
|
||||
<group choice="opt" rep="norepeat">
|
||||
<arg choice="plain" rep="norepeat">-s <replaceable class="parameter">name</replaceable></arg>
|
||||
<arg choice="plain" rep="norepeat">-z <replaceable class="parameter">zone</replaceable></arg>
|
||||
<arg><option>-a <replaceable class="parameter">algorithm</replaceable></option></arg>
|
||||
<arg><option>-h</option></arg>
|
||||
<arg><option>-k <replaceable class="parameter">keyname</replaceable></option></arg>
|
||||
<arg><option>-r <replaceable class="parameter">randomfile</replaceable></option></arg>
|
||||
<group>
|
||||
<arg choice="plain">-s <replaceable class="parameter">name</replaceable></arg>
|
||||
<arg choice="plain">-z <replaceable class="parameter">zone</replaceable></arg>
|
||||
</group>
|
||||
<arg choice="opt" rep="norepeat"><option>-q</option></arg>
|
||||
<arg choice="opt" rep="norepeat">name</arg>
|
||||
<arg><option>-q</option></arg>
|
||||
<arg choice="opt">name</arg>
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
|
||||
<refsection><info><title>DESCRIPTION</title></info>
|
||||
|
||||
<refsect1>
|
||||
<title>DESCRIPTION</title>
|
||||
<para><command>ddns-confgen</command>
|
||||
generates a key for use by <command>nsupdate</command>
|
||||
and <command>named</command>. It simplifies configuration
|
||||
@@ -84,14 +81,14 @@
|
||||
<para>
|
||||
Note that <command>named</command> itself can configure a
|
||||
local DDNS key for use with <command>nsupdate -l</command>.
|
||||
<command>ddns-confgen</command> is only needed when a
|
||||
<command>ddns-confgen</command> is only needed when a
|
||||
more elaborate configuration is required: for instance, if
|
||||
<command>nsupdate</command> is to be used from a remote system.
|
||||
</para>
|
||||
</refsection>
|
||||
|
||||
<refsection><info><title>OPTIONS</title></info>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>OPTIONS</title>
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
@@ -191,10 +188,10 @@
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsection>
|
||||
|
||||
<refsection><info><title>SEE ALSO</title></info>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>SEE ALSO</title>
|
||||
<para><citerefentry>
|
||||
<refentrytitle>nsupdate</refentrytitle><manvolnum>1</manvolnum>
|
||||
</citerefentry>,
|
||||
@@ -206,6 +203,16 @@
|
||||
</citerefentry>,
|
||||
<citetitle>BIND 9 Administrator Reference Manual</citetitle>.
|
||||
</para>
|
||||
</refsection>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
<refsect1>
|
||||
<title>AUTHOR</title>
|
||||
<para><corpauthor>Internet Systems Consortium</corpauthor>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry><!--
|
||||
- Local variables:
|
||||
- mode: sgml
|
||||
- End:
|
||||
-->
|
||||
@@ -1,5 +1,5 @@
|
||||
<!--
|
||||
- Copyright (C) 2009, 2014, 2015 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2009 Internet Systems Consortium, Inc. ("ISC")
|
||||
-
|
||||
- Permission to use, copy, modify, and/or distribute this software for any
|
||||
- purpose with or without fee is hereby granted, provided that the above
|
||||
@@ -13,13 +13,14 @@
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
<!-- $Id$ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>ddns-confgen</title>
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry">
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
|
||||
<a name="man.ddns-confgen"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2>Name</h2>
|
||||
@@ -29,36 +30,36 @@
|
||||
<h2>Synopsis</h2>
|
||||
<div class="cmdsynopsis"><p><code class="command">ddns-confgen</code> [<code class="option">-a <em class="replaceable"><code>algorithm</code></em></code>] [<code class="option">-h</code>] [<code class="option">-k <em class="replaceable"><code>keyname</code></em></code>] [<code class="option">-r <em class="replaceable"><code>randomfile</code></em></code>] [ -s <em class="replaceable"><code>name</code></em> | -z <em class="replaceable"><code>zone</code></em> ] [<code class="option">-q</code>] [name]</p></div>
|
||||
</div>
|
||||
<div class="refsection">
|
||||
<a name="id-1.7"></a><h2>DESCRIPTION</h2>
|
||||
<p><span class="command"><strong>ddns-confgen</strong></span>
|
||||
generates a key for use by <span class="command"><strong>nsupdate</strong></span>
|
||||
and <span class="command"><strong>named</strong></span>. It simplifies configuration
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2543396"></a><h2>DESCRIPTION</h2>
|
||||
<p><span><strong class="command">ddns-confgen</strong></span>
|
||||
generates a key for use by <span><strong class="command">nsupdate</strong></span>
|
||||
and <span><strong class="command">named</strong></span>. It simplifies configuration
|
||||
of dynamic zones by generating a key and providing the
|
||||
<span class="command"><strong>nsupdate</strong></span> and <span class="command"><strong>named.conf</strong></span>
|
||||
<span><strong class="command">nsupdate</strong></span> and <span><strong class="command">named.conf</strong></span>
|
||||
syntax that will be needed to use it, including an example
|
||||
<span class="command"><strong>update-policy</strong></span> statement.
|
||||
<span><strong class="command">update-policy</strong></span> statement.
|
||||
</p>
|
||||
<p>
|
||||
If a domain name is specified on the command line, it will
|
||||
be used in the name of the generated key and in the sample
|
||||
<span class="command"><strong>named.conf</strong></span> syntax. For example,
|
||||
<span class="command"><strong>ddns-confgen example.com</strong></span> would
|
||||
<span><strong class="command">named.conf</strong></span> syntax. For example,
|
||||
<span><strong class="command">ddns-confgen example.com</strong></span> would
|
||||
generate a key called "ddns-key.example.com", and sample
|
||||
<span class="command"><strong>named.conf</strong></span> command that could be used
|
||||
<span><strong class="command">named.conf</strong></span> command that could be used
|
||||
in the zone definition for "example.com".
|
||||
</p>
|
||||
<p>
|
||||
Note that <span class="command"><strong>named</strong></span> itself can configure a
|
||||
local DDNS key for use with <span class="command"><strong>nsupdate -l</strong></span>.
|
||||
<span class="command"><strong>ddns-confgen</strong></span> is only needed when a
|
||||
Note that <span><strong class="command">named</strong></span> itself can configure a
|
||||
local DDNS key for use with <span><strong class="command">nsupdate -l</strong></span>.
|
||||
<span><strong class="command">ddns-confgen</strong></span> is only needed when a
|
||||
more elaborate configuration is required: for instance, if
|
||||
<span class="command"><strong>nsupdate</strong></span> is to be used from a remote system.
|
||||
<span><strong class="command">nsupdate</strong></span> is to be used from a remote system.
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsection">
|
||||
<a name="id-1.8"></a><h2>OPTIONS</h2>
|
||||
<div class="variablelist"><dl class="variablelist">
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2543456"></a><h2>OPTIONS</h2>
|
||||
<div class="variablelist"><dl>
|
||||
<dt><span class="term">-a <em class="replaceable"><code>algorithm</code></em></span></dt>
|
||||
<dd><p>
|
||||
Specifies the algorithm to use for the TSIG key. Available
|
||||
@@ -68,7 +69,7 @@
|
||||
<dt><span class="term">-h</span></dt>
|
||||
<dd><p>
|
||||
Prints a short summary of the options and arguments to
|
||||
<span class="command"><strong>ddns-confgen</strong></span>.
|
||||
<span><strong class="command">ddns-confgen</strong></span>.
|
||||
</p></dd>
|
||||
<dt><span class="term">-k <em class="replaceable"><code>keyname</code></em></span></dt>
|
||||
<dd><p>
|
||||
@@ -101,7 +102,7 @@
|
||||
</p></dd>
|
||||
<dt><span class="term">-s <em class="replaceable"><code>name</code></em></span></dt>
|
||||
<dd><p>
|
||||
Single host mode: The example <span class="command"><strong>named.conf</strong></span> text
|
||||
Single host mode: The example <span><strong class="command">named.conf</strong></span> text
|
||||
shows how to set an update policy for the specified
|
||||
<em class="replaceable"><code>name</code></em>
|
||||
using the "name" nametype.
|
||||
@@ -113,7 +114,7 @@
|
||||
</p></dd>
|
||||
<dt><span class="term">-z <em class="replaceable"><code>zone</code></em></span></dt>
|
||||
<dd><p>
|
||||
zone mode: The example <span class="command"><strong>named.conf</strong></span> text
|
||||
zone mode: The example <span><strong class="command">named.conf</strong></span> text
|
||||
shows how to set an update policy for the specified
|
||||
<em class="replaceable"><code>zone</code></em>
|
||||
using the "zonesub" nametype, allowing updates to all subdomain
|
||||
@@ -123,13 +124,18 @@
|
||||
</p></dd>
|
||||
</dl></div>
|
||||
</div>
|
||||
<div class="refsection">
|
||||
<a name="id-1.9"></a><h2>SEE ALSO</h2>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2543643"></a><h2>SEE ALSO</h2>
|
||||
<p><span class="citerefentry"><span class="refentrytitle">nsupdate</span>(1)</span>,
|
||||
<span class="citerefentry"><span class="refentrytitle">named.conf</span>(5)</span>,
|
||||
<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="id2543682"></a><h2>AUTHOR</h2>
|
||||
<p><span class="corpauthor">Internet Systems Consortium</span>
|
||||
</p>
|
||||
</div>
|
||||
</div></body>
|
||||
</html>
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2009, 2012, 2013, 2015 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2009, 2012, 2013 Internet Systems Consortium, Inc. ("ISC")
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
@@ -29,7 +29,6 @@
|
||||
#include <isc/file.h>
|
||||
#include <isc/keyboard.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/string.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.\" Copyright (C) 2004, 2005, 2007, 2009, 2014, 2015 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2004, 2005, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2001, 2003 Internet Software Consortium.
|
||||
.\"
|
||||
.\" Permission to use, copy, modify, and/or distribute this software for any
|
||||
@@ -13,73 +13,58 @@
|
||||
.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
.\" PERFORMANCE OF THIS SOFTWARE.
|
||||
.\"
|
||||
.\" $Id$
|
||||
.\"
|
||||
.hy 0
|
||||
.ad l
|
||||
'\" t
|
||||
.\" Title: rndc-confgen
|
||||
.\" Title: rndc\-confgen
|
||||
.\" Author:
|
||||
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
|
||||
.\" Date: 2009-06-15
|
||||
.\" Generator: DocBook XSL Stylesheets v1.71.1 <http://docbook.sf.net/>
|
||||
.\" Date: Aug 27, 2001
|
||||
.\" Manual: BIND9
|
||||
.\" Source: ISC
|
||||
.\" Language: English
|
||||
.\" Source: BIND9
|
||||
.\"
|
||||
.TH "RNDC\-CONFGEN" "8" "2009\-06\-15" "ISC" "BIND9"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.TH "RNDC\-CONFGEN" "8" "Aug 27, 2001" "BIND9" "BIND9"
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
.SH "NAME"
|
||||
rndc-confgen \- rndc key generation tool
|
||||
rndc\-confgen \- rndc key generation tool
|
||||
.SH "SYNOPSIS"
|
||||
.HP \w'\fBrndc\-confgen\fR\ 'u
|
||||
.HP 13
|
||||
\fBrndc\-confgen\fR [\fB\-a\fR] [\fB\-b\ \fR\fB\fIkeysize\fR\fR] [\fB\-c\ \fR\fB\fIkeyfile\fR\fR] [\fB\-h\fR] [\fB\-k\ \fR\fB\fIkeyname\fR\fR] [\fB\-p\ \fR\fB\fIport\fR\fR] [\fB\-r\ \fR\fB\fIrandomfile\fR\fR] [\fB\-s\ \fR\fB\fIaddress\fR\fR] [\fB\-t\ \fR\fB\fIchrootdir\fR\fR] [\fB\-u\ \fR\fB\fIuser\fR\fR]
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
\fBrndc\-confgen\fR
|
||||
generates configuration files for
|
||||
\fBrndc\fR\&. It can be used as a convenient alternative to writing the
|
||||
rndc\&.conf
|
||||
\fBrndc\fR. It can be used as a convenient alternative to writing the
|
||||
\fIrndc.conf\fR
|
||||
file and the corresponding
|
||||
\fBcontrols\fR
|
||||
and
|
||||
\fBkey\fR
|
||||
statements in
|
||||
named\&.conf
|
||||
by hand\&. Alternatively, it can be run with the
|
||||
\fInamed.conf\fR
|
||||
by hand. Alternatively, it can be run with the
|
||||
\fB\-a\fR
|
||||
option to set up a
|
||||
rndc\&.key
|
||||
\fIrndc.key\fR
|
||||
file and avoid the need for a
|
||||
rndc\&.conf
|
||||
\fIrndc.conf\fR
|
||||
file and a
|
||||
\fBcontrols\fR
|
||||
statement altogether\&.
|
||||
statement altogether.
|
||||
.SH "OPTIONS"
|
||||
.PP
|
||||
\-a
|
||||
.RS 4
|
||||
Do automatic
|
||||
\fBrndc\fR
|
||||
configuration\&. This creates a file
|
||||
rndc\&.key
|
||||
configuration. This creates a file
|
||||
\fIrndc.key\fR
|
||||
in
|
||||
/etc
|
||||
\fI/etc\fR
|
||||
(or whatever
|
||||
\fIsysconfdir\fR
|
||||
was specified as when
|
||||
@@ -88,13 +73,13 @@ was built) that is read by both
|
||||
\fBrndc\fR
|
||||
and
|
||||
\fBnamed\fR
|
||||
on startup\&. The
|
||||
rndc\&.key
|
||||
on startup. The
|
||||
\fIrndc.key\fR
|
||||
file defines a default command channel and authentication key allowing
|
||||
\fBrndc\fR
|
||||
to communicate with
|
||||
\fBnamed\fR
|
||||
on the local host with no further configuration\&.
|
||||
on the local host with no further configuration.
|
||||
.sp
|
||||
Running
|
||||
\fBrndc\-confgen \-a\fR
|
||||
@@ -102,8 +87,8 @@ allows BIND 9 and
|
||||
\fBrndc\fR
|
||||
to be used as drop\-in replacements for BIND 8 and
|
||||
\fBndc\fR, with no changes to the existing BIND 8
|
||||
named\&.conf
|
||||
file\&.
|
||||
\fInamed.conf\fR
|
||||
file.
|
||||
.sp
|
||||
If a more elaborate configuration than that generated by
|
||||
\fBrndc\-confgen \-a\fR
|
||||
@@ -112,15 +97,15 @@ is required, for example if rndc is to be used remotely, you should run
|
||||
without the
|
||||
\fB\-a\fR
|
||||
option and set up a
|
||||
rndc\&.conf
|
||||
\fIrndc.conf\fR
|
||||
and
|
||||
named\&.conf
|
||||
as directed\&.
|
||||
\fInamed.conf\fR
|
||||
as directed.
|
||||
.RE
|
||||
.PP
|
||||
\-b \fIkeysize\fR
|
||||
.RS 4
|
||||
Specifies the size of the authentication key in bits\&. Must be between 1 and 512 bits; the default is 128\&.
|
||||
Specifies the size of the authentication key in bits. Must be between 1 and 512 bits; the default is 128.
|
||||
.RE
|
||||
.PP
|
||||
\-c \fIkeyfile\fR
|
||||
@@ -128,19 +113,19 @@ Specifies the size of the authentication key in bits\&. Must be between 1 and 51
|
||||
Used with the
|
||||
\fB\-a\fR
|
||||
option to specify an alternate location for
|
||||
rndc\&.key\&.
|
||||
\fIrndc.key\fR.
|
||||
.RE
|
||||
.PP
|
||||
\-h
|
||||
.RS 4
|
||||
Prints a short summary of the options and arguments to
|
||||
\fBrndc\-confgen\fR\&.
|
||||
\fBrndc\-confgen\fR.
|
||||
.RE
|
||||
.PP
|
||||
\-k \fIkeyname\fR
|
||||
.RS 4
|
||||
Specifies the key name of the rndc authentication key\&. This must be a valid domain name\&. The default is
|
||||
\fBrndc\-key\fR\&.
|
||||
Specifies the key name of the rndc authentication key. This must be a valid domain name. The default is
|
||||
\fBrndc\-key\fR.
|
||||
.RE
|
||||
.PP
|
||||
\-p \fIport\fR
|
||||
@@ -148,18 +133,18 @@ Specifies the key name of the rndc authentication key\&. This must be a valid do
|
||||
Specifies the command channel port where
|
||||
\fBnamed\fR
|
||||
listens for connections from
|
||||
\fBrndc\fR\&. The default is 953\&.
|
||||
\fBrndc\fR. The default is 953.
|
||||
.RE
|
||||
.PP
|
||||
\-r \fIrandomfile\fR
|
||||
.RS 4
|
||||
Specifies a source of random data for generating the authorization\&. If the operating system does not provide a
|
||||
/dev/random
|
||||
or equivalent device, the default source of randomness is keyboard input\&.
|
||||
randomdev
|
||||
specifies the name of a character device or file containing random data to be used instead of the default\&. The special value
|
||||
keyboard
|
||||
indicates that keyboard input should be used\&.
|
||||
Specifies a source of random data for generating the authorization. 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.
|
||||
.RE
|
||||
.PP
|
||||
\-s \fIaddress\fR
|
||||
@@ -167,7 +152,7 @@ indicates that keyboard input should be used\&.
|
||||
Specifies the IP address where
|
||||
\fBnamed\fR
|
||||
listens for command channel connections from
|
||||
\fBrndc\fR\&. The default is the loopback address 127\&.0\&.0\&.1\&.
|
||||
\fBrndc\fR. The default is the loopback address 127.0.0.1.
|
||||
.RE
|
||||
.PP
|
||||
\-t \fIchrootdir\fR
|
||||
@@ -176,10 +161,10 @@ Used with the
|
||||
\fB\-a\fR
|
||||
option to specify a directory where
|
||||
\fBnamed\fR
|
||||
will run chrooted\&. An additional copy of the
|
||||
rndc\&.key
|
||||
will run chrooted. An additional copy of the
|
||||
\fIrndc.key\fR
|
||||
will be written relative to this directory so that it will be found by the chrooted
|
||||
\fBnamed\fR\&.
|
||||
\fBnamed\fR.
|
||||
.RE
|
||||
.PP
|
||||
\-u \fIuser\fR
|
||||
@@ -187,10 +172,10 @@ will be written relative to this directory so that it will be found by the chroo
|
||||
Used with the
|
||||
\fB\-a\fR
|
||||
option to set the owner of the
|
||||
rndc\&.key
|
||||
file generated\&. If
|
||||
\fIrndc.key\fR
|
||||
file generated. If
|
||||
\fB\-t\fR
|
||||
is also specified only the file in the chroot area has its owner changed\&.
|
||||
is also specified only the file in the chroot area has its owner changed.
|
||||
.RE
|
||||
.SH "EXAMPLES"
|
||||
.PP
|
||||
@@ -201,13 +186,13 @@ to be used with no manual configuration, run
|
||||
\fBrndc\-confgen \-a\fR
|
||||
.PP
|
||||
To print a sample
|
||||
rndc\&.conf
|
||||
\fIrndc.conf\fR
|
||||
file and corresponding
|
||||
\fBcontrols\fR
|
||||
and
|
||||
\fBkey\fR
|
||||
statements to be manually inserted into
|
||||
named\&.conf, run
|
||||
\fInamed.conf\fR, run
|
||||
.PP
|
||||
\fBrndc\-confgen\fR
|
||||
.SH "SEE ALSO"
|
||||
@@ -215,13 +200,12 @@ named\&.conf, run
|
||||
\fBrndc\fR(8),
|
||||
\fBrndc.conf\fR(5),
|
||||
\fBnamed\fR(8),
|
||||
BIND 9 Administrator Reference Manual\&.
|
||||
BIND 9 Administrator Reference Manual.
|
||||
.SH "AUTHOR"
|
||||
.PP
|
||||
\fBInternet Systems Consortium, Inc\&.\fR
|
||||
Internet Systems Consortium
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
Copyright \(co 2004, 2005, 2007, 2009, 2014, 2015 Internet Systems Consortium, Inc. ("ISC")
|
||||
Copyright \(co 2004, 2005, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
|
||||
.br
|
||||
Copyright \(co 2001, 2003 Internet Software Consortium.
|
||||
.br
|
||||
@@ -1,5 +1,8 @@
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
|
||||
[<!ENTITY mdash "—">]>
|
||||
<!--
|
||||
- Copyright (C) 2004, 2005, 2007, 2009, 2014, 2015 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2004, 2005, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2001, 2003 Internet Software Consortium.
|
||||
-
|
||||
- Permission to use, copy, modify, and/or distribute this software for any
|
||||
@@ -15,14 +18,10 @@
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
|
||||
<!-- Converted by db4-upgrade version 1.0 -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="man.rndc-confgen">
|
||||
<info>
|
||||
<date>2009-06-15</date>
|
||||
</info>
|
||||
<!-- $Id: rndc-confgen.docbook,v 1.4 2009/06/15 23:47:59 tbox Exp $ -->
|
||||
<refentry id="man.rndc-confgen">
|
||||
<refentryinfo>
|
||||
<corpname>ISC</corpname>
|
||||
<corpauthor>Internet Systems Consortium, Inc.</corpauthor>
|
||||
<date>Aug 27, 2001</date>
|
||||
</refentryinfo>
|
||||
|
||||
<refmeta>
|
||||
@@ -42,8 +41,6 @@
|
||||
<year>2005</year>
|
||||
<year>2007</year>
|
||||
<year>2009</year>
|
||||
<year>2014</year>
|
||||
<year>2015</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
<copyright>
|
||||
@@ -54,23 +51,23 @@
|
||||
</docinfo>
|
||||
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis sepchar=" ">
|
||||
<cmdsynopsis>
|
||||
<command>rndc-confgen</command>
|
||||
<arg choice="opt" rep="norepeat"><option>-a</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-b <replaceable class="parameter">keysize</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-c <replaceable class="parameter">keyfile</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-h</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-k <replaceable class="parameter">keyname</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-p <replaceable class="parameter">port</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-r <replaceable class="parameter">randomfile</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-s <replaceable class="parameter">address</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-t <replaceable class="parameter">chrootdir</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-u <replaceable class="parameter">user</replaceable></option></arg>
|
||||
<arg><option>-a</option></arg>
|
||||
<arg><option>-b <replaceable class="parameter">keysize</replaceable></option></arg>
|
||||
<arg><option>-c <replaceable class="parameter">keyfile</replaceable></option></arg>
|
||||
<arg><option>-h</option></arg>
|
||||
<arg><option>-k <replaceable class="parameter">keyname</replaceable></option></arg>
|
||||
<arg><option>-p <replaceable class="parameter">port</replaceable></option></arg>
|
||||
<arg><option>-r <replaceable class="parameter">randomfile</replaceable></option></arg>
|
||||
<arg><option>-s <replaceable class="parameter">address</replaceable></option></arg>
|
||||
<arg><option>-t <replaceable class="parameter">chrootdir</replaceable></option></arg>
|
||||
<arg><option>-u <replaceable class="parameter">user</replaceable></option></arg>
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
|
||||
<refsection><info><title>DESCRIPTION</title></info>
|
||||
|
||||
<refsect1>
|
||||
<title>DESCRIPTION</title>
|
||||
<para><command>rndc-confgen</command>
|
||||
generates configuration files
|
||||
for <command>rndc</command>. It can be used as a
|
||||
@@ -85,10 +82,10 @@
|
||||
and a <command>controls</command> statement altogether.
|
||||
</para>
|
||||
|
||||
</refsection>
|
||||
|
||||
<refsection><info><title>OPTIONS</title></info>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>OPTIONS</title>
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
@@ -242,10 +239,10 @@
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
</refsection>
|
||||
|
||||
<refsection><info><title>EXAMPLES</title></info>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>EXAMPLES</title>
|
||||
<para>
|
||||
To allow <command>rndc</command> to be used with
|
||||
no manual configuration, run
|
||||
@@ -260,10 +257,10 @@
|
||||
</para>
|
||||
<para><userinput>rndc-confgen</userinput>
|
||||
</para>
|
||||
</refsection>
|
||||
|
||||
<refsection><info><title>SEE ALSO</title></info>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>SEE ALSO</title>
|
||||
<para><citerefentry>
|
||||
<refentrytitle>rndc</refentrytitle><manvolnum>8</manvolnum>
|
||||
</citerefentry>,
|
||||
@@ -275,6 +272,16 @@
|
||||
</citerefentry>,
|
||||
<citetitle>BIND 9 Administrator Reference Manual</citetitle>.
|
||||
</para>
|
||||
</refsection>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
<refsect1>
|
||||
<title>AUTHOR</title>
|
||||
<para><corpauthor>Internet Systems Consortium</corpauthor>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry><!--
|
||||
- Local variables:
|
||||
- mode: sgml
|
||||
- End:
|
||||
-->
|
||||
Loaded 100 of 3694 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user