Compare commits
1 Commits
v9.17.3
...
test-rando
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
be16142ea5 |
@@ -1,73 +0,0 @@
|
||||
BasedOnStyle: LLVM
|
||||
IndentWidth: 8
|
||||
UseTab: Always
|
||||
BreakBeforeBraces: Custom
|
||||
BraceWrapping:
|
||||
AfterClass: false
|
||||
AfterEnum: false
|
||||
AfterStruct: false
|
||||
AfterUnion: false
|
||||
AfterControlStatement: MultiLine
|
||||
AfterFunction: false # should also be MultiLine, but not yet supported
|
||||
AfterExternBlock: false
|
||||
BeforeElse: false
|
||||
IndentBraces: false
|
||||
SplitEmptyFunction: true
|
||||
AllowShortIfStatementsOnASingleLine: false
|
||||
IndentCaseLabels: false
|
||||
AlwaysBreakAfterReturnType: All
|
||||
Cpp11BracedListStyle: false
|
||||
ColumnLimit: 80
|
||||
AlignAfterOpenBracket: Align
|
||||
AlignConsecutiveDeclarations: false
|
||||
AlignConsecutiveMacros: true
|
||||
AlignTrailingComments: true
|
||||
AllowAllArgumentsOnNextLine: true
|
||||
AlwaysBreakBeforeMultilineStrings: false
|
||||
BreakBeforeBinaryOperators: None
|
||||
BreakBeforeTernaryOperators: true
|
||||
AlignEscapedNewlines: Left
|
||||
DerivePointerAlignment: false
|
||||
PointerAlignment: Right
|
||||
PointerBindsToType: false
|
||||
IncludeBlocks: Regroup
|
||||
IncludeCategories:
|
||||
- Regex: '^<isc/'
|
||||
Priority: 5
|
||||
- Regex: '^<(pk11|pkcs11)/'
|
||||
Priority: 10
|
||||
- Regex: '^<dns/'
|
||||
Priority: 15
|
||||
- Regex: '^<dst/'
|
||||
Priority: 20
|
||||
- Regex: '^<isccc/'
|
||||
Priority: 25
|
||||
- Regex: '^<isccfg/'
|
||||
Priority: 30
|
||||
- Regex: '^<ns/'
|
||||
Priority: 35
|
||||
- Regex: '^<irs/'
|
||||
Priority: 40
|
||||
- Regex: '^<bind9/'
|
||||
Priority: 45
|
||||
- Regex: '^<(dig|named|rndc|confgen|dlz)/'
|
||||
Priority: 50
|
||||
- Regex: '^<dlz_'
|
||||
Priority: 55
|
||||
- Regex: '^".*"'
|
||||
Priority: 99
|
||||
- Regex: '<openssl/'
|
||||
Priority: 1
|
||||
- Regex: '<(mysql|protobuf-c)/'
|
||||
Priority: 1
|
||||
- Regex: '.*'
|
||||
Priority: 0
|
||||
KeepEmptyLinesAtTheStartOfBlocks: false
|
||||
MaxEmptyLinesToKeep: 1
|
||||
PenaltyBreakAssignment: 30
|
||||
PenaltyBreakComment: 10
|
||||
PenaltyBreakFirstLessLess: 0
|
||||
PenaltyBreakString: 80
|
||||
PenaltyExcessCharacter: 100
|
||||
Standard: Cpp11
|
||||
ContinuationIndentWidth: 8
|
||||
@@ -1,61 +0,0 @@
|
||||
BasedOnStyle: LLVM
|
||||
IndentWidth: 8
|
||||
UseTab: Always
|
||||
BreakBeforeBraces: Custom
|
||||
BraceWrapping:
|
||||
AfterClass: false
|
||||
AfterEnum: false
|
||||
AfterStruct: false
|
||||
AfterUnion: false
|
||||
AfterControlStatement: MultiLine
|
||||
AfterFunction: false # should also be MultiLine, but not yet supported
|
||||
AfterExternBlock: false
|
||||
BeforeElse: false
|
||||
IndentBraces: false
|
||||
SplitEmptyFunction: true
|
||||
AllowShortIfStatementsOnASingleLine: false
|
||||
IndentCaseLabels: false
|
||||
AlwaysBreakAfterReturnType: All
|
||||
Cpp11BracedListStyle: false
|
||||
ColumnLimit: 80
|
||||
AlignAfterOpenBracket: Align
|
||||
AlignConsecutiveDeclarations: true
|
||||
AlignConsecutiveMacros: true
|
||||
AlignTrailingComments: true
|
||||
AllowAllArgumentsOnNextLine: true
|
||||
AlwaysBreakBeforeMultilineStrings: false
|
||||
BreakBeforeBinaryOperators: None
|
||||
BreakBeforeTernaryOperators: true
|
||||
AlignEscapedNewlines: Left
|
||||
DerivePointerAlignment: false
|
||||
PointerAlignment: Right
|
||||
PointerBindsToType: false
|
||||
IncludeBlocks: Regroup
|
||||
IncludeCategories:
|
||||
- Regex: '^<isc/'
|
||||
Priority: 2
|
||||
- Regex: '^<dns/'
|
||||
Priority: 3
|
||||
- Regex: '^<iscccc/'
|
||||
Priority: 4
|
||||
- Regex: '^<isccfg/'
|
||||
Priority: 5
|
||||
- Regex: '^<ns/'
|
||||
Priority: 6
|
||||
- Regex: '^<bind9/)'
|
||||
Priority: 7
|
||||
- Regex: '^(<[^/]*)/)'
|
||||
Priority: 8
|
||||
- Regex: '<[[:alnum:].]+>'
|
||||
Priority: 1
|
||||
- Regex: '".*"'
|
||||
Priority: 9
|
||||
KeepEmptyLinesAtTheStartOfBlocks: false
|
||||
MaxEmptyLinesToKeep: 1
|
||||
PenaltyBreakAssignment: 30
|
||||
PenaltyBreakComment: 10
|
||||
PenaltyBreakFirstLessLess: 0
|
||||
PenaltyBreakString: 80
|
||||
PenaltyExcessCharacter: 100
|
||||
Standard: Cpp11
|
||||
ContinuationIndentWidth: 8
|
||||
114
.dir-locals.el
114
.dir-locals.el
@@ -1,114 +0,0 @@
|
||||
;;; Directory Local Variables
|
||||
;;; For more information see (info "(emacs) Directory Variables")
|
||||
|
||||
((c-mode .
|
||||
((eval .
|
||||
(set (make-local-variable 'directory-of-current-dir-locals-file)
|
||||
(file-name-directory (locate-dominating-file default-directory ".dir-locals.el"))
|
||||
)
|
||||
)
|
||||
(eval .
|
||||
(set (make-local-variable 'include-directories)
|
||||
(list
|
||||
|
||||
;; top directory
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "./"))
|
||||
|
||||
;; libisc
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "lib/isc/unix/include"))
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "lib/isc/pthreads/include"))
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "lib/isc/include"))
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "lib/isc"))
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "lib/isc/netmgr"))
|
||||
|
||||
;; libdns
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "lib/dns/include"))
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "lib/dns"))
|
||||
|
||||
;; libisccc
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "lib/isccc/include"))
|
||||
|
||||
;; libisccfg
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "lib/isccfg/include"))
|
||||
|
||||
;; libns
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "lib/ns/include"))
|
||||
|
||||
;; libirs
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "lib/irs/include"))
|
||||
|
||||
;; libbind9
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "lib/bind9/include"))
|
||||
|
||||
;; bin
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "bin/check"))
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "bin/confgen/include"))
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "bin/confgen"))
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "bin/confgen/include"))
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "bin/dig/include"))
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "bin/named/include"))
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "bin/named/unix/include"))
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "bin/rndc/include"))
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "bin/dnssec/include"))
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "bin/named/include"))
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "bin/rndc/include"))
|
||||
|
||||
(expand-file-name "/usr/local/opt/openssl@1.1/include")
|
||||
(expand-file-name "/usr/local/opt/libxml2/include/libxml2")
|
||||
(expand-file-name "/usr/local/opt/json-c/include/json-c/")
|
||||
(expand-file-name "/usr/local/include")
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(eval setq flycheck-clang-include-path include-directories)
|
||||
(eval setq flycheck-cppcheck-include-path include-directories)
|
||||
(eval setq flycheck-gcc-include-path include-directories)
|
||||
(eval setq flycheck-clang-args
|
||||
(list
|
||||
"-include"
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "config.h"))
|
||||
)
|
||||
)
|
||||
(eval setq flycheck-gcc-args
|
||||
(list
|
||||
"-include"
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "config.h"))
|
||||
)
|
||||
)
|
||||
(eval setq flycheck-cppcheck-args
|
||||
(list
|
||||
"--enable=all"
|
||||
"--suppress=missingIncludeSystem"
|
||||
(concat "-include=" (expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "config.h")))
|
||||
)
|
||||
)
|
||||
)
|
||||
))
|
||||
12
.gitattributes
vendored
12
.gitattributes
vendored
@@ -1,11 +1,3 @@
|
||||
*.sln.in eol=crlf
|
||||
*.vcxproj.* eol=crlf
|
||||
|
||||
.gitignore export-ignore
|
||||
/conftools export-ignore
|
||||
/doc/design export-ignore
|
||||
/doc/dev export-ignore
|
||||
/util/** export-ignore
|
||||
/util/bindkeys.pl -export-ignore
|
||||
/util/check-make-install.in -export-ignore
|
||||
/util/mksymtbl.pl -export-ignore
|
||||
*.vcxproj.in eol=crlf
|
||||
*.vcxproj.filters.in eol=crlf
|
||||
|
||||
113
.gitignore
vendored
113
.gitignore
vendored
@@ -1,69 +1,62 @@
|
||||
*-symtbl.c
|
||||
*.a
|
||||
*.gcda
|
||||
*.gcno
|
||||
*.la
|
||||
*.lo
|
||||
*.log
|
||||
Makefile
|
||||
config.log
|
||||
config.h
|
||||
config.cache
|
||||
config.status
|
||||
libtool
|
||||
/isc-config.sh
|
||||
/configure.lineno
|
||||
autom4te.cache/
|
||||
*.o
|
||||
*.orig
|
||||
*.plist/ # ccc-analyzer store its results in .plist directories
|
||||
*.rej
|
||||
*.lo
|
||||
*.so
|
||||
*.trs
|
||||
*.a
|
||||
*.la
|
||||
*.gcno
|
||||
*.gcda
|
||||
*_test
|
||||
*.ipch # vscode/intellisense precompiled header
|
||||
*~
|
||||
__pycache__/
|
||||
*-symtbl.c
|
||||
timestamp
|
||||
ans.run
|
||||
named.run
|
||||
named.memstats
|
||||
gen.dSYM/
|
||||
.ccache/
|
||||
.cproject
|
||||
.deps/
|
||||
.dirstamp
|
||||
.libs/
|
||||
unit/atf-src/atf-c++/atf-c++.pc
|
||||
unit/atf-src/atf-c/atf-c.pc
|
||||
unit/atf-src/atf-c/defs.h
|
||||
unit/atf-src/atf-c/detail/process_helpers
|
||||
unit/atf-src/atf-config/atf-config
|
||||
unit/atf-src/atf-report/atf-report
|
||||
unit/atf-src/atf-report/fail_helper
|
||||
unit/atf-src/atf-report/misc_helpers
|
||||
unit/atf-src/atf-report/pass_helper
|
||||
unit/atf-src/atf-run/atf-run
|
||||
unit/atf-src/atf-run/bad_metadata_helper
|
||||
unit/atf-src/atf-run/expect_helpers
|
||||
unit/atf-src/atf-run/misc_helpers
|
||||
unit/atf-src/atf-run/pass_helper
|
||||
unit/atf-src/atf-run/several_tcs_helper
|
||||
unit/atf-src/atf-run/zero_tcs_helper
|
||||
unit/atf-src/atf-sh/atf-check
|
||||
unit/atf-src/atf-sh/atf-sh
|
||||
unit/atf-src/atf-sh/misc_helpers
|
||||
unit/atf-src/atf-version/atf-version
|
||||
unit/atf-src/atf-version/revision.h
|
||||
unit/atf-src/atf-version/revision.h.stamp
|
||||
unit/atf-src/bconfig.h
|
||||
unit/atf-src/bootstrap/atconfig
|
||||
unit/atf-src/doc/atf.7
|
||||
unit/atf-src/stamp-h1
|
||||
unit/atf-src/test-programs/c_helpers
|
||||
unit/atf-src/test-programs/cpp_helpers
|
||||
unit/atf-src/test-programs/sh_helpers
|
||||
# ccc-analyzer store its results in .plist directories
|
||||
*.plist/
|
||||
*~
|
||||
.project
|
||||
.cproject
|
||||
.settings
|
||||
/aclocal.m4
|
||||
/ar-lib
|
||||
/autom4te.cache/
|
||||
/bind.keys.h
|
||||
/compile
|
||||
/config.cache
|
||||
/config.guess
|
||||
/config.h
|
||||
/config.h.in
|
||||
/config.log
|
||||
/config.status
|
||||
/config.sub
|
||||
/configure
|
||||
/configure.lineno
|
||||
/depcomp
|
||||
/install-sh
|
||||
/isc-config.sh
|
||||
/libltdl/*
|
||||
/libtool
|
||||
/ltmain.sh
|
||||
/m4/libtool.m4
|
||||
/m4/ltargz.m4
|
||||
/m4/ltdl.m4
|
||||
/m4/ltoptions.m4
|
||||
/m4/ltsugar.m4
|
||||
/m4/ltversion.m4
|
||||
/m4/lt~obsolete.m4
|
||||
/missing
|
||||
/py-compile
|
||||
/stamp-h1
|
||||
/test-driver
|
||||
Makefile
|
||||
Makefile.in
|
||||
ans.run
|
||||
gen.dSYM/
|
||||
kyua.log
|
||||
named.memstats
|
||||
named.run
|
||||
timestamp
|
||||
/compile_commands.json
|
||||
/cppcheck_html/
|
||||
/cppcheck.results
|
||||
/tsan
|
||||
/util/check-make-install
|
||||
/INSTALL
|
||||
|
||||
1446
.gitlab-ci.yml
1446
.gitlab-ci.yml
File diff suppressed because it is too large
Load Diff
@@ -9,10 +9,6 @@ email to [security-officer@isc.org](security-officer@isc.org).
|
||||
|
||||
(Summarize the bug encountered concisely.)
|
||||
|
||||
### BIND version used
|
||||
|
||||
(Paste the output of `named -V`.)
|
||||
|
||||
### Steps to reproduce
|
||||
|
||||
(How one can reproduce the issue - this is very important.)
|
||||
|
||||
@@ -1,74 +0,0 @@
|
||||
## Release Schedule
|
||||
|
||||
**Code Freeze:**
|
||||
|
||||
**Tagging Deadline:**
|
||||
|
||||
**Public Release:**
|
||||
|
||||
## Release Checklist
|
||||
|
||||
### Before the Code Freeze
|
||||
|
||||
- [ ] ***(QA)*** Inform Support and Marketing of impending release (and give estimated release dates).
|
||||
- [ ] ***(QA)*** Ensure there are no permanent test failures on any platform.
|
||||
- [ ] ***(QA)*** Check Perflab to ensure there has been no unexplained drop in performance for the versions being released.
|
||||
- [ ] ***(QA)*** Check whether all issues assigned to the release milestone are resolved[^1].
|
||||
- [ ] ***(QA)*** Ensure that there are no outstanding merge requests in the private repository[^1] (Subscription Edition only).
|
||||
- [ ] ***(QA)*** Ensure all merge requests marked for backporting have been indeed backported.
|
||||
|
||||
### Before the Tagging Deadline
|
||||
|
||||
- [ ] ***(QA)*** Look for outstanding documentation issues (e.g. `CHANGES` mistakes) and address them if any are found.
|
||||
- [ ] ***(QA)*** Ensure release notes are correct, ask Support and Marketing to check them as well.
|
||||
- [ ] ***(Support)*** Check release notes, ask QA to correct any mistakes found.
|
||||
- [ ] ***(Marketing)*** Check release notes, ask QA to correct any mistakes found.
|
||||
- [ ] ***(SwEng)*** Update API files for libraries with new version information.
|
||||
- [ ] ***(SwEng)*** Change software version and library versions in `configure.ac` (new major release only).
|
||||
- [ ] ***(SwEng)*** Rebuild `configure` using Autoconf on `docs.isc.org`.
|
||||
- [ ] ***(SwEng)*** Update `CHANGES`.
|
||||
- [ ] ***(SwEng)*** Update `CHANGES.SE` (Subscription Edition only).
|
||||
- [ ] ***(SwEng)*** Update `README.md`.
|
||||
- [ ] ***(SwEng)*** Update `version`.
|
||||
- [ ] ***(SwEng)*** Build documentation on `docs.isc.org`.
|
||||
- [ ] ***(QA)*** Check that all the above steps were performed correctly.
|
||||
- [ ] ***(QA)*** Check that the formatting is correct for text, PDF, and HTML versions of release notes.
|
||||
- [ ] ***(SwEng)*** Tag the releases[^2]. (Tags may only be pushed to the public repository for releases which are *not* security releases.)
|
||||
- [ ] ***(SwEng)*** If this is the first tag for a release (e.g. beta), create a release branch named `release_v9_X_Y` to allow development to continue on the maintenance branch whilst release engineering continues.
|
||||
|
||||
### Before the ASN Deadline (for ASN Releases) or the Public Release Date (for Regular Releases)
|
||||
|
||||
- [ ] ***(QA)*** Verify GitLab CI results for the tags created and prepare a QA report for the releases to be published.
|
||||
- [ ] ***(QA)*** Request signatures for the tarballs, providing their location and checksums.
|
||||
- [ ] ***(Signers)*** Validate tarball checksums, sign tarballs, and upload signatures.
|
||||
- [ ] ***(QA)*** Verify tarball signatures and check tarball checksums again.
|
||||
- [ ] ***(Support)*** Pre-publish ASN and/or Subscription Edition tarballs so that packages can be built.
|
||||
- [ ] ***(QA)*** Build and test ASN and/or Subscription Edition packages.
|
||||
- [ ] ***(QA)*** Notify Support that the releases have been prepared.
|
||||
- [ ] ***(Support)*** Send out ASNs (if applicable).
|
||||
|
||||
### On the Day of Public Release
|
||||
|
||||
- [ ] ***(Support)*** Wait for clearance from Security Officer to proceed with the public release (if applicable).
|
||||
- [ ] ***(Support)*** Place tarballs in public location on FTP site.
|
||||
- [ ] ***(Support)*** Publish links to downloads on ISC website.
|
||||
- [ ] ***(Support)*** Write release email to *bind-announce*.
|
||||
- [ ] ***(Support)*** Write email to *bind-users* (if a major release).
|
||||
- [ ] ***(Support)*** Update tickets in case of waiting support customers.
|
||||
- [ ] ***(QA)*** Build and test any outstanding private packages.
|
||||
- [ ] ***(QA)*** Build public packages (`*.deb`, RPMs).
|
||||
- [ ] ***(QA)*** Inform Marketing of the release.
|
||||
- [ ] ***(QA)*** Update the internal [BIND release dates wiki page](https://wiki.isc.org/bin/view/Main/BindReleaseDates) when public announcement has been made.
|
||||
- [ ] ***(Marketing)*** Post short note to Twitter.
|
||||
- [ ] ***(Marketing)*** Update [Wikipedia entry for BIND](https://en.wikipedia.org/wiki/BIND).
|
||||
- [ ] ***(Marketing)*** Write blog article (if a major release).
|
||||
- [ ] ***(QA)*** Ensure all new tags are annotated and signed.
|
||||
- [ ] ***(SwEng)*** Merge the automatically prepared `prep 9.X.Y` commit which updates `version` and documentation on the release branch into the relevant maintenance branch (`v9_X`).
|
||||
- [ ] ***(SwEng)*** Push tags for the published releases to the public repository.
|
||||
- [ ] ***(QA)*** For each maintained branch, update the `BIND_BASELINE_VERSION` variable for the `abi-check` job in `.gitlab-ci.yml` to the latest published BIND version tag for a given branch.
|
||||
- [ ] ***(QA)*** Prepare empty release notes for the next set of releases.
|
||||
- [ ] ***(QA)*** Update QA tools used in GitLab CI (e.g. Flake8, PyLint) by modifying the relevant `Dockerfile`.
|
||||
|
||||
[^1]: If not, use the time remaining until the tagging deadline to ensure all outstanding issues are either resolved or moved to a different milestone.
|
||||
|
||||
[^2]: Preferred command line: `git tag -u <DEVELOPER_KEYID> -a -s -m "BIND 9.X.Y[alphatag]" v9_X_Y[alphatag]`, where `[alphatag]` is an optional string such as `b1`, `rc1`, etc.
|
||||
35
.lgtm.yml
35
.lgtm.yml
@@ -1,35 +0,0 @@
|
||||
extraction:
|
||||
cpp:
|
||||
prepare:
|
||||
packages:
|
||||
- "libxml2-dev"
|
||||
- "libjson-c-dev"
|
||||
- "libssl-dev"
|
||||
- "zlib1g-dev"
|
||||
- "libcmocka-dev"
|
||||
- "pkg-config"
|
||||
- "libcap2-dev"
|
||||
- "libedit-dev"
|
||||
- "libidn2-dev"
|
||||
- "libmaxminddb-dev"
|
||||
- "libuv1-dev"
|
||||
configure:
|
||||
command:
|
||||
- "autoreconf -fi"
|
||||
- "CFLAGS=\"-Og -g\" ./configure --enable-developer"
|
||||
path_classifiers:
|
||||
test:
|
||||
- "lib/*/tests/"
|
||||
- "bin/tests/"
|
||||
docs:
|
||||
- "**/*.xml"
|
||||
- "**/*.docbook"
|
||||
- "**/*.html"
|
||||
- "**/*.1"
|
||||
- "**/*.5"
|
||||
- "**/*.8"
|
||||
queries:
|
||||
- exclude: libltdl/
|
||||
- exclude: fuzz/
|
||||
- exclude: "bin/tests/system/*/ans*/*.py"
|
||||
- exclude: cpp/use-of-goto
|
||||
@@ -1,7 +0,0 @@
|
||||
[MASTER]
|
||||
disable=
|
||||
C0114, # missing-module-docstring
|
||||
C0115, # missing-class-docstring
|
||||
C0116, # missing-function-docstring
|
||||
R0801, # duplicate-code
|
||||
C0103, # invalid-name
|
||||
1434
.uncrustify.cfg
1434
.uncrustify.cfg
File diff suppressed because it is too large
Load Diff
53
AUTHORS
53
AUTHORS
@@ -1,53 +0,0 @@
|
||||
Mark Andrews
|
||||
Andreas Gustafsson
|
||||
Evan Hunt
|
||||
Brian Wellington
|
||||
Bob Halley
|
||||
David Lawrence
|
||||
Michael Graff
|
||||
Michael Sawyer
|
||||
Ondřej Surý
|
||||
James Brister
|
||||
Tatuya JINMEI 神明達哉
|
||||
Francis Dupont
|
||||
Michał Kępień
|
||||
Danny Mayer
|
||||
Mukund Sivaraman
|
||||
Jeremy C. Reed
|
||||
William King
|
||||
Stephen Morris
|
||||
Witold Kręcicki
|
||||
Curtis Blackburn
|
||||
Scott Mann
|
||||
Rob Austein
|
||||
Jim Reid
|
||||
Eric Luce
|
||||
Olafur Gudmundsson
|
||||
Stephen Jacob
|
||||
Damien Neil
|
||||
Tony Finch
|
||||
Jakob Schlyter
|
||||
Petr Menšík
|
||||
Vernon Schryver
|
||||
Matt Nelson
|
||||
Shane Kerr
|
||||
Paul Ebersman
|
||||
Ray Bellis
|
||||
Shawn Routhier
|
||||
Ben Cottrell
|
||||
Tomas Hozza
|
||||
johnd
|
||||
Bill Parker
|
||||
李昶
|
||||
Kevin Chen
|
||||
Jonathan Casey
|
||||
Mary Stahl
|
||||
Mathieu Arnold
|
||||
David Hankins
|
||||
Paul Hoffman
|
||||
Paul Vixie
|
||||
Brian Conry
|
||||
Anay Panvalkar
|
||||
colleen
|
||||
Robert Edmonds
|
||||
João Damas
|
||||
5
Atffile
Normal file
5
Atffile
Normal file
@@ -0,0 +1,5 @@
|
||||
Content-Type: application/X-atf-atffile; version="1"
|
||||
|
||||
prop: test-suite = bind9
|
||||
|
||||
tp: lib
|
||||
@@ -1,71 +0,0 @@
|
||||
# BIND 9 Code of Conduct
|
||||
|
||||
Like the technical community as a whole, the BIND 9 team and community is made
|
||||
up of a mixture of professionals and volunteers from all over the world, working
|
||||
on every aspect of the mission - including mentorship, teaching, and connecting
|
||||
people.
|
||||
|
||||
Diversity is one of our huge strengths, but it can also lead to communication
|
||||
issues and unhappiness. To that end, we have a few ground rules that we ask
|
||||
people to adhere to. This code applies equally to the core development team, open source contributors and those
|
||||
seeking help and guidance.
|
||||
|
||||
This isn't an exhaustive list of things that you can't do. Rather, take it in
|
||||
the spirit in which it's intended - a guide to make it easier to enrich all of
|
||||
us and the technical communities in which we participate.
|
||||
|
||||
This code of conduct applies to all spaces managed by the BIND 9 project or
|
||||
Internet Systems Consortium. This includes chat, the mailing lists, the issue
|
||||
tracker, and any other fora created by the project team which the
|
||||
community uses for communication. In addition, violations of this code outside
|
||||
these spaces may affect a person's ability to participate within them.
|
||||
|
||||
If you believe someone is violating the code of conduct, we ask that you report
|
||||
it by emailing [conduct@isc.org](conduct@isc.org). For more details please see
|
||||
our [Reporting Guidelines](https://www.isc.org/conductreporting/).
|
||||
|
||||
* **Be friendly and patient.**
|
||||
* **Be welcoming.** We strive to be a community that welcomes and supports
|
||||
people of all backgrounds and identities. This includes, but is not limited to
|
||||
members of any race, ethnicity, culture, national origin, colour, immigration
|
||||
status, social and economic class, educational level, sex, sexual orientation,
|
||||
gender identity and expression, age, size, family status, political belief,
|
||||
religion, and mental and physical ability.
|
||||
* **Be considerate.** Your work will be used by other people, and you in turn
|
||||
will depend on the work of others. Any decision you take will affect users and
|
||||
colleagues, and you should take those consequences into account when making
|
||||
decisions. Remember that we're a world-wide community, so you might not be
|
||||
communicating in someone else's primary language.
|
||||
* **Be respectful.** Not all of us will agree all the time, but disagreement is
|
||||
no excuse for poor behavior and poor manners. We might all experience some
|
||||
frustration now and then, but we cannot allow that frustration to turn into a
|
||||
personal attack. It's important to remember that a community where people feel
|
||||
uncomfortable or threatened is not a productive one. Members of the BIND 9
|
||||
community should be respectful when dealing with other members as well as with
|
||||
people outside the BIND 9 community.
|
||||
* **Be careful in the words that you choose.** We are a community of
|
||||
professionals, and we conduct ourselves professionally. Be kind to others. Do
|
||||
not insult or put down other participants. Harassment and other exclusionary
|
||||
behavior aren't acceptable. This includes, but is not limited to:
|
||||
* Violent threats or language directed against another person.
|
||||
* Discriminatory jokes and language.
|
||||
* Posting sexually explicit or violent material.
|
||||
* Posting (or threatening to post) other people's personally identifying
|
||||
information ("doxing").
|
||||
* Personal insults, especially those using racist or sexist terms.
|
||||
* Unwelcome sexual attention.
|
||||
* Advocating for, or encouraging, any of the above behavior.
|
||||
* Repeated harassment of others. In general, if someone asks you to stop, then
|
||||
stop.
|
||||
* **When we disagree, try to understand why.** Disagreements, both social and
|
||||
technical, happen all the time and BIND 9 is no exception. It is important
|
||||
that we resolve disagreements and differing views constructively. Remember
|
||||
that we're different. The strength of BIND 9 comes from its varied community,
|
||||
people from a wide range of backgrounds. Different people have different
|
||||
perspectives on issues. Being unable to understand why someone holds a
|
||||
viewpoint doesn't mean that they're wrong. Don't forget that it is human to
|
||||
err and blaming each other doesn't get us anywhere. Instead, focus on helping
|
||||
to resolve issues and learning from mistakes.
|
||||
|
||||
Original text courtesy of the [Django Code of Conduct](https://www.djangoproject.com/conduct/)
|
||||
project.
|
||||
186
CONTRIBUTING
Normal file
186
CONTRIBUTING
Normal file
@@ -0,0 +1,186 @@
|
||||
BIND Source Access and Contributor Guidelines
|
||||
|
||||
Feb 22, 2018
|
||||
|
||||
Contents
|
||||
|
||||
1. Access to source code
|
||||
2. Reporting bugs
|
||||
3. Contributing code
|
||||
|
||||
Introduction
|
||||
|
||||
Thank you for using BIND!
|
||||
|
||||
BIND is open source software that implements the Domain Name System (DNS)
|
||||
protocols for the Internet. It is a reference implementation of those
|
||||
protocols, but it is also production-grade software, suitable for use in
|
||||
high-volume and high-reliability applications. It is by far the most
|
||||
widely used DNS software, providing a robust and stable platform on top of
|
||||
which organizations can build distributed computing systems with the
|
||||
knowledge that those systems are fully compliant with published DNS
|
||||
standards.
|
||||
|
||||
BIND is and will always remain free and openly available. It can be used
|
||||
and modified in any way by anyone.
|
||||
|
||||
BIND is maintained by the Internet Systems Consortium, a public-benefit
|
||||
501(c)(3) nonprofit, using a "managed open source" approach: anyone can
|
||||
see the source, but only ISC employees have commit access. Until recently,
|
||||
the source could only be seen once ISC had published a release: read
|
||||
access to the source repository was restricted just as commit access was.
|
||||
That's now changing, with the opening of a public git mirror to the BIND
|
||||
source tree (see below).
|
||||
|
||||
Access to source code
|
||||
|
||||
Public BIND releases are always available from the ISC FTP site.
|
||||
|
||||
A public-access GIT repository is also available at https://gitlab.isc.org
|
||||
. This repository is a mirror, updated several times per day, of the
|
||||
source repository maintained by ISC. It contains all the public release
|
||||
branches; upcoming releases can be viewed in their current state at any
|
||||
time. It does not contain development branches or unreviewed work in
|
||||
progress. Commits which address security vulnerablilities are withheld
|
||||
until after public disclosure.
|
||||
|
||||
You can browse the source online via https://gitlab.isc.org/isc-projects/
|
||||
bind9
|
||||
|
||||
To clone the repository, use:
|
||||
|
||||
$ git clone https://gitlab.isc.org/isc-projects/bind9.git
|
||||
|
||||
Release branch names are of the form v9_X, where X represents the second
|
||||
number in the BIND 9 version number. So, to check out the BIND 9.12
|
||||
branch, use:
|
||||
|
||||
$ git checkout v9_12
|
||||
|
||||
Whenever a branch is ready for publication, a tag will be placed of the
|
||||
form v9_X_Y. The 9.12.0 release, for instance, is tagged as v9_12_0.
|
||||
|
||||
The branch in which the next major release is being developed is called
|
||||
master.
|
||||
|
||||
Reporting bugs
|
||||
|
||||
Reports of flaws in the BIND package, including software bugs, errors in
|
||||
the documentation, missing files in the tarball, suggested changes or
|
||||
requests for new features, etc, can be filed using https://gitlab.isc.org/
|
||||
isc-projects/bind9/issues.
|
||||
|
||||
Due to a large ticket backlog, we are sometimes slow to respond,
|
||||
especially if a bug is cosmetic or if a feature request is vague or low in
|
||||
priority, but we will try at least to acknowledge legitimate bug reports
|
||||
within a week.
|
||||
|
||||
ISC's ticketing system is publicly readable; however, you must have an
|
||||
account to file a new issue. You can either register locally or use
|
||||
credentials from an existing account at GitHub, GitLab, Google, Twitter,
|
||||
or Facebook.
|
||||
|
||||
Reporting possible security issues
|
||||
|
||||
If you think you may be seeing a potential security vulnerability in BIND
|
||||
(for example, a crash with REQUIRE, INSIST, or ASSERT failure), please
|
||||
report it immediately by emailing to security-officer@isc.org. Plain-text
|
||||
e-mail is not a secure choice for communications concerning undisclosed
|
||||
security issues so please encrypt your communications to us if possible,
|
||||
using the ISC Security Officer public key.
|
||||
|
||||
Do not discuss undisclosed security vulnerabilites on any public mailing
|
||||
list. ISC has a long history of handling reported vulnerabilities promptly
|
||||
and effectively and we respect and acknowledge responsible reporters.
|
||||
|
||||
ISC's Security Vulnerability Disclosure Policy is documented at https://
|
||||
kb.isc.org/article/AA-00861/0.
|
||||
|
||||
If you have a crash, you may want to consult ?What to do if your BIND or
|
||||
DHCP server has crashed.?
|
||||
|
||||
Contributing code
|
||||
|
||||
BIND is licensed under the Mozilla Public License 2.0. Earier versions
|
||||
(BIND 9.10 and earlier) were licensed under the ISC License
|
||||
|
||||
ISC does not require an explicit copyright assignment for patch
|
||||
contributions. However, by submitting a patch to ISC, you implicitly
|
||||
certify that you are the author of the code, that you intend to reliquish
|
||||
exclusive copyright, and that you grant permission to publish your work
|
||||
under the open source license used for the BIND version(s) to which your
|
||||
patch will be applied.
|
||||
|
||||
BIND code
|
||||
|
||||
Patches for BIND may be submitted directly via merge requests in ISC's
|
||||
Gitlab source repository for BIND.
|
||||
|
||||
Patches can also be submitted as diffs against a specific version of BIND
|
||||
-- preferably the current top of the master branch. Diffs may be generated
|
||||
using either git format-patch or git diff.
|
||||
|
||||
Those wanting to write code for BIND may be interested in the developer
|
||||
information page, which includes information about BIND design and coding
|
||||
practices, including discussion of internal APIs and overall system
|
||||
architecture. (This is a work in progress, and still quite preliminary.)
|
||||
|
||||
Every patch submitted will be reviewed by ISC engineers following our code
|
||||
review process before it is merged.
|
||||
|
||||
It may take considerable time to review patch submissions, especially if
|
||||
they don't meet ISC style and quality guidelines. If a patch is a good
|
||||
idea, we can and will do additional work to bring it up to par, but if
|
||||
we're busy with other work, it may take us a long time to get to it.
|
||||
|
||||
To ensure your patch is acted on as promptly as possible, please:
|
||||
|
||||
* Try to adhere to the BIND 9 coding style.
|
||||
* Run make check to ensure your change hasn't caused any functional
|
||||
regressions.
|
||||
* Document your work, both in the patch itself and in the accompanying
|
||||
email.
|
||||
* In patches that make non-trivial functional changes, include system
|
||||
tests if possible; when introducing or substantially altering a
|
||||
library API, include unit tests. See Testing for more information.
|
||||
|
||||
Changes to configure
|
||||
|
||||
If you need to make changes to configure, you should not edit it directly;
|
||||
instead, edit configure.in, then run autoconf. Similarly, instead of
|
||||
editing config.h.in directly, edit configure.in and run autoheader.
|
||||
|
||||
When submitting a patch as a diff, it's fine to omit the configure diffs
|
||||
to save space. Just send the configure.in diffs and we'll generate the new
|
||||
configure during the review process.
|
||||
|
||||
Documentation
|
||||
|
||||
All functional changes should be documented. There are three types of
|
||||
documentation in the BIND source tree:
|
||||
|
||||
* Man pages are kept alongside the source code for the commands they
|
||||
document, in files ending in .docbook; for example, the named man page
|
||||
is bin/named/named.docbook.
|
||||
* The BIND 9 Administrator Reference Manual is mostly in doc/arm/
|
||||
Bv9ARM-book.xml, plus a few other XML files that are included in it.
|
||||
* API documentation is in the header file describing the API, in
|
||||
Doxygen-formatted comments.
|
||||
|
||||
It is not necessary to edit any documentation files other than these; all
|
||||
PDF, HTML, and nroff-format man page files will be updated automatically
|
||||
from the docbook and XML files after merging.
|
||||
|
||||
Patches to improve existing documentation are also very welcome!
|
||||
|
||||
Tests
|
||||
|
||||
BIND is a large and complex project. We rely heavily on continuous
|
||||
automated testing and cannot merge new code without adequate test
|
||||
coverage. Please see the 'Testing' section of doc/dev/dev.md for more
|
||||
information.
|
||||
|
||||
Thanks
|
||||
|
||||
Thank you for your interest in contributing to the ongoing development of
|
||||
BIND.
|
||||
@@ -8,8 +8,8 @@
|
||||
- See the COPYRIGHT file distributed with this work for additional
|
||||
- information regarding copyright ownership.
|
||||
-->
|
||||
## BIND 9 Source Access and Contributor Guidelines
|
||||
*May 28, 2020*
|
||||
## BIND Source Access and Contributor Guidelines
|
||||
*Feb 22, 2018*
|
||||
|
||||
### Contents
|
||||
|
||||
@@ -19,12 +19,12 @@
|
||||
|
||||
### Introduction
|
||||
|
||||
Thank you for using BIND 9!
|
||||
Thank you for using BIND!
|
||||
|
||||
BIND is open source software that implements the Domain Name System (DNS)
|
||||
protocols for the Internet. It is a reference implementation of those
|
||||
protocols, but it is also production-grade software, suitable for use in
|
||||
high-volume and high-reliability applications. It is very
|
||||
high-volume and high-reliability applications. It is by far the most
|
||||
widely used DNS software, providing a robust and stable platform on top of
|
||||
which organizations can build distributed computing systems with the
|
||||
knowledge that those systems are fully compliant with published DNS
|
||||
@@ -33,22 +33,14 @@ standards.
|
||||
BIND is and will always remain free and openly available. It can be
|
||||
used and modified in any way by anyone.
|
||||
|
||||
BIND is maintained by [Internet Systems Consortium](https://www.isc.org),
|
||||
BIND is maintained by the [Internet Systems Consortium](https://www.isc.org),
|
||||
a public-benefit 501(c)(3) nonprofit, using a "managed open source" approach:
|
||||
anyone can see the source, but only ISC employees have commit access.
|
||||
In the past, the source could only be seen once ISC had published
|
||||
a release; read access to the source repository was restricted just
|
||||
as commit access was. That has changed, as ISC now provides a
|
||||
Until recently, the source could only be seen once ISC had published
|
||||
a release: read access to the source repository was restricted just
|
||||
as commit access was. That's now changing, with the opening of a
|
||||
public git mirror to the BIND source tree (see below).
|
||||
|
||||
At ISC, we're committed to
|
||||
building communities that are welcoming and inclusive: environments where people
|
||||
are encouraged to share ideas, treat each other with respect, and collaborate
|
||||
towards the best solutions. To reinforce our commitment, ISC
|
||||
has adopted a slightly modified version of the Django
|
||||
[Code of Conduct](https://gitlab.isc.org/isc-projects/bind9/-/blob/master/CODE_OF_CONDUCT.md) for the BIND 9 project, as well as for the conduct of our
|
||||
developers throughout the industry.
|
||||
|
||||
### <a name="access"></a>Access to source code
|
||||
|
||||
Public BIND releases are always available from the
|
||||
@@ -76,7 +68,7 @@ branch, use:
|
||||
|
||||
> $ git checkout v9_12
|
||||
|
||||
Whenever a branch is ready for publication, a tag is placed of the
|
||||
Whenever a branch is ready for publication, a tag will be placed of the
|
||||
form `v9_X_Y`. The 9.12.0 release, for instance, is tagged as `v9_12_0`.
|
||||
|
||||
The branch in which the next major release is being developed is called
|
||||
@@ -86,16 +78,16 @@ The branch in which the next major release is being developed is called
|
||||
|
||||
Reports of flaws in the BIND package, including software bugs, errors
|
||||
in the documentation, missing files in the tarball, suggested changes
|
||||
or requests for new features, etc., can be filed using
|
||||
or requests for new features, etc, can be filed using
|
||||
[https://gitlab.isc.org/isc-projects/bind9/issues](https://gitlab.isc.org/isc-projects/bind9/issues).
|
||||
|
||||
Due to a large ticket backlog, we are sometimes slow to respond,
|
||||
especially if a bug is cosmetic or if a feature request is vague or
|
||||
low in priority, but we try at least to acknowledge legitimate
|
||||
low in priority, but we will try at least to acknowledge legitimate
|
||||
bug reports within a week.
|
||||
|
||||
ISC's GitLab system is publicly readable; however, you must have
|
||||
an account to create a new issue. You can either register locally or
|
||||
ISC's ticketing system is publicly readable; however, you must have
|
||||
an account to file a new issue. You can either register locally or
|
||||
use credentials from an existing account at GitHub, GitLab, Google,
|
||||
Twitter, or Facebook.
|
||||
|
||||
@@ -105,26 +97,26 @@ If you think you may be seeing a potential security vulnerability in BIND
|
||||
report it immediately by emailing to security-officer@isc.org. Plain-text
|
||||
e-mail is not a secure choice for communications concerning undisclosed
|
||||
security issues so please encrypt your communications to us if possible,
|
||||
using the [ISC Security Officer public key](https://www.isc.org/pgpkey/).
|
||||
using the [ISC Security Officer public key](https://www.isc.org/downloads/software-support-policy/openpgp-key/).
|
||||
|
||||
Do not discuss undisclosed security vulnerabilities on any public mailing list.
|
||||
Do not discuss undisclosed security vulnerabilites on any public mailing list.
|
||||
ISC has a long history of handling reported vulnerabilities promptly and
|
||||
effectively and we respect and acknowledge responsible reporters.
|
||||
|
||||
ISC's Security Vulnerability Disclosure Policy is documented at [https://kb.isc.org/docs/aa-00861](https://kb.isc.org/docs/aa-00861).
|
||||
ISC's Security Vulnerability Disclosure Policy is documented at [https://kb.isc.org/article/AA-00861/0](https://kb.isc.org/article/AA-00861/0).
|
||||
|
||||
If you have a crash, you may want to consult
|
||||
["What to do if your BIND or DHCP server has crashed."](https://kb.isc.org/docs/aa-00340)
|
||||
[‘What to do if your BIND or DHCP server has crashed.’](https://kb.isc.org/article/AA-00340/89/What-to-do-if-your-BIND-or-DHCP-server-has-crashed.html)
|
||||
|
||||
### <a name="contrib"></a>Contributing code
|
||||
### <a name="bugs"></a>Contributing code
|
||||
|
||||
BIND is licensed under the
|
||||
[Mozilla Public License 2.0](https://www.mozilla.org/en-US/MPL/2.0/).
|
||||
Earlier versions (BIND 9.10 and earlier) were licensed under the [ISC License](https://www.isc.org/licenses/)
|
||||
[Mozilla Public License 2.0](http://www.isc.org/downloads/software-support-policy/isc-license/).
|
||||
Earier versions (BIND 9.10 and earlier) were licensed under the [ISC License](http://www.isc.org/downloads/software-support-policy/isc-license/)
|
||||
|
||||
ISC does not require an explicit copyright assignment for patch
|
||||
contributions. However, by submitting a patch to ISC, you implicitly
|
||||
certify that you are the author of the code, that you intend to relinquish
|
||||
certify that you are the author of the code, that you intend to reliquish
|
||||
exclusive copyright, and that you grant permission to publish your work
|
||||
under the open source license used for the BIND version(s) to which your
|
||||
patch will be applied.
|
||||
@@ -132,7 +124,7 @@ patch will be applied.
|
||||
#### <a name="bind"></a>BIND code
|
||||
|
||||
Patches for BIND may be submitted directly via merge requests in
|
||||
[ISC's GitLab](https://gitlab.isc.org/isc-projects/bind9/) source
|
||||
[ISC's Gitlab](https://gitlab.isc.org/isc-projects/bind9/) source
|
||||
repository for BIND.
|
||||
|
||||
Patches can also be submitted as diffs against a specific version of
|
||||
@@ -142,9 +134,10 @@ be generated using either `git format-patch` or `git diff`.
|
||||
Those wanting to write code for BIND may be interested in the
|
||||
[developer information](doc/dev/dev.md) page, which includes information
|
||||
about BIND design and coding practices, including discussion of internal
|
||||
APIs and overall system architecture.
|
||||
APIs and overall system architecture. (This is a work in progress, and
|
||||
still quite preliminary.)
|
||||
|
||||
Every patch submitted is reviewed by ISC engineers following our
|
||||
Every patch submitted will be reviewed by ISC engineers following our
|
||||
[code review process](doc/dev/dev.md#reviews) before it is merged.
|
||||
|
||||
It may take considerable time to review patch submissions, especially if
|
||||
@@ -155,7 +148,7 @@ we're busy with other work, it may take us a long time to get to it.
|
||||
To ensure your patch is acted on as promptly as possible, please:
|
||||
|
||||
* Try to adhere to the [BIND 9 coding style](doc/dev/style.md).
|
||||
* Run `make check` to ensure your change hasn't caused any
|
||||
* Run `make` `check` to ensure your change hasn't caused any
|
||||
functional regressions.
|
||||
* Document your work, both in the patch itself and in the
|
||||
accompanying email.
|
||||
@@ -181,23 +174,28 @@ All functional changes should be documented. There are three types
|
||||
of documentation in the BIND source tree:
|
||||
|
||||
* Man pages are kept alongside the source code for the commands
|
||||
they document, in files ending in `.rst`: for example, the
|
||||
`named` man page is `bin/named/named.rst`.
|
||||
* The *BIND 9 Administrator Reference Manual* is in the .rst files in
|
||||
`doc/arm/`; the PDF and HTML versions are automatically generated from the `.rst` files.
|
||||
they document, in files ending in `.docbook`; for example, the
|
||||
`named` man page is `bin/named/named.docbook`.
|
||||
* The *BIND 9 Administrator Reference Manual* is mostly in
|
||||
`doc/arm/Bv9ARM-book.xml`, plus a few other XML files that are included
|
||||
in it.
|
||||
* API documentation is in the header file describing the API, in
|
||||
Doxygen-formatted comments.
|
||||
|
||||
It is not necessary to edit any documentation files other than these;
|
||||
all PDF, HTML, and `nroff`-format man page files will be updated
|
||||
automatically from the `docbook` and `XML` files after merging.
|
||||
|
||||
Patches to improve existing documentation are also very welcome!
|
||||
|
||||
##### Tests
|
||||
|
||||
BIND is a large and complex project. We rely heavily on continuous
|
||||
automated testing and cannot merge new code without adequate test coverage.
|
||||
Please see [the "Testing" section of doc/dev/dev.md](doc/dev/dev.md#testing)
|
||||
Please see [the 'Testing' section of doc/dev/dev.md](doc/dev/dev.md#testing)
|
||||
for more information.
|
||||
|
||||
#### Thanks
|
||||
|
||||
Thank you for your interest in contributing to the ongoing development
|
||||
of BIND 9.
|
||||
of BIND.
|
||||
|
||||
227
COPYRIGHT
227
COPYRIGHT
@@ -1,4 +1,4 @@
|
||||
Copyright (C) 1996-2020 Internet Systems Consortium, Inc. ("ISC")
|
||||
Copyright (C) 1996-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
|
||||
This Source Code Form is subject to the terms of the Mozilla Public
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -181,6 +181,67 @@ SUCH DAMAGE.
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 1998 Doug Rabson
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGE.
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
Copyright ((c)) 2002, Rice University
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following
|
||||
disclaimer in the documentation and/or other materials provided
|
||||
with the distribution.
|
||||
|
||||
* Neither the name of Rice University (RICE) nor the names of its
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
|
||||
This software is provided by RICE and the contributors on an "as is"
|
||||
basis, without any representations or warranties of any kind, express
|
||||
or implied including, but not limited to, representations or
|
||||
warranties of non-infringement, merchantability or fitness for a
|
||||
particular purpose. In no event shall RICE or contributors be liable
|
||||
for any direct, indirect, incidental, special, exemplary, or
|
||||
consequential damages (including, but not limited to, procurement of
|
||||
substitute goods or services; loss of use, data, or profits; or
|
||||
business interruption) however caused and on any theory of liability,
|
||||
whether in contract, strict liability, or tort (including negligence
|
||||
or otherwise) arising in any way out of the use of this software, even
|
||||
if advised of the possibility of such damage.
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 1993 by Digital Equipment Corporation.
|
||||
|
||||
Permission to use, copy, modify, and distribute this software for any
|
||||
@@ -201,6 +262,61 @@ SOFTWARE.
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
Copyright 2000 Aaron D. Gifford. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
3. Neither the name of the copyright holder nor the names of contributors
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) AND CONTRIBUTOR(S) ``AS IS'' AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) OR CONTRIBUTOR(S) BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGE.
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 1998 Doug Rabson.
|
||||
Copyright (c) 2001 Jake Burkholder.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGE.
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
|
||||
All rights reserved.
|
||||
|
||||
@@ -247,6 +363,49 @@ SOFTWARE.
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved.
|
||||
|
||||
By using this file, you agree to the terms and conditions set forth bellow.
|
||||
|
||||
LICENSE TERMS AND CONDITIONS
|
||||
|
||||
The following License Terms and Conditions apply, unless a different
|
||||
license is obtained from Japan Network Information Center ("JPNIC"),
|
||||
a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda,
|
||||
Chiyoda-ku, Tokyo 101-0047, Japan.
|
||||
|
||||
1. Use, Modification and Redistribution (including distribution of any
|
||||
modified or derived work) in source and/or binary forms is permitted
|
||||
under this License Terms and Conditions.
|
||||
|
||||
2. Redistribution of source code must retain the copyright notices as they
|
||||
appear in each source code file, this License Terms and Conditions.
|
||||
|
||||
3. Redistribution in binary form must reproduce the Copyright Notice,
|
||||
this License Terms and Conditions, in the documentation and/or other
|
||||
materials provided with the distribution. For the purposes of binary
|
||||
distribution the "Copyright Notice" refers to the following language:
|
||||
"Copyright (c) 2000-2002 Japan Network Information Center. All rights
|
||||
reserved."
|
||||
|
||||
4. The name of JPNIC may not be used to endorse or promote products
|
||||
derived from this Software without specific prior written approval of
|
||||
JPNIC.
|
||||
|
||||
5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
||||
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 2004 Nominet, Ltd.
|
||||
|
||||
Permission to use, copy, modify, and distribute this software for any
|
||||
@@ -263,6 +422,24 @@ PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
Portions Copyright RSA Security Inc.
|
||||
|
||||
License to copy and use this software is granted provided that it is
|
||||
identified as "RSA Security Inc. PKCS #11 Cryptographic Token Interface
|
||||
(Cryptoki)" in all material mentioning or referencing this software.
|
||||
|
||||
License is also granted to make and use derivative works provided that
|
||||
such works are identified as "derived from the RSA Security Inc. PKCS #11
|
||||
Cryptographic Token Interface (Cryptoki)" in all material mentioning or
|
||||
referencing the derived work.
|
||||
|
||||
RSA Security Inc. makes no representations concerning either the
|
||||
merchantability of this software or the suitability of this software for
|
||||
any particular purpose. It is provided "as is" without express or implied
|
||||
warranty of any kind.
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 1996, David Mazieres <dm@uun.org>
|
||||
Copyright (c) 2008, Damien Miller <djm@openbsd.org>
|
||||
|
||||
@@ -280,6 +457,54 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2000-2001 The OpenSSL Project. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
|
||||
3. All advertising materials mentioning features or use of this
|
||||
software must display the following acknowledgment:
|
||||
"This product includes software developed by the OpenSSL Project
|
||||
for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
|
||||
|
||||
4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
|
||||
endorse or promote products derived from this software without
|
||||
prior written permission. For written permission, please contact
|
||||
licensing@OpenSSL.org.
|
||||
|
||||
5. Products derived from this software may not be called "OpenSSL"
|
||||
nor may "OpenSSL" appear in their names without prior written
|
||||
permission of the OpenSSL Project.
|
||||
|
||||
6. Redistributions of any form whatsoever must retain the following
|
||||
acknowledgment:
|
||||
"This product includes software developed by the OpenSSL Project
|
||||
for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
|
||||
EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
|
||||
ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 1995, 1997, 1998 The NetBSD Foundation, Inc.
|
||||
All rights reserved.
|
||||
|
||||
|
||||
524
HISTORY
Normal file
524
HISTORY
Normal file
@@ -0,0 +1,524 @@
|
||||
Functional enhancements from prior major releases of BIND 9
|
||||
|
||||
BIND 9.11
|
||||
|
||||
BIND 9.11.0 includes a number of changes from BIND 9.10 and earlier
|
||||
releases. New features include:
|
||||
|
||||
* Added support for Catalog Zones, a new method for provisioning
|
||||
servers: a list of zones to be served is stored in a DNS zone, along
|
||||
with their configuration parameters. Changes to the catalog zone are
|
||||
propagated to slaves via normal AXFR/IXFR, whereupon the zones that
|
||||
are listed in it are automatically added, deleted or reconfigured.
|
||||
* Added support for "dnstap", a fast and flexible method of capturing
|
||||
and logging DNS traffic.
|
||||
* Added support for "dyndb", a new API for loading zone data from an
|
||||
external database, developed by Red Hat for the FreeIPA project.
|
||||
* "fetchlimit" quotas are now compiled in by default. These are 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.
|
||||
* Added a new "dnssec-keymgr" key mainenance utility, which can generate
|
||||
or update keys as needed to ensure that a zone's keys match a defined
|
||||
DNSSEC policy.
|
||||
* The experimental "SIT" feature in BIND 9.10 has been renamed "COOKIE"
|
||||
and is no longer optional. EDNS COOKIE is a mechanism enabling clients
|
||||
to detect off-path spoofed responses, and servers to detect
|
||||
spoofed-source queries. Clients that identify themselves using COOKIE
|
||||
options are not subject to response rate limiting (RRL) and can
|
||||
receive larger UDP responses.
|
||||
* SERVFAIL responses can now be cached for a limited time (defaulting to
|
||||
1 second, with an upper limit of 30). This can reduce the frequency of
|
||||
retries when a query is persistently failing.
|
||||
* Added an "nsip-wait-recurse" switch to RPZ. This causes NSIP rules to
|
||||
be skipped if a name server IP address isn't in the cache yet; the
|
||||
address will be looked up and the rule will be applied on future
|
||||
queries.
|
||||
* Added a Python RNDC module. This allows multiple commands to sent over
|
||||
a persistent RNDC channel, which saves time.
|
||||
* The "controls" block in named.conf can now grant read-only "rndc"
|
||||
access to specified clients or keys. Read-only clients could, for
|
||||
example, check "rndc status" but could not reconfigure or shut down
|
||||
the server.
|
||||
* "rndc" commands can now return arbitrarily large amounts of text to
|
||||
the caller.
|
||||
* The zone serial number of a dynamically updatable zone can now be set
|
||||
via "rndc signing -serial ". This allows inline-signing zones to be
|
||||
set to a specific serial number.
|
||||
* The new "rndc nta" command can be used to set a Negative Trust Anchor
|
||||
(NTA), disabling DNSSEC validation for a specific domain; this can be
|
||||
used when responses from a domain are known to be failing validation
|
||||
due to administrative error rather than because of a spoofing attack.
|
||||
Negative trust anchors are strictly temporary; by default they expire
|
||||
after one hour, but can be configured to last up to one week.
|
||||
* "rndc delzone" can now be used on zones that were not originally
|
||||
created by "rndc addzone".
|
||||
* "rndc modzone" reconfigures a single zone, without requiring the
|
||||
entire server to be reconfigured.
|
||||
* "rndc showzone" displays the current configuration of a zone.
|
||||
* "rndc managed-keys" can be used to check the status of RFC 5001
|
||||
managed trust anchors, or to force trust anchors to be refreshed.
|
||||
* "max-cache-size" can now be set to a percentage of available memory.
|
||||
The default is 90%.
|
||||
* Update forwarding performance has been improved by allowing a single
|
||||
TCP connection to be shared by multiple updates.
|
||||
* The EDNS Client Subnet (ECS) option is now supported for authoritative
|
||||
servers; if a query contains an ECS option then ACLs containing
|
||||
"geoip" or "ecs" elements can match against the the address encoded in
|
||||
the option. This can be used to select a view for a query, so that
|
||||
different answers can be provided depending on the client network.
|
||||
* The EDNS EXPIRE option has been implemented on the client side,
|
||||
allowing a slave server to set the expiration timer correctly when
|
||||
transferring zone data from another slave server.
|
||||
* The key generation and manipulation tools (dnssec-keygen,
|
||||
dnssec-settime, dnssec-importkey, dnssec-keyfromlabel) now take
|
||||
"-Psync" and "-Dsync" options to set the publication and deletion
|
||||
times of CDS and CDNSKEY parent-synchronization records. Both named
|
||||
and dnssec-signzone can now publish and remove these records at the
|
||||
scheduled times.
|
||||
* A new "minimal-any" option reduces the size of UDP responses for query
|
||||
type ANY by returning a single arbitrarily selected RRset instead of
|
||||
all RRsets.
|
||||
* A new "masterfile-style" zone option controls the formatting of text
|
||||
zone files: When set to "full", a zone file is dumped in
|
||||
single-line-per-record format.
|
||||
* "serial-update-method" can now be set to "date". On update, the serial
|
||||
number will be set to the current date in YYYYMMDDNN format.
|
||||
* "dnssec-signzone -N date" sets the serial number to YYYYMMDDNN.
|
||||
* "named -L " causes named to send log messages to the specified file by
|
||||
default instead of to the system log.
|
||||
* "dig +ttlunits" prints TTL values with time-unit suffixes: w, d, h, m,
|
||||
s for weeks, days, hours, minutes, and seconds.
|
||||
* "dig +unknownformat" prints dig output in RFC 3597 "unknown record"
|
||||
presentation format.
|
||||
* "dig +ednsopt" allows dig to set arbitrary EDNS options on requests.
|
||||
* "dig +ednsflags" allows dig to set yet-to-be-defined EDNS flags on
|
||||
requests.
|
||||
* "mdig" is an alternate version of dig which sends multiple pipelined
|
||||
TCP queries to a server. Instead of waiting for a response after
|
||||
sending a query, it sends all queries immediately and displays
|
||||
responses in the order received.
|
||||
* "serial-query-rate" no longer controls NOTIFY messages. These are
|
||||
separately controlled by "notify-rate" and "startup-notify-rate".
|
||||
* "nsupdate" now performs "check-names" processing by default on records
|
||||
to be added. This can be disabled with "check-names no".
|
||||
* The statistics channel now supports DEFLATE compression, reducing the
|
||||
size of the data sent over the network when querying statistics.
|
||||
* New counters have been added to the statistics channel to track the
|
||||
sizes of incoming queries and outgoing responses in histogram buckets,
|
||||
as specified in RSSAC002.
|
||||
* A new NXDOMAIN redirect method (option "nxdomain-redirect") has been
|
||||
added, allowing redirection to a specified DNS namespace instead of a
|
||||
single redirect zone.
|
||||
* When starting up, named now ensures that no other named process is
|
||||
already running.
|
||||
* Files created by named to store information, including "mkeys" and
|
||||
"nzf" files, are now named after their corresponding views unless the
|
||||
view name contains characters incompatible with use as a filename. Old
|
||||
style filenames (based on the hash of the view name) will still work.
|
||||
|
||||
BIND 9.10.0
|
||||
|
||||
BIND 9.10.0 includes a number of changes from BIND 9.9 and earlier
|
||||
releases. New features include:
|
||||
|
||||
* DNS Response-rate limiting (DNS RRL), which blunts the impact of
|
||||
reflection and amplification attacks, is always compiled in and no
|
||||
longer requires a compile-time option to enable it.
|
||||
* An experimental "Source Identity Token" (SIT) EDNS option is now
|
||||
available. Similar to DNS Cookies as invented by Donald Eastlake 3rd,
|
||||
these are designed to enable clients to detect off-path spoofed
|
||||
responses, and to enable servers to detect spoofed-source queries.
|
||||
Servers can be configured to send smaller responses to clients that
|
||||
have not identified themselves using a SIT option, reducing the
|
||||
effectiveness of amplification attacks. RRL processing has also been
|
||||
updated; clients proven to be legitimate via SIT are not subject to
|
||||
rate limiting. Use "configure --enable-sit" to enable this feature in
|
||||
BIND.
|
||||
* A new zone file format, "map", stores zone data in a format that can
|
||||
be mapped directly into memory, allowing significantly faster zone
|
||||
loading.
|
||||
* "delv" (domain entity lookup and validation) is a new tool with
|
||||
dig-like semantics for looking up DNS data and performing internal
|
||||
DNSSEC validation. This allows easy validation in environments where
|
||||
the resolver may not be trustworthy, and assists with troubleshooting
|
||||
of DNSSEC problems. (NOTE: In previous development releases of BIND
|
||||
9.10, this utility was called "delve". The spelling has been changed
|
||||
to avoid confusion with the "delve" utility included with the Xapian
|
||||
search engine.)
|
||||
* Improved EDNS(0) processing for better resolver performance and
|
||||
reliability over slow or lossy connections.
|
||||
* A new "configure --with-tuning=large" option tunes certain compiled-in
|
||||
constants and default settings to values better suited to large
|
||||
servers with abundant memory. This can improve performance on such
|
||||
servers, but will consume more memory and may degrade performance on
|
||||
smaller systems.
|
||||
* Substantial improvement in response-policy zone (RPZ) performance. Up
|
||||
to 32 response-policy zones can be configured with minimal performance
|
||||
loss.
|
||||
* To improve recursive resolver performance, cache records which are
|
||||
still being requested by clients can now be automatically refreshed
|
||||
from the authoritative server before they expire, reducing or
|
||||
eliminating the time window in which no answer is available in the
|
||||
cache.
|
||||
* New "rpz-client-ip" triggers and drop policies allowing response
|
||||
policies based on the IP address of the client.
|
||||
* ACLs can now be specified based on geographic location using the
|
||||
MaxMind GeoIP databases. Use "configure --with-geoip" to enable.
|
||||
* Zone data can now be shared between views, allowing multiple views to
|
||||
serve the same zones authoritatively without storing multiple copies
|
||||
in memory.
|
||||
* New XML schema (version 3) for the statistics channel includes many
|
||||
new statistics and uses a flattened XML tree for faster parsing. The
|
||||
older schema is now deprecated.
|
||||
* A new stylesheet, based on the Google Charts API, displays XML
|
||||
statistics in charts and graphs on javascript-enabled browsers.
|
||||
* The statistics channel can now provide data in JSON format as well as
|
||||
XML.
|
||||
* New stats counters track TCP and UDP queries received per zone, and
|
||||
EDNS options received in total.
|
||||
* The internal and export versions of the BIND libraries (libisc,
|
||||
libdns, etc) have been unified so that external library clients can
|
||||
use the same libraries as BIND itself.
|
||||
* A new compile-time option, "configure --enable-native-pkcs11", allows
|
||||
BIND 9 cryptography functions to use the PKCS#11 API natively, so that
|
||||
BIND can drive a cryptographic hardware service module (HSM) directly
|
||||
instead of using a modified OpenSSL as an intermediary. (Note: This
|
||||
feature requires an HSM to have a full implementation of the PKCS#11
|
||||
API; many current HSMs only have partial implementations. The new
|
||||
"pkcs11-tokens" command can be used to check API completeness. Native
|
||||
PKCS#11 is known to work with the Thales nShield HSM and with SoftHSM
|
||||
version 2 from the Open DNSSEC project.)
|
||||
* The new "max-zone-ttl" option enforces maximum TTLs for zones. This
|
||||
can simplify the process of rolling DNSSEC keys by guaranteeing that
|
||||
cached signatures will have expired within the specified amount of
|
||||
time.
|
||||
* "dig +subnet" sends an EDNS CLIENT-SUBNET option when querying.
|
||||
* "dig +expire" sends an EDNS EXPIRE option when querying. When this
|
||||
option is sent with an SOA query to a server that supports it, it will
|
||||
report the expiry time of a slave zone.
|
||||
* New "dnssec-coverage" tool to check DNSSEC key coverage for a zone and
|
||||
report if a lapse in signing coverage has been inadvertently
|
||||
scheduled.
|
||||
* Signing algorithm flexibility and other improvements for the "rndc"
|
||||
control channel.
|
||||
* "named-checkzone" and "named-compilezone" can now read journal files,
|
||||
allowing them to process dynamic zones.
|
||||
* Multiple DLZ databases can now be configured. Individual zones can be
|
||||
configured to be served from a specific DLZ database. DLZ databases
|
||||
now serve zones of type "master" and "redirect".
|
||||
* "rndc zonestatus" reports information about a specified zone.
|
||||
* "named" now listens on IPv6 as well as IPv4 interfaces by default.
|
||||
* "named" now preserves the capitalization of names when responding to
|
||||
queries: for instance, a query for "example.com" may be answered with
|
||||
"example.COM" if the name was configured that way in the zone file.
|
||||
Some clients have a bug causing them to depend on the older behavior,
|
||||
in which the case of the answer always matched the case of the query,
|
||||
rather than the case of the name configured in the DNS. Such clients
|
||||
can now be specified in the new "no-case-compress" ACL; this will
|
||||
restore the older behavior of "named" for those clients only.
|
||||
* new "dnssec-importkey" command allows the use of offline DNSSEC keys
|
||||
with automatic DNSKEY management.
|
||||
* New "named-rrchecker" tool to verify the syntactic correctness of
|
||||
individual resource records.
|
||||
* When re-signing a zone, the new "dnssec-signzone -Q" option drops
|
||||
signatures from keys that are still published but are no longer
|
||||
active.
|
||||
* "named-checkconf -px" will print the contents of configuration files
|
||||
with the shared secrets obscured, making it easier to share
|
||||
configuration (e.g. when submitting a bug report) without revealing
|
||||
private information.
|
||||
* "rndc scan" causes named to re-scan network interfaces for changes in
|
||||
local addresses.
|
||||
* On operating systems with support for routing sockets, network
|
||||
interfaces are re-scanned automatically whenever they change.
|
||||
* "tsig-keygen" is now available as an alternate command name to use for
|
||||
"ddns-confgen".
|
||||
|
||||
BIND 9.9.0
|
||||
|
||||
BIND 9.9.0 includes a number of changes from BIND 9.8 and earlier
|
||||
releases. New features include:
|
||||
|
||||
* Inline signing, allowing automatic DNSSEC signing of master zones
|
||||
without modification of the zonefile, or "bump in the wire" signing in
|
||||
slaves.
|
||||
* NXDOMAIN redirection.
|
||||
* New 'rndc flushtree' command clears all data under a given name from
|
||||
the DNS cache.
|
||||
* New 'rndc sync' command dumps pending changes in a dynamic zone to
|
||||
disk without a freeze/thaw cycle.
|
||||
* New 'rndc signing' command displays or clears signing status records
|
||||
in 'auto-dnssec' zones.
|
||||
* NSEC3 parameters for 'auto-dnssec' zones can now be set prior to
|
||||
signing, eliminating the need to initially sign with NSEC.
|
||||
* Startup time improvements on large authoritative servers.
|
||||
* Slave zones are now saved in raw format by default.
|
||||
* Several improvements to response policy zones (RPZ).
|
||||
* Improved hardware scalability by using multiple threads to listen for
|
||||
queries and using finer-grained client locking
|
||||
* The 'also-notify' option now takes the same syntax as 'masters', so it
|
||||
can used named masterlists and TSIG keys.
|
||||
* 'dnssec-signzone -D' writes an output file containing only DNSSEC
|
||||
data, which can be included by the primary zone file.
|
||||
* 'dnssec-signzone -R' forces removal of signatures that are not expired
|
||||
but were created by a key which no longer exists.
|
||||
* 'dnssec-signzone -X' allows a separate expiration date to be specified
|
||||
for DNSKEY signatures from other signatures.
|
||||
* New '-L' option to dnssec-keygen, dnssec-settime, and
|
||||
dnssec-keyfromlabel sets the default TTL for the key.
|
||||
* dnssec-dsfromkey now supports reading from standard input, to make it
|
||||
easier to convert DNSKEY to DS.
|
||||
* RFC 1918 reverse zones have been added to the empty-zones table per
|
||||
RFC 6303.
|
||||
* Dynamic updates can now optionally set the zone's SOA serial number to
|
||||
the current UNIX time.
|
||||
* DLZ modules can now retrieve the source IP address of the querying
|
||||
client.
|
||||
* 'request-ixfr' option can now be set at the per-zone level.
|
||||
* 'dig +rrcomments' turns on comments about DNSKEY records, indicating
|
||||
their key ID, algorithm and function
|
||||
* Simplified nsupdate syntax and added readline support
|
||||
|
||||
BIND 9.8.0
|
||||
|
||||
BIND 9.8.0 includes a number of changes from BIND 9.7 and earlier
|
||||
releases. New features include:
|
||||
|
||||
* Built-in trust anchor for the root zone, which can be switched on via
|
||||
"dnssec-validation auto;"
|
||||
* Support for DNS64.
|
||||
* Support for response policy zones (RPZ).
|
||||
* Support for writable DLZ zones.
|
||||
* Improved ease of configuration of GSS/TSIG for interoperability with
|
||||
Active Directory
|
||||
* Support for GOST signing algorithm for DNSSEC.
|
||||
* Removed RTT Banding from server selection algorithm.
|
||||
* New "static-stub" zone type.
|
||||
* Allow configuration of resolver timeouts via "resolver-query-timeout"
|
||||
option.
|
||||
* The DLZ "dlopen" driver is now built by default.
|
||||
* Added a new include file with function typedefs for the DLZ "dlopen"
|
||||
driver.
|
||||
* Made "--with-gssapi" default.
|
||||
* More verbose error reporting from DLZ LDAP.
|
||||
|
||||
BIND 9.7.0
|
||||
|
||||
BIND 9.7.0 includes a number of changes from BIND 9.6 and earlier
|
||||
releases. Most are intended to simplify DNSSEC configuration. New features
|
||||
include:
|
||||
|
||||
* Fully automatic signing of zones by "named".
|
||||
* Simplified configuration of DNSSEC Lookaside Validation (DLV).
|
||||
* Simplified configuration of Dynamic DNS, using the "ddns-confgen"
|
||||
command line tool or the "local" update-policy option. (As a side
|
||||
effect, this also makes it easier to configure automatic zone
|
||||
re-signing.)
|
||||
* New named option "attach-cache" that allows multiple views to share a
|
||||
single cache.
|
||||
* DNS rebinding attack prevention.
|
||||
* New default values for dnssec-keygen parameters.
|
||||
* Support for RFC 5011 automated trust anchor maintenance
|
||||
* Smart signing: simplified tools for zone signing and key maintenance.
|
||||
* The "statistics-channels" option is now available on Windows.
|
||||
* A new DNSSEC-aware libdns API for use by non-BIND9 applications
|
||||
* On some platforms, named and other binaries can now print out a stack
|
||||
backtrace on assertion failure, to aid in debugging.
|
||||
* A "tools only" installation mode on Windows, which only installs dig,
|
||||
host, nslookup and nsupdate.
|
||||
* Improved PKCS#11 support, including Keyper support and explicit
|
||||
OpenSSL engine selection.
|
||||
|
||||
BIND 9.6.0
|
||||
|
||||
* Full NSEC3 support
|
||||
* Automatic zone re-signing
|
||||
* New update-policy methods tcp-self and 6to4-self
|
||||
* The BIND 8 resolver library, libbind, has been removed from the BIND 9
|
||||
distribution and is now available as a separate download.
|
||||
* Change the default pid file location from /var/run to /var/run/
|
||||
{named,lwresd} for improved chroot/setuid support.
|
||||
|
||||
BIND 9.5.0
|
||||
|
||||
* GSS-TSIG support (RFC 3645).
|
||||
* DHCID support.
|
||||
* Experimental http server and statistics support for named via xml.
|
||||
* More detailed statistics counters including those supported in BIND 8.
|
||||
* Faster ACL processing.
|
||||
* Use Doxygen to generate internal documentation.
|
||||
* Efficient LRU cache-cleaning mechanism.
|
||||
* NSID support.
|
||||
|
||||
BIND 9.4.0
|
||||
|
||||
* Implemented "additional section caching (or acache)", an internal
|
||||
cache framework for additional section content to improve response
|
||||
performance. Several configuration options were provided to control
|
||||
the behavior.
|
||||
* New notify type 'master-only'. Enable notify for master zones only.
|
||||
* Accept 'notify-source' style syntax for query-source.
|
||||
* rndc now allows addresses to be set in the server clauses.
|
||||
* New option "allow-query-cache". This lets "allow-query" be used to
|
||||
specify the default zone access level rather than having to have every
|
||||
zone override the global value. "allow-query-cache" can be set at both
|
||||
the options and view levels. If "allow-query-cache" is not set then
|
||||
"allow-recursion" is used if set, otherwise "allow-query" is used if
|
||||
set unless "recursion no;" is set in which case "none;" is used,
|
||||
otherwise the default (localhost; localnets;) is used.
|
||||
* rndc: the source address can now be specified.
|
||||
* ixfr-from-differences now takes master and slave in addition to yes
|
||||
and no at the options and view levels.
|
||||
* Allow the journal's name to be changed via named.conf.
|
||||
* 'rndc notify zone [class [view]]' resend the NOTIFY messages for the
|
||||
specified zone.
|
||||
* 'dig +trace' now randomly selects the next servers to try. Report if
|
||||
there is a bad delegation.
|
||||
* Improve check-names error messages.
|
||||
* Make public the function to read a key file, dst_key_read_public().
|
||||
* dig now returns the byte count for axfr/ixfr.
|
||||
* allow-update is now settable at the options / view level.
|
||||
* named-checkconf now checks the logging configuration.
|
||||
* host now can turn on memory debugging flags with '-m'.
|
||||
* Don't send notify messages to self.
|
||||
* Perform sanity checks on NS records which refer to 'in zone' names.
|
||||
* New zone option "notify-delay". Specify a minimum delay between sets
|
||||
of NOTIFY messages.
|
||||
* Extend adjusting TTL warning messages.
|
||||
* Named and named-checkzone can now both check for non-terminal wildcard
|
||||
records.
|
||||
* "rndc freeze/thaw" now freezes/thaws all zones.
|
||||
* named-checkconf now check acls to verify that they only refer to
|
||||
existing acls.
|
||||
* The server syntax has been extended to support a range of servers.
|
||||
* Report differences between hints and real NS rrset and associated
|
||||
address records.
|
||||
* Preserve the case of domain names in rdata during zone transfers.
|
||||
* Restructured the data locking framework using architecture dependent
|
||||
atomic operations (when available), improving response performance on
|
||||
multi-processor machines significantly. x86, x86_64, alpha, powerpc,
|
||||
and mips are currently supported.
|
||||
* UNIX domain controls are now supported.
|
||||
* Add support for additional zone file formats for improving loading
|
||||
performance. The masterfile-format option in named.conf can be used to
|
||||
specify a non-default format. A separate command named-compilezone was
|
||||
provided to generate zone files in the new format. Additionally, the
|
||||
-I and -O options for dnssec-signzone specify the input and output
|
||||
formats.
|
||||
* dnssec-signzone can now randomize signature end times (dnssec-signzone
|
||||
-j jitter).
|
||||
* Add support for CH A record.
|
||||
* Add additional zone data constancy checks. named-checkzone has
|
||||
extended checking of NS, MX and SRV record and the hosts they
|
||||
reference. named has extended post zone load checks. New zone options:
|
||||
check-mx and integrity-check.
|
||||
* edns-udp-size can now be overridden on a per server basis.
|
||||
* dig can now specify the EDNS version when making a query.
|
||||
* Added framework for handling multiple EDNS versions.
|
||||
* Additional memory debugging support to track size and mctx arguments.
|
||||
* Detect duplicates of UDP queries we are recursing on and drop them.
|
||||
New stats category "duplicates".
|
||||
* "USE INTERNAL MALLOC" is now runtime selectable.
|
||||
* The lame cache is now done on a basis as some servers only appear to
|
||||
be lame for certain query types.
|
||||
* Limit the number of recursive clients that can be waiting for a single
|
||||
query () to resolve. New options clients-per-query and
|
||||
max-clients-per-query.
|
||||
* dig: report the number of extra bytes still left in the packet after
|
||||
processing all the records.
|
||||
* Support for IPSECKEY rdata type.
|
||||
* Raise the UDP recieve buffer size to 32k if it is less than 32k.
|
||||
* x86 and x86_64 now have seperate atomic locking implementations.
|
||||
* named-checkconf now validates update-policy entries.
|
||||
* Attempt to make the amount of work performed in a iteration self
|
||||
tuning. The covers nodes clean from the cache per iteration, nodes
|
||||
written to disk when rewriting a master file and nodes destroyed per
|
||||
iteration when destroying a zone or a cache.
|
||||
* ISC string copy API.
|
||||
* Automatic empty zone creation for D.F.IP6.ARPA and friends. Note: RFC
|
||||
1918 zones are not yet covered by this but are likely to be in a
|
||||
future release.
|
||||
* New options: empty-server, empty-contact, empty-zones-enable and
|
||||
disable-empty-zone.
|
||||
* dig now has a '-q queryname' and '+showsearch' options.
|
||||
* host/nslookup now continue (default)/fail on SERVFAIL.
|
||||
* dig now warns if 'RA' is not set in the answer when 'RD' was set in
|
||||
the query. host/nslookup skip servers that fail to set 'RA' when 'RD'
|
||||
is set unless a server is explicitly set.
|
||||
* Integrate contibuted DLZ code into named.
|
||||
* Integrate contibuted IDN code from JPNIC.
|
||||
* libbind: corresponds to that from BIND 8.4.7.
|
||||
|
||||
BIND 9.3.0
|
||||
|
||||
* DNSSEC is now DS based (RFC 3658).
|
||||
* DNSSEC lookaside validation.
|
||||
* check-names is now implemented.
|
||||
* rrset-order is more complete.
|
||||
* IPv4/IPv6 transition support, dual-stack-servers.
|
||||
* IXFR deltas can now be generated when loading master files,
|
||||
ixfr-from-differences.
|
||||
* It is now possible to specify the size of a journal, max-journal-size.
|
||||
* It is now possible to define a named set of master servers to be used
|
||||
in masters clause, masters.
|
||||
* The advertised EDNS UDP size can now be set, edns-udp-size.
|
||||
* allow-v6-synthesis has been obsoleted.
|
||||
* Zones containing MD and MF will now be rejected.
|
||||
* dig, nslookup name. now report "Not Implemented" as NOTIMP rather than
|
||||
NOTIMPL. This will have impact on scripts that are looking for
|
||||
NOTIMPL.
|
||||
* libbind: corresponds to that from BIND 8.4.5.
|
||||
|
||||
BIND 9.2.0
|
||||
|
||||
* The size of the cache can now be limited using the "max-cache-size"
|
||||
option.
|
||||
* The server can now automatically convert RFC1886-style recursive
|
||||
lookup requests into RFC2874-style lookups, when enabled using the new
|
||||
option "allow-v6-synthesis". This allows stub resolvers that support
|
||||
AAAA records but not A6 record chains or binary labels to perform
|
||||
lookups in domains that make use of these IPv6 DNS features.
|
||||
* Performance has been improved.
|
||||
* The man pages now use the more portable "man" macros rather than the
|
||||
"mandoc" macros, and are installed by "make install".
|
||||
* The named.conf parser has been completely rewritten. It now supports
|
||||
"include" directives in more places such as inside "view" statements,
|
||||
and it no longer has any reserved words.
|
||||
* The "rndc status" command is now implemented.
|
||||
* rndc can now be configured automatically.
|
||||
* A BIND 8 compatible stub resolver library is now included in lib/bind.
|
||||
* OpenSSL has been removed from the distribution. This means that to use
|
||||
DNSSEC, OpenSSL must be installed and the --with-openssl option must
|
||||
be supplied to configure. This does not apply to the use of TSIG,
|
||||
which does not require OpenSSL.
|
||||
* The source distribution now builds on Windows. See win32utils/
|
||||
readme1.txt and win32utils/win32-build.txt for details.
|
||||
* This distribution also includes a new lightweight stub resolver
|
||||
library and associated resolver daemon that fully support forward and
|
||||
reverse lookups of both IPv4 and IPv6 addresses. This library is
|
||||
considered experimental and is not a complete replacement for the BIND
|
||||
8 resolver library. Applications that use the BIND 8 res_* functions
|
||||
to perform DNS lookups or dynamic updates still need to be linked
|
||||
against the BIND 8 libraries. For DNS lookups, they can also use the
|
||||
new "getrrsetbyname()" API.
|
||||
* BIND 9.2 is capable of acting as an authoritative server for DNSSEC
|
||||
secured zones. This functionality is believed to be stable and
|
||||
complete except for lacking support for verifications involving
|
||||
wildcard records in secure zones.
|
||||
* When acting as a caching server, BIND 9.2 can be configured to perform
|
||||
DNSSEC secure resolution on behalf of its clients. This part of the
|
||||
DNSSEC implementation is still considered experimental. For detailed
|
||||
information about the state of the DNSSEC implementation, see the file
|
||||
doc/misc/dnssec.
|
||||
100
HISTORY.md
100
HISTORY.md
@@ -10,96 +10,6 @@
|
||||
-->
|
||||
### Functional enhancements from prior major releases of BIND 9
|
||||
|
||||
#### BIND 9.16
|
||||
|
||||
BIND 9.16 (a stable branch based on the 9.15 development branch)
|
||||
includes a number of changes from BIND 9.14 and earlier releases.
|
||||
New features include:
|
||||
|
||||
* New `dnssec-policy` statement to configure a key and signing policy
|
||||
for zones, enabling automatic key regeneration and rollover.
|
||||
* New network manager based on `libuv`.
|
||||
* Added support for the new GeoIP2 geolocation API, `libmaxminddb`.
|
||||
* Improved DNSSEC trust anchor configuration using the `trust-anchors`
|
||||
statement, permitting configuration of trust anchors in DS as well as
|
||||
DNSKEY format.
|
||||
* YAML output for `dig`, `mdig`, and `delv`.
|
||||
|
||||
#### BIND 9.14
|
||||
|
||||
BIND 9.14 (a stable branch based on the 9.13 development branch)
|
||||
includes a number of changes from BIND 9.12 and earlier releases.
|
||||
New features include:
|
||||
|
||||
* A new "plugin" mechanism has been added to allow query functionality
|
||||
to be extended using dynamically loadable libraries. The "filter-aaaa"
|
||||
feature has been removed from named and is now implemented as a plugin.
|
||||
* Socket and task code has been refactored to improve performance.
|
||||
* QNAME minimization, as described in RFC 7816, is now supported.
|
||||
* "Root key sentinel" support, enabling validating resolvers to indicate
|
||||
via a special query which trust anchors are configured for the root zone.
|
||||
* Secondary zones can now be configured as "mirror" zones; their contents
|
||||
are transferred in as with traditional slave zones, but are subject to
|
||||
DNSSEC validation and are not treated as authoritative data when
|
||||
answering. This makes it easier to configure a local copy of the root
|
||||
zone as described in RFC 7706.
|
||||
* The "validate-except" option allows configuration of domains below which
|
||||
DNSSEC validation should not be performed.
|
||||
* The default value of "dnssec-validation" is now "auto".
|
||||
* IDNA2008 is now supported when linking with `libidn2`.
|
||||
* "named -V" now outputs the default paths for files used by named
|
||||
and other tools.
|
||||
|
||||
In addition, workarounds that were formerly in place to enable resolution
|
||||
of domains whose authoritative servers did not respond to EDNS queries
|
||||
have been removed. See [https://dnsflagday.net](https://dnsflagday.net)
|
||||
for more details.
|
||||
|
||||
Cryptographic support has been modernized. BIND now uses the
|
||||
best available pseudo-random number generator for the platform on which
|
||||
it's built. Very old versions of OpenSSL are no longer supported.
|
||||
Cryptography is now mandatory: building BIND without DNSSEC is no
|
||||
longer supported.
|
||||
|
||||
Special code to support certain legacy operating systems has also
|
||||
been removed; see the file [PLATFORMS.md](PLATFORMS.md) for details
|
||||
of supported platforms. In addition to OpenSSL, BIND now requires
|
||||
support for IPv6, threads, and standard atomic operations provided
|
||||
by the C compiler.
|
||||
|
||||
#### BIND 9.12
|
||||
|
||||
BIND 9.12 includes a number of changes from BIND 9.11 and earlier releases.
|
||||
New features include:
|
||||
|
||||
* `named` and related libraries have been substantially refactored for
|
||||
improved query performance -- particularly on delegation heavy zones --
|
||||
and for improved readability, maintainability, and testability.
|
||||
* Code implementing the name server query processing logic has been moved
|
||||
into a new `libns` library, for easier testing and use in tools other
|
||||
than `named`.
|
||||
* Cached, validated NSEC and other records can now be used to synthesize
|
||||
NXDOMAIN responses.
|
||||
* The DNS Response Policy Service API (DNSRPS) is now supported.
|
||||
* Setting `'max-journal-size default'` now limits the size of journal files
|
||||
to twice the size of the zone.
|
||||
* `dnstap-read -x` prints a hex dump of the wire format of each logged
|
||||
DNS message.
|
||||
* `dnstap` output files can now be configured to roll automatically when
|
||||
reaching a given size.
|
||||
* Log file timestamps can now also be formatted in ISO 8601 (local) or ISO
|
||||
8601 (UTC) formats.
|
||||
* Logging channels and `dnstap` output files can now be configured to use a
|
||||
timestamp as the suffix when rolling to a new file.
|
||||
* `'named-checkconf -l'` lists zones found in `named.conf`.
|
||||
* Added support for the EDNS Padding and Keepalive options.
|
||||
* 'new-zones-directory' option sets the location where the configuration
|
||||
data for zones added by rndc addzone is stored.
|
||||
* The default key algorithm in `rndc-confgen` is now hmac-sha256.
|
||||
* `filter-aaaa-on-v4` and `filter-aaaa-on-v6` options are now available
|
||||
by default without a configure option.
|
||||
* The obsolete `isc-hmac-fixup` command has been removed.
|
||||
|
||||
#### BIND 9.11
|
||||
|
||||
BIND 9.11.0 includes a number of changes from BIND 9.10 and earlier
|
||||
@@ -165,7 +75,7 @@ releases. New features include:
|
||||
- "rndc modzone" reconfigures a single zone, without requiring the entire
|
||||
server to be reconfigured.
|
||||
- "rndc showzone" displays the current configuration of a zone.
|
||||
- "rndc managed-keys" can be used to check the status of RFC 5011 managed
|
||||
- "rndc managed-keys" can be used to check the status of RFC 5001 managed
|
||||
trust anchors, or to force trust anchors to be refreshed.
|
||||
- "max-cache-size" can now be set to a percentage of available memory. The
|
||||
default is 90%.
|
||||
@@ -548,8 +458,8 @@ BIND 9.4.0
|
||||
- dig: report the number of extra bytes still left in the packet after
|
||||
processing all the records.
|
||||
- Support for IPSECKEY rdata type.
|
||||
- Raise the UDP receive buffer size to 32k if it is less than 32k.
|
||||
- x86 and x86_64 now have separate atomic locking implementations.
|
||||
- Raise the UDP recieve buffer size to 32k if it is less than 32k.
|
||||
- x86 and x86_64 now have seperate atomic locking implementations.
|
||||
- named-checkconf now validates update-policy entries.
|
||||
- Attempt to make the amount of work performed in a iteration self tuning.
|
||||
The covers nodes clean from the cache per iteration, nodes written to
|
||||
@@ -566,8 +476,8 @@ BIND 9.4.0
|
||||
- dig now warns if 'RA' is not set in the answer when 'RD' was set in the
|
||||
query. host/nslookup skip servers that fail to set 'RA' when 'RD' is set
|
||||
unless a server is explicitly set.
|
||||
- Integrate contributed DLZ code into named.
|
||||
- Integrate contributed IDN code from JPNIC.
|
||||
- Integrate contibuted DLZ code into named.
|
||||
- Integrate contibuted IDN code from JPNIC.
|
||||
- libbind: corresponds to that from BIND 8.4.7.
|
||||
|
||||
#### BIND 9.3.0
|
||||
|
||||
4
Kyuafile
Normal file
4
Kyuafile
Normal file
@@ -0,0 +1,4 @@
|
||||
syntax(2)
|
||||
test_suite('bind9')
|
||||
|
||||
include('lib/Kyuafile')
|
||||
25
Makefile.am
25
Makefile.am
@@ -1,25 +0,0 @@
|
||||
include $(top_srcdir)/Makefile.top
|
||||
|
||||
SUBDIRS = . libltdl lib doc bin
|
||||
|
||||
BUILT_SOURCES = bind.keys.h
|
||||
CLEANFILES = bind.keys.h
|
||||
|
||||
bind.keys.h: bind.keys Makefile
|
||||
${PERL} ${top_srcdir}/util/bindkeys.pl ${top_srcdir}/bind.keys > $@
|
||||
|
||||
dist_sysconf_DATA = bind.keys
|
||||
|
||||
.PHONY: doc
|
||||
|
||||
EXTRA_DIST = \
|
||||
util/bindkeys.pl \
|
||||
contrib \
|
||||
CHANGES \
|
||||
COPYRIGHT \
|
||||
LICENSE \
|
||||
*.md
|
||||
|
||||
dist-hook:
|
||||
find $(distdir) -type f -name .gitignore -delete
|
||||
git rev-parse --short HEAD | cut -b1-7 > $(distdir)/srcid
|
||||
@@ -1,51 +0,0 @@
|
||||
SPHINX_V = $(SPHINX_V_@AM_V@)
|
||||
SPHINX_V_ = $(SPHINX_V_@AM_DEFAULT_V@)
|
||||
SPHINX_V_0 = -q
|
||||
SPHINX_V_1 = -n
|
||||
|
||||
AM_V_SPHINX = $(AM_V_SPHINX_@AM_V@)
|
||||
AM_V_SPHINX_ = $(AM_V_SPHINX_@AM_DEFAULT_V@)
|
||||
AM_V_SPHINX_0 = @echo " SPHINX $@";
|
||||
|
||||
SPHINXBUILDDIR = $(builddir)/_build
|
||||
|
||||
common_SPHINXOPTS = \
|
||||
-c $(srcdir) \
|
||||
-a \
|
||||
$(SPHINX_V)
|
||||
|
||||
ALLSPHINXOPTS = \
|
||||
$(common_SPHINXOPTS) \
|
||||
-D version="$(PACKAGE_VERSION)" \
|
||||
-D today="$(RELEASE_DATE)" \
|
||||
-D release="$(PACKAGE_VERSION)" \
|
||||
$(SPHINXOPTS) \
|
||||
$(srcdir)
|
||||
|
||||
man_SPHINXOPTS = \
|
||||
$(common_SPHINXOPTS) \
|
||||
-D version="@""PACKAGE_VERSION@"\
|
||||
-D today="@""RELEASE_DATE@" \
|
||||
-D release="@""PACKAGE_VERSION@"\
|
||||
$(SPHINXOPTS) \
|
||||
$(srcdir)
|
||||
|
||||
AM_V_SED = $(AM_V_SED_@AM_V@)
|
||||
AM_V_SED_ = $(AM_V_SED_@AM_DEFAULT_V@)
|
||||
AM_V_SED_0 = @echo " SED $@";
|
||||
|
||||
AM_V_CFG_TEST = $(AM_V_CFG_TEST_@AM_V@)
|
||||
AM_V_CFG_TEST_ = $(AM_V_CFG_TEST_@AM_DEFAULT_V@)
|
||||
AM_V_CFG_TEST_0 = @echo " CFG_GEN $@";
|
||||
|
||||
AM_V_RST_OPTIONS = $(AM_V_CFG_TEST_@AM_V@)
|
||||
AM_V_RST_OPTIONS_ = $(AM_V_RST_OPTIONS_@AM_DEFAULT_V@)
|
||||
AM_V_RST_OPTIONS_0 = @echo " RST_OPTIONS $@";
|
||||
|
||||
AM_V_RST_ZONEOPT = $(AM_V_CFG_TEST_@AM_V@)
|
||||
AM_V_RST_ZONEOPT_ = $(AM_V_RST_ZONEOPT_@AM_DEFAULT_V@)
|
||||
AM_V_RST_ZONEOPT_0 = @echo " RST_ZONEOPT $@";
|
||||
|
||||
AM_V_RST_GRAMMARS = $(AM_V_CFG_TEST_@AM_V@)
|
||||
AM_V_RST_GRAMMARS_ = $(AM_V_RST_GRAMMARS_@AM_DEFAULT_V@)
|
||||
AM_V_RST_GRAMMARS_0 = @echo " RST_GRAMMARS $@";
|
||||
120
Makefile.in
Normal file
120
Makefile.in
Normal file
@@ -0,0 +1,120 @@
|
||||
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
#
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
#
|
||||
# See the COPYRIGHT file distributed with this work for additional
|
||||
# information regarding copyright ownership.
|
||||
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
top_builddir = @top_builddir@
|
||||
|
||||
VERSION=@BIND9_VERSION@
|
||||
|
||||
SUBDIRS = make unit lib bin doc
|
||||
TARGETS =
|
||||
PREREQS = bind.keys.h
|
||||
|
||||
MANPAGES = isc-config.sh.1
|
||||
|
||||
HTMLPAGES = isc-config.sh.html
|
||||
|
||||
MANOBJS = README HISTORY OPTIONS CONTRIBUTING ${MANPAGES} ${HTMLPAGES}
|
||||
|
||||
@BIND9_MAKE_RULES@
|
||||
|
||||
newrr:
|
||||
cd lib/dns; ${MAKE} newrr
|
||||
|
||||
bind.keys.h: ${top_srcdir}/bind.keys ${srcdir}/util/bindkeys.pl
|
||||
${PERL} ${srcdir}/util/bindkeys.pl < ${top_srcdir}/bind.keys > $@
|
||||
|
||||
distclean::
|
||||
rm -f config.cache config.h config.log config.status TAGS
|
||||
rm -f libtool isc-config.sh configure.lineno
|
||||
rm -f util/conf.sh docutil/docbook2man-wrapper.sh
|
||||
|
||||
# XXX we should clean libtool stuff too. Only do this after we add rules
|
||||
# to make it.
|
||||
maintainer-clean::
|
||||
rm -f configure
|
||||
rm -f bind.keys.h
|
||||
|
||||
docclean manclean maintainer-clean::
|
||||
rm -f ${MANOBJS}
|
||||
|
||||
doc man:: ${MANOBJS}
|
||||
|
||||
installdirs:
|
||||
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${bindir} \
|
||||
${DESTDIR}${localstatedir}/run ${DESTDIR}${sysconfdir}
|
||||
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man1
|
||||
|
||||
install:: isc-config.sh installdirs
|
||||
${INSTALL_SCRIPT} isc-config.sh ${DESTDIR}${bindir}
|
||||
rm -f ${DESTDIR}${bindir}/bind9-config
|
||||
@LN@ ${DESTDIR}${bindir}/isc-config.sh ${DESTDIR}${bindir}/bind9-config
|
||||
${INSTALL_DATA} ${top_srcdir}/isc-config.sh.1 ${DESTDIR}${mandir}/man1
|
||||
rm -f ${DESTDIR}${mandir}/man1/bind9-config.1
|
||||
@LN@ ${DESTDIR}${mandir}/man1/isc-config.sh.1 ${DESTDIR}${mandir}/man1/bind9-config.1
|
||||
${INSTALL_DATA} ${top_srcdir}/bind.keys ${DESTDIR}${sysconfdir}
|
||||
|
||||
uninstall::
|
||||
rm -f ${DESTDIR}${sysconfdir}/bind.keys
|
||||
rm -f ${DESTDIR}${mandir}/man1/bind9-config.1
|
||||
rm -f ${DESTDIR}${mandir}/man1/isc-config.sh.1
|
||||
rm -f ${DESTDIR}${bindir}/bind9-config
|
||||
rm -f ${DESTDIR}${bindir}/isc-config.sh
|
||||
|
||||
tags:
|
||||
rm -f TAGS
|
||||
find lib bin -name "*.[ch]" -print | @ETAGS@ -
|
||||
|
||||
test check:
|
||||
@if test -n "`${PERL} ${top_srcdir}/bin/tests/system/testsock.pl 2>/dev/null || echo fail`"; then \
|
||||
echo I: NOTE: The tests were not run because they require that; \
|
||||
echo I: the IP addresses 10.53.0.1 through 10.53.0.8 are configured; \
|
||||
echo I: as alias addresses on the loopback interface. Please run; \
|
||||
echo I: \'bin/tests/system/ifconfig.sh up\' as root to configure; \
|
||||
echo I: them, then rerun the tests. Run make force-test to run the; \
|
||||
echo I: tests anyway.; \
|
||||
exit 1; \
|
||||
fi
|
||||
${MAKE} test-force
|
||||
|
||||
force-test: test-force
|
||||
|
||||
test-force:
|
||||
status=0; \
|
||||
(cd bin/tests && ${MAKE} ${MAKEDEFS} test) || status=1; \
|
||||
(test -f ${top_builddir}/unit/unittest.sh && \
|
||||
$(SHELL) ${top_builddir}/unit/unittest.sh) || status=1; \
|
||||
exit $$status
|
||||
|
||||
README: README.md
|
||||
${PANDOC} --email-obfuscation=none -s -t html README.md | \
|
||||
${W3M} -dump -cols 75 -O ascii -T text/html | \
|
||||
sed -e '$${/^$$/d;}' > $@
|
||||
|
||||
HISTORY: HISTORY.md
|
||||
${PANDOC} --email-obfuscation=none -s -t html HISTORY.md | \
|
||||
${W3M} -dump -cols 75 -O ascii -T text/html | \
|
||||
sed -e '$${/^$$/d;}' > $@
|
||||
|
||||
OPTIONS: OPTIONS.md
|
||||
${PANDOC} --email-obfuscation=none -s -t html OPTIONS.md | \
|
||||
${W3M} -dump -cols 75 -O ascii -T text/html | \
|
||||
sed -e '$${/^$$/d;}' > $@
|
||||
|
||||
CONTRIBUTING: CONTRIBUTING.md
|
||||
${PANDOC} --email-obfuscation=none -s -t html CONTRIBUTING.md | \
|
||||
${W3M} -dump -cols 75 -O ascii -T text/html | \
|
||||
sed -e '$${/^$$/d;}' > $@
|
||||
|
||||
unit::
|
||||
sh ${top_builddir}/unit/unittest.sh
|
||||
|
||||
clean::
|
||||
@@ -1,10 +0,0 @@
|
||||
# Hey Emacs, this is -*- makefile-automake -*- file!
|
||||
# vim: filetype=automake
|
||||
|
||||
AM_CPPFLAGS += \
|
||||
$(CMOCKA_CFLAGS) \
|
||||
-DTESTS_DIR=\"$(abs_srcdir)\" \
|
||||
-DNAMED_PLUGINDIR=\"$(libdir)/named\"
|
||||
|
||||
LDADD = \
|
||||
$(CMOCKA_LIBS)
|
||||
89
Makefile.top
89
Makefile.top
@@ -1,89 +0,0 @@
|
||||
# Hey Emacs, this is -*- makefile-automake -*- file!
|
||||
# vim: filetype=automake
|
||||
|
||||
ACLOCAL_AMFLAGS = -I $(top_srcdir)/m4
|
||||
|
||||
AM_CFLAGS = \
|
||||
$(STD_CFLAGS)
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
$(STD_CPPFLAGS) \
|
||||
-include $(top_builddir)/config.h \
|
||||
-I$(srcdir)/include
|
||||
|
||||
if HAVE_GSSAPI
|
||||
AM_CPPFLAGS += \
|
||||
$(GSSAPI_CFLAGS)
|
||||
endif
|
||||
|
||||
LIBISC_CFLAGS = \
|
||||
-I$(top_srcdir)/include \
|
||||
-I$(top_srcdir)/lib/isc/unix/include \
|
||||
-I$(top_srcdir)/lib/isc/pthreads/include \
|
||||
-I$(top_srcdir)/lib/isc/include \
|
||||
-I$(top_builddir)/lib/isc/include
|
||||
|
||||
if HAVE_JSON_C
|
||||
LIBISC_CFLAGS += \
|
||||
$(JSON_C_CFLAGS)
|
||||
endif HAVE_JSON_C
|
||||
|
||||
if HAVE_LIBXML2
|
||||
LIBISC_CFLAGS += \
|
||||
$(LIBXML2_CFLAGS)
|
||||
endif HAVE_LIBXML2
|
||||
|
||||
LIBISC_LIBS = $(top_builddir)/lib/isc/libisc.la
|
||||
|
||||
LIBDNS_CFLAGS = \
|
||||
-I$(top_srcdir)/lib/dns/include \
|
||||
-I$(top_builddir)/lib/dns/include
|
||||
|
||||
LIBDNS_LIBS = \
|
||||
$(top_builddir)/lib/dns/libdns.la
|
||||
|
||||
if HAVE_DNSTAP
|
||||
LIBDNS_CFLAGS += \
|
||||
$(DNSTAP_CFLAGS)
|
||||
endif HAVE_DNSTAP
|
||||
|
||||
if HAVE_LMDB
|
||||
LIBDNS_CFLAGS += \
|
||||
$(LMDB_CFLAGS)
|
||||
endif HAVE_LMDB
|
||||
|
||||
LIBNS_CFLAGS = \
|
||||
-I$(top_srcdir)/lib/ns/include
|
||||
|
||||
LIBNS_LIBS = \
|
||||
$(top_builddir)/lib/ns/libns.la
|
||||
|
||||
LIBIRS_CFLAGS = \
|
||||
-I$(top_srcdir)/lib/irs/include
|
||||
|
||||
LIBIRS_LIBS = \
|
||||
$(top_builddir)/lib/irs/libirs.la
|
||||
|
||||
LIBISCCFG_CFLAGS = \
|
||||
-I$(top_srcdir)/lib/isccfg/include
|
||||
|
||||
LIBISCCFG_LIBS = \
|
||||
$(top_builddir)/lib/isccfg/libisccfg.la
|
||||
|
||||
LIBISCCC_CFLAGS = \
|
||||
-I$(top_srcdir)/lib/isccc/include/
|
||||
|
||||
LIBISCCC_LIBS = \
|
||||
$(top_builddir)/lib/isccc/libisccc.la
|
||||
|
||||
LIBBIND9_CFLAGS = \
|
||||
-I$(top_srcdir)/lib/bind9/include
|
||||
|
||||
LIBBIND9_LIBS = \
|
||||
$(top_builddir)/lib/bind9/libbind9.la
|
||||
|
||||
LIBLTDL_CFLAGS = \
|
||||
-I$(top_srcdir)/libltdl
|
||||
|
||||
LIBLTDL_LIBS = \
|
||||
$(top_builddir)/libltdl/libltdlc.la
|
||||
26
OPTIONS
Normal file
26
OPTIONS
Normal file
@@ -0,0 +1,26 @@
|
||||
Setting the STD_CDEFINES environment variable before running configure can
|
||||
be used to enable certain compile-time options that are not explicitly
|
||||
defined in configure.
|
||||
|
||||
Some of these settings are:
|
||||
|
||||
Setting Description
|
||||
Overwrite memory with tag values when allocating
|
||||
-DISC_MEM_DEFAULTFILL=1 or freeing it; this impairs performance but
|
||||
makes debugging of memory problems easier.
|
||||
Don't track memory allocations by file and line
|
||||
-DISC_MEM_TRACKLINES=0 number; this improves performance but makes
|
||||
debugging more difficult.
|
||||
-DISC_FACILITY=LOG_LOCAL0 Change the default syslog facility for named
|
||||
-DNS_CLIENT_DROPPORT=0 Disable dropping queries from particular
|
||||
well-known ports:
|
||||
-DCHECK_SIBLING=0 Don't check sibling glue in named-checkzone
|
||||
-DCHECK_LOCAL=0 Don't check out-of-zone addresses in
|
||||
named-checkzone
|
||||
-DNS_RUN_PID_DIR=0 Create default PID files in ${localstatedir}/run
|
||||
rather than ${localstatedir}/run/named/
|
||||
Disable the use of inline functions to implement
|
||||
-DISC_BUFFER_USEINLINE=0 the isc_buffer API: this reduces performance but
|
||||
may be useful when debugging
|
||||
-DISC_HEAP_CHECK Test heap consistency after every heap
|
||||
operation; used when debugging
|
||||
105
PLATFORMS.md
105
PLATFORMS.md
@@ -1,105 +0,0 @@
|
||||
<!--
|
||||
- Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
-
|
||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
-
|
||||
- See the COPYRIGHT file distributed with this work for additional
|
||||
- information regarding copyright ownership.
|
||||
-->
|
||||
## Supported platforms
|
||||
|
||||
In general, this version of BIND will build and run on any POSIX-compliant
|
||||
system with a C11-compliant C compiler, BSD-style sockets with RFC-compliant
|
||||
IPv6 support, POSIX-compliant threads, the `libuv` asynchronous I/O library,
|
||||
and the OpenSSL cryptography library.
|
||||
|
||||
The following C11 features are used in BIND 9:
|
||||
|
||||
* Atomic operations support from the compiler is needed, either in the form of
|
||||
builtin operations, C11 atomics, or the `Interlocked` family of functions on
|
||||
Windows.
|
||||
|
||||
* Thread Local Storage support from the compiler is needed, either in the form
|
||||
of C11 `_Thread_local`/`thread_local`, the `__thread` GCC extension, or
|
||||
the `__declspec(thread)` MSVC extension on Windows.
|
||||
|
||||
BIND 9.17 requires a fairly recent version of `libuv` (at least 1.x). For
|
||||
some of the older systems listed below, you will have to install an updated
|
||||
`libuv` package from sources such as EPEL, PPA, or other native sources for
|
||||
updated packages. The other option is to build and install `libuv` from
|
||||
source.
|
||||
|
||||
Certain optional BIND features have additional library dependencies.
|
||||
These include `libxml2` and `libjson-c` for statistics, `libmaxminddb` for
|
||||
geolocation, `libfstrm` and `libprotobuf-c` for DNSTAP, and `libidn2` for
|
||||
internationalized domain name conversion.
|
||||
|
||||
ISC regularly tests BIND on many operating systems and architectures, but
|
||||
lacks the resources to test all of them. Consequently, ISC is only able to
|
||||
offer support on a "best effort" basis for some.
|
||||
|
||||
### Regularly tested platforms
|
||||
|
||||
As of Jul 2020, BIND 9.17 is fully supported and regularly tested on the
|
||||
following systems:
|
||||
|
||||
* Debian 9, 10
|
||||
* Ubuntu LTS 16.04, 20.04
|
||||
* Fedora 32
|
||||
* Red Hat Enterprise Linux / CentOS 7, 8
|
||||
* FreeBSD 11.4, 12.1
|
||||
* OpenBSD 6.7
|
||||
* Alpine Linux 3.12
|
||||
|
||||
The amd64, i386, armhf and arm64 CPU architectures are all fully supported.
|
||||
|
||||
### Best effort
|
||||
|
||||
The following are platforms on which BIND is known to build and run.
|
||||
ISC makes every effort to fix bugs on these platforms, but may be unable to
|
||||
do so quickly due to lack of hardware, less familiarity on the part of
|
||||
engineering staff, and other constraints. With the exception of Windows
|
||||
Server 2012 R2, none of these are tested regularly by ISC.
|
||||
|
||||
* Windows Server 2012 R2, 2016 / x64
|
||||
* Windows 10 / x64
|
||||
* macOS 10.12+
|
||||
* Solaris 11
|
||||
* NetBSD
|
||||
* Other Linux distributions still supported by their vendors, such as:
|
||||
* Ubuntu 19.04+
|
||||
* Gentoo
|
||||
* Arch Linux
|
||||
* OpenWRT/LEDE 17.01+
|
||||
* Other CPU architectures (mips, mipsel, sparc, ...)
|
||||
|
||||
### Community maintained
|
||||
|
||||
These systems may not all have the required dependencies for building BIND
|
||||
easily available, although it will be possible in many cases to compile
|
||||
those directly from source. The community and interested parties may wish
|
||||
to help with maintenance, and we welcome patch contributions, although we
|
||||
cannot guarantee that we will accept them. All contributions will be
|
||||
assessed against the risk of adverse effect on officially supported
|
||||
platforms.
|
||||
|
||||
* Platforms past or close to their respective EOL dates, such as:
|
||||
* Ubuntu 14.04, 18.10
|
||||
* CentOS 6
|
||||
* Debian Jessie
|
||||
* FreeBSD 10.x
|
||||
|
||||
## Unsupported platforms
|
||||
|
||||
These are platforms on which BIND 9.17 is known *not* to build or run:
|
||||
|
||||
* Platforms without at least OpenSSL 1.0.2
|
||||
* Windows 10 / x86
|
||||
* Windows Server 2012 and older
|
||||
* Solaris 10 and older
|
||||
* Platforms that don't support IPv6 Advanced Socket API (RFC 3542)
|
||||
* Platforms that don't support atomic operations (via compiler or library)
|
||||
* Linux without NPTL (Native POSIX Thread Library)
|
||||
* Platforms on which `libuv` cannot be compiled
|
||||
334
README
Normal file
334
README
Normal file
@@ -0,0 +1,334 @@
|
||||
BIND 9
|
||||
|
||||
Contents
|
||||
|
||||
1. Introduction
|
||||
2. Reporting bugs and getting help
|
||||
3. Contributing to BIND
|
||||
4. BIND 9.13 features
|
||||
5. Building BIND
|
||||
6. macOS
|
||||
7. Compile-time options
|
||||
8. Automated testing
|
||||
9. Documentation
|
||||
10. Change log
|
||||
11. Acknowledgments
|
||||
|
||||
Introduction
|
||||
|
||||
BIND (Berkeley Internet Name Domain) is a complete, highly portable
|
||||
implementation of the DNS (Domain Name System) protocol.
|
||||
|
||||
The BIND name server, named, is able to serve as an authoritative name
|
||||
server, recursive resolver, DNS forwarder, or all three simultaneously. It
|
||||
implements views for split-horizon DNS, automatic DNSSEC zone signing and
|
||||
key management, catalog zones to facilitate provisioning of zone data
|
||||
throughout a name server constellation, response policy zones (RPZ) to
|
||||
protect clients from malicious data, response rate limiting (RRL) and
|
||||
recursive query limits to reduce distributed denial of service attacks,
|
||||
and many other advanced DNS features. BIND also includes a suite of
|
||||
administrative tools, including the dig and delv DNS lookup tools,
|
||||
nsupdate for dynamic DNS zone updates, rndc for remote name server
|
||||
administration, and more.
|
||||
|
||||
BIND 9 is a complete re-write of the BIND architecture that was used in
|
||||
versions 4 and 8. Internet Systems Consortium (https://www.isc.org), a 501
|
||||
(c)(3) public benefit corporation dedicated to providing software and
|
||||
services in support of the Internet infrastructure, developed BIND 9 and
|
||||
is responsible for its ongoing maintenance and improvement. BIND is open
|
||||
source software licenced under the terms of the Mozilla Public License,
|
||||
version 2.0.
|
||||
|
||||
For a summary of features introduced in past major releases of BIND, see
|
||||
the file HISTORY.
|
||||
|
||||
For a detailed list of changes made throughout the history of BIND 9, see
|
||||
the file CHANGES. See below for details on the CHANGES file format.
|
||||
|
||||
For up-to-date release notes and errata, see http://www.isc.org/software/
|
||||
bind9/releasenotes
|
||||
|
||||
Reporting bugs and getting help
|
||||
|
||||
To report non-security-sensitive bugs or request new features, you may
|
||||
open an Issue in the BIND 9 project on the ISC GitLab server at https://
|
||||
gitlab.isc.org/isc-projects/bind9.
|
||||
|
||||
Please note that, unless you explicitly mark the newly created Issue as
|
||||
"confidential", it will be publicly readable. Please do not include any
|
||||
information in bug reports that you consider to be confidential unless the
|
||||
issue has been marked as such. In particular, if submitting the contents
|
||||
of your configuration file in a non-confidential Issue, it is advisable to
|
||||
obscure key secrets: this can be done automatically by using
|
||||
named-checkconf -px.
|
||||
|
||||
If the bug you are reporting is a potential security issue, such as an
|
||||
assertion failure or other crash in named, please do NOT use GitLab to
|
||||
report it. Instead, please send mail to security-officer@isc.org.
|
||||
|
||||
Professional support and training for BIND are available from ISC at
|
||||
https://www.isc.org/support.
|
||||
|
||||
To join the BIND Users mailing list, or view the archives, visit https://
|
||||
lists.isc.org/mailman/listinfo/bind-users.
|
||||
|
||||
If you're planning on making changes to the BIND 9 source code, you may
|
||||
also want to join the BIND Workers mailing list, at https://lists.isc.org/
|
||||
mailman/listinfo/bind-workers.
|
||||
|
||||
Contributing to BIND
|
||||
|
||||
ISC maintains a public git repository for BIND; details can be found at
|
||||
http://www.isc.org/git/.
|
||||
|
||||
Information for BIND contributors can be found in the following files: -
|
||||
General information: CONTRIBUTING.md - BIND 9 code style: doc/dev/style.md
|
||||
- BIND architecture and developer guide: doc/dev/dev.md
|
||||
|
||||
Patches for BIND may be submitted as Merge Requests in the ISC GitLab
|
||||
server at at https://gitlab.isc.org/isc-projects/bind9/merge_requests.
|
||||
|
||||
By default, external contributors don't have ability to fork BIND in the
|
||||
GitLab server, but if you wish to contribute code to BIND, you may request
|
||||
permission to do so. Thereafter, you can create git branches and directly
|
||||
submit requests that they be reviewed and merged.
|
||||
|
||||
If you prefer, you may also submit code by opening a GitLab Issue and
|
||||
including your patch as an attachment, preferably generated by git
|
||||
format-patch.
|
||||
|
||||
BIND 9.13 features
|
||||
|
||||
BIND 9.13.0 is the newest development branch of BIND 9. It includes a
|
||||
number of changes from BIND 9.12 and earlier releases. New features
|
||||
include:
|
||||
|
||||
* TBD
|
||||
|
||||
Building BIND
|
||||
|
||||
BIND requires a UNIX or Linux system with an ANSI C compiler, basic POSIX
|
||||
support, and a 64-bit integer type. Successful builds have been observed
|
||||
on many versions of Linux and UNIX, including RedHat, Fedora, Debian,
|
||||
Ubuntu, SuSE, Slackware, FreeBSD, NetBSD, OpenBSD, Mac OS X, Solaris,
|
||||
HP-UX, AIX, SCO OpenServer, and OpenWRT.
|
||||
|
||||
BIND is also available for Windows 2008 and higher. See win32utils/
|
||||
readme1st.txt for details on building for Windows systems.
|
||||
|
||||
To build on a UNIX or Linux system, use:
|
||||
|
||||
$ ./configure
|
||||
$ make
|
||||
|
||||
If you're planning on making changes to the BIND 9 source, you should run
|
||||
make depend. If you're using Emacs, you might find make tags helpful.
|
||||
|
||||
Several environment variables that can be set before running configure
|
||||
will affect compilation:
|
||||
|
||||
Variable Description
|
||||
CC The C compiler to use. configure tries to figure out the
|
||||
right one for supported systems.
|
||||
C compiler flags. Defaults to include -g and/or -O2 as
|
||||
CFLAGS supported by the compiler. Please include '-g' if you need
|
||||
to set CFLAGS.
|
||||
System header file directories. Can be used to specify
|
||||
STD_CINCLUDES where add-on thread or IPv6 support is, for example.
|
||||
Defaults to empty string.
|
||||
Any additional preprocessor symbols you want defined.
|
||||
STD_CDEFINES Defaults to empty string. For a list of possible settings,
|
||||
see the file OPTIONS.
|
||||
LDFLAGS Linker flags. Defaults to empty string.
|
||||
BUILD_CC Needed when cross-compiling: the native C compiler to use
|
||||
when building for the target system.
|
||||
BUILD_CFLAGS Optional, used for cross-compiling
|
||||
BUILD_CPPFLAGS
|
||||
BUILD_LDFLAGS
|
||||
BUILD_LIBS
|
||||
|
||||
macOS
|
||||
|
||||
Building on macOS assumes that the "Command Tools for Xcode" is installed.
|
||||
This can be downloaded from https://developer.apple.com/download/more/ or
|
||||
if you have Xcode already installed you can run "xcode-select --install".
|
||||
This will add /usr/include to the system and install the compiler and
|
||||
other tools so that they can be easily found.
|
||||
|
||||
Compile-time options
|
||||
|
||||
To see a full list of configuration options, run configure --help.
|
||||
|
||||
On most platforms, BIND 9 is built with multithreading support, allowing
|
||||
it to take advantage of multiple CPUs. You can configure this by
|
||||
specifying --enable-threads or --disable-threads on the configure command
|
||||
line. The default is to enable threads, except on some older operating
|
||||
systems on which threads are known to have had problems in the past.
|
||||
(Note: Prior to BIND 9.10, the default was to disable threads on Linux
|
||||
systems; this has now been reversed. On Linux systems, the threaded build
|
||||
is known to change BIND's behavior with respect to file permissions; it
|
||||
may be necessary to specify a user with the -u option when running named.)
|
||||
|
||||
To build shared libraries, specify --with-libtool on the configure command
|
||||
line.
|
||||
|
||||
Certain compiled-in constants and default settings can be increased to
|
||||
values better suited to large servers with abundant memory resources (e.g,
|
||||
64-bit servers with 12G or more of memory) by specifying --with-tuning=
|
||||
large on the configure command line. This can improve performance on big
|
||||
servers, but will consume more memory and may degrade performance on
|
||||
smaller systems.
|
||||
|
||||
For the server to support DNSSEC, you need to build it with crypto
|
||||
support. To use OpenSSL, you should have OpenSSL 1.0.2e or newer
|
||||
installed. If the OpenSSL library is installed in a nonstandard location,
|
||||
specify the prefix using "--with-openssl=<PREFIX>" on the configure
|
||||
command line. To use a PKCS#11 hardware service module for cryptographic
|
||||
operations, specify the path to the PKCS#11 provider library using
|
||||
"--with-pkcs11=<PREFIX>", and configure BIND with
|
||||
"--enable-native-pkcs11".
|
||||
|
||||
To support the HTTP statistics channel, the server must be linked with at
|
||||
least one of the following: libxml2 http://xmlsoft.org or json-c https://
|
||||
github.com/json-c. If these are installed at a nonstandard location,
|
||||
specify the prefix using --with-libxml2=/prefix or --with-libjson=/prefix.
|
||||
|
||||
To support compression on the HTTP statistics channel, the server must be
|
||||
linked against libzlib. If this is installed in a nonstandard location,
|
||||
specify the prefix using --with-zlib=/prefix.
|
||||
|
||||
To support storing configuration data for runtime-added zones in an LMDB
|
||||
database, the server must be linked with liblmdb. If this is installed in
|
||||
a nonstandard location, specify the prefix using "with-lmdb=/prefix".
|
||||
|
||||
To support GeoIP location-based ACLs, the server must be linked with
|
||||
libGeoIP. This is not turned on by default; BIND must be configured with
|
||||
"--with-geoip". If the library is installed in a nonstandard location, use
|
||||
specify the prefix using "--with-geoip=/prefix".
|
||||
|
||||
For DNSTAP packet logging, you must have installed libfstrm https://
|
||||
github.com/farsightsec/fstrm and libprotobuf-c https://
|
||||
developers.google.com/protocol-buffers, and BIND must be configured with
|
||||
"--enable-dnstap".
|
||||
|
||||
Portions of BIND that are written in Python, including dnssec-keymgr,
|
||||
dnssec-coverage, dnssec-checkds, and some of the system tests, require the
|
||||
'argparse' and 'ply' modules to be available. 'argparse' is a standard
|
||||
module as of Python 2.7 and Python 3.2. 'ply' is available from https://
|
||||
pypi.python.org/pypi/ply.
|
||||
|
||||
On some platforms it is necessary to explicitly request large file support
|
||||
to handle files bigger than 2GB. This can be done by using
|
||||
--enable-largefile on the configure command line.
|
||||
|
||||
Support for the "fixed" rrset-order option can be enabled or disabled by
|
||||
specifying --enable-fixed-rrset or --disable-fixed-rrset on the configure
|
||||
command line. By default, fixed rrset-order is disabled to reduce memory
|
||||
footprint.
|
||||
|
||||
If your operating system has integrated support for IPv6, it will be used
|
||||
automatically. If you have installed KAME IPv6 separately, use --with-kame
|
||||
[=PATH] to specify its location.
|
||||
|
||||
make install will install named and the various BIND 9 libraries. By
|
||||
default, installation is into /usr/local, but this can be changed with the
|
||||
--prefix option when running configure.
|
||||
|
||||
You may specify the option --sysconfdir to set the directory where
|
||||
configuration files like named.conf go by default, and --localstatedir to
|
||||
set the default parent directory of run/named.pid. For backwards
|
||||
compatibility with BIND 8, --sysconfdir defaults to /etc and
|
||||
--localstatedir defaults to /var if no --prefix option is given. If there
|
||||
is a --prefix option, sysconfdir defaults to $prefix/etc and localstatedir
|
||||
defaults to $prefix/var.
|
||||
|
||||
Automated testing
|
||||
|
||||
A system test suite can be run with make test. The system tests require
|
||||
you to configure a set of virtual IP addresses on your system (this allows
|
||||
multiple servers to run locally and communicate with one another). These
|
||||
IP addresses can be configured by running the command bin/tests/system/
|
||||
ifconfig.sh up as root.
|
||||
|
||||
Some tests require Perl and the Net::DNS and/or IO::Socket::INET6 modules,
|
||||
and will be skipped if these are not available. Some tests require Python
|
||||
and the 'dnspython' module and will be skipped if these are not available.
|
||||
See bin/tests/system/README for further details.
|
||||
|
||||
Unit tests are implemented using Automated Testing Framework (ATF). To run
|
||||
them, use configure --with-atf, then run make test or make unit.
|
||||
|
||||
Documentation
|
||||
|
||||
The BIND 9 Administrator Reference Manual is included with the source
|
||||
distribution, in DocBook XML, HTML and PDF format, in the doc/arm
|
||||
directory.
|
||||
|
||||
Some of the programs in the BIND 9 distribution have man pages in their
|
||||
directories. In particular, the command line options of named are
|
||||
documented in bin/named/named.8.
|
||||
|
||||
Frequently (and not-so-frequently) asked questions and their answers can
|
||||
be found in the ISC Knowledge Base at https://kb.isc.org.
|
||||
|
||||
Additional information on various subjects can be found in other README
|
||||
files throughout the source tree.
|
||||
|
||||
Change log
|
||||
|
||||
A detailed list of all changes that have been made throughout the
|
||||
development BIND 9 is included in the file CHANGES, with the most recent
|
||||
changes listed first. Change notes include tags indicating the category of
|
||||
the change that was made; these categories are:
|
||||
|
||||
Category Description
|
||||
[func] New feature
|
||||
[bug] General bug fix
|
||||
[security] Fix for a significant security flaw
|
||||
[experimental] Used for new features when the syntax or other aspects of
|
||||
the design are still in flux and may change
|
||||
[port] Portability enhancement
|
||||
[maint] Updates to built-in data such as root server addresses and
|
||||
keys
|
||||
[tuning] Changes to built-in configuration defaults and constants to
|
||||
improve performance
|
||||
[performance] Other changes to improve server performance
|
||||
[protocol] Updates to the DNS protocol such as new RR types
|
||||
[test] Changes to the automatic tests, not affecting server
|
||||
functionality
|
||||
[cleanup] Minor corrections and refactoring
|
||||
[doc] Documentation
|
||||
[contrib] Changes to the contributed tools and libraries in the
|
||||
'contrib' subdirectory
|
||||
Used in the master development branch to reserve change
|
||||
[placeholder] 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 older releases on a case-by-case basis.
|
||||
All other change types may be applied to all currently-supported releases.
|
||||
|
||||
Acknowledgments
|
||||
|
||||
* The original development of BIND 9 was underwritten by the following
|
||||
organizations:
|
||||
|
||||
Sun Microsystems, Inc.
|
||||
Hewlett Packard
|
||||
Compaq Computer Corporation
|
||||
IBM
|
||||
Process Software Corporation
|
||||
Silicon Graphics, Inc.
|
||||
Network Associates, Inc.
|
||||
U.S. Defense Information Systems Agency
|
||||
USENIX Association
|
||||
Stichting NLnet - NLnet Foundation
|
||||
Nominum, Inc.
|
||||
|
||||
* This product includes software developed by the OpenSSL Project for
|
||||
use in the OpenSSL Toolkit. http://www.OpenSSL.org/
|
||||
* This product includes cryptographic software written by Eric Young
|
||||
(eay@cryptsoft.com)
|
||||
* This product includes software written by Tim Hudson
|
||||
(tjh@cryptsoft.com)
|
||||
312
README.md
312
README.md
@@ -15,10 +15,9 @@
|
||||
1. [Introduction](#intro)
|
||||
1. [Reporting bugs and getting help](#help)
|
||||
1. [Contributing to BIND](#contrib)
|
||||
1. [BIND 9.17 features](#features)
|
||||
1. [BIND 9.13 features](#features)
|
||||
1. [Building BIND](#build)
|
||||
1. [macOS](#macos)
|
||||
1. [Dependencies](#dependencies)
|
||||
1. [Compile-time options](#opts)
|
||||
1. [Automated testing](#testing)
|
||||
1. [Documentation](#doc)
|
||||
@@ -28,27 +27,27 @@
|
||||
### <a name="intro"/> Introduction
|
||||
|
||||
BIND (Berkeley Internet Name Domain) is a complete, highly portable
|
||||
implementation of the Domain Name System (DNS) protocol.
|
||||
implementation of the DNS (Domain Name System) protocol.
|
||||
|
||||
The BIND name server, `named`, can act as an authoritative name
|
||||
server, recursive resolver, DNS forwarder, or all three simultaneously. It
|
||||
The BIND name server, `named`, is able to serve as an authoritative name
|
||||
server, recursive resolver, DNS forwarder, or all three simultaneously. It
|
||||
implements views for split-horizon DNS, automatic DNSSEC zone signing and
|
||||
key management, catalog zones to facilitate provisioning of zone data
|
||||
throughout a name server constellation, response policy zones (RPZ) to
|
||||
protect clients from malicious data, response rate limiting (RRL) and
|
||||
recursive query limits to reduce distributed denial of service attacks,
|
||||
and many other advanced DNS features. BIND also includes a suite of
|
||||
and many other advanced DNS features. BIND also includes a suite of
|
||||
administrative tools, including the `dig` and `delv` DNS lookup tools,
|
||||
`nsupdate` for dynamic DNS zone updates, `rndc` for remote name server
|
||||
administration, and more.
|
||||
|
||||
BIND 9 began as a complete rewrite of the BIND architecture that was
|
||||
used in versions 4 and 8. Internet Systems Consortium
|
||||
([https://www.isc.org](https://www.isc.org)), a 501(c)(3) US public benefit
|
||||
BIND 9 is a complete re-write of the BIND architecture that was used in
|
||||
versions 4 and 8. Internet Systems Consortium
|
||||
([https://www.isc.org](https://www.isc.org)), a 501(c)(3) public benefit
|
||||
corporation dedicated to providing software and services in support of the
|
||||
Internet infrastructure, developed BIND 9 and is responsible for its
|
||||
ongoing maintenance and improvement. BIND is open source software
|
||||
licensed under the terms of the Mozilla Public License, version 2.0.
|
||||
ongoing maintenance and improvement. BIND is open source software
|
||||
licenced under the terms of the Mozilla Public License, version 2.0.
|
||||
|
||||
For a summary of features introduced in past major releases of BIND,
|
||||
see the file [HISTORY](HISTORY.md).
|
||||
@@ -57,41 +56,31 @@ For a detailed list of changes made throughout the history of BIND 9, see
|
||||
the file [CHANGES](CHANGES). See [below](#changes) for details on the
|
||||
CHANGES file format.
|
||||
|
||||
For up-to-date versions and release notes, see
|
||||
[https://www.isc.org/download/](https://www.isc.org/download/).
|
||||
|
||||
For information about supported platforms, see [PLATFORMS](PLATFORMS.md).
|
||||
For up-to-date release notes and errata, see
|
||||
[http://www.isc.org/software/bind9/releasenotes](http://www.isc.org/software/bind9/releasenotes)
|
||||
|
||||
### <a name="help"/> Reporting bugs and getting help
|
||||
|
||||
To report non-security-sensitive bugs or request new features, you may
|
||||
open an issue in the BIND 9 project on the
|
||||
open an Issue in the BIND 9 project on the
|
||||
[ISC GitLab server](https://gitlab.isc.org) at
|
||||
[https://gitlab.isc.org/isc-projects/bind9](https://gitlab.isc.org/isc-projects/bind9).
|
||||
|
||||
Please note that, unless you explicitly mark the newly created issue as
|
||||
"confidential," it will be publicly readable. Please do not include any
|
||||
Please note that, unless you explicitly mark the newly created Issue as
|
||||
"confidential", it will be publicly readable. Please do not include any
|
||||
information in bug reports that you consider to be confidential unless
|
||||
the issue has been marked as such. In particular, if submitting the
|
||||
contents of your configuration file in a non-confidential issue, it is
|
||||
advisable to obscure key secrets; this can be done automatically by
|
||||
the issue has been marked as such. In particular, if submitting the
|
||||
contents of your configuration file in a non-confidential Issue, it is
|
||||
advisable to obscure key secrets: this can be done automatically by
|
||||
using `named-checkconf -px`.
|
||||
|
||||
If you are reporting a bug that is a potential security issue, such as an
|
||||
If the bug you are reporting is a potential security issue, such as an
|
||||
assertion failure or other crash in `named`, please do *NOT* use GitLab to
|
||||
report it. Instead, send mail to
|
||||
[security-officer@isc.org](mailto:security-officer@isc.org) using our
|
||||
OpenPGP key to secure your message. (Information about OpenPGP and links
|
||||
to our key can be found at
|
||||
[https://www.isc.org/pgpkey](https://www.isc.org/pgpkey).) Please do not
|
||||
discuss the bug on any public mailing list.
|
||||
|
||||
For a general overview of ISC security policies, read the Knowledgebase
|
||||
article at [https://kb.isc.org/docs/aa-00861](https://kb.isc.org/docs/aa-00861).
|
||||
report it. Instead, please send mail to
|
||||
[security-officer@isc.org](mailto:security-officer@isc.org).
|
||||
|
||||
Professional support and training for BIND are available from
|
||||
ISC. Contact us at [https://www.isc.org/contact](https://www.isc.org/contact)
|
||||
for more information.
|
||||
ISC at [https://www.isc.org/support](https://www.isc.org/support).
|
||||
|
||||
To join the __BIND Users__ mailing list, or view the archives, visit
|
||||
[https://lists.isc.org/mailman/listinfo/bind-users](https://lists.isc.org/mailman/listinfo/bind-users).
|
||||
@@ -103,160 +92,144 @@ may also want to join the __BIND Workers__ mailing list, at
|
||||
### <a name="contrib"/> Contributing to BIND
|
||||
|
||||
ISC maintains a public git repository for BIND; details can be found
|
||||
at [https://www.isc.org/sourceaccess/](https://www.isc.org/sourceaccess/).
|
||||
at [http://www.isc.org/git/](http://www.isc.org/git/).
|
||||
|
||||
Information for BIND contributors can be found in the following files:
|
||||
- General information: [CONTRIBUTING.md](CONTRIBUTING.md)
|
||||
- Code of Conduct: [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md)
|
||||
- General information: [CONTRIBUTING.md](CONTRIBUTING)
|
||||
- BIND 9 code style: [doc/dev/style.md](doc/dev/style.md)
|
||||
- BIND architecture and developer guide: [doc/dev/dev.md](doc/dev/dev.md)
|
||||
|
||||
Patches for BIND may be submitted as
|
||||
[merge requests](https://gitlab.isc.org/isc-projects/bind9/merge_requests)
|
||||
on the [ISC GitLab server](https://gitlab.isc.org).
|
||||
[Merge Requests](https://gitlab.isc.org/isc-projects/bind9/merge_requests)
|
||||
in the [ISC GitLab server](https://gitlab.isc.org) at
|
||||
at [https://gitlab.isc.org/isc-projects/bind9/merge_requests](https://gitlab.isc.org/isc-projects/bind9/merge_requests).
|
||||
|
||||
By default, external contributors do not have the ability to fork BIND on the
|
||||
GitLab server; if you wish to contribute code to BIND, you may request
|
||||
By default, external contributors don't have ability to fork BIND in the
|
||||
GitLab server, but if you wish to contribute code to BIND, you may request
|
||||
permission to do so. Thereafter, you can create git branches and directly
|
||||
submit requests that they be reviewed and merged.
|
||||
|
||||
If you prefer, you may also submit code by opening a
|
||||
[GitLab issue](https://gitlab.isc.org/isc-projects/bind9/issues) and
|
||||
[GitLab Issue](https://gitlab.isc.org/isc-projects/bind9/issues) and
|
||||
including your patch as an attachment, preferably generated by
|
||||
`git format-patch`.
|
||||
|
||||
### <a name="features"/> BIND 9.17 features
|
||||
### <a name="features"/> BIND 9.13 features
|
||||
|
||||
BIND 9.17 is the newest development branch of BIND 9. It includes a
|
||||
number of changes from BIND 9.16 and earlier releases. New features include:
|
||||
BIND 9.13.0 is the newest development branch of BIND 9. It includes a
|
||||
number of changes from BIND 9.12 and earlier releases. New features
|
||||
include:
|
||||
|
||||
* The new option `max-ixfr-ratio` to limit the size of outgoing IXFR responses
|
||||
before falling back to full zone transfers.
|
||||
* `rndc nta -d` and `rndc secroots` now include `validate-except` entries
|
||||
when listing negative trust anchors.
|
||||
* TBD
|
||||
|
||||
### <a name="build"/> Building BIND 9
|
||||
### <a name="build"/> Building BIND
|
||||
|
||||
At a minimum, BIND requires a Unix or Linux system with an ANSI C compiler,
|
||||
basic POSIX support, and a 64-bit integer type. BIND also requires the
|
||||
`libuv` asynchronous I/O library, and a cryptography provider library
|
||||
such as OpenSSL or a hardware service module supporting PKCS#11. On
|
||||
Linux, BIND requires the `libcap` library to set process privileges,
|
||||
though this requirement can be overridden by disabling capability
|
||||
support at compile time. See [Compile-time options](#opts) below
|
||||
for details on other libraries that may be required to support
|
||||
optional features.
|
||||
BIND requires a UNIX or Linux system with an ANSI C compiler, basic POSIX
|
||||
support, and a 64-bit integer type. Successful builds have been observed on
|
||||
many versions of Linux and UNIX, including RedHat, Fedora, Debian, Ubuntu,
|
||||
SuSE, Slackware, FreeBSD, NetBSD, OpenBSD, Mac OS X, Solaris, HP-UX, AIX,
|
||||
SCO OpenServer, and OpenWRT.
|
||||
|
||||
Successful builds have been observed on many versions of Linux and
|
||||
Unix, including RHEL/CentOS, Fedora, Debian, Ubuntu, SLES, openSUSE,
|
||||
Slackware, Alpine, FreeBSD, NetBSD, OpenBSD, macOS, Solaris,
|
||||
OpenIndiana, OmniOS CE, HP-UX, and OpenWRT.
|
||||
|
||||
BIND 9 is also available for Windows Server 2012 R2 and higher. See
|
||||
`win32utils/build.txt` for details on building for Windows
|
||||
BIND is also available for Windows 2008 and higher. See
|
||||
`win32utils/readme1st.txt` for details on building for Windows
|
||||
systems.
|
||||
|
||||
To build on a Unix or Linux system, use:
|
||||
To build on a UNIX or Linux system, use:
|
||||
|
||||
$ autoreconf -fi (if you are building in the git repository)
|
||||
$ ./configure
|
||||
$ make
|
||||
|
||||
If you're planning on making changes to the BIND 9 source, you should run
|
||||
`make depend`. If you're using Emacs, you might find `make tags` helpful.
|
||||
|
||||
Several environment variables, which can be set before running `configure`,
|
||||
affect compilation. Significant ones are:
|
||||
Several environment variables that can be set before running `configure` will
|
||||
affect compilation:
|
||||
|
||||
|Variable|Description |
|
||||
|--------------------|-----------------------------------------------|
|
||||
|`CC`|The C compiler to use. `configure` tries to figure out the right one for supported systems.|
|
||||
|`CFLAGS`|C compiler flags. Defaults to include -g and/or -O2 as supported by the compiler. Please include '-g' if you need to set `CFLAGS`. |
|
||||
|`STD_CINCLUDES`|System header file directories. Can be used to specify where add-on thread or IPv6 support is, for example. Defaults to empty string.|
|
||||
|`STD_CDEFINES`|Any additional preprocessor symbols you want defined. Defaults to empty string. For a list of possible settings, see the file [OPTIONS](OPTIONS.md).|
|
||||
|`LDFLAGS`|Linker flags. Defaults to empty string.|
|
||||
|
||||
Additional environment variables affecting the build are listed at the
|
||||
end of the `configure` help text, which can be obtained by running the
|
||||
command:
|
||||
|
||||
$ ./configure --help
|
||||
|`BUILD_CC`|Needed when cross-compiling: the native C compiler to use when building for the target system.|
|
||||
|`BUILD_CFLAGS`|Optional, used for cross-compiling|
|
||||
|`BUILD_CPPFLAGS`||
|
||||
|`BUILD_LDFLAGS`||
|
||||
|`BUILD_LIBS`||
|
||||
|
||||
#### <a name="macos"> macOS
|
||||
|
||||
Building on macOS assumes that the "Command Tools for Xcode" are installed.
|
||||
These can be downloaded from
|
||||
[https://developer.apple.com/download/more/](https://developer.apple.com/download/more/)
|
||||
or, if you have Xcode already installed, you can run
|
||||
`xcode-select--install`. (Note that an Apple ID may be required to access the download
|
||||
page.)
|
||||
Building on macOS assumes that the "Command Tools for Xcode" is installed.
|
||||
This can be downloaded from https://developer.apple.com/download/more/
|
||||
or if you have Xcode already installed you can run "xcode-select --install".
|
||||
This will add /usr/include to the system and install the compiler and other
|
||||
tools so that they can be easily found.
|
||||
|
||||
#### <a name="dependencies"> Dependencies
|
||||
|
||||
To build BIND you need to have the following packages installed:
|
||||
|
||||
libuv
|
||||
pkg-config / pkgconfig / pkgconf
|
||||
|
||||
To build BIND from the git repository, you need the following tools
|
||||
installed:
|
||||
|
||||
autoconf (includes autoreconf)
|
||||
automake
|
||||
libtool
|
||||
libltdl-dev (Debian) / libtool-ltdl-dev (Fedora/CentOS) / libltdl (FreeBSD)
|
||||
|
||||
#### <a name="opts"/> Compile-time options
|
||||
|
||||
To see a full list of configuration options, run `configure --help`.
|
||||
|
||||
On most platforms, BIND 9 is built with multithreading support, allowing it
|
||||
to take advantage of multiple CPUs. You can configure this by specifying
|
||||
`--enable-threads` or `--disable-threads` on the `configure` command line.
|
||||
The default is to enable threads, except on some older operating systems on
|
||||
which threads are known to have had problems in the past. (Note: Prior to
|
||||
BIND 9.10, the default was to disable threads on Linux systems; this has
|
||||
now been reversed. On Linux systems, the threaded build is known to change
|
||||
BIND's behavior with respect to file permissions; it may be necessary to
|
||||
specify a user with the -u option when running `named`.)
|
||||
|
||||
To build shared libraries, specify `--with-libtool` on the `configure`
|
||||
command line.
|
||||
|
||||
Certain compiled-in constants and default settings can be increased to
|
||||
values better suited to large servers with abundant memory resources (e.g,
|
||||
64-bit servers with 12G or more of memory) by specifying
|
||||
`--with-tuning=large` on the `configure` command line. This can improve
|
||||
performance on big servers, but will consume more memory and may degrade
|
||||
performance on smaller systems.
|
||||
|
||||
For the server to support DNSSEC, you need to build it with crypto support.
|
||||
To use OpenSSL, you should have OpenSSL 1.0.2e or newer installed. If the
|
||||
To use OpenSSL, you should have OpenSSL 1.0.2e or newer installed. If the
|
||||
OpenSSL library is installed in a nonstandard location, specify the prefix
|
||||
using `--with-openssl=<PREFIX>` on the configure command line. To use a
|
||||
using "--with-openssl=<PREFIX>" on the configure command line. To use a
|
||||
PKCS#11 hardware service module for cryptographic operations, specify the
|
||||
path to the PKCS#11 provider library using `--with-pkcs11=<PREFIX>`, and
|
||||
configure BIND with `--enable-native-pkcs11`.
|
||||
path to the PKCS#11 provider library using "--with-pkcs11=<PREFIX>", and
|
||||
configure BIND with "--enable-native-pkcs11".
|
||||
|
||||
To support the HTTP statistics channel, the server must be linked with at
|
||||
least one of the following libraries: `libxml2`
|
||||
[http://xmlsoft.org](http://xmlsoft.org) or `json-c`
|
||||
[https://github.com/json-c/json-c](https://github.com/json-c/json-c).
|
||||
If these are installed at a nonstandard location, then:
|
||||
|
||||
* for `libxml2`, specify the prefix using `--with-libxml2=/prefix`.
|
||||
* for `json-c`, adjust `PKG_CONFIG_PATH`.
|
||||
least one of the following: libxml2
|
||||
[http://xmlsoft.org](http://xmlsoft.org) or json-c
|
||||
[https://github.com/json-c](https://github.com/json-c). If these are
|
||||
installed at a nonstandard location, specify the prefix using
|
||||
`--with-libxml2=/prefix` or `--with-libjson=/prefix`.
|
||||
|
||||
To support compression on the HTTP statistics channel, the server must be
|
||||
linked against `libzlib`. If this is installed in a nonstandard location,
|
||||
linked against libzlib. If this is installed in a nonstandard location,
|
||||
specify the prefix using `--with-zlib=/prefix`.
|
||||
|
||||
To support storing configuration data for runtime-added zones in an LMDB
|
||||
database, the server must be linked with `liblmdb`. If this is installed in a
|
||||
nonstandard location, specify the prefix using `with-lmdb=/prefix`.
|
||||
database, the server must be linked with liblmdb. If this is installed in a
|
||||
nonstandard location, specify the prefix using "with-lmdb=/prefix".
|
||||
|
||||
To support MaxMind GeoIP2 location-based ACLs, the server must be linked
|
||||
with `libmaxminddb`. This is turned on by default if the library is
|
||||
found; if the library is installed in a nonstandard location,
|
||||
specify the prefix using `--with-maxminddb=/prefix`. GeoIP2 support
|
||||
can be switched off with `--disable-geoip`.
|
||||
To support GeoIP location-based ACLs, the server must be linked with
|
||||
libGeoIP. This is not turned on by default; BIND must be configured with
|
||||
"--with-geoip". If the library is installed in a nonstandard location, use
|
||||
specify the prefix using "--with-geoip=/prefix".
|
||||
|
||||
For DNSTAP packet logging, you must have installed `libfstrm`
|
||||
For DNSTAP packet logging, you must have installed libfstrm
|
||||
[https://github.com/farsightsec/fstrm](https://github.com/farsightsec/fstrm)
|
||||
and `libprotobuf-c`
|
||||
and libprotobuf-c
|
||||
[https://developers.google.com/protocol-buffers](https://developers.google.com/protocol-buffers),
|
||||
and BIND must be configured with `--enable-dnstap`.
|
||||
and BIND must be configured with "--enable-dnstap".
|
||||
|
||||
Certain compiled-in constants and default settings can be decreased to
|
||||
values better suited to small machines, e.g. OpenWRT boxes, by specifying
|
||||
`--with-tuning=small` on the `configure` command line. This decreases
|
||||
memory usage by using smaller structures, but degrades performance.
|
||||
|
||||
On Linux, process capabilities are managed in user space using
|
||||
the `libcap` library, which can be installed on most Linux systems via
|
||||
the `libcap-dev` or `libcap-devel` package. Process capability support can
|
||||
also be disabled by configuring with `--disable-linux-caps`.
|
||||
Portions of BIND that are written in Python, including
|
||||
`dnssec-keymgr`, `dnssec-coverage`, `dnssec-checkds`, and some of the
|
||||
system tests, require the 'argparse' and 'ply' modules to be available.
|
||||
'argparse' is a standard module as of Python 2.7 and Python 3.2.
|
||||
'ply' is available from [https://pypi.python.org/pypi/ply](https://pypi.python.org/pypi/ply).
|
||||
|
||||
On some platforms it is necessary to explicitly request large file support
|
||||
to handle files bigger than 2GB. This can be done by using
|
||||
@@ -264,54 +237,54 @@ to handle files bigger than 2GB. This can be done by using
|
||||
|
||||
Support for the "fixed" rrset-order option can be enabled or disabled by
|
||||
specifying `--enable-fixed-rrset` or `--disable-fixed-rrset` on the
|
||||
configure command line. By default, fixed rrset-order is disabled to
|
||||
configure command line. By default, fixed rrset-order is disabled to
|
||||
reduce memory footprint.
|
||||
|
||||
The `--enable-querytrace` option causes `named` to log every step of
|
||||
processing every query. The `--enable-singletrace` option turns on the
|
||||
same verbose tracing, but allows an individual query to be separately
|
||||
traced by setting its query ID to 0. These options should only be enabled
|
||||
when debugging, because they have a significant negative impact on query
|
||||
performance.
|
||||
If your operating system has integrated support for IPv6, it will be used
|
||||
automatically. If you have installed KAME IPv6 separately, use
|
||||
`--with-kame[=PATH]` to specify its location.
|
||||
|
||||
`make install` installs `named` and the various BIND 9 libraries. By
|
||||
`make install` will install `named` and the various BIND 9 libraries. By
|
||||
default, installation is into /usr/local, but this can be changed with the
|
||||
`--prefix` option when running `configure`.
|
||||
|
||||
You may specify the option `--sysconfdir` to set the directory where
|
||||
configuration files like `named.conf` go by default, and `--localstatedir`
|
||||
to set the default parent directory of `run/named.pid`. `--sysconfdir`
|
||||
defaults to `$prefix/etc` and `--localstatedir` defaults to `$prefix/var`.
|
||||
to set the default parent directory of `run/named.pid`. For backwards
|
||||
compatibility with BIND 8, `--sysconfdir` defaults to `/etc` and
|
||||
`--localstatedir` defaults to `/var` if no `--prefix` option is given. If
|
||||
there is a `--prefix` option, sysconfdir defaults to `$prefix/etc` and
|
||||
localstatedir defaults to `$prefix/var`.
|
||||
|
||||
### <a name="testing"/> Automated testing
|
||||
|
||||
A system test suite can be run with `make check`. The system tests require
|
||||
A system test suite can be run with `make test`. The system tests require
|
||||
you to configure a set of virtual IP addresses on your system (this allows
|
||||
multiple servers to run locally and communicate with each other). These
|
||||
multiple servers to run locally and communicate with one another). These
|
||||
IP addresses can be configured by running the command
|
||||
`bin/tests/system/ifconfig.sh up` as root.
|
||||
|
||||
Some tests require Perl and the `Net::DNS` and/or `IO::Socket::INET6` modules,
|
||||
and are skipped if these are not available. Some tests require Python
|
||||
and the `dnspython` module and are skipped if these are not available.
|
||||
Some tests require Perl and the Net::DNS and/or IO::Socket::INET6 modules,
|
||||
and will be skipped if these are not available. Some tests require Python
|
||||
and the 'dnspython' module and will be skipped if these are not available.
|
||||
See bin/tests/system/README for further details.
|
||||
|
||||
Unit tests are implemented using the CMocka unit testing framework. To build
|
||||
them, use `configure --with-cmocka`. Execution of tests is done by the automake
|
||||
parallel test driver; unit tests are also run by `make check`.
|
||||
Unit tests are implemented using Automated Testing Framework (ATF).
|
||||
To run them, use `configure --with-atf`, then run `make test` or
|
||||
`make unit`.
|
||||
|
||||
### <a name="doc"/> Documentation
|
||||
|
||||
The *BIND 9 Administrator Reference Manual* (ARM) is included with the source
|
||||
distribution, and in .rst format, in the `doc/arm`
|
||||
directory. HTML and PDF versions are automatically generated and can
|
||||
be viewed at [https://bind9.readthedocs.io/en/latest/index.html](https://bind9.readthedocs.io/en/latest/index.html).
|
||||
The *BIND 9 Administrator Reference Manual* is included with the source
|
||||
distribution, in DocBook XML, HTML and PDF format, in the `doc/arm`
|
||||
directory.
|
||||
|
||||
Man pages for some of the programs in the BIND 9 distribution
|
||||
are also included in the BIND ARM.
|
||||
Some of the programs in the BIND 9 distribution have man pages in their
|
||||
directories. In particular, the command line options of `named` are
|
||||
documented in `bin/named/named.8`.
|
||||
|
||||
Frequently (and not-so-frequently) asked questions and their answers
|
||||
can be found in the ISC Knowledgebase at
|
||||
can be found in the ISC Knowledge Base at
|
||||
[https://kb.isc.org](https://kb.isc.org).
|
||||
|
||||
Additional information on various subjects can be found in other
|
||||
@@ -320,8 +293,8 @@ Additional information on various subjects can be found in other
|
||||
### <a name="changes"/> Change log
|
||||
|
||||
A detailed list of all changes that have been made throughout the
|
||||
development of BIND 9 is included in the file CHANGES, with the most recent
|
||||
changes listed first. Change notes include tags indicating the category of
|
||||
development BIND 9 is included in the file CHANGES, with the most recent
|
||||
changes listed first. Change notes include tags indicating the category of
|
||||
the change that was made; these categories are:
|
||||
|
||||
|Category |Description |
|
||||
@@ -339,31 +312,12 @@ the change that was made; these categories are:
|
||||
| [cleanup] | Minor corrections and refactoring |
|
||||
| [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 |
|
||||
| [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 only appear in new-feature
|
||||
releases (i.e., those with version numbers ending in zero). Some new
|
||||
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 older releases on a case-by-case basis.
|
||||
All other change types may be applied to all currently supported releases.
|
||||
|
||||
#### Bug report identifiers
|
||||
|
||||
Most notes in the CHANGES file include a reference to a bug report or
|
||||
issue number. Prior to 2018, these were usually of the form `[RT #NNN]`
|
||||
and referred to entries in the "bind9-bugs" RT database, which was not open
|
||||
to the public. More recent entries use the form `[GL #NNN]` or, less often,
|
||||
`[GL !NNN]`, which, respectively, refer to issues or merge requests in the
|
||||
GitLab database. Most of these are publicly readable, unless they include
|
||||
information which is confidential or security-sensitive.
|
||||
|
||||
To look up a GitLab issue by its number, use the URL
|
||||
[https://gitlab.isc.org/isc-projects/bind9/issues/NNN](https://gitlab.isc.org/isc-projects/bind9/issues).
|
||||
To look up a merge request, use
|
||||
[https://gitlab.isc.org/isc-projects/bind9/merge_requests/NNN](https://gitlab.isc.org/isc-projects/bind9/merge_requests).
|
||||
|
||||
In rare cases, an issue or merge request number may be followed with the
|
||||
letter "P". This indicates that the information is in the private ISC
|
||||
GitLab instance, which is not visible to the public.
|
||||
All other change types may be applied to all currently-supported releases.
|
||||
|
||||
### <a name="ack"/> Acknowledgments
|
||||
|
||||
@@ -384,7 +338,7 @@ GitLab instance, which is not visible to the public.
|
||||
|
||||
* This product includes software developed by the OpenSSL Project for use
|
||||
in the OpenSSL Toolkit.
|
||||
[https://www.OpenSSL.org/](https://www.OpenSSL.org/)
|
||||
[http://www.OpenSSL.org/](http://www.OpenSSL.org/)
|
||||
* This product includes cryptographic software written by Eric Young
|
||||
(eay@cryptsoft.com).
|
||||
* This product includes software written by Tim Hudson (tjh@cryptsoft.com).
|
||||
(eay@cryptsoft.com)
|
||||
* This product includes software written by Tim Hudson (tjh@cryptsoft.com)
|
||||
|
||||
137
acconfig.h
Normal file
137
acconfig.h
Normal file
@@ -0,0 +1,137 @@
|
||||
/*
|
||||
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*
|
||||
* See the COPYRIGHT file distributed with this work for additional
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
/***
|
||||
*** This file is not to be included by any public header files, because
|
||||
*** it does not get installed.
|
||||
***/
|
||||
@TOP@
|
||||
|
||||
/** define on DEC OSF to enable 4.4BSD style sa_len support */
|
||||
#undef _SOCKADDR_LEN
|
||||
|
||||
/** define if your system needs pthread_init() before using pthreads */
|
||||
#undef NEED_PTHREAD_INIT
|
||||
|
||||
/** define if your system has sigwait() */
|
||||
#undef HAVE_SIGWAIT
|
||||
|
||||
/** define if sigwait() is the UnixWare flavor */
|
||||
#undef HAVE_UNIXWARE_SIGWAIT
|
||||
|
||||
/** define on Solaris to get sigwait() to work using pthreads semantics */
|
||||
#undef _POSIX_PTHREAD_SEMANTICS
|
||||
|
||||
/** define if LinuxThreads is in use */
|
||||
#undef HAVE_LINUXTHREADS
|
||||
|
||||
/** define if sysconf() is available */
|
||||
#undef HAVE_SYSCONF
|
||||
|
||||
/** define if sysctlbyname() is available */
|
||||
#undef HAVE_SYSCTLBYNAME
|
||||
|
||||
/** define if catgets() is available */
|
||||
#undef HAVE_CATGETS
|
||||
|
||||
/** define if getifaddrs() exists */
|
||||
#undef HAVE_GETIFADDRS
|
||||
|
||||
/** define if you have the NET_RT_IFLIST sysctl variable and sys/sysctl.h */
|
||||
#undef HAVE_IFLIST_SYSCTL
|
||||
|
||||
/** define if tzset() is available */
|
||||
#undef HAVE_TZSET
|
||||
|
||||
/** define if struct addrinfo exists */
|
||||
#undef HAVE_ADDRINFO
|
||||
|
||||
/** define if getaddrinfo() exists */
|
||||
#undef HAVE_GETADDRINFO
|
||||
|
||||
/** define if gai_strerror() exists */
|
||||
#undef HAVE_GAISTRERROR
|
||||
|
||||
/**
|
||||
* define if pthread_setconcurrency() should be called to tell the
|
||||
* OS how many threads we might want to run.
|
||||
*/
|
||||
#undef CALL_PTHREAD_SETCONCURRENCY
|
||||
|
||||
/** define if IPv6 is not disabled */
|
||||
#undef WANT_IPV6
|
||||
|
||||
/** define if flockfile() is available */
|
||||
#undef HAVE_FLOCKFILE
|
||||
|
||||
/** define if getc_unlocked() is available */
|
||||
#undef HAVE_GETCUNLOCKED
|
||||
|
||||
/** Shut up warnings about sputaux in stdio.h on BSD/OS pre-4.1 */
|
||||
#undef SHUTUP_SPUTAUX
|
||||
#ifdef SHUTUP_SPUTAUX
|
||||
struct __sFILE;
|
||||
extern __inline int __sputaux(int _c, struct __sFILE *_p);
|
||||
#endif
|
||||
|
||||
/** Shut up warnings about missing sigwait prototype on BSD/OS 4.0* */
|
||||
#undef SHUTUP_SIGWAIT
|
||||
#ifdef SHUTUP_SIGWAIT
|
||||
int sigwait(const unsigned int *set, int *sig);
|
||||
#endif
|
||||
|
||||
/** Shut up warnings from gcc -Wcast-qual on BSD/OS 4.1. */
|
||||
#undef SHUTUP_STDARG_CAST
|
||||
#if defined(SHUTUP_STDARG_CAST) && defined(__GNUC__)
|
||||
#include <stdarg.h> /** Grr. Must be included *every time*. */
|
||||
/**
|
||||
* The silly continuation line is to keep configure from
|
||||
* commenting out the #undef.
|
||||
*/
|
||||
|
||||
#undef \
|
||||
va_start
|
||||
#define va_start(ap, last) \
|
||||
do { \
|
||||
union { const void *konst; long *var; } _u; \
|
||||
_u.konst = &(last); \
|
||||
ap = (va_list)(_u.var + __va_words(__typeof(last))); \
|
||||
} while (0)
|
||||
#endif /** SHUTUP_STDARG_CAST && __GNUC__ */
|
||||
|
||||
/** define if the system has a random number generating device */
|
||||
#undef PATH_RANDOMDEV
|
||||
|
||||
/** define if pthread_attr_getstacksize() is available */
|
||||
#undef HAVE_PTHREAD_ATTR_GETSTACKSIZE
|
||||
|
||||
/** define if pthread_attr_setstacksize() is available */
|
||||
#undef HAVE_PTHREAD_ATTR_SETSTACKSIZE
|
||||
|
||||
/** define if you have strerror in the C library. */
|
||||
#undef HAVE_STRERROR
|
||||
|
||||
/* Define if OpenSSL includes DSA support */
|
||||
#undef HAVE_OPENSSL_DSA
|
||||
|
||||
/* Define if you have getpassphrase in the C library. */
|
||||
#undef HAVE_GETPASSPHRASE
|
||||
|
||||
/* Define to the length type used by the socket API (socklen_t, size_t, int). */
|
||||
#undef ISC_SOCKADDR_LEN_T
|
||||
|
||||
/* Define if threads need PTHREAD_SCOPE_SYSTEM */
|
||||
#undef NEED_PTHREAD_SCOPE_SYSTEM
|
||||
|
||||
/* Define to 1 if you have the uname library function. */
|
||||
#undef HAVE_UNAME
|
||||
17
aclocal.m4
vendored
Normal file
17
aclocal.m4
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
sinclude(libtool.m4/libtool.m4)dnl
|
||||
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.]])
|
||||
13
autogen.sh
Executable file
13
autogen.sh
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
#
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
#
|
||||
# See the COPYRIGHT file distributed with this work for additional
|
||||
# information regarding copyright ownership.
|
||||
|
||||
# Run this script after modifying configure.in to generate configure
|
||||
autoreconf -i
|
||||
@@ -1,5 +0,0 @@
|
||||
SUBDIRS = named rndc dig delv dnssec tools nsupdate check confgen tests plugins
|
||||
|
||||
if HAVE_PKCS11
|
||||
SUBDIRS += pkcs11
|
||||
endif
|
||||
18
bin/Makefile.in
Normal file
18
bin/Makefile.in
Normal file
@@ -0,0 +1,18 @@
|
||||
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
#
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
#
|
||||
# See the COPYRIGHT file distributed with this work for additional
|
||||
# information regarding copyright ownership.
|
||||
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
|
||||
SUBDIRS = named rndc dig delv dnssec tools nsupdate check confgen \
|
||||
@NZD_TOOLS@ @PYTHON_TOOLS@ @PKCS11_TOOLS@ tests
|
||||
TARGETS =
|
||||
|
||||
@BIND9_MAKE_RULES@
|
||||
@@ -1,34 +0,0 @@
|
||||
include $(top_srcdir)/Makefile.top
|
||||
|
||||
AM_CPPFLAGS += \
|
||||
$(LIBISC_CFLAGS) \
|
||||
$(LIBDNS_CFLAGS) \
|
||||
$(LIBNS_CFLAGS) \
|
||||
$(LIBISCCFG_CFLAGS) \
|
||||
$(LIBBIND9_CFLAGS)
|
||||
|
||||
AM_CPPFLAGS += \
|
||||
-DNAMED_CONFFILE=\"${sysconfdir}/named.conf\"
|
||||
|
||||
noinst_LTLIBRARIES = libcheck-tool.la
|
||||
|
||||
libcheck_tool_la_SOURCES = \
|
||||
check-tool.h \
|
||||
check-tool.c
|
||||
|
||||
LDADD = \
|
||||
libcheck-tool.la \
|
||||
$(LIBISC_LIBS) \
|
||||
$(LIBDNS_LIBS) \
|
||||
$(LIBNS_LIBS) \
|
||||
$(LIBISCCFG_LIBS) \
|
||||
$(LIBBIND9_LIBS)
|
||||
|
||||
bin_PROGRAMS = named-checkconf named-checkzone
|
||||
|
||||
install-exec-hook:
|
||||
ln -f $(DESTDIR)$(bindir)/named-checkzone \
|
||||
$(DESTDIR)$(bindir)/named-compilezone
|
||||
|
||||
uninstall-hook:
|
||||
-rm -f $(DESTDIR)$(bindir)/named-compilezone
|
||||
102
bin/check/Makefile.in
Normal file
102
bin/check/Makefile.in
Normal file
@@ -0,0 +1,102 @@
|
||||
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
#
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
#
|
||||
# See the COPYRIGHT file distributed with this work for additional
|
||||
# information regarding copyright ownership.
|
||||
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
|
||||
VERSION=@BIND9_VERSION@
|
||||
|
||||
@BIND9_MAKE_INCLUDES@
|
||||
|
||||
CINCLUDES = ${NS_INCLUDES} ${BIND9_INCLUDES} ${DNS_INCLUDES} ${ISCCFG_INCLUDES} \
|
||||
${ISC_INCLUDES} @DST_OPENSSL_INC@
|
||||
|
||||
CDEFINES = -DNAMED_CONFFILE=\"${sysconfdir}/named.conf\"
|
||||
CWARNINGS =
|
||||
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
|
||||
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||
ISCLIBS = ../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
|
||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @ISC_OPENSSL_LIBS@
|
||||
BIND9LIBS = ../../lib/bind9/libbind9.@A@
|
||||
NSLIBS = ../../lib/ns/libns.@A@
|
||||
|
||||
DNSDEPLIBS = ../../lib/dns/libdns.@A@
|
||||
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||
ISCDEPLIBS = ../../lib/isc/libisc.@A@
|
||||
BIND9DEPLIBS = ../../lib/bind9/libbind9.@A@
|
||||
NSDEPENDLIBS = ../../lib/ns/libns.@A@
|
||||
|
||||
LIBS = ${ISCLIBS} @LIBS@
|
||||
NOSYMLIBS = ${ISCNOSYMLIBS} @LIBS@
|
||||
|
||||
SUBDIRS =
|
||||
|
||||
# Alphabetically
|
||||
TARGETS = named-checkconf@EXEEXT@ named-checkzone@EXEEXT@
|
||||
|
||||
# Alphabetically
|
||||
SRCS = named-checkconf.c named-checkzone.c check-tool.c
|
||||
|
||||
MANPAGES = named-checkconf.8 named-checkzone.8
|
||||
|
||||
HTMLPAGES = named-checkconf.html named-checkzone.html
|
||||
|
||||
MANOBJS = ${MANPAGES} ${HTMLPAGES}
|
||||
|
||||
@BIND9_MAKE_RULES@
|
||||
|
||||
named-checkconf.@O@: named-checkconf.c
|
||||
${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \
|
||||
-DVERSION=\"${VERSION}\" \
|
||||
-c ${srcdir}/named-checkconf.c
|
||||
|
||||
named-checkzone.@O@: named-checkzone.c
|
||||
${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \
|
||||
-DVERSION=\"${VERSION}\" \
|
||||
-c ${srcdir}/named-checkzone.c
|
||||
|
||||
named-checkconf@EXEEXT@: named-checkconf.@O@ check-tool.@O@ ${ISCDEPLIBS} \
|
||||
${NSDEPENDLIBS} ${DNSDEPLIBS} ${ISCCFGDEPLIBS} ${BIND9DEPLIBS}
|
||||
export BASEOBJS="named-checkconf.@O@ check-tool.@O@"; \
|
||||
export LIBS0="${NSLIBS} ${BIND9LIBS} ${ISCCFGLIBS} ${DNSLIBS}"; \
|
||||
${FINALBUILDCMD}
|
||||
|
||||
named-checkzone@EXEEXT@: named-checkzone.@O@ check-tool.@O@ ${ISCDEPLIBS} \
|
||||
${NSDEPENDLIBS} ${DNSDEPLIBS}
|
||||
export BASEOBJS="named-checkzone.@O@ check-tool.@O@"; \
|
||||
export LIBS0="${NSLIBS} ${ISCCFGLIBS} ${DNSLIBS}"; \
|
||||
${FINALBUILDCMD}
|
||||
|
||||
doc man:: ${MANOBJS}
|
||||
|
||||
docclean manclean maintainer-clean::
|
||||
rm -f ${MANOBJS}
|
||||
|
||||
installdirs:
|
||||
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${sbindir}
|
||||
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man8
|
||||
|
||||
install:: named-checkconf@EXEEXT@ named-checkzone@EXEEXT@ installdirs
|
||||
${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} named-checkconf@EXEEXT@ ${DESTDIR}${sbindir}
|
||||
${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} named-checkzone@EXEEXT@ ${DESTDIR}${sbindir}
|
||||
(cd ${DESTDIR}${sbindir}; rm -f named-compilezone@EXEEXT@; ${LINK_PROGRAM} named-checkzone@EXEEXT@ named-compilezone@EXEEXT@)
|
||||
for m in ${MANPAGES}; do ${INSTALL_DATA} ${srcdir}/$$m ${DESTDIR}${mandir}/man8; done
|
||||
(cd ${DESTDIR}${mandir}/man8; rm -f named-compilezone.8; ${LINK_PROGRAM} named-checkzone.8 named-compilezone.8)
|
||||
|
||||
uninstall::
|
||||
rm -f ${DESTDIR}${mandir}/man8/named-compilezone.8
|
||||
for m in ${MANPAGES}; do rm -f ${DESTDIR}${mandir}/man8/$$m ; done
|
||||
rm -f ${DESTDIR}${sbindir}/named-compilezone@EXEEXT@
|
||||
${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${sbindir}/named-checkconf@EXEEXT@
|
||||
${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${sbindir}/named-checkzone@EXEEXT@
|
||||
|
||||
clean distclean::
|
||||
rm -f ${TARGETS} r1.htm
|
||||
@@ -9,21 +9,23 @@
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdbool.h>
|
||||
#include <config.h>
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <Winsock2.h>
|
||||
#endif /* ifdef _WIN32 */
|
||||
#endif
|
||||
|
||||
#include "check-tool.h"
|
||||
#include <isc/buffer.h>
|
||||
#include <isc/log.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/net.h>
|
||||
#include <isc/netdb.h>
|
||||
#include <isc/net.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/region.h>
|
||||
#include <isc/stdio.h>
|
||||
@@ -50,61 +52,72 @@
|
||||
|
||||
#include <ns/log.h>
|
||||
|
||||
#include "check-tool.h"
|
||||
|
||||
#ifndef CHECK_SIBLING
|
||||
#define CHECK_SIBLING 1
|
||||
#endif /* ifndef CHECK_SIBLING */
|
||||
#endif
|
||||
|
||||
#ifndef CHECK_LOCAL
|
||||
#define CHECK_LOCAL 1
|
||||
#endif /* ifndef CHECK_LOCAL */
|
||||
#endif
|
||||
|
||||
#define CHECK(r) \
|
||||
do { \
|
||||
result = (r); \
|
||||
#ifdef HAVE_ADDRINFO
|
||||
#ifdef HAVE_GETADDRINFO
|
||||
#ifdef HAVE_GAISTRERROR
|
||||
#define USE_GETADDRINFO
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define CHECK(r) \
|
||||
do { \
|
||||
result = (r); \
|
||||
if (result != ISC_R_SUCCESS) \
|
||||
goto cleanup; \
|
||||
goto cleanup; \
|
||||
} while (0)
|
||||
|
||||
#define ERR_IS_CNAME 1
|
||||
#define ERR_NO_ADDRESSES 2
|
||||
#define ERR_IS_CNAME 1
|
||||
#define ERR_NO_ADDRESSES 2
|
||||
#define ERR_LOOKUP_FAILURE 3
|
||||
#define ERR_EXTRA_A 4
|
||||
#define ERR_EXTRA_AAAA 5
|
||||
#define ERR_MISSING_GLUE 5
|
||||
#define ERR_IS_MXCNAME 6
|
||||
#define ERR_IS_SRVCNAME 7
|
||||
#define ERR_EXTRA_A 4
|
||||
#define ERR_EXTRA_AAAA 5
|
||||
#define ERR_MISSING_GLUE 5
|
||||
#define ERR_IS_MXCNAME 6
|
||||
#define ERR_IS_SRVCNAME 7
|
||||
|
||||
static const char *dbtype[] = { "rbt" };
|
||||
|
||||
int debug = 0;
|
||||
const char *journal = NULL;
|
||||
bool nomerge = true;
|
||||
isc_boolean_t nomerge = ISC_TRUE;
|
||||
#if CHECK_LOCAL
|
||||
bool docheckmx = true;
|
||||
bool dochecksrv = true;
|
||||
bool docheckns = true;
|
||||
#else /* if CHECK_LOCAL */
|
||||
bool docheckmx = false;
|
||||
bool dochecksrv = false;
|
||||
bool docheckns = false;
|
||||
#endif /* if CHECK_LOCAL */
|
||||
dns_zoneopt_t zone_options = DNS_ZONEOPT_CHECKNS | DNS_ZONEOPT_CHECKMX |
|
||||
DNS_ZONEOPT_MANYERRORS | DNS_ZONEOPT_CHECKNAMES |
|
||||
isc_boolean_t docheckmx = ISC_TRUE;
|
||||
isc_boolean_t dochecksrv = ISC_TRUE;
|
||||
isc_boolean_t docheckns = ISC_TRUE;
|
||||
#else
|
||||
isc_boolean_t docheckmx = ISC_FALSE;
|
||||
isc_boolean_t dochecksrv = ISC_FALSE;
|
||||
isc_boolean_t docheckns = ISC_FALSE;
|
||||
#endif
|
||||
dns_zoneopt_t zone_options = DNS_ZONEOPT_CHECKNS |
|
||||
DNS_ZONEOPT_CHECKMX |
|
||||
DNS_ZONEOPT_MANYERRORS |
|
||||
DNS_ZONEOPT_CHECKNAMES |
|
||||
DNS_ZONEOPT_CHECKINTEGRITY |
|
||||
#if CHECK_SIBLING
|
||||
DNS_ZONEOPT_CHECKSIBLING |
|
||||
#endif /* if CHECK_SIBLING */
|
||||
#endif
|
||||
DNS_ZONEOPT_CHECKWILDCARD |
|
||||
DNS_ZONEOPT_WARNMXCNAME | DNS_ZONEOPT_WARNSRVCNAME;
|
||||
DNS_ZONEOPT_WARNMXCNAME |
|
||||
DNS_ZONEOPT_WARNSRVCNAME;
|
||||
|
||||
/*
|
||||
* This needs to match the list in bin/named/log.c.
|
||||
*/
|
||||
static isc_logcategory_t categories[] = { { "", 0 },
|
||||
{ "unmatched", 0 },
|
||||
{ NULL, 0 } };
|
||||
static isc_logcategory_t categories[] = {
|
||||
{ "", 0 },
|
||||
{ "unmatched", 0 },
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
static isc_symtab_t *symtab = NULL;
|
||||
static isc_mem_t *sym_mctx;
|
||||
@@ -122,53 +135,55 @@ add(char *key, int value) {
|
||||
isc_symvalue_t symvalue;
|
||||
|
||||
if (sym_mctx == NULL) {
|
||||
isc_mem_create(&sym_mctx);
|
||||
result = isc_mem_create(0, 0, &sym_mctx);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return;
|
||||
}
|
||||
|
||||
if (symtab == NULL) {
|
||||
result = isc_symtab_create(sym_mctx, 100, freekey, sym_mctx,
|
||||
false, &symtab);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
ISC_FALSE, &symtab);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
key = isc_mem_strdup(sym_mctx, key);
|
||||
if (key == NULL)
|
||||
return;
|
||||
|
||||
symvalue.as_pointer = NULL;
|
||||
result = isc_symtab_define(symtab, key, value, symvalue,
|
||||
isc_symexists_reject);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS)
|
||||
isc_mem_free(sym_mctx, key);
|
||||
}
|
||||
}
|
||||
|
||||
static bool
|
||||
static isc_boolean_t
|
||||
logged(char *key, int value) {
|
||||
isc_result_t result;
|
||||
|
||||
if (symtab == NULL) {
|
||||
return (false);
|
||||
}
|
||||
if (symtab == NULL)
|
||||
return (ISC_FALSE);
|
||||
|
||||
result = isc_symtab_lookup(symtab, key, value, NULL);
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
return (true);
|
||||
}
|
||||
return (false);
|
||||
if (result == ISC_R_SUCCESS)
|
||||
return (ISC_TRUE);
|
||||
return (ISC_FALSE);
|
||||
}
|
||||
|
||||
static bool
|
||||
static isc_boolean_t
|
||||
checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
|
||||
dns_rdataset_t *a, dns_rdataset_t *aaaa) {
|
||||
dns_rdataset_t *a, dns_rdataset_t *aaaa)
|
||||
{
|
||||
#ifdef USE_GETADDRINFO
|
||||
dns_rdataset_t *rdataset;
|
||||
dns_rdata_t rdata = DNS_RDATA_INIT;
|
||||
struct addrinfo hints, *ai, *cur;
|
||||
char namebuf[DNS_NAME_FORMATSIZE + 1];
|
||||
char ownerbuf[DNS_NAME_FORMATSIZE];
|
||||
char addrbuf[sizeof("xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:123.123.123.123")];
|
||||
bool answer = true;
|
||||
bool match;
|
||||
isc_boolean_t answer = ISC_TRUE;
|
||||
isc_boolean_t match;
|
||||
const char *type;
|
||||
void *ptr = NULL;
|
||||
int result;
|
||||
@@ -178,9 +193,8 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
|
||||
REQUIRE(aaaa == NULL || !dns_rdataset_isassociated(aaaa) ||
|
||||
aaaa->type == dns_rdatatype_aaaa);
|
||||
|
||||
if (a == NULL || aaaa == NULL) {
|
||||
if (a == NULL || aaaa == NULL)
|
||||
return (answer);
|
||||
}
|
||||
|
||||
memset(&hints, 0, sizeof(hints));
|
||||
hints.ai_flags = AI_CANONNAME;
|
||||
@@ -207,26 +221,25 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
|
||||
*/
|
||||
cur = ai;
|
||||
while (cur != NULL && cur->ai_canonname == NULL &&
|
||||
cur->ai_next != NULL) {
|
||||
cur->ai_next != NULL)
|
||||
cur = cur->ai_next;
|
||||
}
|
||||
if (cur != NULL && cur->ai_canonname != NULL &&
|
||||
strcasecmp(cur->ai_canonname, namebuf) != 0 &&
|
||||
!logged(namebuf, ERR_IS_CNAME))
|
||||
{
|
||||
!logged(namebuf, ERR_IS_CNAME)) {
|
||||
dns_zone_log(zone, ISC_LOG_ERROR,
|
||||
"%s/NS '%s' (out of zone) "
|
||||
"is a CNAME '%s' (illegal)",
|
||||
ownerbuf, namebuf, cur->ai_canonname);
|
||||
ownerbuf, namebuf,
|
||||
cur->ai_canonname);
|
||||
/* XXX950 make fatal for 9.5.0 */
|
||||
/* answer = false; */
|
||||
/* answer = ISC_FALSE; */
|
||||
add(namebuf, ERR_IS_CNAME);
|
||||
}
|
||||
break;
|
||||
case EAI_NONAME:
|
||||
#if defined(EAI_NODATA) && (EAI_NODATA != EAI_NONAME)
|
||||
case EAI_NODATA:
|
||||
#endif /* if defined(EAI_NODATA) && (EAI_NODATA != EAI_NONAME) */
|
||||
#endif
|
||||
if (!logged(namebuf, ERR_NO_ADDRESSES)) {
|
||||
dns_zone_log(zone, ISC_LOG_ERROR,
|
||||
"%s/NS '%s' (out of zone) "
|
||||
@@ -235,154 +248,143 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
|
||||
add(namebuf, ERR_NO_ADDRESSES);
|
||||
}
|
||||
/* XXX950 make fatal for 9.5.0 */
|
||||
return (true);
|
||||
return (ISC_TRUE);
|
||||
|
||||
default:
|
||||
if (!logged(namebuf, ERR_LOOKUP_FAILURE)) {
|
||||
dns_zone_log(zone, ISC_LOG_WARNING,
|
||||
"getaddrinfo(%s) failed: %s", namebuf,
|
||||
gai_strerror(result));
|
||||
"getaddrinfo(%s) failed: %s",
|
||||
namebuf, gai_strerror(result));
|
||||
add(namebuf, ERR_LOOKUP_FAILURE);
|
||||
}
|
||||
return (true);
|
||||
return (ISC_TRUE);
|
||||
}
|
||||
|
||||
/*
|
||||
* Check that all glue records really exist.
|
||||
*/
|
||||
if (!dns_rdataset_isassociated(a)) {
|
||||
if (!dns_rdataset_isassociated(a))
|
||||
goto checkaaaa;
|
||||
}
|
||||
result = dns_rdataset_first(a);
|
||||
while (result == ISC_R_SUCCESS) {
|
||||
dns_rdataset_current(a, &rdata);
|
||||
match = false;
|
||||
match = ISC_FALSE;
|
||||
for (cur = ai; cur != NULL; cur = cur->ai_next) {
|
||||
if (cur->ai_family != AF_INET) {
|
||||
if (cur->ai_family != AF_INET)
|
||||
continue;
|
||||
}
|
||||
ptr = &((struct sockaddr_in *)(cur->ai_addr))->sin_addr;
|
||||
if (memcmp(ptr, rdata.data, rdata.length) == 0) {
|
||||
match = true;
|
||||
match = ISC_TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!match && !logged(namebuf, ERR_EXTRA_A)) {
|
||||
dns_zone_log(zone, ISC_LOG_ERROR,
|
||||
"%s/NS '%s' "
|
||||
dns_zone_log(zone, ISC_LOG_ERROR, "%s/NS '%s' "
|
||||
"extra GLUE A record (%s)",
|
||||
ownerbuf, namebuf,
|
||||
inet_ntop(AF_INET, rdata.data, addrbuf,
|
||||
sizeof(addrbuf)));
|
||||
inet_ntop(AF_INET, rdata.data,
|
||||
addrbuf, sizeof(addrbuf)));
|
||||
add(namebuf, ERR_EXTRA_A);
|
||||
/* XXX950 make fatal for 9.5.0 */
|
||||
/* answer = false; */
|
||||
/* answer = ISC_FALSE; */
|
||||
}
|
||||
dns_rdata_reset(&rdata);
|
||||
result = dns_rdataset_next(a);
|
||||
}
|
||||
|
||||
checkaaaa:
|
||||
if (!dns_rdataset_isassociated(aaaa)) {
|
||||
checkaaaa:
|
||||
if (!dns_rdataset_isassociated(aaaa))
|
||||
goto checkmissing;
|
||||
}
|
||||
result = dns_rdataset_first(aaaa);
|
||||
while (result == ISC_R_SUCCESS) {
|
||||
dns_rdataset_current(aaaa, &rdata);
|
||||
match = false;
|
||||
match = ISC_FALSE;
|
||||
for (cur = ai; cur != NULL; cur = cur->ai_next) {
|
||||
if (cur->ai_family != AF_INET6) {
|
||||
if (cur->ai_family != AF_INET6)
|
||||
continue;
|
||||
}
|
||||
ptr = &((struct sockaddr_in6 *)(cur->ai_addr))
|
||||
->sin6_addr;
|
||||
ptr = &((struct sockaddr_in6 *)(cur->ai_addr))->sin6_addr;
|
||||
if (memcmp(ptr, rdata.data, rdata.length) == 0) {
|
||||
match = true;
|
||||
match = ISC_TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!match && !logged(namebuf, ERR_EXTRA_AAAA)) {
|
||||
dns_zone_log(zone, ISC_LOG_ERROR,
|
||||
"%s/NS '%s' "
|
||||
dns_zone_log(zone, ISC_LOG_ERROR, "%s/NS '%s' "
|
||||
"extra GLUE AAAA record (%s)",
|
||||
ownerbuf, namebuf,
|
||||
inet_ntop(AF_INET6, rdata.data, addrbuf,
|
||||
sizeof(addrbuf)));
|
||||
inet_ntop(AF_INET6, rdata.data,
|
||||
addrbuf, sizeof(addrbuf)));
|
||||
add(namebuf, ERR_EXTRA_AAAA);
|
||||
/* XXX950 make fatal for 9.5.0. */
|
||||
/* answer = false; */
|
||||
/* answer = ISC_FALSE; */
|
||||
}
|
||||
dns_rdata_reset(&rdata);
|
||||
result = dns_rdataset_next(aaaa);
|
||||
}
|
||||
|
||||
checkmissing:
|
||||
checkmissing:
|
||||
/*
|
||||
* Check that all addresses appear in the glue.
|
||||
*/
|
||||
if (!logged(namebuf, ERR_MISSING_GLUE)) {
|
||||
bool missing_glue = false;
|
||||
isc_boolean_t missing_glue = ISC_FALSE;
|
||||
for (cur = ai; cur != NULL; cur = cur->ai_next) {
|
||||
switch (cur->ai_family) {
|
||||
case AF_INET:
|
||||
rdataset = a;
|
||||
ptr = &((struct sockaddr_in *)(cur->ai_addr))
|
||||
->sin_addr;
|
||||
ptr = &((struct sockaddr_in *)(cur->ai_addr))->sin_addr;
|
||||
type = "A";
|
||||
break;
|
||||
case AF_INET6:
|
||||
rdataset = aaaa;
|
||||
ptr = &((struct sockaddr_in6 *)(cur->ai_addr))
|
||||
->sin6_addr;
|
||||
ptr = &((struct sockaddr_in6 *)(cur->ai_addr))->sin6_addr;
|
||||
type = "AAAA";
|
||||
break;
|
||||
default:
|
||||
continue;
|
||||
continue;
|
||||
}
|
||||
match = false;
|
||||
if (dns_rdataset_isassociated(rdataset)) {
|
||||
match = ISC_FALSE;
|
||||
if (dns_rdataset_isassociated(rdataset))
|
||||
result = dns_rdataset_first(rdataset);
|
||||
} else {
|
||||
else
|
||||
result = ISC_R_FAILURE;
|
||||
}
|
||||
while (result == ISC_R_SUCCESS && !match) {
|
||||
dns_rdataset_current(rdataset, &rdata);
|
||||
if (memcmp(ptr, rdata.data, rdata.length) == 0)
|
||||
{
|
||||
match = true;
|
||||
}
|
||||
match = ISC_TRUE;
|
||||
dns_rdata_reset(&rdata);
|
||||
result = dns_rdataset_next(rdataset);
|
||||
}
|
||||
if (!match) {
|
||||
dns_zone_log(zone, ISC_LOG_ERROR,
|
||||
"%s/NS '%s' "
|
||||
dns_zone_log(zone, ISC_LOG_ERROR, "%s/NS '%s' "
|
||||
"missing GLUE %s record (%s)",
|
||||
ownerbuf, namebuf, type,
|
||||
inet_ntop(cur->ai_family, ptr,
|
||||
addrbuf,
|
||||
sizeof(addrbuf)));
|
||||
addrbuf, sizeof(addrbuf)));
|
||||
/* XXX950 make fatal for 9.5.0. */
|
||||
/* answer = false; */
|
||||
missing_glue = true;
|
||||
/* answer = ISC_FALSE; */
|
||||
missing_glue = ISC_TRUE;
|
||||
}
|
||||
}
|
||||
if (missing_glue) {
|
||||
if (missing_glue)
|
||||
add(namebuf, ERR_MISSING_GLUE);
|
||||
}
|
||||
}
|
||||
freeaddrinfo(ai);
|
||||
return (answer);
|
||||
#else
|
||||
return (ISC_TRUE);
|
||||
#endif
|
||||
}
|
||||
|
||||
static bool
|
||||
static isc_boolean_t
|
||||
checkmx(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
|
||||
#ifdef USE_GETADDRINFO
|
||||
struct addrinfo hints, *ai, *cur;
|
||||
char namebuf[DNS_NAME_FORMATSIZE + 1];
|
||||
char ownerbuf[DNS_NAME_FORMATSIZE];
|
||||
int result;
|
||||
int level = ISC_LOG_ERROR;
|
||||
bool answer = true;
|
||||
isc_boolean_t answer = ISC_TRUE;
|
||||
|
||||
memset(&hints, 0, sizeof(hints));
|
||||
hints.ai_flags = AI_CANONNAME;
|
||||
@@ -409,15 +411,12 @@ checkmx(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
|
||||
*/
|
||||
cur = ai;
|
||||
while (cur != NULL && cur->ai_canonname == NULL &&
|
||||
cur->ai_next != NULL) {
|
||||
cur->ai_next != NULL)
|
||||
cur = cur->ai_next;
|
||||
}
|
||||
if (cur != NULL && cur->ai_canonname != NULL &&
|
||||
strcasecmp(cur->ai_canonname, namebuf) != 0)
|
||||
{
|
||||
if ((zone_options & DNS_ZONEOPT_WARNMXCNAME) != 0) {
|
||||
strcasecmp(cur->ai_canonname, namebuf) != 0) {
|
||||
if ((zone_options & DNS_ZONEOPT_WARNMXCNAME) != 0)
|
||||
level = ISC_LOG_WARNING;
|
||||
}
|
||||
if ((zone_options & DNS_ZONEOPT_IGNOREMXCNAME) == 0) {
|
||||
if (!logged(namebuf, ERR_IS_MXCNAME)) {
|
||||
dns_zone_log(zone, level,
|
||||
@@ -428,9 +427,8 @@ checkmx(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
|
||||
cur->ai_canonname);
|
||||
add(namebuf, ERR_IS_MXCNAME);
|
||||
}
|
||||
if (level == ISC_LOG_ERROR) {
|
||||
answer = false;
|
||||
}
|
||||
if (level == ISC_LOG_ERROR)
|
||||
answer = ISC_FALSE;
|
||||
}
|
||||
}
|
||||
freeaddrinfo(ai);
|
||||
@@ -439,7 +437,7 @@ checkmx(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
|
||||
case EAI_NONAME:
|
||||
#if defined(EAI_NODATA) && (EAI_NODATA != EAI_NONAME)
|
||||
case EAI_NODATA:
|
||||
#endif /* if defined(EAI_NODATA) && (EAI_NODATA != EAI_NONAME) */
|
||||
#endif
|
||||
if (!logged(namebuf, ERR_NO_ADDRESSES)) {
|
||||
dns_zone_log(zone, ISC_LOG_ERROR,
|
||||
"%s/MX '%s' (out of zone) "
|
||||
@@ -448,27 +446,31 @@ checkmx(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
|
||||
add(namebuf, ERR_NO_ADDRESSES);
|
||||
}
|
||||
/* XXX950 make fatal for 9.5.0. */
|
||||
return (true);
|
||||
return (ISC_TRUE);
|
||||
|
||||
default:
|
||||
if (!logged(namebuf, ERR_LOOKUP_FAILURE)) {
|
||||
dns_zone_log(zone, ISC_LOG_WARNING,
|
||||
"getaddrinfo(%s) failed: %s", namebuf,
|
||||
gai_strerror(result));
|
||||
"getaddrinfo(%s) failed: %s",
|
||||
namebuf, gai_strerror(result));
|
||||
add(namebuf, ERR_LOOKUP_FAILURE);
|
||||
}
|
||||
return (true);
|
||||
return (ISC_TRUE);
|
||||
}
|
||||
#else
|
||||
return (ISC_TRUE);
|
||||
#endif
|
||||
}
|
||||
|
||||
static bool
|
||||
static isc_boolean_t
|
||||
checksrv(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
|
||||
#ifdef USE_GETADDRINFO
|
||||
struct addrinfo hints, *ai, *cur;
|
||||
char namebuf[DNS_NAME_FORMATSIZE + 1];
|
||||
char ownerbuf[DNS_NAME_FORMATSIZE];
|
||||
int result;
|
||||
int level = ISC_LOG_ERROR;
|
||||
bool answer = true;
|
||||
isc_boolean_t answer = ISC_TRUE;
|
||||
|
||||
memset(&hints, 0, sizeof(hints));
|
||||
hints.ai_flags = AI_CANONNAME;
|
||||
@@ -495,28 +497,23 @@ checksrv(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
|
||||
*/
|
||||
cur = ai;
|
||||
while (cur != NULL && cur->ai_canonname == NULL &&
|
||||
cur->ai_next != NULL) {
|
||||
cur->ai_next != NULL)
|
||||
cur = cur->ai_next;
|
||||
}
|
||||
if (cur != NULL && cur->ai_canonname != NULL &&
|
||||
strcasecmp(cur->ai_canonname, namebuf) != 0)
|
||||
{
|
||||
if ((zone_options & DNS_ZONEOPT_WARNSRVCNAME) != 0) {
|
||||
strcasecmp(cur->ai_canonname, namebuf) != 0) {
|
||||
if ((zone_options & DNS_ZONEOPT_WARNSRVCNAME) != 0)
|
||||
level = ISC_LOG_WARNING;
|
||||
}
|
||||
if ((zone_options & DNS_ZONEOPT_IGNORESRVCNAME) == 0) {
|
||||
if (!logged(namebuf, ERR_IS_SRVCNAME)) {
|
||||
dns_zone_log(zone, level,
|
||||
"%s/SRV '%s'"
|
||||
dns_zone_log(zone, level, "%s/SRV '%s'"
|
||||
" (out of zone) is a "
|
||||
"CNAME '%s' (illegal)",
|
||||
ownerbuf, namebuf,
|
||||
cur->ai_canonname);
|
||||
add(namebuf, ERR_IS_SRVCNAME);
|
||||
}
|
||||
if (level == ISC_LOG_ERROR) {
|
||||
answer = false;
|
||||
}
|
||||
if (level == ISC_LOG_ERROR)
|
||||
answer = ISC_FALSE;
|
||||
}
|
||||
}
|
||||
freeaddrinfo(ai);
|
||||
@@ -525,7 +522,7 @@ checksrv(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
|
||||
case EAI_NONAME:
|
||||
#if defined(EAI_NODATA) && (EAI_NODATA != EAI_NONAME)
|
||||
case EAI_NODATA:
|
||||
#endif /* if defined(EAI_NODATA) && (EAI_NODATA != EAI_NONAME) */
|
||||
#endif
|
||||
if (!logged(namebuf, ERR_NO_ADDRESSES)) {
|
||||
dns_zone_log(zone, ISC_LOG_ERROR,
|
||||
"%s/SRV '%s' (out of zone) "
|
||||
@@ -534,17 +531,20 @@ checksrv(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
|
||||
add(namebuf, ERR_NO_ADDRESSES);
|
||||
}
|
||||
/* XXX950 make fatal for 9.5.0. */
|
||||
return (true);
|
||||
return (ISC_TRUE);
|
||||
|
||||
default:
|
||||
if (!logged(namebuf, ERR_LOOKUP_FAILURE)) {
|
||||
dns_zone_log(zone, ISC_LOG_WARNING,
|
||||
"getaddrinfo(%s) failed: %s", namebuf,
|
||||
gai_strerror(result));
|
||||
"getaddrinfo(%s) failed: %s",
|
||||
namebuf, gai_strerror(result));
|
||||
add(namebuf, ERR_LOOKUP_FAILURE);
|
||||
}
|
||||
return (true);
|
||||
return (ISC_TRUE);
|
||||
}
|
||||
#else
|
||||
return (ISC_TRUE);
|
||||
#endif
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
@@ -553,7 +553,7 @@ setup_logging(isc_mem_t *mctx, FILE *errout, isc_log_t **logp) {
|
||||
isc_logconfig_t *logconfig = NULL;
|
||||
isc_log_t *log = NULL;
|
||||
|
||||
isc_log_create(mctx, &log, &logconfig);
|
||||
RUNTIME_CHECK(isc_log_create(mctx, &log, &logconfig) == ISC_R_SUCCESS);
|
||||
isc_log_registercategories(log, categories);
|
||||
isc_log_setcontext(log);
|
||||
dns_log_init(log);
|
||||
@@ -565,11 +565,12 @@ setup_logging(isc_mem_t *mctx, FILE *errout, isc_log_t **logp) {
|
||||
destination.file.name = NULL;
|
||||
destination.file.versions = ISC_LOG_ROLLNEVER;
|
||||
destination.file.maximum_size = 0;
|
||||
isc_log_createchannel(logconfig, "stderr", ISC_LOG_TOFILEDESC,
|
||||
ISC_LOG_DYNAMIC, &destination, 0);
|
||||
|
||||
RUNTIME_CHECK(isc_log_usechannel(logconfig, "stderr", NULL, NULL) ==
|
||||
ISC_R_SUCCESS);
|
||||
RUNTIME_CHECK(isc_log_createchannel(logconfig, "stderr",
|
||||
ISC_LOG_TOFILEDESC,
|
||||
ISC_LOG_DYNAMIC,
|
||||
&destination, 0) == ISC_R_SUCCESS);
|
||||
RUNTIME_CHECK(isc_log_usechannel(logconfig, "stderr",
|
||||
NULL, NULL) == ISC_R_SUCCESS);
|
||||
|
||||
*logp = log;
|
||||
return (ISC_R_SUCCESS);
|
||||
@@ -596,20 +597,18 @@ check_ttls(dns_zone_t *zone, dns_ttl_t maxttl) {
|
||||
CHECK(dns_db_newversion(db, &version));
|
||||
CHECK(dns_db_createiterator(db, 0, &dbiter));
|
||||
|
||||
for (result = dns_dbiterator_first(dbiter); result == ISC_R_SUCCESS;
|
||||
result = dns_dbiterator_next(dbiter))
|
||||
{
|
||||
for (result = dns_dbiterator_first(dbiter);
|
||||
result == ISC_R_SUCCESS;
|
||||
result = dns_dbiterator_next(dbiter)) {
|
||||
result = dns_dbiterator_current(dbiter, &node, name);
|
||||
if (result == DNS_R_NEWORIGIN) {
|
||||
if (result == DNS_R_NEWORIGIN)
|
||||
result = ISC_R_SUCCESS;
|
||||
}
|
||||
CHECK(result);
|
||||
|
||||
CHECK(dns_db_allrdatasets(db, node, version, 0, &rdsiter));
|
||||
for (result = dns_rdatasetiter_first(rdsiter);
|
||||
result == ISC_R_SUCCESS;
|
||||
result = dns_rdatasetiter_next(rdsiter))
|
||||
{
|
||||
result = dns_rdatasetiter_next(rdsiter)) {
|
||||
dns_rdatasetiter_current(rdsiter, &rdataset);
|
||||
if (rdataset.ttl > maxttl) {
|
||||
char nbuf[DNS_NAME_FORMATSIZE];
|
||||
@@ -632,35 +631,28 @@ check_ttls(dns_zone_t *zone, dns_ttl_t maxttl) {
|
||||
}
|
||||
dns_rdataset_disassociate(&rdataset);
|
||||
}
|
||||
if (result == ISC_R_NOMORE) {
|
||||
if (result == ISC_R_NOMORE)
|
||||
result = ISC_R_SUCCESS;
|
||||
}
|
||||
CHECK(result);
|
||||
|
||||
dns_rdatasetiter_destroy(&rdsiter);
|
||||
dns_db_detachnode(db, &node);
|
||||
}
|
||||
|
||||
if (result == ISC_R_NOMORE) {
|
||||
if (result == ISC_R_NOMORE)
|
||||
result = ISC_R_SUCCESS;
|
||||
}
|
||||
|
||||
cleanup:
|
||||
if (node != NULL) {
|
||||
cleanup:
|
||||
if (node != NULL)
|
||||
dns_db_detachnode(db, &node);
|
||||
}
|
||||
if (rdsiter != NULL) {
|
||||
if (rdsiter != NULL)
|
||||
dns_rdatasetiter_destroy(&rdsiter);
|
||||
}
|
||||
if (dbiter != NULL) {
|
||||
if (dbiter != NULL)
|
||||
dns_dbiterator_destroy(&dbiter);
|
||||
}
|
||||
if (version != NULL) {
|
||||
dns_db_closeversion(db, &version, false);
|
||||
}
|
||||
if (db != NULL) {
|
||||
if (version != NULL)
|
||||
dns_db_closeversion(db, &version, ISC_FALSE);
|
||||
if (db != NULL)
|
||||
dns_db_detach(&db);
|
||||
}
|
||||
|
||||
return (result);
|
||||
}
|
||||
@@ -669,7 +661,8 @@ cleanup:
|
||||
isc_result_t
|
||||
load_zone(isc_mem_t *mctx, const char *zonename, const char *filename,
|
||||
dns_masterformat_t fileformat, const char *classname,
|
||||
dns_ttl_t maxttl, dns_zone_t **zonep) {
|
||||
dns_ttl_t maxttl, dns_zone_t **zonep)
|
||||
{
|
||||
isc_result_t result;
|
||||
dns_rdataclass_t rdclass;
|
||||
isc_textregion_t region;
|
||||
@@ -680,10 +673,9 @@ load_zone(isc_mem_t *mctx, const char *zonename, const char *filename,
|
||||
|
||||
REQUIRE(zonep == NULL || *zonep == NULL);
|
||||
|
||||
if (debug) {
|
||||
if (debug)
|
||||
fprintf(stderr, "loading \"%s\" from \"%s\" class \"%s\"\n",
|
||||
zonename, filename, classname);
|
||||
}
|
||||
|
||||
CHECK(dns_zone_create(&zone, mctx));
|
||||
|
||||
@@ -694,39 +686,30 @@ load_zone(isc_mem_t *mctx, const char *zonename, const char *filename,
|
||||
origin = dns_fixedname_initname(&fixorigin);
|
||||
CHECK(dns_name_fromtext(origin, &buffer, dns_rootname, 0, NULL));
|
||||
CHECK(dns_zone_setorigin(zone, origin));
|
||||
dns_zone_setdbtype(zone, 1, (const char *const *)dbtype);
|
||||
if (strcmp(filename, "-") == 0) {
|
||||
CHECK(dns_zone_setstream(zone, stdin, fileformat,
|
||||
&dns_master_style_default));
|
||||
} else {
|
||||
CHECK(dns_zone_setfile(zone, filename, fileformat,
|
||||
&dns_master_style_default));
|
||||
}
|
||||
if (journal != NULL) {
|
||||
CHECK(dns_zone_setdbtype(zone, 1, (const char * const *) dbtype));
|
||||
CHECK(dns_zone_setfile(zone, filename, fileformat,
|
||||
&dns_master_style_default));
|
||||
if (journal != NULL)
|
||||
CHECK(dns_zone_setjournal(zone, journal));
|
||||
}
|
||||
|
||||
DE_CONST(classname, region.base);
|
||||
region.length = strlen(classname);
|
||||
CHECK(dns_rdataclass_fromtext(&rdclass, ®ion));
|
||||
|
||||
dns_zone_setclass(zone, rdclass);
|
||||
dns_zone_setoption(zone, zone_options, true);
|
||||
dns_zone_setoption(zone, zone_options, ISC_TRUE);
|
||||
dns_zone_setoption(zone, DNS_ZONEOPT_NOMERGE, nomerge);
|
||||
|
||||
dns_zone_setmaxttl(zone, maxttl);
|
||||
|
||||
if (docheckmx) {
|
||||
if (docheckmx)
|
||||
dns_zone_setcheckmx(zone, checkmx);
|
||||
}
|
||||
if (docheckns) {
|
||||
if (docheckns)
|
||||
dns_zone_setcheckns(zone, checkns);
|
||||
}
|
||||
if (dochecksrv) {
|
||||
if (dochecksrv)
|
||||
dns_zone_setchecksrv(zone, checksrv);
|
||||
}
|
||||
|
||||
CHECK(dns_zone_load(zone, false));
|
||||
CHECK(dns_zone_load(zone));
|
||||
|
||||
/*
|
||||
* When loading map files we can't catch oversize TTLs during
|
||||
@@ -741,10 +724,9 @@ load_zone(isc_mem_t *mctx, const char *zonename, const char *filename,
|
||||
zone = NULL;
|
||||
}
|
||||
|
||||
cleanup:
|
||||
if (zone != NULL) {
|
||||
cleanup:
|
||||
if (zone != NULL)
|
||||
dns_zone_detach(&zone);
|
||||
}
|
||||
return (result);
|
||||
}
|
||||
|
||||
@@ -752,39 +734,36 @@ cleanup:
|
||||
isc_result_t
|
||||
dump_zone(const char *zonename, dns_zone_t *zone, const char *filename,
|
||||
dns_masterformat_t fileformat, const dns_master_style_t *style,
|
||||
const uint32_t rawversion) {
|
||||
const isc_uint32_t rawversion)
|
||||
{
|
||||
isc_result_t result;
|
||||
FILE *output = stdout;
|
||||
const char *flags;
|
||||
|
||||
flags = (fileformat == dns_masterformat_text) ? "w" : "wb";
|
||||
flags = (fileformat == dns_masterformat_text) ? "w+" : "wb+";
|
||||
|
||||
if (debug) {
|
||||
if (filename != NULL && strcmp(filename, "-") != 0) {
|
||||
fprintf(stderr, "dumping \"%s\" to \"%s\"\n", zonename,
|
||||
filename);
|
||||
} else {
|
||||
if (filename != NULL && strcmp(filename, "-") != 0)
|
||||
fprintf(stderr, "dumping \"%s\" to \"%s\"\n",
|
||||
zonename, filename);
|
||||
else
|
||||
fprintf(stderr, "dumping \"%s\"\n", zonename);
|
||||
}
|
||||
}
|
||||
|
||||
if (filename != NULL && strcmp(filename, "-") != 0) {
|
||||
result = isc_stdio_open(filename, flags, &output);
|
||||
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
fprintf(stderr,
|
||||
"could not open output "
|
||||
"file \"%s\" for writing\n",
|
||||
filename);
|
||||
fprintf(stderr, "could not open output "
|
||||
"file \"%s\" for writing\n", filename);
|
||||
return (ISC_R_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
result = dns_zone_dumptostream(zone, output, fileformat, style,
|
||||
rawversion);
|
||||
if (output != stdout) {
|
||||
if (output != stdout)
|
||||
(void)isc_stdio_close(output);
|
||||
}
|
||||
|
||||
return (result);
|
||||
}
|
||||
@@ -798,7 +777,7 @@ InitSockets(void) {
|
||||
|
||||
wVersionRequested = MAKEWORD(2, 0);
|
||||
|
||||
err = WSAStartup(wVersionRequested, &wsaData);
|
||||
err = WSAStartup( wVersionRequested, &wsaData );
|
||||
if (err != 0) {
|
||||
fprintf(stderr, "WSAStartup() failed: %d\n", err);
|
||||
exit(1);
|
||||
@@ -809,4 +788,5 @@ void
|
||||
DestroySockets(void) {
|
||||
WSACleanup();
|
||||
}
|
||||
#endif /* ifdef _WIN32 */
|
||||
#endif
|
||||
|
||||
|
||||
@@ -9,14 +9,12 @@
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef CHECK_TOOL_H
|
||||
#define CHECK_TOOL_H
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include <isc/lang.h>
|
||||
#include <isc/stdio.h>
|
||||
#include <isc/types.h>
|
||||
@@ -38,23 +36,21 @@ load_zone(isc_mem_t *mctx, const char *zonename, const char *filename,
|
||||
isc_result_t
|
||||
dump_zone(const char *zonename, dns_zone_t *zone, const char *filename,
|
||||
dns_masterformat_t fileformat, const dns_master_style_t *style,
|
||||
const uint32_t rawversion);
|
||||
const isc_uint32_t rawversion);
|
||||
|
||||
#ifdef _WIN32
|
||||
void
|
||||
InitSockets(void);
|
||||
void
|
||||
DestroySockets(void);
|
||||
#endif /* ifdef _WIN32 */
|
||||
void InitSockets(void);
|
||||
void DestroySockets(void);
|
||||
#endif
|
||||
|
||||
extern int debug;
|
||||
extern const char *journal;
|
||||
extern bool nomerge;
|
||||
extern bool docheckmx;
|
||||
extern bool docheckns;
|
||||
extern bool dochecksrv;
|
||||
extern isc_boolean_t nomerge;
|
||||
extern isc_boolean_t docheckmx;
|
||||
extern isc_boolean_t docheckns;
|
||||
extern isc_boolean_t dochecksrv;
|
||||
extern dns_zoneopt_t zone_options;
|
||||
|
||||
ISC_LANG_ENDDECLS
|
||||
|
||||
#endif /* ifndef CHECK_TOOL_H */
|
||||
#endif
|
||||
|
||||
140
bin/check/named-checkconf.8
Normal file
140
bin/check/named-checkconf.8
Normal file
@@ -0,0 +1,140 @@
|
||||
.\" Copyright (C) 2000-2002, 2004, 2005, 2007, 2009, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\"
|
||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
||||
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
.\" file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
.\"
|
||||
.hy 0
|
||||
.ad l
|
||||
'\" t
|
||||
.\" Title: named-checkconf
|
||||
.\" Author:
|
||||
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
|
||||
.\" Date: 2014-01-10
|
||||
.\" Manual: BIND9
|
||||
.\" Source: ISC
|
||||
.\" Language: English
|
||||
.\"
|
||||
.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
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" 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
|
||||
.SH "SYNOPSIS"
|
||||
.HP \w'\fBnamed\-checkconf\fR\ 'u
|
||||
\fBnamed\-checkconf\fR [\fB\-hjlvz\fR] [\fB\-p\fR\ [\fB\-x\fR\ ]] [\fB\-t\ \fR\fB\fIdirectory\fR\fR] {filename}
|
||||
.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\&.
|
||||
.PP
|
||||
Note: files that
|
||||
\fBnamed\fR
|
||||
reads in separate parser contexts, such as
|
||||
rndc\&.key
|
||||
and
|
||||
bind\&.keys, 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\&.
|
||||
\fBnamed\-checkconf\fR
|
||||
can be run on these files explicitly, however\&.
|
||||
.SH "OPTIONS"
|
||||
.PP
|
||||
\-h
|
||||
.RS 4
|
||||
Print the usage summary and exit\&.
|
||||
.RE
|
||||
.PP
|
||||
\-j
|
||||
.RS 4
|
||||
When loading a zonefile read the journal if it exists\&.
|
||||
.RE
|
||||
.PP
|
||||
\-l
|
||||
.RS 4
|
||||
List all the configured zones\&. Each line of output contains the zone name, class (e\&.g\&. IN), view, and type (e\&.g\&. master or slave)\&.
|
||||
.RE
|
||||
.PP
|
||||
\-p
|
||||
.RS 4
|
||||
Print out the
|
||||
named\&.conf
|
||||
and included files in canonical form if no errors were detected\&. See also the
|
||||
\fB\-x\fR
|
||||
option\&.
|
||||
.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
|
||||
\fBnamed\fR\&.
|
||||
.RE
|
||||
.PP
|
||||
\-v
|
||||
.RS 4
|
||||
Print the version of the
|
||||
\fBnamed\-checkconf\fR
|
||||
program and exit\&.
|
||||
.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\&.
|
||||
.RE
|
||||
.PP
|
||||
\-z
|
||||
.RS 4
|
||||
Perform a test load of all master zones found in
|
||||
named\&.conf\&.
|
||||
.RE
|
||||
.PP
|
||||
filename
|
||||
.RS 4
|
||||
The name of the configuration file to be checked\&. If not specified, it defaults to
|
||||
/etc/named\&.conf\&.
|
||||
.RE
|
||||
.SH "RETURN VALUES"
|
||||
.PP
|
||||
\fBnamed\-checkconf\fR
|
||||
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\&.
|
||||
.SH "AUTHOR"
|
||||
.PP
|
||||
\fBInternet Systems Consortium, Inc\&.\fR
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
Copyright \(co 2000-2002, 2004, 2005, 2007, 2009, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.br
|
||||
@@ -9,14 +9,15 @@
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <config.h>
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <isc/attributes.h>
|
||||
#include <isc/commandline.h>
|
||||
#include <isc/dir.h>
|
||||
#include <isc/hash.h>
|
||||
@@ -27,6 +28,10 @@
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <isccfg/namedconf.h>
|
||||
|
||||
#include <bind9/check.h>
|
||||
|
||||
#include <dns/db.h>
|
||||
#include <dns/fixedname.h>
|
||||
#include <dns/log.h>
|
||||
@@ -36,36 +41,27 @@
|
||||
#include <dns/rootns.h>
|
||||
#include <dns/zone.h>
|
||||
|
||||
#include <isccfg/grammar.h>
|
||||
#include <isccfg/namedconf.h>
|
||||
|
||||
#include <bind9/check.h>
|
||||
|
||||
#include "check-tool.h"
|
||||
|
||||
static const char *program = "named-checkconf";
|
||||
|
||||
static bool loadplugins = true;
|
||||
|
||||
isc_log_t *logc = NULL;
|
||||
|
||||
#define CHECK(r) \
|
||||
do { \
|
||||
result = (r); \
|
||||
#define CHECK(r)\
|
||||
do { \
|
||||
result = (r); \
|
||||
if (result != ISC_R_SUCCESS) \
|
||||
goto cleanup; \
|
||||
goto cleanup; \
|
||||
} while (0)
|
||||
|
||||
/*% usage */
|
||||
ISC_NORETURN static void
|
||||
usage(void);
|
||||
ISC_PLATFORM_NORETURN_PRE static void
|
||||
usage(void) ISC_PLATFORM_NORETURN_POST;
|
||||
|
||||
static void
|
||||
usage(void) {
|
||||
fprintf(stderr,
|
||||
"usage: %s [-chijlvz] [-p [-x]] [-t directory] "
|
||||
"[named.conf]\n",
|
||||
program);
|
||||
fprintf(stderr, "usage: %s [-hjlvz] [-p [-x]] [-t directory] "
|
||||
"[named.conf]\n", program);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@@ -87,28 +83,26 @@ directory_callback(const char *clausename, const cfg_obj_t *obj, void *arg) {
|
||||
result = isc_dir_chdir(directory);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
cfg_obj_log(obj, logc, ISC_LOG_ERROR,
|
||||
"change directory to '%s' failed: %s\n", directory,
|
||||
isc_result_totext(result));
|
||||
"change directory to '%s' failed: %s\n",
|
||||
directory, isc_result_totext(result));
|
||||
return (result);
|
||||
}
|
||||
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static bool
|
||||
static isc_boolean_t
|
||||
get_maps(const cfg_obj_t **maps, const char *name, const cfg_obj_t **obj) {
|
||||
int i;
|
||||
for (i = 0;; i++) {
|
||||
if (maps[i] == NULL) {
|
||||
return (false);
|
||||
}
|
||||
if (cfg_map_get(maps[i], name, obj) == ISC_R_SUCCESS) {
|
||||
return (true);
|
||||
}
|
||||
if (maps[i] == NULL)
|
||||
return (ISC_FALSE);
|
||||
if (cfg_map_get(maps[i], name, obj) == ISC_R_SUCCESS)
|
||||
return (ISC_TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
static bool
|
||||
static isc_boolean_t
|
||||
get_checknames(const cfg_obj_t **maps, const cfg_obj_t **obj) {
|
||||
const cfg_listelt_t *element;
|
||||
const cfg_obj_t *checknames;
|
||||
@@ -118,31 +112,30 @@ get_checknames(const cfg_obj_t **maps, const cfg_obj_t **obj) {
|
||||
int i;
|
||||
|
||||
for (i = 0;; i++) {
|
||||
if (maps[i] == NULL) {
|
||||
return (false);
|
||||
}
|
||||
if (maps[i] == NULL)
|
||||
return (ISC_FALSE);
|
||||
checknames = NULL;
|
||||
result = cfg_map_get(maps[i], "check-names", &checknames);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS)
|
||||
continue;
|
||||
}
|
||||
if (checknames != NULL && !cfg_obj_islist(checknames)) {
|
||||
*obj = checknames;
|
||||
return (true);
|
||||
return (ISC_TRUE);
|
||||
}
|
||||
for (element = cfg_list_first(checknames); element != NULL;
|
||||
element = cfg_list_next(element))
|
||||
{
|
||||
for (element = cfg_list_first(checknames);
|
||||
element != NULL;
|
||||
element = cfg_list_next(element)) {
|
||||
value = cfg_listelt_value(element);
|
||||
type = cfg_tuple_get(value, "type");
|
||||
if ((strcasecmp(cfg_obj_asstring(type), "primary") !=
|
||||
0) &&
|
||||
(strcasecmp(cfg_obj_asstring(type), "master") != 0))
|
||||
if ((strcasecmp(cfg_obj_asstring(type),
|
||||
"primary") != 0) &&
|
||||
(strcasecmp(cfg_obj_asstring(type),
|
||||
"master") != 0))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
*obj = cfg_tuple_get(value, "mode");
|
||||
return (true);
|
||||
return (ISC_TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -154,21 +147,18 @@ configure_hint(const char *zfile, const char *zclass, isc_mem_t *mctx) {
|
||||
dns_rdataclass_t rdclass;
|
||||
isc_textregion_t r;
|
||||
|
||||
if (zfile == NULL) {
|
||||
if (zfile == NULL)
|
||||
return (ISC_R_FAILURE);
|
||||
}
|
||||
|
||||
DE_CONST(zclass, r.base);
|
||||
r.length = strlen(zclass);
|
||||
result = dns_rdataclass_fromtext(&rdclass, &r);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
}
|
||||
|
||||
result = dns_rootns_create(mctx, rdclass, zfile, &db);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
}
|
||||
|
||||
dns_db_detach(&db);
|
||||
return (ISC_R_SUCCESS);
|
||||
@@ -176,16 +166,17 @@ configure_hint(const char *zfile, const char *zclass, isc_mem_t *mctx) {
|
||||
|
||||
/*% configure the zone */
|
||||
static isc_result_t
|
||||
configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig,
|
||||
const cfg_obj_t *vconfig, const cfg_obj_t *config,
|
||||
isc_mem_t *mctx, bool list) {
|
||||
configure_zone(const char *vclass, const char *view,
|
||||
const cfg_obj_t *zconfig, const cfg_obj_t *vconfig,
|
||||
const cfg_obj_t *config, isc_mem_t *mctx, isc_boolean_t list)
|
||||
{
|
||||
int i = 0;
|
||||
isc_result_t result;
|
||||
const char *zclass;
|
||||
const char *zname;
|
||||
const char *zfile = NULL;
|
||||
const cfg_obj_t *maps[4];
|
||||
const cfg_obj_t *primariesobj = NULL;
|
||||
const cfg_obj_t *mastersobj = NULL;
|
||||
const cfg_obj_t *inviewobj = NULL;
|
||||
const cfg_obj_t *zoptions = NULL;
|
||||
const cfg_obj_t *classobj = NULL;
|
||||
@@ -202,22 +193,19 @@ configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig,
|
||||
|
||||
zname = cfg_obj_asstring(cfg_tuple_get(zconfig, "name"));
|
||||
classobj = cfg_tuple_get(zconfig, "class");
|
||||
if (!cfg_obj_isstring(classobj)) {
|
||||
if (!cfg_obj_isstring(classobj))
|
||||
zclass = vclass;
|
||||
} else {
|
||||
else
|
||||
zclass = cfg_obj_asstring(classobj);
|
||||
}
|
||||
|
||||
zoptions = cfg_tuple_get(zconfig, "options");
|
||||
maps[i++] = zoptions;
|
||||
if (vconfig != NULL) {
|
||||
if (vconfig != NULL)
|
||||
maps[i++] = cfg_tuple_get(vconfig, "options");
|
||||
}
|
||||
if (config != NULL) {
|
||||
cfg_map_get(config, "options", &obj);
|
||||
if (obj != NULL) {
|
||||
if (obj != NULL)
|
||||
maps[i++] = obj;
|
||||
}
|
||||
}
|
||||
maps[i] = NULL;
|
||||
|
||||
@@ -226,14 +214,12 @@ configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig,
|
||||
const char *inview = cfg_obj_asstring(inviewobj);
|
||||
printf("%s %s %s in-view %s\n", zname, zclass, view, inview);
|
||||
}
|
||||
if (inviewobj != NULL) {
|
||||
if (inviewobj != NULL)
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
cfg_map_get(zoptions, "type", &typeobj);
|
||||
if (typeobj == NULL) {
|
||||
if (typeobj == NULL)
|
||||
return (ISC_R_FAILURE);
|
||||
}
|
||||
|
||||
if (list) {
|
||||
const char *ztype = cfg_obj_asstring(typeobj);
|
||||
@@ -245,21 +231,18 @@ configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig,
|
||||
* Skip checks when using an alternate data source.
|
||||
*/
|
||||
cfg_map_get(zoptions, "database", &dbobj);
|
||||
if (dbobj != NULL && strcmp("rbt", cfg_obj_asstring(dbobj)) != 0 &&
|
||||
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, "dlz", &dlzobj);
|
||||
if (dlzobj != NULL) {
|
||||
if (dlzobj != NULL)
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
cfg_map_get(zoptions, "file", &fileobj);
|
||||
if (fileobj != NULL) {
|
||||
if (fileobj != NULL)
|
||||
zfile = cfg_obj_asstring(fileobj);
|
||||
}
|
||||
|
||||
/*
|
||||
* Check hints files for hint zones.
|
||||
@@ -279,19 +262,13 @@ configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig,
|
||||
* Is the redirect zone configured as a slave?
|
||||
*/
|
||||
if (strcasecmp(cfg_obj_asstring(typeobj), "redirect") == 0) {
|
||||
cfg_map_get(zoptions, "primaries", &primariesobj);
|
||||
if (primariesobj == NULL) {
|
||||
cfg_map_get(zoptions, "masters", &primariesobj);
|
||||
}
|
||||
|
||||
if (primariesobj != NULL) {
|
||||
cfg_map_get(zoptions, "masters", &mastersobj);
|
||||
if (mastersobj != NULL)
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
}
|
||||
|
||||
if (zfile == NULL) {
|
||||
if (zfile == NULL)
|
||||
return (ISC_R_FAILURE);
|
||||
}
|
||||
|
||||
obj = NULL;
|
||||
if (get_maps(maps, "check-dup-records", &obj)) {
|
||||
@@ -304,10 +281,8 @@ configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig,
|
||||
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
|
||||
zone_options &= ~DNS_ZONEOPT_CHECKDUPRR;
|
||||
zone_options &= ~DNS_ZONEOPT_CHECKDUPRRFAIL;
|
||||
} else {
|
||||
} else
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
} else {
|
||||
zone_options |= DNS_ZONEOPT_CHECKDUPRR;
|
||||
zone_options &= ~DNS_ZONEOPT_CHECKDUPRRFAIL;
|
||||
@@ -324,10 +299,8 @@ configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig,
|
||||
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
|
||||
zone_options &= ~DNS_ZONEOPT_CHECKMX;
|
||||
zone_options &= ~DNS_ZONEOPT_CHECKMXFAIL;
|
||||
} else {
|
||||
} else
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
} else {
|
||||
zone_options |= DNS_ZONEOPT_CHECKMX;
|
||||
zone_options &= ~DNS_ZONEOPT_CHECKMXFAIL;
|
||||
@@ -335,14 +308,12 @@ configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig,
|
||||
|
||||
obj = NULL;
|
||||
if (get_maps(maps, "check-integrity", &obj)) {
|
||||
if (cfg_obj_asboolean(obj)) {
|
||||
if (cfg_obj_asboolean(obj))
|
||||
zone_options |= DNS_ZONEOPT_CHECKINTEGRITY;
|
||||
} else {
|
||||
else
|
||||
zone_options &= ~DNS_ZONEOPT_CHECKINTEGRITY;
|
||||
}
|
||||
} else {
|
||||
} else
|
||||
zone_options |= DNS_ZONEOPT_CHECKINTEGRITY;
|
||||
}
|
||||
|
||||
obj = NULL;
|
||||
if (get_maps(maps, "check-mx-cname", &obj)) {
|
||||
@@ -355,10 +326,8 @@ configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig,
|
||||
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
|
||||
zone_options |= DNS_ZONEOPT_WARNMXCNAME;
|
||||
zone_options |= DNS_ZONEOPT_IGNOREMXCNAME;
|
||||
} else {
|
||||
} else
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
} else {
|
||||
zone_options |= DNS_ZONEOPT_WARNMXCNAME;
|
||||
zone_options &= ~DNS_ZONEOPT_IGNOREMXCNAME;
|
||||
@@ -375,10 +344,8 @@ configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig,
|
||||
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
|
||||
zone_options |= DNS_ZONEOPT_WARNSRVCNAME;
|
||||
zone_options |= DNS_ZONEOPT_IGNORESRVCNAME;
|
||||
} else {
|
||||
} else
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
} else {
|
||||
zone_options |= DNS_ZONEOPT_WARNSRVCNAME;
|
||||
zone_options &= ~DNS_ZONEOPT_IGNORESRVCNAME;
|
||||
@@ -386,11 +353,10 @@ configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig,
|
||||
|
||||
obj = NULL;
|
||||
if (get_maps(maps, "check-sibling", &obj)) {
|
||||
if (cfg_obj_asboolean(obj)) {
|
||||
if (cfg_obj_asboolean(obj))
|
||||
zone_options |= DNS_ZONEOPT_CHECKSIBLING;
|
||||
} else {
|
||||
else
|
||||
zone_options &= ~DNS_ZONEOPT_CHECKSIBLING;
|
||||
}
|
||||
}
|
||||
|
||||
obj = NULL;
|
||||
@@ -399,10 +365,8 @@ configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig,
|
||||
zone_options |= DNS_ZONEOPT_CHECKSPF;
|
||||
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
|
||||
zone_options &= ~DNS_ZONEOPT_CHECKSPF;
|
||||
} else {
|
||||
} else
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
} else {
|
||||
zone_options |= DNS_ZONEOPT_CHECKSPF;
|
||||
}
|
||||
@@ -418,50 +382,46 @@ configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig,
|
||||
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
|
||||
zone_options &= ~DNS_ZONEOPT_CHECKNAMES;
|
||||
zone_options &= ~DNS_ZONEOPT_CHECKNAMESFAIL;
|
||||
} else {
|
||||
} else
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
} else {
|
||||
zone_options |= DNS_ZONEOPT_CHECKNAMES;
|
||||
zone_options |= DNS_ZONEOPT_CHECKNAMESFAIL;
|
||||
zone_options |= DNS_ZONEOPT_CHECKNAMES;
|
||||
zone_options |= DNS_ZONEOPT_CHECKNAMESFAIL;
|
||||
}
|
||||
|
||||
masterformat = dns_masterformat_text;
|
||||
fmtobj = NULL;
|
||||
if (get_maps(maps, "masterfile-format", &fmtobj)) {
|
||||
const char *masterformatstr = cfg_obj_asstring(fmtobj);
|
||||
if (strcasecmp(masterformatstr, "text") == 0) {
|
||||
if (strcasecmp(masterformatstr, "text") == 0)
|
||||
masterformat = dns_masterformat_text;
|
||||
} else if (strcasecmp(masterformatstr, "raw") == 0) {
|
||||
else if (strcasecmp(masterformatstr, "raw") == 0)
|
||||
masterformat = dns_masterformat_raw;
|
||||
} else if (strcasecmp(masterformatstr, "map") == 0) {
|
||||
else if (strcasecmp(masterformatstr, "map") == 0)
|
||||
masterformat = dns_masterformat_map;
|
||||
} else {
|
||||
else
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
obj = NULL;
|
||||
if (get_maps(maps, "max-zone-ttl", &obj)) {
|
||||
maxttl = cfg_obj_asduration(obj);
|
||||
maxttl = cfg_obj_asuint32(obj);
|
||||
zone_options |= DNS_ZONEOPT_CHECKTTL;
|
||||
}
|
||||
|
||||
result = load_zone(mctx, zname, zfile, masterformat, zclass, maxttl,
|
||||
NULL);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
result = load_zone(mctx, zname, zfile, masterformat,
|
||||
zclass, maxttl, NULL);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fprintf(stderr, "%s/%s/%s: %s\n", view, zname, zclass,
|
||||
dns_result_totext(result));
|
||||
}
|
||||
return (result);
|
||||
}
|
||||
|
||||
/*% configure a view */
|
||||
static isc_result_t
|
||||
configure_view(const char *vclass, const char *view, const cfg_obj_t *config,
|
||||
const cfg_obj_t *vconfig, isc_mem_t *mctx, bool list) {
|
||||
const cfg_obj_t *vconfig, isc_mem_t *mctx, isc_boolean_t list)
|
||||
{
|
||||
const cfg_listelt_t *element;
|
||||
const cfg_obj_t *voptions;
|
||||
const cfg_obj_t *zonelist;
|
||||
@@ -469,33 +429,32 @@ configure_view(const char *vclass, const char *view, const cfg_obj_t *config,
|
||||
isc_result_t tresult;
|
||||
|
||||
voptions = NULL;
|
||||
if (vconfig != NULL) {
|
||||
if (vconfig != NULL)
|
||||
voptions = cfg_tuple_get(vconfig, "options");
|
||||
}
|
||||
|
||||
zonelist = NULL;
|
||||
if (voptions != NULL) {
|
||||
if (voptions != NULL)
|
||||
(void)cfg_map_get(voptions, "zone", &zonelist);
|
||||
} else {
|
||||
else
|
||||
(void)cfg_map_get(config, "zone", &zonelist);
|
||||
}
|
||||
|
||||
for (element = cfg_list_first(zonelist); element != NULL;
|
||||
for (element = cfg_list_first(zonelist);
|
||||
element != NULL;
|
||||
element = cfg_list_next(element))
|
||||
{
|
||||
const cfg_obj_t *zconfig = cfg_listelt_value(element);
|
||||
tresult = configure_zone(vclass, view, zconfig, vconfig, config,
|
||||
mctx, list);
|
||||
if (tresult != ISC_R_SUCCESS) {
|
||||
tresult = configure_zone(vclass, view, zconfig, vconfig,
|
||||
config, mctx, list);
|
||||
if (tresult != ISC_R_SUCCESS)
|
||||
result = tresult;
|
||||
}
|
||||
}
|
||||
return (result);
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
config_getclass(const cfg_obj_t *classobj, dns_rdataclass_t defclass,
|
||||
dns_rdataclass_t *classp) {
|
||||
dns_rdataclass_t *classp)
|
||||
{
|
||||
isc_textregion_t r;
|
||||
|
||||
if (!cfg_obj_isstring(classobj)) {
|
||||
@@ -510,7 +469,8 @@ config_getclass(const cfg_obj_t *classobj, dns_rdataclass_t defclass,
|
||||
/*% load zones from the configuration */
|
||||
static isc_result_t
|
||||
load_zones_fromconfig(const cfg_obj_t *config, isc_mem_t *mctx,
|
||||
bool list_zones) {
|
||||
isc_boolean_t list_zones)
|
||||
{
|
||||
const cfg_listelt_t *element;
|
||||
const cfg_obj_t *views;
|
||||
const cfg_obj_t *vconfig;
|
||||
@@ -520,7 +480,8 @@ load_zones_fromconfig(const cfg_obj_t *config, isc_mem_t *mctx,
|
||||
views = NULL;
|
||||
|
||||
(void)cfg_map_get(config, "view", &views);
|
||||
for (element = cfg_list_first(views); element != NULL;
|
||||
for (element = cfg_list_first(views);
|
||||
element != NULL;
|
||||
element = cfg_list_next(element))
|
||||
{
|
||||
const cfg_obj_t *classobj;
|
||||
@@ -529,36 +490,28 @@ load_zones_fromconfig(const cfg_obj_t *config, isc_mem_t *mctx,
|
||||
char buf[sizeof("CLASS65535")];
|
||||
|
||||
vconfig = cfg_listelt_value(element);
|
||||
if (vconfig == NULL) {
|
||||
if (vconfig == NULL)
|
||||
continue;
|
||||
}
|
||||
|
||||
classobj = cfg_tuple_get(vconfig, "class");
|
||||
tresult = config_getclass(classobj, dns_rdataclass_in,
|
||||
&viewclass);
|
||||
if (tresult != ISC_R_SUCCESS) {
|
||||
CHECK(tresult);
|
||||
}
|
||||
|
||||
if (dns_rdataclass_ismeta(viewclass)) {
|
||||
CHECK(config_getclass(classobj, dns_rdataclass_in,
|
||||
&viewclass));
|
||||
if (dns_rdataclass_ismeta(viewclass))
|
||||
CHECK(ISC_R_FAILURE);
|
||||
}
|
||||
|
||||
dns_rdataclass_format(viewclass, buf, sizeof(buf));
|
||||
vname = cfg_obj_asstring(cfg_tuple_get(vconfig, "name"));
|
||||
tresult = configure_view(buf, vname, config, vconfig, mctx,
|
||||
list_zones);
|
||||
if (tresult != ISC_R_SUCCESS) {
|
||||
if (tresult != ISC_R_SUCCESS)
|
||||
result = tresult;
|
||||
}
|
||||
}
|
||||
|
||||
if (views == NULL) {
|
||||
tresult = configure_view("IN", "_default", config, NULL, mctx,
|
||||
list_zones);
|
||||
if (tresult != ISC_R_SUCCESS) {
|
||||
if (tresult != ISC_R_SUCCESS)
|
||||
result = tresult;
|
||||
}
|
||||
}
|
||||
|
||||
cleanup:
|
||||
@@ -584,68 +537,51 @@ main(int argc, char **argv) {
|
||||
isc_mem_t *mctx = NULL;
|
||||
isc_result_t result;
|
||||
int exit_status = 0;
|
||||
bool load_zones = false;
|
||||
bool list_zones = false;
|
||||
bool print = false;
|
||||
bool nodeprecate = false;
|
||||
isc_boolean_t load_zones = ISC_FALSE;
|
||||
isc_boolean_t list_zones = ISC_FALSE;
|
||||
isc_boolean_t print = ISC_FALSE;
|
||||
unsigned int flags = 0;
|
||||
|
||||
isc_commandline_errprint = false;
|
||||
isc_commandline_errprint = ISC_FALSE;
|
||||
|
||||
/*
|
||||
* Process memory debugging argument first.
|
||||
*/
|
||||
#define CMDLINE_FLAGS "cdhijlm:t:pvxz"
|
||||
#define CMDLINE_FLAGS "dhjlm: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) {
|
||||
if (strcasecmp(isc_commandline_argument, "size") == 0)
|
||||
isc_mem_debugging |= ISC_MEM_DEBUGSIZE;
|
||||
}
|
||||
if (strcasecmp(isc_commandline_argument, "mctx") == 0) {
|
||||
if (strcasecmp(isc_commandline_argument, "mctx") == 0)
|
||||
isc_mem_debugging |= ISC_MEM_DEBUGCTX;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
isc_commandline_reset = true;
|
||||
isc_commandline_reset = ISC_TRUE;
|
||||
|
||||
isc_mem_create(&mctx);
|
||||
RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
|
||||
|
||||
while ((c = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != EOF) {
|
||||
switch (c) {
|
||||
case 'c':
|
||||
loadplugins = false;
|
||||
break;
|
||||
|
||||
case 'd':
|
||||
debug++;
|
||||
break;
|
||||
|
||||
case 'i':
|
||||
nodeprecate = true;
|
||||
break;
|
||||
|
||||
case 'j':
|
||||
nomerge = false;
|
||||
nomerge = ISC_FALSE;
|
||||
break;
|
||||
|
||||
case 'l':
|
||||
list_zones = true;
|
||||
list_zones = ISC_TRUE;
|
||||
break;
|
||||
|
||||
case 'm':
|
||||
@@ -661,11 +597,11 @@ main(int argc, char **argv) {
|
||||
break;
|
||||
|
||||
case 'p':
|
||||
print = true;
|
||||
print = ISC_TRUE;
|
||||
break;
|
||||
|
||||
case 'v':
|
||||
printf("%s\n", PACKAGE_VERSION);
|
||||
printf(VERSION "\n");
|
||||
exit(0);
|
||||
|
||||
case 'x':
|
||||
@@ -673,24 +609,23 @@ main(int argc, char **argv) {
|
||||
break;
|
||||
|
||||
case 'z':
|
||||
load_zones = true;
|
||||
docheckmx = false;
|
||||
docheckns = false;
|
||||
dochecksrv = false;
|
||||
load_zones = ISC_TRUE;
|
||||
docheckmx = ISC_FALSE;
|
||||
docheckns = ISC_FALSE;
|
||||
dochecksrv = ISC_FALSE;
|
||||
break;
|
||||
|
||||
case '?':
|
||||
if (isc_commandline_option != '?') {
|
||||
if (isc_commandline_option != '?')
|
||||
fprintf(stderr, "%s: invalid argument -%c\n",
|
||||
program, isc_commandline_option);
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
/* FALLTHROUGH */
|
||||
case 'h':
|
||||
usage();
|
||||
|
||||
default:
|
||||
fprintf(stderr, "%s: unhandled option -%c\n", program,
|
||||
isc_commandline_option);
|
||||
fprintf(stderr, "%s: unhandled option -%c\n",
|
||||
program, isc_commandline_option);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
@@ -704,19 +639,16 @@ main(int argc, char **argv) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (isc_commandline_index + 1 < argc) {
|
||||
if (isc_commandline_index + 1 < argc)
|
||||
usage();
|
||||
}
|
||||
if (argv[isc_commandline_index] != NULL) {
|
||||
if (argv[isc_commandline_index] != NULL)
|
||||
conffile = argv[isc_commandline_index];
|
||||
}
|
||||
if (conffile == NULL || conffile[0] == '\0') {
|
||||
if (conffile == NULL || conffile[0] == '\0')
|
||||
conffile = NAMED_CONFFILE;
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
InitSockets();
|
||||
#endif /* ifdef _WIN32 */
|
||||
#endif
|
||||
|
||||
RUNTIME_CHECK(setup_logging(mctx, stdout, &logc) == ISC_R_SUCCESS);
|
||||
|
||||
@@ -724,43 +656,37 @@ main(int argc, char **argv) {
|
||||
|
||||
RUNTIME_CHECK(cfg_parser_create(mctx, logc, &parser) == ISC_R_SUCCESS);
|
||||
|
||||
if (nodeprecate) {
|
||||
cfg_parser_setflags(parser, CFG_PCTX_NODEPRECATED, true);
|
||||
}
|
||||
cfg_parser_setcallback(parser, directory_callback, NULL);
|
||||
|
||||
if (cfg_parse_file(parser, conffile, &cfg_type_namedconf, &config) !=
|
||||
ISC_R_SUCCESS)
|
||||
{
|
||||
exit(1);
|
||||
}
|
||||
|
||||
result = bind9_check_namedconf(config, loadplugins, logc, mctx);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
result = bind9_check_namedconf(config, logc, mctx);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
exit_status = 1;
|
||||
}
|
||||
|
||||
if (result == ISC_R_SUCCESS && (load_zones || list_zones)) {
|
||||
result = load_zones_fromconfig(config, mctx, list_zones);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS)
|
||||
exit_status = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (print && exit_status == 0) {
|
||||
if (print && exit_status == 0)
|
||||
cfg_printx(config, flags, output, NULL);
|
||||
}
|
||||
cfg_obj_destroy(parser, &config);
|
||||
|
||||
cfg_parser_destroy(&parser);
|
||||
|
||||
dns_name_destroy();
|
||||
|
||||
isc_log_destroy(&logc);
|
||||
|
||||
isc_mem_destroy(&mctx);
|
||||
|
||||
#ifdef _WIN32
|
||||
DestroySockets();
|
||||
#endif /* ifdef _WIN32 */
|
||||
#endif
|
||||
|
||||
return (exit_status);
|
||||
}
|
||||
|
||||
207
bin/check/named-checkconf.docbook
Normal file
207
bin/check/named-checkconf.docbook
Normal file
@@ -0,0 +1,207 @@
|
||||
<!DOCTYPE book [
|
||||
<!ENTITY mdash "—">]>
|
||||
<!--
|
||||
- Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
-
|
||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
-
|
||||
- See the COPYRIGHT file distributed with this work for additional
|
||||
- information regarding copyright ownership.
|
||||
-->
|
||||
|
||||
<!-- Converted by db4-upgrade version 1.0 -->
|
||||
<refentry xmlns:db="http://docbook.org/ns/docbook" version="5.0" xml:id="man.named-checkconf">
|
||||
<info>
|
||||
<date>2014-01-10</date>
|
||||
</info>
|
||||
<refentryinfo>
|
||||
<corpname>ISC</corpname>
|
||||
<corpauthor>Internet Systems Consortium, Inc.</corpauthor>
|
||||
</refentryinfo>
|
||||
|
||||
<refmeta>
|
||||
<refentrytitle><application>named-checkconf</application></refentrytitle>
|
||||
<manvolnum>8</manvolnum>
|
||||
<refmiscinfo>BIND9</refmiscinfo>
|
||||
</refmeta>
|
||||
|
||||
<docinfo>
|
||||
<copyright>
|
||||
<year>2000</year>
|
||||
<year>2001</year>
|
||||
<year>2002</year>
|
||||
<year>2004</year>
|
||||
<year>2005</year>
|
||||
<year>2007</year>
|
||||
<year>2009</year>
|
||||
<year>2014</year>
|
||||
<year>2015</year>
|
||||
<year>2016</year>
|
||||
<year>2018</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
<refnamediv>
|
||||
<refname><application>named-checkconf</application></refname>
|
||||
<refpurpose>named configuration file syntax checking tool</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis sepchar=" ">
|
||||
<command>named-checkconf</command>
|
||||
<arg choice="opt" rep="norepeat"><option>-hjlvz</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-p</option>
|
||||
<arg choice="opt" rep="norepeat"><option>-x</option>
|
||||
</arg></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-t <replaceable class="parameter">directory</replaceable></option></arg>
|
||||
<arg choice="req" rep="norepeat">filename</arg>
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
|
||||
<refsection><info><title>DESCRIPTION</title></info>
|
||||
|
||||
<para><command>named-checkconf</command>
|
||||
checks the syntax, but not the semantics, of a
|
||||
<command>named</command> configuration file. The file is parsed
|
||||
and checked for syntax errors, along with all files included by it.
|
||||
If no file is specified, <filename>/etc/named.conf</filename> is read
|
||||
by default.
|
||||
</para>
|
||||
<para>
|
||||
Note: files that <command>named</command> reads in separate
|
||||
parser contexts, such as <filename>rndc.key</filename> and
|
||||
<filename>bind.keys</filename>, are not automatically read
|
||||
by <command>named-checkconf</command>. Configuration
|
||||
errors in these files may cause <command>named</command> to
|
||||
fail to run, even if <command>named-checkconf</command> was
|
||||
successful. <command>named-checkconf</command> can be run
|
||||
on these files explicitly, however.
|
||||
</para>
|
||||
</refsection>
|
||||
|
||||
<refsection><info><title>OPTIONS</title></info>
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>-h</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Print the usage summary and exit.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-j</term>
|
||||
<listitem>
|
||||
<para>
|
||||
When loading a zonefile read the journal if it exists.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-l</term>
|
||||
<listitem>
|
||||
<para>
|
||||
List all the configured zones. Each line of output
|
||||
contains the zone name, class (e.g. IN), view, and type
|
||||
(e.g. master or slave).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-p</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Print out the <filename>named.conf</filename> and included files
|
||||
in canonical form if no errors were detected.
|
||||
See also the <option>-x</option> option.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-t <replaceable class="parameter">directory</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Chroot to <filename>directory</filename> so that include
|
||||
directives in the configuration file are processed as if
|
||||
run by a similarly chrooted <command>named</command>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-v</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Print the version of the <command>named-checkconf</command>
|
||||
program and exit.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-x</term>
|
||||
<listitem>
|
||||
<para>
|
||||
When printing the configuration files in canonical
|
||||
form, obscure shared secrets by replacing them with
|
||||
strings of question marks ('?'). This allows the
|
||||
contents of <filename>named.conf</filename> and related
|
||||
files to be shared — for example, when submitting
|
||||
bug reports — without compromising private data.
|
||||
This option cannot be used without <option>-p</option>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-z</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Perform a test load of all master zones found in
|
||||
<filename>named.conf</filename>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>filename</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The name of the configuration file to be checked. If not
|
||||
specified, it defaults to <filename>/etc/named.conf</filename>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
|
||||
</refsection>
|
||||
|
||||
<refsection><info><title>RETURN VALUES</title></info>
|
||||
|
||||
<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>
|
||||
|
||||
<para><citerefentry>
|
||||
<refentrytitle>named</refentrytitle><manvolnum>8</manvolnum>
|
||||
</citerefentry>,
|
||||
<citerefentry>
|
||||
<refentrytitle>named-checkzone</refentrytitle><manvolnum>8</manvolnum>
|
||||
</citerefentry>,
|
||||
<citetitle>BIND 9 Administrator Reference Manual</citetitle>.
|
||||
</para>
|
||||
</refsection>
|
||||
</refentry>
|
||||
166
bin/check/named-checkconf.html
Normal file
166
bin/check/named-checkconf.html
Normal file
@@ -0,0 +1,166 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--
|
||||
- Copyright (C) 2000-2002, 2004, 2005, 2007, 2009, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
-
|
||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
-->
|
||||
<html lang="en">
|
||||
<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">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry">
|
||||
<a name="man.named-checkconf"></a><div class="titlepage"></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="refnamediv">
|
||||
<h2>Name</h2>
|
||||
<p>
|
||||
<span class="application">named-checkconf</span>
|
||||
— named configuration file syntax checking tool
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="refsynopsisdiv">
|
||||
<h2>Synopsis</h2>
|
||||
<div class="cmdsynopsis"><p>
|
||||
<code class="command">named-checkconf</code>
|
||||
[<code class="option">-hjlvz</code>]
|
||||
[<code class="option">-p</code>
|
||||
[<code class="option">-x</code>
|
||||
]]
|
||||
[<code class="option">-t <em class="replaceable"><code>directory</code></em></code>]
|
||||
{filename}
|
||||
</p></div>
|
||||
</div>
|
||||
|
||||
<div class="refsection">
|
||||
<a name="id-1.7"></a><h2>DESCRIPTION</h2>
|
||||
|
||||
<p><span class="command"><strong>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
|
||||
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
|
||||
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
|
||||
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">
|
||||
<dt><span class="term">-h</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Print the usage summary and exit.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-j</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
When loading a zonefile read the journal if it exists.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-l</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
List all the configured zones. Each line of output
|
||||
contains the zone name, class (e.g. IN), view, and type
|
||||
(e.g. master or slave).
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-p</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Print out the <code class="filename">named.conf</code> and included files
|
||||
in canonical form if no errors were detected.
|
||||
See also the <code class="option">-x</code> option.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-t <em class="replaceable"><code>directory</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Chroot to <code class="filename">directory</code> so that include
|
||||
directives in the configuration file are processed as if
|
||||
run by a similarly chrooted <span class="command"><strong>named</strong></span>.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-v</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Print the version of the <span class="command"><strong>named-checkconf</strong></span>
|
||||
program and exit.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-x</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
When printing the configuration files in canonical
|
||||
form, obscure shared secrets by replacing them with
|
||||
strings of question marks ('?'). This allows the
|
||||
contents of <code class="filename">named.conf</code> and related
|
||||
files to be shared — for example, when submitting
|
||||
bug reports — without compromising private data.
|
||||
This option cannot be used without <code class="option">-p</code>.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-z</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Perform a test load of all master zones found in
|
||||
<code class="filename">named.conf</code>.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">filename</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
The name of the configuration file to be checked. If not
|
||||
specified, it defaults to <code class="filename">/etc/named.conf</code>.
|
||||
</p>
|
||||
</dd>
|
||||
</dl></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="refsection">
|
||||
<a name="id-1.9"></a><h2>RETURN VALUES</h2>
|
||||
|
||||
<p><span class="command"><strong>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>
|
||||
|
||||
<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></body>
|
||||
</html>
|
||||
@@ -1,105 +0,0 @@
|
||||
..
|
||||
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
|
||||
This Source Code Form is subject to the terms of the Mozilla Public
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
See the COPYRIGHT file distributed with this work for additional
|
||||
information regarding copyright ownership.
|
||||
|
||||
..
|
||||
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
|
||||
This Source Code Form is subject to the terms of the Mozilla Public
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
See the COPYRIGHT file distributed with this work for additional
|
||||
information regarding copyright ownership.
|
||||
|
||||
|
||||
.. highlight: console
|
||||
|
||||
.. _man_named-checkconf:
|
||||
|
||||
named-checkconf - named configuration file syntax checking tool
|
||||
---------------------------------------------------------------
|
||||
|
||||
Synopsis
|
||||
~~~~~~~~
|
||||
|
||||
:program:`named-checkconf` [**-chjlvz**] [**-p** [**-x** ]] [**-t** directory] {filename}
|
||||
|
||||
Description
|
||||
~~~~~~~~~~~
|
||||
|
||||
``named-checkconf`` checks the syntax, but not the semantics, of a
|
||||
``named`` configuration file. The file, along with all files included by it, is parsed and checked for syntax
|
||||
errors. If no file is specified,
|
||||
``/etc/named.conf`` is read by default.
|
||||
|
||||
Note: files that ``named`` reads in separate parser contexts, such as
|
||||
``rndc.key`` and ``bind.keys``, are not automatically read by
|
||||
``named-checkconf``. Configuration errors in these files may cause
|
||||
``named`` to fail to run, even if ``named-checkconf`` was successful.
|
||||
However, ``named-checkconf`` can be run on these files explicitly.
|
||||
|
||||
Options
|
||||
~~~~~~~
|
||||
|
||||
``-h``
|
||||
This option prints the usage summary and exits.
|
||||
|
||||
``-j``
|
||||
When loading a zonefile, this option instructs ``named`` to read the journal if it exists.
|
||||
|
||||
``-l``
|
||||
This option lists all the configured zones. Each line of output contains the zone
|
||||
name, class (e.g. IN), view, and type (e.g. primary or secondary).
|
||||
|
||||
``-c``
|
||||
This option specifies that only the "core" configuration should be checked. This suppresses the loading of
|
||||
plugin modules, and causes all parameters to ``plugin`` statements to
|
||||
be ignored.
|
||||
|
||||
``-i``
|
||||
This option ignores warnings on deprecated options.
|
||||
|
||||
``-p``
|
||||
This option prints out the ``named.conf`` and included files in canonical form if
|
||||
no errors were detected. See also the ``-x`` option.
|
||||
|
||||
``-t directory``
|
||||
This option instructs ``named`` to chroot to ``directory``, so that ``include`` directives in the
|
||||
configuration file are processed as if run by a similarly chrooted
|
||||
``named``.
|
||||
|
||||
``-v``
|
||||
This option prints the version of the ``named-checkconf`` program and exits.
|
||||
|
||||
``-x``
|
||||
When printing the configuration files in canonical form, this option obscures
|
||||
shared secrets by replacing them with strings of question marks
|
||||
(``?``). This allows the contents of ``named.conf`` and related files
|
||||
to be shared - for example, when submitting bug reports -
|
||||
without compromising private data. This option cannot be used without
|
||||
``-p``.
|
||||
|
||||
``-z``
|
||||
This option performs a test load of all zones of type ``primary`` found in ``named.conf``.
|
||||
|
||||
``filename``
|
||||
This indicates the name of the configuration file to be checked. If not specified,
|
||||
it defaults to ``/etc/named.conf``.
|
||||
|
||||
Return Values
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
``named-checkconf`` returns an exit status of 1 if errors were detected
|
||||
and 0 otherwise.
|
||||
|
||||
See Also
|
||||
~~~~~~~~
|
||||
|
||||
:manpage:`named(8)`, :manpage:`named-checkzone(8)`, BIND 9 Administrator Reference Manual.
|
||||
329
bin/check/named-checkzone.8
Normal file
329
bin/check/named-checkzone.8
Normal file
@@ -0,0 +1,329 @@
|
||||
.\" Copyright (C) 2000-2002, 2004-2007, 2009-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\"
|
||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
||||
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
.\" file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
.\"
|
||||
.hy 0
|
||||
.ad l
|
||||
'\" t
|
||||
.\" Title: named-checkzone
|
||||
.\" Author:
|
||||
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
|
||||
.\" Date: 2014-02-19
|
||||
.\" Manual: BIND9
|
||||
.\" Source: ISC
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "NAMED\-CHECKZONE" "8" "2014\-02\-19" "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
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" 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
|
||||
.SH "SYNOPSIS"
|
||||
.HP \w'\fBnamed\-checkzone\fR\ 'u
|
||||
\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\-J\ \fR\fB\fIfilename\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\fIttl\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
|
||||
\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\-J\ \fR\fB\fIfilename\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\fIttl\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
|
||||
\fBnamed\fR
|
||||
does when loading a zone\&. This makes
|
||||
\fBnamed\-checkzone\fR
|
||||
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\fR
|
||||
configuration file\&.
|
||||
.SH "OPTIONS"
|
||||
.PP
|
||||
\-d
|
||||
.RS 4
|
||||
Enable debugging\&.
|
||||
.RE
|
||||
.PP
|
||||
\-h
|
||||
.RS 4
|
||||
Print the usage summary and exit\&.
|
||||
.RE
|
||||
.PP
|
||||
\-q
|
||||
.RS 4
|
||||
Quiet mode \- exit code only\&.
|
||||
.RE
|
||||
.PP
|
||||
\-v
|
||||
.RS 4
|
||||
Print the version of the
|
||||
\fBnamed\-checkzone\fR
|
||||
program and exit\&.
|
||||
.RE
|
||||
.PP
|
||||
\-j
|
||||
.RS 4
|
||||
When loading a zone file, read the journal if it exists\&. The journal file name is assumed to be the zone file name appended with the string
|
||||
\&.jnl\&.
|
||||
.RE
|
||||
.PP
|
||||
\-J \fIfilename\fR
|
||||
.RS 4
|
||||
When loading the zone file read the journal from the given file, if it exists\&. (Implies \-j\&.)
|
||||
.RE
|
||||
.PP
|
||||
\-c \fIclass\fR
|
||||
.RS 4
|
||||
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
|
||||
\fB"full"\fR
|
||||
(default),
|
||||
\fB"full\-sibling"\fR,
|
||||
\fB"local"\fR,
|
||||
\fB"local\-sibling"\fR
|
||||
and
|
||||
\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
|
||||
\fB"local"\fR
|
||||
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
|
||||
\fB"local"\fR
|
||||
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
|
||||
\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\&.
|
||||
.sp
|
||||
Mode
|
||||
\fB"full\-sibling"\fR
|
||||
and
|
||||
\fB"local\-sibling"\fR
|
||||
disable sibling glue checks but are otherwise the same as
|
||||
\fB"full"\fR
|
||||
and
|
||||
\fB"local"\fR
|
||||
respectively\&.
|
||||
.sp
|
||||
Mode
|
||||
\fB"none"\fR
|
||||
disables the checks\&.
|
||||
.RE
|
||||
.PP
|
||||
\-f \fIformat\fR
|
||||
.RS 4
|
||||
Specify the format of the zone file\&. Possible formats are
|
||||
\fB"text"\fR
|
||||
(default),
|
||||
\fB"raw"\fR, and
|
||||
\fB"map"\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\&.
|
||||
.sp
|
||||
Possible formats are
|
||||
\fB"text"\fR
|
||||
(default), which is the standard textual representation of the zone, and
|
||||
\fB"map"\fR,
|
||||
\fB"raw"\fR, and
|
||||
\fB"raw=N"\fR, which store the zone in a binary format for rapid loading by
|
||||
\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\&.
|
||||
.RE
|
||||
.PP
|
||||
\-k \fImode\fR
|
||||
.RS 4
|
||||
Perform
|
||||
\fB"check\-names"\fR
|
||||
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\&.
|
||||
.RE
|
||||
.PP
|
||||
\-l \fIttl\fR
|
||||
.RS 4
|
||||
Sets a maximum permissible TTL for the input file\&. Any record with a TTL higher than this value will cause the zone to be rejected\&. This is similar to using the
|
||||
\fBmax\-zone\-ttl\fR
|
||||
option in
|
||||
named\&.conf\&.
|
||||
.RE
|
||||
.PP
|
||||
\-L \fIserial\fR
|
||||
.RS 4
|
||||
When compiling a zone to "raw" or "map" 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
|
||||
\fB"fail"\fR,
|
||||
\fB"warn"\fR
|
||||
(default) and
|
||||
\fB"ignore"\fR\&.
|
||||
.RE
|
||||
.PP
|
||||
\-M \fImode\fR
|
||||
.RS 4
|
||||
Check if a MX record refers to a CNAME\&. Possible modes are
|
||||
\fB"fail"\fR,
|
||||
\fB"warn"\fR
|
||||
(default) and
|
||||
\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
|
||||
\fB"fail"\fR
|
||||
(default for
|
||||
\fBnamed\-compilezone\fR),
|
||||
\fB"warn"\fR
|
||||
(default for
|
||||
\fBnamed\-checkzone\fR) and
|
||||
\fB"ignore"\fR\&.
|
||||
.RE
|
||||
.PP
|
||||
\-o \fIfilename\fR
|
||||
.RS 4
|
||||
Write zone output to
|
||||
filename\&. If
|
||||
filename
|
||||
is
|
||||
\-
|
||||
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
|
||||
\fB"fail"\fR,
|
||||
\fB"warn"\fR
|
||||
(default) and
|
||||
\fB"ignore"\fR\&.
|
||||
.RE
|
||||
.PP
|
||||
\-s \fIstyle\fR
|
||||
.RS 4
|
||||
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
|
||||
\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\&.
|
||||
.RE
|
||||
.PP
|
||||
\-S \fImode\fR
|
||||
.RS 4
|
||||
Check if a SRV record refers to a CNAME\&. Possible modes are
|
||||
\fB"fail"\fR,
|
||||
\fB"warn"\fR
|
||||
(default) and
|
||||
\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
|
||||
\fBnamed\fR\&.
|
||||
.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
|
||||
\fB"warn"\fR
|
||||
(default),
|
||||
\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\&.
|
||||
.RE
|
||||
.PP
|
||||
\-D
|
||||
.RS 4
|
||||
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
|
||||
\fB"warn"\fR
|
||||
(default) and
|
||||
\fB"ignore"\fR\&.
|
||||
.RE
|
||||
.PP
|
||||
zonename
|
||||
.RS 4
|
||||
The domain name of the zone being checked\&.
|
||||
.RE
|
||||
.PP
|
||||
filename
|
||||
.RS 4
|
||||
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\&.
|
||||
.SH "SEE ALSO"
|
||||
.PP
|
||||
\fBnamed\fR(8),
|
||||
\fBnamed-checkconf\fR(8),
|
||||
RFC 1035,
|
||||
BIND 9 Administrator Reference Manual\&.
|
||||
.SH "AUTHOR"
|
||||
.PP
|
||||
\fBInternet Systems Consortium, Inc\&.\fR
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
Copyright \(co 2000-2002, 2004-2007, 2009-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.br
|
||||
@@ -9,17 +9,16 @@
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdbool.h>
|
||||
#include <config.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <isc/app.h>
|
||||
#include <isc/attributes.h>
|
||||
#include <isc/commandline.h>
|
||||
#include <isc/dir.h>
|
||||
#include <isc/file.h>
|
||||
#include <isc/hash.h>
|
||||
#include <isc/log.h>
|
||||
#include <isc/mem.h>
|
||||
@@ -54,31 +53,31 @@ static const char *prog_name = NULL;
|
||||
static const dns_master_style_t *outputstyle = NULL;
|
||||
static enum { progmode_check, progmode_compile } progmode;
|
||||
|
||||
#define ERRRET(result, function) \
|
||||
do { \
|
||||
if (result != ISC_R_SUCCESS) { \
|
||||
if (!quiet) \
|
||||
fprintf(stderr, "%s() returned %s\n", \
|
||||
#define ERRRET(result, function) \
|
||||
do { \
|
||||
if (result != ISC_R_SUCCESS) { \
|
||||
if (!quiet) \
|
||||
fprintf(stderr, "%s() returned %s\n", \
|
||||
function, dns_result_totext(result)); \
|
||||
return (result); \
|
||||
} \
|
||||
return (result); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
ISC_NORETURN static void
|
||||
usage(void);
|
||||
ISC_PLATFORM_NORETURN_PRE static void
|
||||
usage(void) ISC_PLATFORM_NORETURN_POST;
|
||||
|
||||
static void
|
||||
usage(void) {
|
||||
fprintf(stderr,
|
||||
"usage: %s [-djqvD] [-c class] "
|
||||
"[-f inputformat] [-F outputformat] [-J filename] "
|
||||
"[-s (full|relative)] [-t directory] [-w directory] "
|
||||
"[-k (ignore|warn|fail)] [-m (ignore|warn|fail)] "
|
||||
"[-n (ignore|warn|fail)] [-r (ignore|warn|fail)] "
|
||||
"[-t directory] [-w directory] [-k (ignore|warn|fail)] "
|
||||
"[-n (ignore|warn|fail)] [-m (ignore|warn|fail)] "
|
||||
"[-r (ignore|warn|fail)] "
|
||||
"[-i (full|full-sibling|local|local-sibling|none)] "
|
||||
"[-M (ignore|warn|fail)] [-S (ignore|warn|fail)] "
|
||||
"[-W (ignore|warn)] "
|
||||
"%s zonename [ (filename|-) ]\n",
|
||||
"%s zonename filename\n",
|
||||
prog_name,
|
||||
progmode == progmode_check ? "[-o filename]" : "-o filename");
|
||||
exit(1);
|
||||
@@ -86,9 +85,9 @@ usage(void) {
|
||||
|
||||
static void
|
||||
destroy(void) {
|
||||
if (zone != NULL) {
|
||||
if (zone != NULL)
|
||||
dns_zone_detach(&zone);
|
||||
}
|
||||
dns_name_destroy();
|
||||
}
|
||||
|
||||
/*% main processing routine */
|
||||
@@ -96,7 +95,7 @@ int
|
||||
main(int argc, char **argv) {
|
||||
int c;
|
||||
char *origin = NULL;
|
||||
const char *filename = NULL;
|
||||
char *filename = NULL;
|
||||
isc_log_t *lctx = NULL;
|
||||
isc_result_t result;
|
||||
char classname_in[] = "IN";
|
||||
@@ -107,10 +106,10 @@ main(int argc, char **argv) {
|
||||
dns_masterformat_t inputformat = dns_masterformat_text;
|
||||
dns_masterformat_t outputformat = dns_masterformat_text;
|
||||
dns_masterrawheader_t header;
|
||||
uint32_t rawversion = 1, serialnum = 0;
|
||||
isc_uint32_t rawversion = 1, serialnum = 0;
|
||||
dns_ttl_t maxttl = 0;
|
||||
bool snset = false;
|
||||
bool logdump = false;
|
||||
isc_boolean_t snset = ISC_FALSE;
|
||||
isc_boolean_t logdump = ISC_FALSE;
|
||||
FILE *errout = stdout;
|
||||
char *endp;
|
||||
|
||||
@@ -122,53 +121,49 @@ main(int argc, char **argv) {
|
||||
outputstyle = &dns_master_style_full;
|
||||
|
||||
prog_name = strrchr(argv[0], '/');
|
||||
if (prog_name == NULL) {
|
||||
if (prog_name == NULL)
|
||||
prog_name = strrchr(argv[0], '\\');
|
||||
}
|
||||
if (prog_name != NULL) {
|
||||
if (prog_name != NULL)
|
||||
prog_name++;
|
||||
} else {
|
||||
else
|
||||
prog_name = argv[0];
|
||||
}
|
||||
/*
|
||||
* Libtool doesn't preserve the program name prior to final
|
||||
* installation. Remove the libtool prefix ("lt-").
|
||||
*/
|
||||
if (strncmp(prog_name, "lt-", 3) == 0) {
|
||||
if (strncmp(prog_name, "lt-", 3) == 0)
|
||||
prog_name += 3;
|
||||
}
|
||||
|
||||
#define PROGCMP(X) \
|
||||
(strcasecmp(prog_name, X) == 0 || strcasecmp(prog_name, X ".exe") == 0)
|
||||
|
||||
if (PROGCMP("named-checkzone")) {
|
||||
if (PROGCMP("named-checkzone"))
|
||||
progmode = progmode_check;
|
||||
} else if (PROGCMP("named-compilezone")) {
|
||||
else if (PROGCMP("named-compilezone"))
|
||||
progmode = progmode_compile;
|
||||
} else {
|
||||
else
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
/* Compilation specific defaults */
|
||||
if (progmode == progmode_compile) {
|
||||
zone_options |= (DNS_ZONEOPT_CHECKNS | DNS_ZONEOPT_FATALNS |
|
||||
DNS_ZONEOPT_CHECKSPF | DNS_ZONEOPT_CHECKDUPRR |
|
||||
zone_options |= (DNS_ZONEOPT_CHECKNS |
|
||||
DNS_ZONEOPT_FATALNS |
|
||||
DNS_ZONEOPT_CHECKSPF |
|
||||
DNS_ZONEOPT_CHECKDUPRR |
|
||||
DNS_ZONEOPT_CHECKNAMES |
|
||||
DNS_ZONEOPT_CHECKNAMESFAIL |
|
||||
DNS_ZONEOPT_CHECKWILDCARD);
|
||||
} else {
|
||||
zone_options |= (DNS_ZONEOPT_CHECKDUPRR | DNS_ZONEOPT_CHECKSPF);
|
||||
}
|
||||
} else
|
||||
zone_options |= (DNS_ZONEOPT_CHECKDUPRR |
|
||||
DNS_ZONEOPT_CHECKSPF);
|
||||
|
||||
#define ARGCMP(X) (strcmp(isc_commandline_argument, X) == 0)
|
||||
|
||||
isc_commandline_errprint = false;
|
||||
isc_commandline_errprint = ISC_FALSE;
|
||||
|
||||
while ((c = isc_commandline_parse(argc, argv,
|
||||
"c:df:hi:jJ:k:L:l:m:n:qr:s:t:o:vw:DF:"
|
||||
"M:S:T:W:")) != EOF)
|
||||
{
|
||||
"c:df:hi:jJ:k:L:l:m:n:qr:s:t:o:vw:DF:M:S:T:W:"))
|
||||
!= EOF) {
|
||||
switch (c) {
|
||||
case 'c':
|
||||
classname = isc_commandline_argument;
|
||||
@@ -182,33 +177,33 @@ main(int argc, char **argv) {
|
||||
if (ARGCMP("full")) {
|
||||
zone_options |= DNS_ZONEOPT_CHECKINTEGRITY |
|
||||
DNS_ZONEOPT_CHECKSIBLING;
|
||||
docheckmx = true;
|
||||
docheckns = true;
|
||||
dochecksrv = true;
|
||||
docheckmx = ISC_TRUE;
|
||||
docheckns = ISC_TRUE;
|
||||
dochecksrv = ISC_TRUE;
|
||||
} else if (ARGCMP("full-sibling")) {
|
||||
zone_options |= DNS_ZONEOPT_CHECKINTEGRITY;
|
||||
zone_options &= ~DNS_ZONEOPT_CHECKSIBLING;
|
||||
docheckmx = true;
|
||||
docheckns = true;
|
||||
dochecksrv = true;
|
||||
docheckmx = ISC_TRUE;
|
||||
docheckns = ISC_TRUE;
|
||||
dochecksrv = ISC_TRUE;
|
||||
} else if (ARGCMP("local")) {
|
||||
zone_options |= DNS_ZONEOPT_CHECKINTEGRITY;
|
||||
zone_options |= DNS_ZONEOPT_CHECKSIBLING;
|
||||
docheckmx = false;
|
||||
docheckns = false;
|
||||
dochecksrv = false;
|
||||
docheckmx = ISC_FALSE;
|
||||
docheckns = ISC_FALSE;
|
||||
dochecksrv = ISC_FALSE;
|
||||
} else if (ARGCMP("local-sibling")) {
|
||||
zone_options |= DNS_ZONEOPT_CHECKINTEGRITY;
|
||||
zone_options &= ~DNS_ZONEOPT_CHECKSIBLING;
|
||||
docheckmx = false;
|
||||
docheckns = false;
|
||||
dochecksrv = false;
|
||||
docheckmx = ISC_FALSE;
|
||||
docheckns = ISC_FALSE;
|
||||
dochecksrv = ISC_FALSE;
|
||||
} else if (ARGCMP("none")) {
|
||||
zone_options &= ~DNS_ZONEOPT_CHECKINTEGRITY;
|
||||
zone_options &= ~DNS_ZONEOPT_CHECKSIBLING;
|
||||
docheckmx = false;
|
||||
docheckns = false;
|
||||
dochecksrv = false;
|
||||
docheckmx = ISC_FALSE;
|
||||
docheckns = ISC_FALSE;
|
||||
dochecksrv = ISC_FALSE;
|
||||
} else {
|
||||
fprintf(stderr, "invalid argument to -i: %s\n",
|
||||
isc_commandline_argument);
|
||||
@@ -225,12 +220,12 @@ main(int argc, char **argv) {
|
||||
break;
|
||||
|
||||
case 'j':
|
||||
nomerge = false;
|
||||
nomerge = ISC_FALSE;
|
||||
break;
|
||||
|
||||
case 'J':
|
||||
journal = isc_commandline_argument;
|
||||
nomerge = false;
|
||||
nomerge = ISC_FALSE;
|
||||
break;
|
||||
|
||||
case 'k':
|
||||
@@ -251,7 +246,7 @@ main(int argc, char **argv) {
|
||||
break;
|
||||
|
||||
case 'L':
|
||||
snset = true;
|
||||
snset = ISC_TRUE;
|
||||
endp = NULL;
|
||||
serialnum = strtol(isc_commandline_argument, &endp, 0);
|
||||
if (*endp != '\0') {
|
||||
@@ -272,15 +267,16 @@ main(int argc, char **argv) {
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case 'n':
|
||||
if (ARGCMP("ignore")) {
|
||||
zone_options &= ~(DNS_ZONEOPT_CHECKNS |
|
||||
zone_options &= ~(DNS_ZONEOPT_CHECKNS|
|
||||
DNS_ZONEOPT_FATALNS);
|
||||
} else if (ARGCMP("warn")) {
|
||||
zone_options |= DNS_ZONEOPT_CHECKNS;
|
||||
zone_options &= ~DNS_ZONEOPT_FATALNS;
|
||||
} else if (ARGCMP("fail")) {
|
||||
zone_options |= DNS_ZONEOPT_CHECKNS |
|
||||
zone_options |= DNS_ZONEOPT_CHECKNS|
|
||||
DNS_ZONEOPT_FATALNS;
|
||||
} else {
|
||||
fprintf(stderr, "invalid argument to -n: %s\n",
|
||||
@@ -332,9 +328,9 @@ main(int argc, char **argv) {
|
||||
break;
|
||||
|
||||
case 's':
|
||||
if (ARGCMP("full")) {
|
||||
if (ARGCMP("full"))
|
||||
outputstyle = &dns_master_style_full;
|
||||
} else if (ARGCMP("relative")) {
|
||||
else if (ARGCMP("relative")) {
|
||||
outputstyle = &dns_master_style_default;
|
||||
} else {
|
||||
fprintf(stderr,
|
||||
@@ -355,7 +351,7 @@ main(int argc, char **argv) {
|
||||
break;
|
||||
|
||||
case 'v':
|
||||
printf("%s\n", PACKAGE_VERSION);
|
||||
printf(VERSION "\n");
|
||||
exit(0);
|
||||
|
||||
case 'w':
|
||||
@@ -413,25 +409,23 @@ main(int argc, char **argv) {
|
||||
break;
|
||||
|
||||
case 'W':
|
||||
if (ARGCMP("warn")) {
|
||||
if (ARGCMP("warn"))
|
||||
zone_options |= DNS_ZONEOPT_CHECKWILDCARD;
|
||||
} else if (ARGCMP("ignore")) {
|
||||
else if (ARGCMP("ignore"))
|
||||
zone_options &= ~DNS_ZONEOPT_CHECKWILDCARD;
|
||||
}
|
||||
break;
|
||||
|
||||
case '?':
|
||||
if (isc_commandline_option != '?') {
|
||||
if (isc_commandline_option != '?')
|
||||
fprintf(stderr, "%s: invalid argument -%c\n",
|
||||
prog_name, isc_commandline_option);
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
/* FALLTHROUGH */
|
||||
case 'h':
|
||||
usage();
|
||||
|
||||
default:
|
||||
fprintf(stderr, "%s: unhandled option -%c\n", prog_name,
|
||||
isc_commandline_option);
|
||||
fprintf(stderr, "%s: unhandled option -%c\n",
|
||||
prog_name, isc_commandline_option);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
@@ -439,26 +433,26 @@ main(int argc, char **argv) {
|
||||
if (workdir != NULL) {
|
||||
result = isc_dir_chdir(workdir);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
fprintf(stderr, "isc_dir_chdir: %s: %s\n", workdir,
|
||||
isc_result_totext(result));
|
||||
fprintf(stderr, "isc_dir_chdir: %s: %s\n",
|
||||
workdir, isc_result_totext(result));
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
if (inputformatstr != NULL) {
|
||||
if (strcasecmp(inputformatstr, "text") == 0) {
|
||||
if (strcasecmp(inputformatstr, "text") == 0)
|
||||
inputformat = dns_masterformat_text;
|
||||
} else if (strcasecmp(inputformatstr, "raw") == 0) {
|
||||
else if (strcasecmp(inputformatstr, "raw") == 0)
|
||||
inputformat = dns_masterformat_raw;
|
||||
} else if (strncasecmp(inputformatstr, "raw=", 4) == 0) {
|
||||
else if (strncasecmp(inputformatstr, "raw=", 4) == 0) {
|
||||
inputformat = dns_masterformat_raw;
|
||||
fprintf(stderr, "WARNING: input format raw, version "
|
||||
"ignored\n");
|
||||
fprintf(stderr,
|
||||
"WARNING: input format raw, version ignored\n");
|
||||
} else if (strcasecmp(inputformatstr, "map") == 0) {
|
||||
inputformat = dns_masterformat_map;
|
||||
} else {
|
||||
fprintf(stderr, "unknown file format: %s\n",
|
||||
inputformatstr);
|
||||
inputformatstr);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
@@ -475,7 +469,8 @@ main(int argc, char **argv) {
|
||||
rawversion = strtol(outputformatstr + 4, &end, 10);
|
||||
if (end == outputformatstr + 4 || *end != '\0' ||
|
||||
rawversion > 1U) {
|
||||
fprintf(stderr, "unknown raw format version\n");
|
||||
fprintf(stderr,
|
||||
"unknown raw format version\n");
|
||||
exit(1);
|
||||
}
|
||||
} else if (strcasecmp(outputformatstr, "map") == 0) {
|
||||
@@ -488,60 +483,47 @@ main(int argc, char **argv) {
|
||||
}
|
||||
|
||||
if (progmode == progmode_compile) {
|
||||
dumpzone = 1; /* always dump */
|
||||
dumpzone = 1; /* always dump */
|
||||
logdump = !quiet;
|
||||
if (output_filename == NULL) {
|
||||
fprintf(stderr, "output file required, but not "
|
||||
"specified\n");
|
||||
fprintf(stderr,
|
||||
"output file required, but not specified\n");
|
||||
usage();
|
||||
}
|
||||
}
|
||||
|
||||
if (output_filename != NULL) {
|
||||
if (output_filename != NULL)
|
||||
dumpzone = 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* If we are printing to stdout then send the informational
|
||||
* If we are outputing to stdout then send the informational
|
||||
* output to stderr.
|
||||
*/
|
||||
if (dumpzone &&
|
||||
(output_filename == NULL || strcmp(output_filename, "-") == 0 ||
|
||||
(output_filename == NULL ||
|
||||
strcmp(output_filename, "-") == 0 ||
|
||||
strcmp(output_filename, "/dev/fd/1") == 0 ||
|
||||
strcmp(output_filename, "/dev/stdout") == 0))
|
||||
{
|
||||
strcmp(output_filename, "/dev/stdout") == 0)) {
|
||||
errout = stderr;
|
||||
logdump = false;
|
||||
logdump = ISC_FALSE;
|
||||
}
|
||||
|
||||
if (argc - isc_commandline_index < 1 ||
|
||||
argc - isc_commandline_index > 2) {
|
||||
if (isc_commandline_index + 2 != argc)
|
||||
usage();
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
InitSockets();
|
||||
#endif /* ifdef _WIN32 */
|
||||
#endif
|
||||
|
||||
isc_mem_create(&mctx);
|
||||
if (!quiet) {
|
||||
RUNTIME_CHECK(setup_logging(mctx, errout, &lctx) ==
|
||||
ISC_R_SUCCESS);
|
||||
}
|
||||
RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
|
||||
if (!quiet)
|
||||
RUNTIME_CHECK(setup_logging(mctx, errout, &lctx)
|
||||
== ISC_R_SUCCESS);
|
||||
|
||||
dns_result_register();
|
||||
|
||||
origin = argv[isc_commandline_index++];
|
||||
|
||||
if (isc_commandline_index == argc) {
|
||||
/* "-" will be interpreted as stdin */
|
||||
filename = "-";
|
||||
} else {
|
||||
filename = argv[isc_commandline_index];
|
||||
}
|
||||
|
||||
isc_commandline_index++;
|
||||
|
||||
filename = argv[isc_commandline_index++];
|
||||
result = load_zone(mctx, origin, filename, inputformat, classname,
|
||||
maxttl, &zone);
|
||||
|
||||
@@ -557,24 +539,20 @@ main(int argc, char **argv) {
|
||||
fprintf(errout, "dump zone to %s...", output_filename);
|
||||
fflush(errout);
|
||||
}
|
||||
result = dump_zone(origin, zone, output_filename, outputformat,
|
||||
outputstyle, rawversion);
|
||||
if (logdump) {
|
||||
result = dump_zone(origin, zone, output_filename,
|
||||
outputformat, outputstyle, rawversion);
|
||||
if (logdump)
|
||||
fprintf(errout, "done\n");
|
||||
}
|
||||
}
|
||||
|
||||
if (!quiet && result == ISC_R_SUCCESS) {
|
||||
if (!quiet && result == ISC_R_SUCCESS)
|
||||
fprintf(errout, "OK\n");
|
||||
}
|
||||
destroy();
|
||||
if (lctx != NULL) {
|
||||
if (lctx != NULL)
|
||||
isc_log_destroy(&lctx);
|
||||
}
|
||||
isc_mem_destroy(&mctx);
|
||||
#ifdef _WIN32
|
||||
DestroySockets();
|
||||
#endif /* ifdef _WIN32 */
|
||||
|
||||
#endif
|
||||
return ((result == ISC_R_SUCCESS) ? 0 : 1);
|
||||
}
|
||||
|
||||
527
bin/check/named-checkzone.docbook
Normal file
527
bin/check/named-checkzone.docbook
Normal file
@@ -0,0 +1,527 @@
|
||||
<!--
|
||||
- Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
-
|
||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
-
|
||||
- See the COPYRIGHT file distributed with this work for additional
|
||||
- information regarding copyright ownership.
|
||||
-->
|
||||
|
||||
<!-- Converted by db4-upgrade version 1.0 -->
|
||||
<refentry xmlns:db="http://docbook.org/ns/docbook" version="5.0" xml:id="man.named-checkzone">
|
||||
<info>
|
||||
<date>2014-02-19</date>
|
||||
</info>
|
||||
<refentryinfo>
|
||||
<corpname>ISC</corpname>
|
||||
<corpauthor>Internet Systems Consortium, Inc.</corpauthor>
|
||||
</refentryinfo>
|
||||
|
||||
<refmeta>
|
||||
<refentrytitle><application>named-checkzone</application></refentrytitle>
|
||||
<manvolnum>8</manvolnum>
|
||||
<refmiscinfo>BIND9</refmiscinfo>
|
||||
</refmeta>
|
||||
|
||||
<docinfo>
|
||||
<copyright>
|
||||
<year>2000</year>
|
||||
<year>2001</year>
|
||||
<year>2002</year>
|
||||
<year>2004</year>
|
||||
<year>2005</year>
|
||||
<year>2006</year>
|
||||
<year>2007</year>
|
||||
<year>2009</year>
|
||||
<year>2010</year>
|
||||
<year>2011</year>
|
||||
<year>2012</year>
|
||||
<year>2013</year>
|
||||
<year>2014</year>
|
||||
<year>2015</year>
|
||||
<year>2016</year>
|
||||
<year>2018</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
<refnamediv>
|
||||
<refname><application>named-checkzone</application></refname>
|
||||
<refname><application>named-compilezone</application></refname>
|
||||
<refpurpose>zone file validity checking or converting tool</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis sepchar=" ">
|
||||
<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>-J <replaceable class="parameter">filename</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">ttl</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>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis sepchar=" ">
|
||||
<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>-J <replaceable class="parameter">filename</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">ttl</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>
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
|
||||
<refsection><info><title>DESCRIPTION</title></info>
|
||||
|
||||
<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
|
||||
zone. This makes <command>named-checkzone</command> useful for
|
||||
checking zone files before configuring them into a name server.
|
||||
</para>
|
||||
<para>
|
||||
<command>named-compilezone</command> is similar to
|
||||
<command>named-checkzone</command>, 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 <command>named</command>.
|
||||
When manually specified otherwise, the check levels must at
|
||||
least be as strict as those specified in the
|
||||
<command>named</command> configuration file.
|
||||
</para>
|
||||
</refsection>
|
||||
|
||||
<refsection><info><title>OPTIONS</title></info>
|
||||
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>-d</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Enable debugging.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-h</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Print the usage summary and exit.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-q</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Quiet mode - exit code only.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-v</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Print the version of the <command>named-checkzone</command>
|
||||
program and exit.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-j</term>
|
||||
<listitem>
|
||||
<para>
|
||||
When loading a zone file, read the journal if it exists.
|
||||
The journal file name is assumed to be the zone file name
|
||||
appended with the string <filename>.jnl</filename>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-J <replaceable class="parameter">filename</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
When loading the zone file read the journal from the given
|
||||
file, if it exists. (Implies -j.)
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-c <replaceable class="parameter">class</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specify the class of the zone. If not specified, "IN" is assumed.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-i <replaceable class="parameter">mode</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Perform post-load zone integrity checks. Possible modes are
|
||||
<command>"full"</command> (default),
|
||||
<command>"full-sibling"</command>,
|
||||
<command>"local"</command>,
|
||||
<command>"local-sibling"</command> and
|
||||
<command>"none"</command>.
|
||||
</para>
|
||||
<para>
|
||||
Mode <command>"full"</command> checks that MX records
|
||||
refer to A or AAAA record (both in-zone and out-of-zone
|
||||
hostnames). Mode <command>"local"</command> only
|
||||
checks MX records which refer to in-zone hostnames.
|
||||
</para>
|
||||
<para>
|
||||
Mode <command>"full"</command> checks that SRV records
|
||||
refer to A or AAAA record (both in-zone and out-of-zone
|
||||
hostnames). Mode <command>"local"</command> only
|
||||
checks SRV records which refer to in-zone hostnames.
|
||||
</para>
|
||||
<para>
|
||||
Mode <command>"full"</command> 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 <command>"local"</command> 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.
|
||||
</para>
|
||||
<para>
|
||||
Mode <command>"full-sibling"</command> and
|
||||
<command>"local-sibling"</command> disable sibling glue
|
||||
checks but are otherwise the same as <command>"full"</command>
|
||||
and <command>"local"</command> respectively.
|
||||
</para>
|
||||
<para>
|
||||
Mode <command>"none"</command> disables the checks.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-f <replaceable class="parameter">format</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specify the format of the zone file.
|
||||
Possible formats are <command>"text"</command> (default),
|
||||
<command>"raw"</command>, and <command>"map"</command>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-F <replaceable class="parameter">format</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specify the format of the output file specified.
|
||||
For <command>named-checkzone</command>,
|
||||
this does not cause any effects unless it dumps the zone
|
||||
contents.
|
||||
</para>
|
||||
<para>
|
||||
Possible formats are <command>"text"</command> (default),
|
||||
which is the standard textual representation of the zone,
|
||||
and <command>"map"</command>, <command>"raw"</command>,
|
||||
and <command>"raw=N"</command>, which store the zone in a
|
||||
binary format for rapid loading by <command>named</command>.
|
||||
<command>"raw=N"</command> specifies the format version of
|
||||
the raw zone file: if N is 0, the raw file can be read by
|
||||
any version of <command>named</command>; if N is 1, the file
|
||||
can be read by release 9.9.0 or higher; the default is 1.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-k <replaceable class="parameter">mode</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Perform <command>"check-names"</command> checks with the
|
||||
specified failure mode.
|
||||
Possible modes are <command>"fail"</command>
|
||||
(default for <command>named-compilezone</command>),
|
||||
<command>"warn"</command>
|
||||
(default for <command>named-checkzone</command>) and
|
||||
<command>"ignore"</command>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-l <replaceable class="parameter">ttl</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Sets a maximum permissible TTL for the input file.
|
||||
Any record with a TTL higher than this value will cause
|
||||
the zone to be rejected. This is similar to using the
|
||||
<command>max-zone-ttl</command> option in
|
||||
<filename>named.conf</filename>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-L <replaceable class="parameter">serial</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
When compiling a zone to "raw" or "map" 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>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-m <replaceable class="parameter">mode</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specify whether MX records should be checked to see if they
|
||||
are addresses. Possible modes are <command>"fail"</command>,
|
||||
<command>"warn"</command> (default) and
|
||||
<command>"ignore"</command>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-M <replaceable class="parameter">mode</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Check if a MX record refers to a CNAME.
|
||||
Possible modes are <command>"fail"</command>,
|
||||
<command>"warn"</command> (default) and
|
||||
<command>"ignore"</command>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-n <replaceable class="parameter">mode</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specify whether NS records should be checked to see if they
|
||||
are addresses.
|
||||
Possible modes are <command>"fail"</command>
|
||||
(default for <command>named-compilezone</command>),
|
||||
<command>"warn"</command>
|
||||
(default for <command>named-checkzone</command>) and
|
||||
<command>"ignore"</command>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-o <replaceable class="parameter">filename</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Write zone output to <filename>filename</filename>.
|
||||
If <filename>filename</filename> is <filename>-</filename> then
|
||||
write to standard out.
|
||||
This is mandatory for <command>named-compilezone</command>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-r <replaceable class="parameter">mode</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Check for records that are treated as different by DNSSEC but
|
||||
are semantically equal in plain DNS.
|
||||
Possible modes are <command>"fail"</command>,
|
||||
<command>"warn"</command> (default) and
|
||||
<command>"ignore"</command>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-s <replaceable class="parameter">style</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specify the style of the dumped zone file.
|
||||
Possible styles are <command>"full"</command> (default)
|
||||
and <command>"relative"</command>.
|
||||
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 <command>named-checkzone</command>
|
||||
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.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-S <replaceable class="parameter">mode</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Check if a SRV record refers to a CNAME.
|
||||
Possible modes are <command>"fail"</command>,
|
||||
<command>"warn"</command> (default) and
|
||||
<command>"ignore"</command>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-t <replaceable class="parameter">directory</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Chroot to <filename>directory</filename> so that
|
||||
include
|
||||
directives in the configuration file are processed as if
|
||||
run by a similarly chrooted <command>named</command>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<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>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-w <replaceable class="parameter">directory</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
chdir to <filename>directory</filename> so that
|
||||
relative
|
||||
filenames in master file $INCLUDE directives work. This
|
||||
is similar to the directory clause in
|
||||
<filename>named.conf</filename>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-D</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Dump zone file in canonical format.
|
||||
This is always enabled for <command>named-compilezone</command>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-W <replaceable class="parameter">mode</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
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 <command>"warn"</command> (default)
|
||||
and
|
||||
<command>"ignore"</command>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>zonename</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The domain name of the zone being checked.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>filename</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The name of the zone file.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
|
||||
</refsection>
|
||||
|
||||
<refsection><info><title>RETURN VALUES</title></info>
|
||||
|
||||
<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>
|
||||
|
||||
<para><citerefentry>
|
||||
<refentrytitle>named</refentrytitle><manvolnum>8</manvolnum>
|
||||
</citerefentry>,
|
||||
<citerefentry>
|
||||
<refentrytitle>named-checkconf</refentrytitle><manvolnum>8</manvolnum>
|
||||
</citerefentry>,
|
||||
<citetitle>RFC 1035</citetitle>,
|
||||
<citetitle>BIND 9 Administrator Reference Manual</citetitle>.
|
||||
</para>
|
||||
</refsection>
|
||||
|
||||
</refentry>
|
||||
429
bin/check/named-checkzone.html
Normal file
429
bin/check/named-checkzone.html
Normal file
@@ -0,0 +1,429 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--
|
||||
- Copyright (C) 2000-2002, 2004-2007, 2009-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
-
|
||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
-->
|
||||
<html lang="en">
|
||||
<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">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry">
|
||||
<a name="man.named-checkzone"></a><div class="titlepage"></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="refnamediv">
|
||||
<h2>Name</h2>
|
||||
<p>
|
||||
<span class="application">named-checkzone</span>,
|
||||
<span class="application">named-compilezone</span>
|
||||
— zone file validity checking or converting tool
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="refsynopsisdiv">
|
||||
<h2>Synopsis</h2>
|
||||
<div class="cmdsynopsis"><p>
|
||||
<code class="command">named-checkzone</code>
|
||||
[<code class="option">-d</code>]
|
||||
[<code class="option">-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">-J <em class="replaceable"><code>filename</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>ttl</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">-J <em class="replaceable"><code>filename</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>ttl</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>
|
||||
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
|
||||
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
|
||||
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>.
|
||||
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.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="refsection">
|
||||
<a name="id-1.8"></a><h2>OPTIONS</h2>
|
||||
|
||||
|
||||
<div class="variablelist"><dl class="variablelist">
|
||||
<dt><span class="term">-d</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Enable debugging.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-h</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Print the usage summary and exit.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-q</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Quiet mode - exit code only.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-v</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Print the version of the <span class="command"><strong>named-checkzone</strong></span>
|
||||
program and exit.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-j</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
When loading a zone file, read the journal if it exists.
|
||||
The journal file name is assumed to be the zone file name
|
||||
appended with the string <code class="filename">.jnl</code>.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-J <em class="replaceable"><code>filename</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
When loading the zone file read the journal from the given
|
||||
file, if it exists. (Implies -j.)
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-c <em class="replaceable"><code>class</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Specify the class of the zone. If not specified, "IN" is assumed.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-i <em class="replaceable"><code>mode</code></em></span></dt>
|
||||
<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>.
|
||||
</p>
|
||||
<p>
|
||||
Mode <span class="command"><strong>"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
|
||||
checks MX records which refer to in-zone hostnames.
|
||||
</p>
|
||||
<p>
|
||||
Mode <span class="command"><strong>"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
|
||||
checks SRV records which refer to in-zone hostnames.
|
||||
</p>
|
||||
<p>
|
||||
Mode <span class="command"><strong>"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
|
||||
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.
|
||||
</p>
|
||||
<p>
|
||||
Mode <span class="command"><strong>"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),
|
||||
<span class="command"><strong>"raw"</strong></span>, and <span class="command"><strong>"map"</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>,
|
||||
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),
|
||||
which is the standard textual representation of the zone,
|
||||
and <span class="command"><strong>"map"</strong></span>, <span class="command"><strong>"raw"</strong></span>,
|
||||
and <span class="command"><strong>"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> 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 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
|
||||
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>.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-l <em class="replaceable"><code>ttl</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Sets a maximum permissible TTL for the input file.
|
||||
Any record with a TTL higher than this value will cause
|
||||
the zone to be rejected. This is similar to using the
|
||||
<span class="command"><strong>max-zone-ttl</strong></span> option in
|
||||
<code class="filename">named.conf</code>.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-L <em class="replaceable"><code>serial</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
When compiling a zone to "raw" or "map" 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>.
|
||||
</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>.
|
||||
</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>.
|
||||
</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>.
|
||||
</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>.
|
||||
</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>.
|
||||
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>
|
||||
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.
|
||||
</p>
|
||||
</dd>
|
||||
<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>.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-t <em class="replaceable"><code>directory</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Chroot to <code class="filename">directory</code> so that
|
||||
include
|
||||
directives in the configuration file are processed as if
|
||||
run by a similarly chrooted <span class="command"><strong>named</strong></span>.
|
||||
</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>.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-w <em class="replaceable"><code>directory</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
chdir to <code class="filename">directory</code> so that
|
||||
relative
|
||||
filenames in master file $INCLUDE directives work. This
|
||||
is similar to the directory clause in
|
||||
<code class="filename">named.conf</code>.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-D</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Dump zone file in canonical format.
|
||||
This is always enabled for <span class="command"><strong>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)
|
||||
and
|
||||
<span class="command"><strong>"ignore"</strong></span>.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">zonename</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
The domain name of the zone being checked.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">filename</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
The name of the zone file.
|
||||
</p>
|
||||
</dd>
|
||||
</dl></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="refsection">
|
||||
<a name="id-1.9"></a><h2>RETURN VALUES</h2>
|
||||
|
||||
<p><span class="command"><strong>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>
|
||||
|
||||
<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></body>
|
||||
</html>
|
||||
@@ -1,215 +0,0 @@
|
||||
..
|
||||
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
|
||||
This Source Code Form is subject to the terms of the Mozilla Public
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
See the COPYRIGHT file distributed with this work for additional
|
||||
information regarding copyright ownership.
|
||||
|
||||
..
|
||||
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
|
||||
This Source Code Form is subject to the terms of the Mozilla Public
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
See the COPYRIGHT file distributed with this work for additional
|
||||
information regarding copyright ownership.
|
||||
|
||||
|
||||
.. highlight: console
|
||||
|
||||
.. _man_named-checkzone:
|
||||
|
||||
named-checkzone, named-compilezone - zone file validity checking or converting tool
|
||||
-----------------------------------------------------------------------------------
|
||||
|
||||
Synopsis
|
||||
~~~~~~~~
|
||||
|
||||
:program:`named-checkzone` [**-d**] [**-h**] [**-j**] [**-q**] [**-v**] [**-c** class] [**-f** format] [**-F** format] [**-J** filename] [**-i** mode] [**-k** mode] [**-m** mode] [**-M** mode] [**-n** mode] [**-l** ttl] [**-L** serial] [**-o** filename] [**-r** mode] [**-s** style] [**-S** mode] [**-t** directory] [**-T** mode] [**-w** directory] [**-D**] [**-W** mode] {zonename} {filename}
|
||||
|
||||
:program:`named-compilezone` [**-d**] [**-j**] [**-q**] [**-v**] [**-c** class] [**-C** mode] [**-f** format] [**-F** format] [**-J** filename] [**-i** mode] [**-k** mode] [**-m** mode] [**-n** mode] [**-l** ttl] [**-L** serial] [**-r** mode] [**-s** style] [**-t** directory] [**-T** mode] [**-w** directory] [**-D**] [**-W** mode] {**-o** filename} {zonename} {filename}
|
||||
|
||||
Description
|
||||
~~~~~~~~~~~
|
||||
|
||||
``named-checkzone`` checks the syntax and integrity of a zone file. It
|
||||
performs the same checks as ``named`` does when loading a zone. This
|
||||
makes ``named-checkzone`` useful for checking zone files before
|
||||
configuring them into a name server.
|
||||
|
||||
``named-compilezone`` is similar to ``named-checkzone``, but it always
|
||||
dumps the zone contents to a specified file in a specified format.
|
||||
It also applies stricter check levels by default, since the
|
||||
dump output is used as an actual zone file loaded by ``named``.
|
||||
When manually specified otherwise, the check levels must at least be as
|
||||
strict as those specified in the ``named`` configuration file.
|
||||
|
||||
Options
|
||||
~~~~~~~
|
||||
|
||||
``-d``
|
||||
This option enables debugging.
|
||||
|
||||
``-h``
|
||||
This option prints the usage summary and exits.
|
||||
|
||||
``-q``
|
||||
This option sets quiet mode, which only sets an exit code to indicate
|
||||
successful or failed completion.
|
||||
|
||||
``-v``
|
||||
This option prints the version of the ``named-checkzone`` program and exits.
|
||||
|
||||
``-j``
|
||||
When loading a zone file, this option tells ``named`` to read the journal if it exists. The journal
|
||||
file name is assumed to be the zone file name with the
|
||||
string ``.jnl`` appended.
|
||||
|
||||
``-J filename``
|
||||
When loading the zone file, this option tells ``named`` to read the journal from the given file, if
|
||||
it exists. This implies ``-j``.
|
||||
|
||||
``-c class``
|
||||
This option specifies the class of the zone. If not specified, ``IN`` is assumed.
|
||||
|
||||
``-i mode``
|
||||
This option performs post-load zone integrity checks. Possible modes are
|
||||
``full`` (the default), ``full-sibling``, ``local``,
|
||||
``local-sibling``, and ``none``.
|
||||
|
||||
Mode ``full`` checks that MX records refer to A or AAAA records
|
||||
(both in-zone and out-of-zone hostnames). Mode ``local`` only
|
||||
checks MX records which refer to in-zone hostnames.
|
||||
|
||||
Mode ``full`` checks that SRV records refer to A or AAAA records
|
||||
(both in-zone and out-of-zone hostnames). Mode ``local`` only
|
||||
checks SRV records which refer to in-zone hostnames.
|
||||
|
||||
Mode ``full`` checks that delegation NS records refer to A or AAAA
|
||||
records (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 ``local`` only checks NS records which refer to in-zone
|
||||
hostnames or verifies that some required glue exists, i.e., when the
|
||||
name server is in a child zone.
|
||||
|
||||
Modes ``full-sibling`` and ``local-sibling`` disable sibling glue
|
||||
checks, but are otherwise the same as ``full`` and ``local``,
|
||||
respectively.
|
||||
|
||||
Mode ``none`` disables the checks.
|
||||
|
||||
``-f format``
|
||||
This option specifies the format of the zone file. Possible formats are ``text``
|
||||
(the default), ``raw``, and ``map``.
|
||||
|
||||
``-F format``
|
||||
This option specifies the format of the output file specified. For
|
||||
``named-checkzone``, this does not have any effect unless it dumps
|
||||
the zone contents.
|
||||
|
||||
Possible formats are ``text`` (the default), which is the standard
|
||||
textual representation of the zone, and ``map``, ``raw``, and
|
||||
``raw=N``, which store the zone in a binary format for rapid
|
||||
loading by ``named``. ``raw=N`` specifies the format version of the
|
||||
raw zone file: if ``N`` is 0, the raw file can be read by any version of
|
||||
``named``; if N is 1, the file can only be read by release 9.9.0 or
|
||||
higher. The default is 1.
|
||||
|
||||
``-k mode``
|
||||
This option performs ``check-names`` checks with the specified failure mode.
|
||||
Possible modes are ``fail`` (the default for ``named-compilezone``),
|
||||
``warn`` (the default for ``named-checkzone``), and ``ignore``.
|
||||
|
||||
``-l ttl``
|
||||
This option sets a maximum permissible TTL for the input file. Any record with a
|
||||
TTL higher than this value causes the zone to be rejected. This
|
||||
is similar to using the ``max-zone-ttl`` option in ``named.conf``.
|
||||
|
||||
``-L serial``
|
||||
When compiling a zone to ``raw`` or ``map`` format, this option sets the "source
|
||||
serial" value in the header to the specified serial number. This is
|
||||
expected to be used primarily for testing purposes.
|
||||
|
||||
``-m mode``
|
||||
This option specifies whether MX records should be checked to see if they are
|
||||
addresses. Possible modes are ``fail``, ``warn`` (the default), and
|
||||
``ignore``.
|
||||
|
||||
``-M mode``
|
||||
This option checks whether a MX record refers to a CNAME. Possible modes are
|
||||
``fail``, ``warn`` (the default), and ``ignore``.
|
||||
|
||||
``-n mode``
|
||||
This option specifies whether NS records should be checked to see if they are
|
||||
addresses. Possible modes are ``fail`` (the default for
|
||||
``named-compilezone``), ``warn`` (the default for ``named-checkzone``),
|
||||
and ``ignore``.
|
||||
|
||||
``-o filename``
|
||||
This option writes the zone output to ``filename``. If ``filename`` is ``-``, then
|
||||
the zone output is written to standard output. This is mandatory for ``named-compilezone``.
|
||||
|
||||
``-r mode``
|
||||
This option checks for records that are treated as different by DNSSEC but are
|
||||
semantically equal in plain DNS. Possible modes are ``fail``,
|
||||
``warn`` (the default), and ``ignore``.
|
||||
|
||||
``-s style``
|
||||
This option specifies the style of the dumped zone file. Possible styles are
|
||||
``full`` (the default) and ``relative``. The ``full`` format is most
|
||||
suitable for processing automatically by a separate script.
|
||||
The relative format is more human-readable and is thus
|
||||
suitable for editing by hand. For ``named-checkzone``, this does not
|
||||
have any effect unless it dumps the zone contents. It also does not
|
||||
have any meaning if the output format is not text.
|
||||
|
||||
``-S mode``
|
||||
This option checks whether an SRV record refers to a CNAME. Possible modes are
|
||||
``fail``, ``warn`` (the default), and ``ignore``.
|
||||
|
||||
``-t directory``
|
||||
This option tells ``named`` to chroot to ``directory``, so that ``include`` directives in the
|
||||
configuration file are processed as if run by a similarly chrooted
|
||||
``named``.
|
||||
|
||||
``-T mode``
|
||||
This option checks whether Sender Policy Framework (SPF) records exist and issues a
|
||||
warning if an SPF-formatted TXT record is not also present. Possible
|
||||
modes are ``warn`` (the default) and ``ignore``.
|
||||
|
||||
``-w directory``
|
||||
This option instructs ``named`` to chdir to ``directory``, so that relative filenames in master file
|
||||
``$INCLUDE`` directives work. This is similar to the directory clause in
|
||||
``named.conf``.
|
||||
|
||||
``-D``
|
||||
This option dumps the zone file in canonical format. This is always enabled for
|
||||
``named-compilezone``.
|
||||
|
||||
``-W mode``
|
||||
This option specifies 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 ``warn``
|
||||
(the default) and ``ignore``.
|
||||
|
||||
``zonename``
|
||||
This indicates the domain name of the zone being checked.
|
||||
|
||||
``filename``
|
||||
This is the name of the zone file.
|
||||
|
||||
Return Values
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
``named-checkzone`` returns an exit status of 1 if errors were detected
|
||||
and 0 otherwise.
|
||||
|
||||
See Also
|
||||
~~~~~~~~
|
||||
|
||||
:manpage:`named(8)`, :manpage:`named-checkconf(8)`, :rfc:`1035`, BIND 9 Administrator Reference
|
||||
Manual.
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|@PLATFORM@">
|
||||
<Configuration>Debug</Configuration>
|
||||
@@ -14,21 +14,18 @@
|
||||
<ProjectGuid>{03A96113-CB14-43AA-AEB2-48950E3915C5}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>checkconf</RootNamespace>
|
||||
@WINDOWS_TARGET_PLATFORM_VERSION@
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
@PLATFORM_TOOLSET@
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
@PLATFORM_TOOLSET@
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
@@ -44,31 +41,27 @@
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>..\..\..\Build\$(Configuration)\</OutDir>
|
||||
<IntDir>.\$(Configuration)\</IntDir>
|
||||
<IntDirSharingDetected>None</IntDirSharingDetected>
|
||||
<TargetName>named-$(ProjectName)</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>..\..\..\Build\$(Configuration)\</OutDir>
|
||||
<IntDir>.\$(Configuration)\</IntDir>
|
||||
<IntDirSharingDetected>None</IntDirSharingDetected>
|
||||
<TargetName>named-$(ProjectName)</TargetName>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<TreatWarningAsError>false</TreatWarningAsError>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
|
||||
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
<BrowseInformation>true</BrowseInformation>
|
||||
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
|
||||
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;..\..\..\lib\bind9\include;..\..\..\lib\isccfg\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
</ClCompile>
|
||||
@@ -77,19 +70,18 @@
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
|
||||
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\isccc\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);..\..\..\lib\ns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>@OPENSSL_LIB@checktool.lib;libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;libbind9.lib;libns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>checktool.lib;libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;libbind9.lib;libns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level1</WarningLevel>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<StringPooling>true</StringPooling>
|
||||
@@ -97,7 +89,6 @@
|
||||
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
|
||||
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
|
||||
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;..\..\..\lib\bind9\include;..\..\..\lib\isccfg\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
</ClCompile>
|
||||
@@ -108,7 +99,7 @@
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
|
||||
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\isccc\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);..\..\..\lib\ns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>@OPENSSL_LIB@checktool.lib;libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;libbind9.lib;libns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>checktool.lib;libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;libbind9.lib;libns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
@@ -118,26 +109,6 @@
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\named-checkconf.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\lib\isc\win32\libisc.vcxproj">
|
||||
<Project>{3840E563-D180-4761-AA9C-E6155F02EAFF}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\lib\dns\win32\libdns.vcxproj">
|
||||
<Project>{5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\lib\ns\win32\libns.vcxproj">
|
||||
<Project>{82ACD33C-E75F-45B8-BB6D-42643A10D7EE}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\lib\isccfg\win32\libisccfg.vcxproj">
|
||||
<Project>{B2DFA58C-6347-478E-81E8-01E06999D4F1}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\lib\bind9\win32\libbind9.vcxproj">
|
||||
<Project>{E741C10B-B075-4206-9596-46765B665E03}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\bin\check\win32\checktool.vcxproj">
|
||||
<Project>{2C1F7096-C5B5-48D4-846F-A7ACA454335D}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
</Project>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|@PLATFORM@">
|
||||
<Configuration>Debug</Configuration>
|
||||
@@ -17,21 +17,18 @@
|
||||
<ProjectGuid>{2C1F7096-C5B5-48D4-846F-A7ACA454335D}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>checktool</RootNamespace>
|
||||
@WINDOWS_TARGET_PLATFORM_VERSION@
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
@PLATFORM_TOOLSET@
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
@PLATFORM_TOOLSET@
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
@@ -48,30 +45,26 @@
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
|
||||
<IntDir>.\$(Configuration)\</IntDir>
|
||||
<IntDirSharingDetected>None</IntDirSharingDetected>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
|
||||
<OutDir>.\$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
|
||||
<IntDir>.\$(Configuration)\</IntDir>
|
||||
<IntDirSharingDetected>None</IntDirSharingDetected>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<TreatWarningAsError>false</TreatWarningAsError>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
|
||||
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
<BrowseInformation>true</BrowseInformation>
|
||||
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
|
||||
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\include;..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\dns\include;..\..\..\lib\ns\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
</ClCompile>
|
||||
@@ -81,14 +74,13 @@
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level1</WarningLevel>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<StringPooling>true</StringPooling>
|
||||
@@ -96,7 +88,6 @@
|
||||
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
|
||||
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
|
||||
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\include;..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\dns\include;..\..\..\lib\ns\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
</ClCompile>
|
||||
@@ -104,20 +95,6 @@
|
||||
<OutputFile>.\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\lib\isc\win32\libisc.vcxproj">
|
||||
<Project>{3840E563-D180-4761-AA9C-E6155F02EAFF}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\lib\dns\win32\libdns.vcxproj">
|
||||
<Project>{5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\lib\ns\win32\libns.vcxproj">
|
||||
<Project>{82ACD33C-E75F-45B8-BB6D-42643A10D7EE}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\lib\isccfg\win32\libisccfg.vcxproj">
|
||||
<Project>{B2DFA58C-6347-478E-81E8-01E06999D4F1}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
</Project>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|@PLATFORM@">
|
||||
<Configuration>Debug</Configuration>
|
||||
@@ -14,21 +14,18 @@
|
||||
<ProjectGuid>{66028555-7DD5-4016-B601-9EF9A1EE8BFA}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>checkzone</RootNamespace>
|
||||
@WINDOWS_TARGET_PLATFORM_VERSION@
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
@PLATFORM_TOOLSET@
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
@PLATFORM_TOOLSET@
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
@@ -44,40 +41,36 @@
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>..\..\..\Build\$(Configuration)\</OutDir>
|
||||
<IntDir>.\$(Configuration)\</IntDir>
|
||||
<IntDirSharingDetected>None</IntDirSharingDetected>
|
||||
<TargetName>named-$(ProjectName)</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>..\..\..\Build\$(Configuration)\</OutDir>
|
||||
<IntDir>.\$(Configuration)\</IntDir>
|
||||
<IntDirSharingDetected>None</IntDirSharingDetected>
|
||||
<TargetName>named-$(ProjectName)</TargetName>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<TreatWarningAsError>false</TreatWarningAsError>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
|
||||
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
<BrowseInformation>true</BrowseInformation>
|
||||
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
|
||||
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;..\..\..\lib\bind9\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
|
||||
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\ns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>@OPENSSL_LIB@checktool.lib;libisc.lib;libdns.lib;libisccfg.lib;libns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);..\..\..\lib\ns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>checktool.lib;libisc.lib;libdns.lib;libisccfg.lib;libbind9.lib;libns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>cd ..\..\..\Build\$(Configuration)
|
||||
@@ -88,14 +81,13 @@ copy /Y named-checkzone.ilk named-compilezone.ilk
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level1</WarningLevel>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<StringPooling>true</StringPooling>
|
||||
@@ -103,8 +95,7 @@ copy /Y named-checkzone.ilk named-compilezone.ilk
|
||||
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
|
||||
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
|
||||
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;..\..\..\lib\bind9\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@@ -113,8 +104,8 @@ copy /Y named-checkzone.ilk named-compilezone.ilk
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
|
||||
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\ns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>@OPENSSL_LIB@checktool.lib;libisc.lib;libdns.lib;libisccfg.lib;libns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);..\..\..\lib\ns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>checktool.lib;libisc.lib;libdns.lib;libisccfg.lib;libbind9.lib;libns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
@@ -129,23 +120,6 @@ copy /Y named-checkzone.exe named-compilezone.exe
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\named-checkzone.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\lib\isc\win32\libisc.vcxproj">
|
||||
<Project>{3840E563-D180-4761-AA9C-E6155F02EAFF}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\lib\dns\win32\libdns.vcxproj">
|
||||
<Project>{5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\lib\ns\win32\libns.vcxproj">
|
||||
<Project>{82ACD33C-E75F-45B8-BB6D-42643A10D7EE}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\lib\isccfg\win32\libisccfg.vcxproj">
|
||||
<Project>{B2DFA58C-6347-478E-81E8-01E06999D4F1}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\bin\check\win32\checktool.vcxproj">
|
||||
<Project>{2C1F7096-C5B5-48D4-846F-A7ACA454335D}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
</Project>
|
||||
@@ -1,30 +0,0 @@
|
||||
include $(top_srcdir)/Makefile.top
|
||||
|
||||
AM_CPPFLAGS += \
|
||||
$(LIBISC_CFLAGS) \
|
||||
$(LIBDNS_CFLAGS) \
|
||||
-DRNDC_KEYFILE=\"${sysconfdir}/rndc.key\"
|
||||
|
||||
LDADD = \
|
||||
libconfgen.la \
|
||||
$(LIBISC_LIBS) \
|
||||
$(LIBDNS_LIBS)
|
||||
|
||||
noinst_LTLIBRARIES = libconfgen.la
|
||||
|
||||
libconfgen_la_SOURCES = \
|
||||
include/confgen/os.h \
|
||||
keygen.h \
|
||||
keygen.c \
|
||||
util.h \
|
||||
util.c \
|
||||
unix/os.c
|
||||
|
||||
sbin_PROGRAMS = ddns-confgen rndc-confgen
|
||||
|
||||
install-exec-hook:
|
||||
ln -f $(DESTDIR)$(sbindir)/ddns-confgen \
|
||||
$(DESTDIR)$(sbindir)/tsig-confgen
|
||||
|
||||
uninstall-hook:
|
||||
-rm -f $(DESTDIR)$(sbindir)/tsig-confgen
|
||||
113
bin/confgen/Makefile.in
Normal file
113
bin/confgen/Makefile.in
Normal file
@@ -0,0 +1,113 @@
|
||||
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
#
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
#
|
||||
# See the COPYRIGHT file distributed with this work for additional
|
||||
# information regarding copyright ownership.
|
||||
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
|
||||
# Attempt to disable parallel processing.
|
||||
.NOTPARALLEL:
|
||||
.NO_PARALLEL:
|
||||
|
||||
VERSION=@BIND9_VERSION@
|
||||
|
||||
@BIND9_MAKE_INCLUDES@
|
||||
|
||||
CINCLUDES = -I${srcdir}/include ${ISC_INCLUDES} ${ISCCC_INCLUDES} \
|
||||
${ISCCFG_INCLUDES} ${DNS_INCLUDES} ${BIND9_INCLUDES}
|
||||
|
||||
CDEFINES =
|
||||
CWARNINGS =
|
||||
|
||||
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||
ISCCCLIBS = ../../lib/isccc/libisccc.@A@
|
||||
ISCLIBS = ../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
|
||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @ISC_OPENSSL_LIBS@
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
|
||||
BIND9LIBS = ../../lib/bind9/libbind9.@A@
|
||||
|
||||
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||
ISCCCDEPLIBS = ../../lib/isccc/libisccc.@A@
|
||||
ISCDEPLIBS = ../../lib/isc/libisc.@A@
|
||||
DNSDEPLIBS = ../../lib/dns/libdns.@A@
|
||||
BIND9DEPLIBS = ../../lib/bind9/libbind9.@A@
|
||||
|
||||
RNDCLIBS = ${ISCCFGLIBS} ${ISCCCLIBS} ${BIND9LIBS} ${DNSLIBS} ${ISCLIBS} @LIBS@
|
||||
RNDCDEPLIBS = ${ISCCFGDEPLIBS} ${ISCCCDEPLIBS} ${BIND9DEPLIBS} ${DNSDEPLIBS} ${ISCDEPLIBS}
|
||||
|
||||
LIBS = ${DNSLIBS} ${ISCLIBS} @LIBS@
|
||||
|
||||
NOSYMLIBS = ${DNSLIBS} ${ISCNOSYMLIBS} @LIBS@
|
||||
|
||||
CONFDEPLIBS = ${DNSDEPLIBS} ${ISCDEPLIBS}
|
||||
|
||||
SRCS= rndc-confgen.c ddns-confgen.c
|
||||
|
||||
SUBDIRS = unix
|
||||
|
||||
TARGETS = rndc-confgen@EXEEXT@ ddns-confgen@EXEEXT@ tsig-keygen@EXEEXT@
|
||||
|
||||
MANPAGES = rndc-confgen.8 ddns-confgen.8
|
||||
|
||||
HTMLPAGES = rndc-confgen.html ddns-confgen.html
|
||||
|
||||
MANOBJS = ${MANPAGES} ${HTMLPAGES}
|
||||
|
||||
UOBJS = unix/os.@O@
|
||||
|
||||
@BIND9_MAKE_RULES@
|
||||
|
||||
rndc-confgen.@O@: rndc-confgen.c
|
||||
${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \
|
||||
-DRNDC_KEYFILE=\"${sysconfdir}/rndc.key\" \
|
||||
-c ${srcdir}/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@ ${CONFDEPLIBS}
|
||||
export BASEOBJS="rndc-confgen.@O@ util.@O@ keygen.@O@ ${UOBJS}"; \
|
||||
${FINALBUILDCMD}
|
||||
|
||||
ddns-confgen@EXEEXT@: ddns-confgen.@O@ util.@O@ keygen.@O@ ${CONFDEPLIBS}
|
||||
export BASEOBJS="ddns-confgen.@O@ util.@O@ keygen.@O@ ${UOBJS}"; \
|
||||
${FINALBUILDCMD}
|
||||
|
||||
# make a link in the build directory to assist with testing
|
||||
tsig-keygen@EXEEXT@: ddns-confgen@EXEEXT@
|
||||
rm -f tsig-keygen@EXEEXT@
|
||||
${LINK_PROGRAM} ddns-confgen@EXEEXT@ tsig-keygen@EXEEXT@
|
||||
|
||||
doc man:: ${MANOBJS}
|
||||
|
||||
docclean manclean maintainer-clean::
|
||||
rm -f ${MANOBJS}
|
||||
|
||||
installdirs:
|
||||
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${sbindir}
|
||||
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man8
|
||||
|
||||
install:: rndc-confgen@EXEEXT@ ddns-confgen@EXEEXT@ installdirs
|
||||
${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} rndc-confgen@EXEEXT@ ${DESTDIR}${sbindir}
|
||||
${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} ddns-confgen@EXEEXT@ ${DESTDIR}${sbindir}
|
||||
${INSTALL_DATA} ${srcdir}/rndc-confgen.8 ${DESTDIR}${mandir}/man8
|
||||
${INSTALL_DATA} ${srcdir}/ddns-confgen.8 ${DESTDIR}${mandir}/man8
|
||||
(cd ${DESTDIR}${sbindir}; rm -f tsig-keygen@EXEEXT@; ${LINK_PROGRAM} ddns-confgen@EXEEXT@ tsig-keygen@EXEEXT@)
|
||||
(cd ${DESTDIR}${mandir}/man8; rm -f tsig-keygen.8; ${LINK_PROGRAM} ddns-confgen.8 tsig-keygen.8)
|
||||
|
||||
uninstall::
|
||||
rm -f ${DESTDIR}${mandir}/man8/tsig-keygen.8
|
||||
rm -f ${DESTDIR}${sbindir}/tsig-keygen@EXEEXT@
|
||||
rm -f ${DESTDIR}${mandir}/man8/ddns-confgen.8
|
||||
rm -f ${DESTDIR}${mandir}/man8/rndc-confgen.8
|
||||
${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${sbindir}/ddns-confgen@EXEEXT@
|
||||
${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${sbindir}/rndc-confgen@EXEEXT@
|
||||
|
||||
clean distclean maintainer-clean::
|
||||
rm -f ${TARGETS}
|
||||
148
bin/confgen/ddns-confgen.8
Normal file
148
bin/confgen/ddns-confgen.8
Normal file
@@ -0,0 +1,148 @@
|
||||
.\" Copyright (C) 2009, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\"
|
||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
||||
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
.\" file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
.\"
|
||||
.hy 0
|
||||
.ad l
|
||||
'\" t
|
||||
.\" Title: ddns-confgen
|
||||
.\" Author:
|
||||
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
|
||||
.\" Date: 2014-03-06
|
||||
.\" Manual: BIND9
|
||||
.\" Source: ISC
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "DDNS\-CONFGEN" "8" "2014\-03\-06" "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
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" 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
|
||||
.SH "SYNOPSIS"
|
||||
.HP \w'\fBtsig\-keygen\fR\ 'u
|
||||
\fBtsig\-keygen\fR [\fB\-a\ \fR\fB\fIalgorithm\fR\fR] [\fB\-h\fR] [name]
|
||||
.HP \w'\fBddns\-confgen\fR\ 'u
|
||||
\fBddns\-confgen\fR [\fB\-a\ \fR\fB\fIalgorithm\fR\fR] [\fB\-h\fR] [\fB\-k\ \fR\fB\fIkeyname\fR\fR] [\fB\-q\fR] [\fB\-r\ \fR\fB\fIrandomfile\fR\fR] [\-s\ \fIname\fR | \-z\ \fIzone\fR]
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
\fBtsig\-keygen\fR
|
||||
and
|
||||
\fBddns\-confgen\fR
|
||||
are invocation methods for a utility that generates keys for use in TSIG signing\&. The resulting keys can be used, for example, to secure dynamic DNS updates to a zone or for the
|
||||
\fBrndc\fR
|
||||
command channel\&.
|
||||
.PP
|
||||
When run as
|
||||
\fBtsig\-keygen\fR, a domain name can be specified on the command line which will be used as the name of the generated key\&. If no name is specified, the default is
|
||||
\fBtsig\-key\fR\&.
|
||||
.PP
|
||||
When run as
|
||||
\fBddns\-confgen\fR, the generated key is accompanied by configuration text and instructions that can be used with
|
||||
\fBnsupdate\fR
|
||||
and
|
||||
\fBnamed\fR
|
||||
when setting up dynamic DNS, including an example
|
||||
\fBupdate\-policy\fR
|
||||
statement\&. (This usage similar to the
|
||||
\fBrndc\-confgen\fR
|
||||
command for setting up command channel security\&.)
|
||||
.PP
|
||||
Note that
|
||||
\fBnamed\fR
|
||||
itself can configure a local DDNS key for use with
|
||||
\fBnsupdate \-l\fR: it does this when a zone is configured with
|
||||
\fBupdate\-policy local;\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\&.
|
||||
.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\&. Options are case\-insensitive, and the "hmac\-" prefix may be omitted\&.
|
||||
.RE
|
||||
.PP
|
||||
\-h
|
||||
.RS 4
|
||||
Prints a short summary of options and arguments\&.
|
||||
.RE
|
||||
.PP
|
||||
\-k \fIkeyname\fR
|
||||
.RS 4
|
||||
Specifies the key name of the DDNS authentication key\&. The default is
|
||||
\fBddns\-key\fR
|
||||
when neither the
|
||||
\fB\-s\fR
|
||||
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\&.
|
||||
.RE
|
||||
.PP
|
||||
\-q
|
||||
.RS 4
|
||||
(\fBddns\-confgen\fR
|
||||
only\&.) Quiet mode: Print only the key, with no explanatory text or usage examples; This is essentially identical to
|
||||
\fBtsig\-keygen\fR\&.
|
||||
.RE
|
||||
.PP
|
||||
\-s \fIname\fR
|
||||
.RS 4
|
||||
(\fBddns\-confgen\fR
|
||||
only\&.) Generate configuration example to allow dynamic updates of a single hostname\&. The example
|
||||
\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
|
||||
\fB\-z\fR
|
||||
option\&.
|
||||
.RE
|
||||
.PP
|
||||
\-z \fIzone\fR
|
||||
.RS 4
|
||||
(\fBddns\-confgen\fR
|
||||
only\&.) Generate configuration example to allow dynamic updates of a zone: The example
|
||||
\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
|
||||
\fB\-s\fR
|
||||
option\&.
|
||||
.RE
|
||||
.SH "SEE ALSO"
|
||||
.PP
|
||||
\fBnsupdate\fR(1),
|
||||
\fBnamed.conf\fR(5),
|
||||
\fBnamed\fR(8),
|
||||
BIND 9 Administrator Reference Manual\&.
|
||||
.SH "AUTHOR"
|
||||
.PP
|
||||
\fBInternet Systems Consortium, Inc\&.\fR
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
Copyright \(co 2009, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.br
|
||||
@@ -17,16 +17,17 @@
|
||||
* and the corresponding key and update-policy statements in named.conf.
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdbool.h>
|
||||
#include <config.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#include <isc/assertions.h>
|
||||
#include <isc/attributes.h>
|
||||
#include <isc/base64.h>
|
||||
#include <isc/buffer.h>
|
||||
#include <isc/commandline.h>
|
||||
#include <isc/file.h>
|
||||
#include <isc/keyboard.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/net.h>
|
||||
#include <isc/print.h>
|
||||
@@ -35,31 +36,30 @@
|
||||
#include <isc/time.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#if USE_PKCS11
|
||||
#if HAVE_PKCS11
|
||||
#include <pk11/result.h>
|
||||
#endif /* if USE_PKCS11 */
|
||||
#endif
|
||||
|
||||
#include <dns/keyvalues.h>
|
||||
#include <dns/name.h>
|
||||
#include <dns/result.h>
|
||||
|
||||
#include <dst/dst.h>
|
||||
|
||||
#include <confgen/os.h>
|
||||
|
||||
#include "keygen.h"
|
||||
#include "util.h"
|
||||
#include "keygen.h"
|
||||
|
||||
#define KEYGEN_DEFAULT "tsig-key"
|
||||
#define CONFGEN_DEFAULT "ddns-key"
|
||||
#define KEYGEN_DEFAULT "tsig-key"
|
||||
#define CONFGEN_DEFAULT "ddns-key"
|
||||
|
||||
static char program[256];
|
||||
const char *progname;
|
||||
static enum { progmode_keygen, progmode_confgen } progmode;
|
||||
bool verbose = false; /* needed by util.c but not used here */
|
||||
static enum { progmode_keygen, progmode_confgen} progmode;
|
||||
isc_boolean_t verbose = ISC_FALSE; /* needed by util.c but not used here */
|
||||
|
||||
ISC_NORETURN static void
|
||||
usage(int status);
|
||||
ISC_PLATFORM_NORETURN_PRE static void
|
||||
usage(int status) ISC_PLATFORM_NORETURN_POST;
|
||||
|
||||
static void
|
||||
usage(int status) {
|
||||
@@ -72,23 +72,23 @@ Usage:\n\
|
||||
-s name: domain name to be updated using the created key\n\
|
||||
-z zone: name of the zone as it will be used in named.conf\n\
|
||||
-q: quiet mode: print the key, with no explanatory text\n",
|
||||
progname);
|
||||
progname);
|
||||
} else {
|
||||
fprintf(stderr, "\
|
||||
Usage:\n\
|
||||
%s [-a alg] [keyname]\n\
|
||||
-a alg: algorithm (default hmac-sha256)\n\n",
|
||||
progname);
|
||||
progname);
|
||||
}
|
||||
|
||||
exit(status);
|
||||
exit (status);
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char **argv) {
|
||||
isc_result_t result = ISC_R_SUCCESS;
|
||||
bool show_final_mem = false;
|
||||
bool quiet = false;
|
||||
isc_boolean_t show_final_mem = ISC_FALSE;
|
||||
isc_boolean_t quiet = ISC_FALSE;
|
||||
isc_buffer_t key_txtbuffer;
|
||||
char key_txtsecret[256];
|
||||
isc_mem_t *mctx = NULL;
|
||||
@@ -102,141 +102,130 @@ main(int argc, char **argv) {
|
||||
int len = 0;
|
||||
int ch;
|
||||
|
||||
#if USE_PKCS11
|
||||
#if HAVE_PKCS11
|
||||
pk11_result_register();
|
||||
#endif /* if USE_PKCS11 */
|
||||
#endif
|
||||
dns_result_register();
|
||||
|
||||
result = isc_file_progname(*argv, program, sizeof(program));
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS)
|
||||
memmove(program, "tsig-keygen", 11);
|
||||
}
|
||||
progname = program;
|
||||
|
||||
/*
|
||||
* Libtool doesn't preserve the program name prior to final
|
||||
* installation. Remove the libtool prefix ("lt-").
|
||||
*/
|
||||
if (strncmp(progname, "lt-", 3) == 0) {
|
||||
if (strncmp(progname, "lt-", 3) == 0)
|
||||
progname += 3;
|
||||
}
|
||||
|
||||
#define PROGCMP(X) \
|
||||
(strcasecmp(progname, X) == 0 || strcasecmp(progname, X ".exe") == 0)
|
||||
|
||||
if (PROGCMP("tsig-keygen")) {
|
||||
progmode = progmode_keygen;
|
||||
quiet = true;
|
||||
} else if (PROGCMP("ddns-confgen")) {
|
||||
quiet = ISC_TRUE;
|
||||
} else if (PROGCMP("ddns-confgen"))
|
||||
progmode = progmode_confgen;
|
||||
} else {
|
||||
else
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
isc_commandline_errprint = false;
|
||||
isc_commandline_errprint = ISC_FALSE;
|
||||
|
||||
while ((ch = isc_commandline_parse(argc, argv, "a:hk:Mmr:qs:y:z:")) !=
|
||||
-1) {
|
||||
while ((ch = isc_commandline_parse(argc, argv,
|
||||
"a:hk:Mmr:qs:y:z:")) != -1) {
|
||||
switch (ch) {
|
||||
case 'a':
|
||||
algname = isc_commandline_argument;
|
||||
alg = alg_fromtext(algname);
|
||||
if (alg == DST_ALG_UNKNOWN) {
|
||||
if (alg == DST_ALG_UNKNOWN)
|
||||
fatal("Unsupported algorithm '%s'", algname);
|
||||
}
|
||||
keysize = alg_bits(alg);
|
||||
break;
|
||||
case 'h':
|
||||
usage(0);
|
||||
case 'k':
|
||||
case 'y':
|
||||
if (progmode == progmode_confgen) {
|
||||
if (progmode == progmode_confgen)
|
||||
keyname = isc_commandline_argument;
|
||||
} else {
|
||||
else
|
||||
usage(1);
|
||||
}
|
||||
break;
|
||||
case 'M':
|
||||
isc_mem_debugging = ISC_MEM_DEBUGTRACE;
|
||||
break;
|
||||
case 'm':
|
||||
show_final_mem = true;
|
||||
show_final_mem = ISC_TRUE;
|
||||
break;
|
||||
case 'q':
|
||||
if (progmode == progmode_confgen) {
|
||||
quiet = true;
|
||||
} else {
|
||||
if (progmode == progmode_confgen)
|
||||
quiet = ISC_TRUE;
|
||||
else
|
||||
usage(1);
|
||||
}
|
||||
break;
|
||||
case 'r':
|
||||
fatal("The -r option has been deprecated.");
|
||||
break;
|
||||
case 's':
|
||||
if (progmode == progmode_confgen) {
|
||||
if (progmode == progmode_confgen)
|
||||
self_domain = isc_commandline_argument;
|
||||
} else {
|
||||
else
|
||||
usage(1);
|
||||
}
|
||||
break;
|
||||
case 'z':
|
||||
if (progmode == progmode_confgen) {
|
||||
if (progmode == progmode_confgen)
|
||||
zone = isc_commandline_argument;
|
||||
} else {
|
||||
else
|
||||
usage(1);
|
||||
}
|
||||
break;
|
||||
case '?':
|
||||
if (isc_commandline_option != '?') {
|
||||
fprintf(stderr, "%s: invalid argument -%c\n",
|
||||
program, isc_commandline_option);
|
||||
usage(1);
|
||||
} else {
|
||||
} else
|
||||
usage(0);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr, "%s: unhandled option -%c\n", program,
|
||||
isc_commandline_option);
|
||||
fprintf(stderr, "%s: unhandled option -%c\n",
|
||||
program, isc_commandline_option);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
if (progmode == progmode_keygen) {
|
||||
if (progmode == progmode_keygen)
|
||||
keyname = argv[isc_commandline_index++];
|
||||
}
|
||||
|
||||
POST(argv);
|
||||
|
||||
if (self_domain != NULL && zone != NULL) {
|
||||
usage(1); /* -s and -z cannot coexist */
|
||||
}
|
||||
if (self_domain != NULL && zone != NULL)
|
||||
usage(1); /* -s and -z cannot coexist */
|
||||
|
||||
if (argc > isc_commandline_index) {
|
||||
if (argc > isc_commandline_index)
|
||||
usage(1);
|
||||
}
|
||||
|
||||
/* Use canonical algorithm name */
|
||||
algname = alg_totext(alg);
|
||||
|
||||
isc_mem_create(&mctx);
|
||||
DO("create memory context", isc_mem_create(0, 0, &mctx));
|
||||
|
||||
if (keyname == NULL) {
|
||||
const char *suffix = NULL;
|
||||
|
||||
keyname = ((progmode == progmode_keygen) ? KEYGEN_DEFAULT
|
||||
: CONFGEN_DEFAULT);
|
||||
if (self_domain != NULL) {
|
||||
keyname = ((progmode == progmode_keygen)
|
||||
? KEYGEN_DEFAULT
|
||||
: CONFGEN_DEFAULT);
|
||||
if (self_domain != NULL)
|
||||
suffix = self_domain;
|
||||
} else if (zone != NULL) {
|
||||
else if (zone != NULL)
|
||||
suffix = zone;
|
||||
}
|
||||
if (suffix != NULL) {
|
||||
len = strlen(keyname) + strlen(suffix) + 2;
|
||||
keybuf = isc_mem_get(mctx, len);
|
||||
if (keybuf == NULL)
|
||||
fatal("failed to allocate memory for keyname");
|
||||
snprintf(keybuf, len, "%s.%s", keyname, suffix);
|
||||
keyname = (const char *)keybuf;
|
||||
keyname = (const char *) keybuf;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -244,19 +233,20 @@ main(int argc, char **argv) {
|
||||
|
||||
generate_key(mctx, alg, keysize, &key_txtbuffer);
|
||||
|
||||
if (!quiet) {
|
||||
|
||||
if (!quiet)
|
||||
printf("\
|
||||
# To activate this key, place the following in named.conf, and\n\
|
||||
# in a separate keyfile on the system or systems from which nsupdate\n\
|
||||
# will be run:\n");
|
||||
}
|
||||
|
||||
printf("\
|
||||
key \"%s\" {\n\
|
||||
algorithm %s;\n\
|
||||
secret \"%.*s\";\n\
|
||||
};\n",
|
||||
keyname, algname, (int)isc_buffer_usedlength(&key_txtbuffer),
|
||||
keyname, algname,
|
||||
(int)isc_buffer_usedlength(&key_txtbuffer),
|
||||
(char *)isc_buffer_base(&key_txtbuffer));
|
||||
|
||||
if (!quiet) {
|
||||
@@ -294,15 +284,14 @@ update-policy {\n\
|
||||
# After the keyfile has been placed, the following command will\n\
|
||||
# execute nsupdate using this key:\n\
|
||||
nsupdate -k <keyfile>\n");
|
||||
|
||||
}
|
||||
|
||||
if (keybuf != NULL) {
|
||||
if (keybuf != NULL)
|
||||
isc_mem_put(mctx, keybuf, len);
|
||||
}
|
||||
|
||||
if (show_final_mem) {
|
||||
if (show_final_mem)
|
||||
isc_mem_stats(mctx, stderr);
|
||||
}
|
||||
|
||||
isc_mem_destroy(&mctx);
|
||||
|
||||
|
||||
211
bin/confgen/ddns-confgen.docbook
Normal file
211
bin/confgen/ddns-confgen.docbook
Normal file
@@ -0,0 +1,211 @@
|
||||
<!--
|
||||
- Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
-
|
||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
-
|
||||
- See the COPYRIGHT file distributed with this work for additional
|
||||
- information regarding copyright ownership.
|
||||
-->
|
||||
|
||||
<!-- Converted by db4-upgrade version 1.0 -->
|
||||
<refentry xmlns:db="http://docbook.org/ns/docbook" version="5.0" xml:id="man.ddns-confgen">
|
||||
<info>
|
||||
<date>2014-03-06</date>
|
||||
</info>
|
||||
<refentryinfo>
|
||||
<corpname>ISC</corpname>
|
||||
<corpauthor>Internet Systems Consortium, Inc.</corpauthor>
|
||||
</refentryinfo>
|
||||
|
||||
<refmeta>
|
||||
<refentrytitle><application>ddns-confgen</application></refentrytitle>
|
||||
<manvolnum>8</manvolnum>
|
||||
<refmiscinfo>BIND9</refmiscinfo>
|
||||
</refmeta>
|
||||
|
||||
<refnamediv>
|
||||
<refname><application>ddns-confgen</application></refname>
|
||||
<refpurpose>ddns key generation tool</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<docinfo>
|
||||
<copyright>
|
||||
<year>2009</year>
|
||||
<year>2014</year>
|
||||
<year>2015</year>
|
||||
<year>2016</year>
|
||||
<year>2018</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis sepchar=" ">
|
||||
<command>tsig-keygen</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">name</arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis sepchar=" ">
|
||||
<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>-q</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>
|
||||
</group>
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
|
||||
<refsection><info><title>DESCRIPTION</title></info>
|
||||
|
||||
<para>
|
||||
<command>tsig-keygen</command> and <command>ddns-confgen</command>
|
||||
are invocation methods for a utility that generates keys for use
|
||||
in TSIG signing. The resulting keys can be used, for example,
|
||||
to secure dynamic DNS updates to a zone or for the
|
||||
<command>rndc</command> command channel.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
When run as <command>tsig-keygen</command>, a domain name
|
||||
can be specified on the command line which will be used as
|
||||
the name of the generated key. If no name is specified,
|
||||
the default is <constant>tsig-key</constant>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
When run as <command>ddns-confgen</command>, the generated
|
||||
key is accompanied by configuration text and instructions
|
||||
that can be used with <command>nsupdate</command> and
|
||||
<command>named</command> when setting up dynamic DNS,
|
||||
including an example <command>update-policy</command>
|
||||
statement. (This usage similar to the
|
||||
<command>rndc-confgen</command> command for setting
|
||||
up command channel security.)
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Note that <command>named</command> itself can configure a
|
||||
local DDNS key for use with <command>nsupdate -l</command>:
|
||||
it does this when a zone is configured with
|
||||
<command>update-policy local;</command>.
|
||||
<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>
|
||||
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>-a <replaceable class="parameter">algorithm</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
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.
|
||||
Options are case-insensitive, and the "hmac-" prefix
|
||||
may be omitted.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-h</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Prints a short summary of options and arguments.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-k <replaceable class="parameter">keyname</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the key name of the DDNS authentication key.
|
||||
The default is <constant>ddns-key</constant> when neither
|
||||
the <option>-s</option> nor <option>-z</option> option is
|
||||
specified; otherwise, the default
|
||||
is <constant>ddns-key</constant> as a separate label
|
||||
followed by the argument of the option, e.g.,
|
||||
<constant>ddns-key.example.com.</constant>
|
||||
The key name must have the format of a valid domain name,
|
||||
consisting of letters, digits, hyphens and periods.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-q</term>
|
||||
<listitem>
|
||||
<para>
|
||||
(<command>ddns-confgen</command> only.) Quiet mode: Print
|
||||
only the key, with no explanatory text or usage examples;
|
||||
This is essentially identical to <command>tsig-keygen</command>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-s <replaceable class="parameter">name</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
(<command>ddns-confgen</command> only.)
|
||||
Generate configuration example to allow dynamic updates
|
||||
of a single hostname. The example <command>named.conf</command>
|
||||
text shows how to set an update policy for the specified
|
||||
<replaceable class="parameter">name</replaceable>
|
||||
using the "name" nametype. The default key name is
|
||||
ddns-key.<replaceable class="parameter">name</replaceable>.
|
||||
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 <option>-z</option> option.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-z <replaceable class="parameter">zone</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
(<command>ddns-confgen</command> only.)
|
||||
Generate configuration example to allow dynamic updates
|
||||
of a zone: The example <command>named.conf</command> text
|
||||
shows how to set an update policy for the specified
|
||||
<replaceable class="parameter">zone</replaceable>
|
||||
using the "zonesub" nametype, allowing updates to
|
||||
all subdomain names within that
|
||||
<replaceable class="parameter">zone</replaceable>.
|
||||
This option cannot be used with the <option>-s</option> option.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsection>
|
||||
|
||||
<refsection><info><title>SEE ALSO</title></info>
|
||||
|
||||
<para><citerefentry>
|
||||
<refentrytitle>nsupdate</refentrytitle><manvolnum>1</manvolnum>
|
||||
</citerefentry>,
|
||||
<citerefentry>
|
||||
<refentrytitle>named.conf</refentrytitle><manvolnum>5</manvolnum>
|
||||
</citerefentry>,
|
||||
<citerefentry>
|
||||
<refentrytitle>named</refentrytitle><manvolnum>8</manvolnum>
|
||||
</citerefentry>,
|
||||
<citetitle>BIND 9 Administrator Reference Manual</citetitle>.
|
||||
</para>
|
||||
</refsection>
|
||||
|
||||
</refentry>
|
||||
187
bin/confgen/ddns-confgen.html
Normal file
187
bin/confgen/ddns-confgen.html
Normal file
@@ -0,0 +1,187 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--
|
||||
- Copyright (C) 2009, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
-
|
||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
-->
|
||||
<html lang="en">
|
||||
<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">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry">
|
||||
<a name="man.ddns-confgen"></a><div class="titlepage"></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="refnamediv">
|
||||
<h2>Name</h2>
|
||||
<p>
|
||||
<span class="application">ddns-confgen</span>
|
||||
— ddns key generation tool
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="refsynopsisdiv">
|
||||
<h2>Synopsis</h2>
|
||||
<div class="cmdsynopsis"><p>
|
||||
<code class="command">tsig-keygen</code>
|
||||
[<code class="option">-a <em class="replaceable"><code>algorithm</code></em></code>]
|
||||
[<code class="option">-h</code>]
|
||||
[name]
|
||||
</p></div>
|
||||
<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">-q</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>
|
||||
]
|
||||
</p></div>
|
||||
</div>
|
||||
|
||||
<div class="refsection">
|
||||
<a name="id-1.7"></a><h2>DESCRIPTION</h2>
|
||||
|
||||
<p>
|
||||
<span class="command"><strong>tsig-keygen</strong></span> and <span class="command"><strong>ddns-confgen</strong></span>
|
||||
are invocation methods for a utility that generates keys for use
|
||||
in TSIG signing. The resulting keys can be used, for example,
|
||||
to secure dynamic DNS updates to a zone or for the
|
||||
<span class="command"><strong>rndc</strong></span> command channel.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
When run as <span class="command"><strong>tsig-keygen</strong></span>, a domain name
|
||||
can be specified on the command line which will be used as
|
||||
the name of the generated key. If no name is specified,
|
||||
the default is <code class="constant">tsig-key</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
When run as <span class="command"><strong>ddns-confgen</strong></span>, the generated
|
||||
key is accompanied by configuration text and instructions
|
||||
that can be used with <span class="command"><strong>nsupdate</strong></span> and
|
||||
<span class="command"><strong>named</strong></span> when setting up dynamic DNS,
|
||||
including an example <span class="command"><strong>update-policy</strong></span>
|
||||
statement. (This usage similar to the
|
||||
<span class="command"><strong>rndc-confgen</strong></span> command for setting
|
||||
up command channel security.)
|
||||
</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>:
|
||||
it does this when a zone is configured with
|
||||
<span class="command"><strong>update-policy local;</strong></span>.
|
||||
<span class="command"><strong>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.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="refsection">
|
||||
<a name="id-1.8"></a><h2>OPTIONS</h2>
|
||||
|
||||
|
||||
<div class="variablelist"><dl class="variablelist">
|
||||
<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
|
||||
choices are: hmac-md5, hmac-sha1, hmac-sha224, hmac-sha256,
|
||||
hmac-sha384 and hmac-sha512. The default is hmac-sha256.
|
||||
Options are case-insensitive, and the "hmac-" prefix
|
||||
may be omitted.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-h</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Prints a short summary of options and arguments.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-k <em class="replaceable"><code>keyname</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Specifies the key name of the DDNS authentication key.
|
||||
The default is <code class="constant">ddns-key</code> when neither
|
||||
the <code class="option">-s</code> nor <code class="option">-z</code> option is
|
||||
specified; otherwise, the default
|
||||
is <code class="constant">ddns-key</code> as a separate label
|
||||
followed by the argument of the option, e.g.,
|
||||
<code class="constant">ddns-key.example.com.</code>
|
||||
The key name must have the format of a valid domain name,
|
||||
consisting of letters, digits, hyphens and periods.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-q</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
(<span class="command"><strong>ddns-confgen</strong></span> only.) Quiet mode: Print
|
||||
only the key, with no explanatory text or usage examples;
|
||||
This is essentially identical to <span class="command"><strong>tsig-keygen</strong></span>.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-s <em class="replaceable"><code>name</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
(<span class="command"><strong>ddns-confgen</strong></span> only.)
|
||||
Generate configuration example to allow dynamic updates
|
||||
of a single hostname. The example <span class="command"><strong>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. The default key name is
|
||||
ddns-key.<em class="replaceable"><code>name</code></em>.
|
||||
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 <code class="option">-z</code> option.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-z <em class="replaceable"><code>zone</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
(<span class="command"><strong>ddns-confgen</strong></span> only.)
|
||||
Generate configuration example to allow dynamic updates
|
||||
of a zone: The example <span class="command"><strong>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 names within that
|
||||
<em class="replaceable"><code>zone</code></em>.
|
||||
This option cannot be used with the <code class="option">-s</code> option.
|
||||
</p>
|
||||
</dd>
|
||||
</dl></div>
|
||||
</div>
|
||||
|
||||
<div class="refsection">
|
||||
<a name="id-1.9"></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></body>
|
||||
</html>
|
||||
@@ -1,103 +0,0 @@
|
||||
..
|
||||
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
|
||||
This Source Code Form is subject to the terms of the Mozilla Public
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
See the COPYRIGHT file distributed with this work for additional
|
||||
information regarding copyright ownership.
|
||||
|
||||
..
|
||||
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
|
||||
This Source Code Form is subject to the terms of the Mozilla Public
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
See the COPYRIGHT file distributed with this work for additional
|
||||
information regarding copyright ownership.
|
||||
|
||||
|
||||
.. highlight: console
|
||||
|
||||
.. _man_ddns-confgen:
|
||||
|
||||
ddns-confgen - ddns key generation tool
|
||||
---------------------------------------
|
||||
|
||||
Synopsis
|
||||
~~~~~~~~
|
||||
:program:`tsig-keygen` [**-a** algorithm] [**-h**] [**-r** randomfile] [**-s** name]
|
||||
|
||||
:program:`ddns-confgen` [**-a** algorithm] [**-h**] [**-k** keyname] [**-q**] [**-r** randomfile] [**-s** name] [**-z** zone]
|
||||
|
||||
Description
|
||||
~~~~~~~~~~~
|
||||
|
||||
``tsig-keygen`` and ``ddns-confgen`` are invocation methods for a
|
||||
utility that generates keys for use in TSIG signing. The resulting keys
|
||||
can be used, for example, to secure dynamic DNS updates to a zone or for
|
||||
the ``rndc`` command channel.
|
||||
|
||||
When run as ``tsig-keygen``, a domain name can be specified on the
|
||||
command line to be used as the name of the generated key. If no
|
||||
name is specified, the default is ``tsig-key``.
|
||||
|
||||
When run as ``ddns-confgen``, the generated key is accompanied by
|
||||
configuration text and instructions that can be used with ``nsupdate``
|
||||
and ``named`` when setting up dynamic DNS, including an example
|
||||
``update-policy`` statement. (This usage is similar to the ``rndc-confgen``
|
||||
command for setting up command-channel security.)
|
||||
|
||||
Note that ``named`` itself can configure a local DDNS key for use with
|
||||
``nsupdate -l``; it does this when a zone is configured with
|
||||
``update-policy local;``. ``ddns-confgen`` is only needed when a more
|
||||
elaborate configuration is required: for instance, if ``nsupdate`` is to
|
||||
be used from a remote system.
|
||||
|
||||
Options
|
||||
~~~~~~~
|
||||
|
||||
``-a algorithm``
|
||||
This option 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. Options are
|
||||
case-insensitive, and the "hmac-" prefix may be omitted.
|
||||
|
||||
``-h``
|
||||
This option prints a short summary of options and arguments.
|
||||
|
||||
``-k keyname``
|
||||
This option specifies the key name of the DDNS authentication key. The default is
|
||||
``ddns-key`` when neither the ``-s`` nor ``-z`` option is specified;
|
||||
otherwise, the default is ``ddns-key`` as a separate label followed
|
||||
by the argument of the option, e.g., ``ddns-key.example.com.`` The
|
||||
key name must have the format of a valid domain name, consisting of
|
||||
letters, digits, hyphens, and periods.
|
||||
|
||||
``-q`` (``ddns-confgen`` only)
|
||||
This option enables quiet mode, which prints only the key, with no
|
||||
explanatory text or usage examples. This is essentially identical to
|
||||
``tsig-keygen``.
|
||||
|
||||
``-s name`` (``ddns-confgen`` only)
|
||||
This option generates a configuration example to allow
|
||||
dynamic updates of a single hostname. The example ``named.conf`` text
|
||||
shows how to set an update policy for the specified name using the
|
||||
"name" nametype. The default key name is ``ddns-key.name``. 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 ``-z``
|
||||
option.
|
||||
|
||||
``-z zone`` (``ddns-confgen`` only)
|
||||
This option generates a configuration example to allow
|
||||
dynamic updates of a zone. The example ``named.conf`` text shows how
|
||||
to set an update policy for the specified zone using the "zonesub"
|
||||
nametype, allowing updates to all subdomain names within that zone.
|
||||
This option cannot be used with the ``-s`` option.
|
||||
|
||||
See Also
|
||||
~~~~~~~~
|
||||
|
||||
:manpage:`nsupdate(1)`, :manpage:`named.conf(5)`, :manpage:`named(8)`, BIND 9 Administrator Reference Manual.
|
||||
@@ -1 +0,0 @@
|
||||
../../../.clang-format.headers
|
||||
@@ -9,19 +9,18 @@
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
|
||||
/*! \file */
|
||||
|
||||
#ifndef RNDC_OS_H
|
||||
#define RNDC_OS_H 1
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <isc/lang.h>
|
||||
#include <stdio.h>
|
||||
|
||||
ISC_LANG_BEGINDECLS
|
||||
|
||||
int
|
||||
set_user(FILE *fd, const char *user);
|
||||
int set_user(FILE *fd, const char *user);
|
||||
/*%<
|
||||
* Set the owner of the file referenced by 'fd' to 'user'.
|
||||
* Returns:
|
||||
@@ -31,4 +30,4 @@ set_user(FILE *fd, const char *user);
|
||||
|
||||
ISC_LANG_ENDDECLS
|
||||
|
||||
#endif /* ifndef RNDC_OS_H */
|
||||
#endif
|
||||
|
||||
@@ -9,15 +9,18 @@
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include "keygen.h"
|
||||
#include <stdarg.h>
|
||||
#include <config.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#include <isc/base64.h>
|
||||
#include <isc/buffer.h>
|
||||
#include <isc/file.h>
|
||||
#include <isc/keyboard.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
@@ -29,10 +32,10 @@
|
||||
#include <dns/name.h>
|
||||
|
||||
#include <dst/dst.h>
|
||||
|
||||
#include <confgen/os.h>
|
||||
|
||||
#include "util.h"
|
||||
#include "keygen.h"
|
||||
|
||||
/*%
|
||||
* Convert algorithm type to string.
|
||||
@@ -40,20 +43,22 @@
|
||||
const char *
|
||||
alg_totext(dns_secalg_t alg) {
|
||||
switch (alg) {
|
||||
case DST_ALG_HMACMD5:
|
||||
return ("hmac-md5");
|
||||
case DST_ALG_HMACSHA1:
|
||||
return ("hmac-sha1");
|
||||
case DST_ALG_HMACSHA224:
|
||||
return ("hmac-sha224");
|
||||
case DST_ALG_HMACSHA256:
|
||||
return ("hmac-sha256");
|
||||
case DST_ALG_HMACSHA384:
|
||||
return ("hmac-sha384");
|
||||
case DST_ALG_HMACSHA512:
|
||||
return ("hmac-sha512");
|
||||
default:
|
||||
return ("(unknown)");
|
||||
#ifndef PK11_MD5_DISABLE
|
||||
case DST_ALG_HMACMD5:
|
||||
return "hmac-md5";
|
||||
#endif
|
||||
case DST_ALG_HMACSHA1:
|
||||
return "hmac-sha1";
|
||||
case DST_ALG_HMACSHA224:
|
||||
return "hmac-sha224";
|
||||
case DST_ALG_HMACSHA256:
|
||||
return "hmac-sha256";
|
||||
case DST_ALG_HMACSHA384:
|
||||
return "hmac-sha384";
|
||||
case DST_ALG_HMACSHA512:
|
||||
return "hmac-sha512";
|
||||
default:
|
||||
return "(unknown)";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,29 +68,24 @@ alg_totext(dns_secalg_t alg) {
|
||||
dns_secalg_t
|
||||
alg_fromtext(const char *name) {
|
||||
const char *p = name;
|
||||
if (strncasecmp(p, "hmac-", 5) == 0) {
|
||||
if (strncasecmp(p, "hmac-", 5) == 0)
|
||||
p = &name[5];
|
||||
}
|
||||
|
||||
if (strcasecmp(p, "md5") == 0) {
|
||||
return (DST_ALG_HMACMD5);
|
||||
}
|
||||
if (strcasecmp(p, "sha1") == 0) {
|
||||
return (DST_ALG_HMACSHA1);
|
||||
}
|
||||
if (strcasecmp(p, "sha224") == 0) {
|
||||
return (DST_ALG_HMACSHA224);
|
||||
}
|
||||
if (strcasecmp(p, "sha256") == 0) {
|
||||
return (DST_ALG_HMACSHA256);
|
||||
}
|
||||
if (strcasecmp(p, "sha384") == 0) {
|
||||
return (DST_ALG_HMACSHA384);
|
||||
}
|
||||
if (strcasecmp(p, "sha512") == 0) {
|
||||
return (DST_ALG_HMACSHA512);
|
||||
}
|
||||
return (DST_ALG_UNKNOWN);
|
||||
#ifndef PK11_MD5_DISABLE
|
||||
if (strcasecmp(p, "md5") == 0)
|
||||
return DST_ALG_HMACMD5;
|
||||
#endif
|
||||
if (strcasecmp(p, "sha1") == 0)
|
||||
return DST_ALG_HMACSHA1;
|
||||
if (strcasecmp(p, "sha224") == 0)
|
||||
return DST_ALG_HMACSHA224;
|
||||
if (strcasecmp(p, "sha256") == 0)
|
||||
return DST_ALG_HMACSHA256;
|
||||
if (strcasecmp(p, "sha384") == 0)
|
||||
return DST_ALG_HMACSHA384;
|
||||
if (strcasecmp(p, "sha512") == 0)
|
||||
return DST_ALG_HMACSHA512;
|
||||
return DST_ALG_UNKNOWN;
|
||||
}
|
||||
|
||||
/*%
|
||||
@@ -94,20 +94,20 @@ alg_fromtext(const char *name) {
|
||||
int
|
||||
alg_bits(dns_secalg_t alg) {
|
||||
switch (alg) {
|
||||
case DST_ALG_HMACMD5:
|
||||
return (128);
|
||||
case DST_ALG_HMACSHA1:
|
||||
return (160);
|
||||
case DST_ALG_HMACSHA224:
|
||||
return (224);
|
||||
case DST_ALG_HMACSHA256:
|
||||
return (256);
|
||||
case DST_ALG_HMACSHA384:
|
||||
return (384);
|
||||
case DST_ALG_HMACSHA512:
|
||||
return (512);
|
||||
default:
|
||||
return (0);
|
||||
case DST_ALG_HMACMD5:
|
||||
return 128;
|
||||
case DST_ALG_HMACSHA1:
|
||||
return 160;
|
||||
case DST_ALG_HMACSHA224:
|
||||
return 224;
|
||||
case DST_ALG_HMACSHA256:
|
||||
return 256;
|
||||
case DST_ALG_HMACSHA384:
|
||||
return 384;
|
||||
case DST_ALG_HMACSHA512:
|
||||
return 512;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,31 +124,32 @@ generate_key(isc_mem_t *mctx, dns_secalg_t alg, int keysize,
|
||||
dst_key_t *key = NULL;
|
||||
|
||||
switch (alg) {
|
||||
case DST_ALG_HMACMD5:
|
||||
case DST_ALG_HMACSHA1:
|
||||
case DST_ALG_HMACSHA224:
|
||||
case DST_ALG_HMACSHA256:
|
||||
if (keysize < 1 || keysize > 512) {
|
||||
#ifndef PK11_MD5_DISABLE
|
||||
case DST_ALG_HMACMD5:
|
||||
#endif
|
||||
case DST_ALG_HMACSHA1:
|
||||
case DST_ALG_HMACSHA224:
|
||||
case DST_ALG_HMACSHA256:
|
||||
if (keysize < 1 || keysize > 512)
|
||||
fatal("keysize %d out of range (must be 1-512)\n",
|
||||
keysize);
|
||||
}
|
||||
break;
|
||||
case DST_ALG_HMACSHA384:
|
||||
case DST_ALG_HMACSHA512:
|
||||
if (keysize < 1 || keysize > 1024) {
|
||||
case DST_ALG_HMACSHA384:
|
||||
case DST_ALG_HMACSHA512:
|
||||
if (keysize < 1 || keysize > 1024)
|
||||
fatal("keysize %d out of range (must be 1-1024)\n",
|
||||
keysize);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
default:
|
||||
fatal("unsupported algorithm %d\n", alg);
|
||||
}
|
||||
|
||||
DO("initialize dst library", dst_lib_init(mctx, NULL));
|
||||
|
||||
DO("generate key",
|
||||
dst_key_generate(dns_rootname, alg, keysize, 0, 0, DNS_KEYPROTO_ANY,
|
||||
dns_rdataclass_in, mctx, &key, NULL));
|
||||
DO("generate key", dst_key_generate(dns_rootname, alg,
|
||||
keysize, 0, 0, DNS_KEYPROTO_ANY,
|
||||
dns_rdataclass_in, mctx, &key,
|
||||
NULL));
|
||||
|
||||
isc_buffer_init(&key_rawbuffer, &key_rawsecret, sizeof(key_rawsecret));
|
||||
|
||||
@@ -156,12 +157,11 @@ generate_key(isc_mem_t *mctx, dns_secalg_t alg, int keysize,
|
||||
|
||||
isc_buffer_usedregion(&key_rawbuffer, &key_rawregion);
|
||||
|
||||
DO("bsse64 encode secret",
|
||||
isc_base64_totext(&key_rawregion, -1, "", key_txtbuffer));
|
||||
DO("bsse64 encode secret", isc_base64_totext(&key_rawregion, -1, "",
|
||||
key_txtbuffer));
|
||||
|
||||
if (key != NULL) {
|
||||
if (key != NULL)
|
||||
dst_key_free(&key);
|
||||
}
|
||||
|
||||
dst_lib_destroy();
|
||||
}
|
||||
@@ -172,8 +172,9 @@ generate_key(isc_mem_t *mctx, dns_secalg_t alg, int keysize,
|
||||
* the name 'keyname' and the secret in the buffer 'secret'.
|
||||
*/
|
||||
void
|
||||
write_key_file(const char *keyfile, const char *user, const char *keyname,
|
||||
isc_buffer_t *secret, dns_secalg_t alg) {
|
||||
write_key_file(const char *keyfile, const char *user,
|
||||
const char *keyname, isc_buffer_t *secret,
|
||||
dns_secalg_t alg) {
|
||||
isc_result_t result;
|
||||
const char *algname = alg_totext(alg);
|
||||
FILE *fd = NULL;
|
||||
@@ -181,21 +182,20 @@ write_key_file(const char *keyfile, const char *user, const char *keyname,
|
||||
DO("create keyfile", isc_file_safecreate(keyfile, &fd));
|
||||
|
||||
if (user != NULL) {
|
||||
if (set_user(fd, user) == -1) {
|
||||
if (set_user(fd, user) == -1)
|
||||
fatal("unable to set file owner\n");
|
||||
}
|
||||
}
|
||||
|
||||
fprintf(fd,
|
||||
"key \"%s\" {\n\talgorithm %s;\n"
|
||||
fprintf(fd, "key \"%s\" {\n\talgorithm %s;\n"
|
||||
"\tsecret \"%.*s\";\n};\n",
|
||||
keyname, algname, (int)isc_buffer_usedlength(secret),
|
||||
keyname, algname,
|
||||
(int)isc_buffer_usedlength(secret),
|
||||
(char *)isc_buffer_base(secret));
|
||||
fflush(fd);
|
||||
if (ferror(fd)) {
|
||||
if (ferror(fd))
|
||||
fatal("write to %s failed\n", keyfile);
|
||||
}
|
||||
if (fclose(fd)) {
|
||||
if (fclose(fd))
|
||||
fatal("fclose(%s) failed\n", keyfile);
|
||||
}
|
||||
fprintf(stderr, "wrote key file \"%s\"\n", keyfile);
|
||||
}
|
||||
|
||||
|
||||
@@ -9,33 +9,26 @@
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef RNDC_KEYGEN_H
|
||||
#define RNDC_KEYGEN_H 1
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <isc/buffer.h>
|
||||
#include <isc/lang.h>
|
||||
#include <isc/mem.h>
|
||||
|
||||
#include <dns/secalg.h>
|
||||
|
||||
ISC_LANG_BEGINDECLS
|
||||
|
||||
void
|
||||
generate_key(isc_mem_t *mctx, dns_secalg_t alg, int keysize,
|
||||
isc_buffer_t *key_txtbuffer);
|
||||
void generate_key(isc_mem_t *mctx, dns_secalg_t alg, int keysize,
|
||||
isc_buffer_t *key_txtbuffer);
|
||||
|
||||
void
|
||||
write_key_file(const char *keyfile, const char *user, const char *keyname,
|
||||
isc_buffer_t *secret, dns_secalg_t alg);
|
||||
void write_key_file(const char *keyfile, const char *user,
|
||||
const char *keyname, isc_buffer_t *secret,
|
||||
dns_secalg_t alg);
|
||||
|
||||
const char *
|
||||
alg_totext(dns_secalg_t alg);
|
||||
dns_secalg_t
|
||||
alg_fromtext(const char *name);
|
||||
int
|
||||
alg_bits(dns_secalg_t alg);
|
||||
const char *alg_totext(dns_secalg_t alg);
|
||||
dns_secalg_t alg_fromtext(const char *name);
|
||||
int alg_bits(dns_secalg_t alg);
|
||||
|
||||
ISC_LANG_ENDDECLS
|
||||
|
||||
|
||||
210
bin/confgen/rndc-confgen.8
Normal file
210
bin/confgen/rndc-confgen.8
Normal file
@@ -0,0 +1,210 @@
|
||||
.\" Copyright (C) 2001, 2003-2005, 2007, 2009, 2013-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\"
|
||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
||||
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
.\" file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
.\"
|
||||
.hy 0
|
||||
.ad l
|
||||
'\" t
|
||||
.\" Title: rndc-confgen
|
||||
.\" Author:
|
||||
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
|
||||
.\" Date: 2013-03-14
|
||||
.\" Manual: BIND9
|
||||
.\" Source: ISC
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "RNDC\-CONFGEN" "8" "2013\-03\-14" "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
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" 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
|
||||
.SH "SYNOPSIS"
|
||||
.HP \w'\fBrndc\-confgen\fR\ 'u
|
||||
\fBrndc\-confgen\fR [\fB\-a\fR] [\fB\-A\ \fR\fB\fIalgorithm\fR\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\-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
|
||||
file and the corresponding
|
||||
\fBcontrols\fR
|
||||
and
|
||||
\fBkey\fR
|
||||
statements in
|
||||
named\&.conf
|
||||
by hand\&. Alternatively, it can be run with the
|
||||
\fB\-a\fR
|
||||
option to set up a
|
||||
rndc\&.key
|
||||
file and avoid the need for a
|
||||
rndc\&.conf
|
||||
file and a
|
||||
\fBcontrols\fR
|
||||
statement altogether\&.
|
||||
.SH "OPTIONS"
|
||||
.PP
|
||||
\-a
|
||||
.RS 4
|
||||
Do automatic
|
||||
\fBrndc\fR
|
||||
configuration\&. This creates a file
|
||||
rndc\&.key
|
||||
in
|
||||
/etc
|
||||
(or whatever
|
||||
\fIsysconfdir\fR
|
||||
was specified as when
|
||||
BIND
|
||||
was built) that is read by both
|
||||
\fBrndc\fR
|
||||
and
|
||||
\fBnamed\fR
|
||||
on startup\&. The
|
||||
rndc\&.key
|
||||
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\&.
|
||||
.sp
|
||||
Running
|
||||
\fBrndc\-confgen \-a\fR
|
||||
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\&.
|
||||
.sp
|
||||
If a more elaborate configuration than that generated by
|
||||
\fBrndc\-confgen \-a\fR
|
||||
is required, for example if rndc is to be used remotely, you should run
|
||||
\fBrndc\-confgen\fR
|
||||
without the
|
||||
\fB\-a\fR
|
||||
option and set up a
|
||||
rndc\&.conf
|
||||
and
|
||||
named\&.conf
|
||||
as directed\&.
|
||||
.RE
|
||||
.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\&.
|
||||
.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 the hash size\&.
|
||||
.RE
|
||||
.PP
|
||||
\-c \fIkeyfile\fR
|
||||
.RS 4
|
||||
Used with the
|
||||
\fB\-a\fR
|
||||
option to specify an alternate location for
|
||||
rndc\&.key\&.
|
||||
.RE
|
||||
.PP
|
||||
\-h
|
||||
.RS 4
|
||||
Prints a short summary of the options and arguments to
|
||||
\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\&.
|
||||
.RE
|
||||
.PP
|
||||
\-p \fIport\fR
|
||||
.RS 4
|
||||
Specifies the command channel port where
|
||||
\fBnamed\fR
|
||||
listens for connections from
|
||||
\fBrndc\fR\&. The default is 953\&.
|
||||
.RE
|
||||
.PP
|
||||
\-s \fIaddress\fR
|
||||
.RS 4
|
||||
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\&.
|
||||
.RE
|
||||
.PP
|
||||
\-t \fIchrootdir\fR
|
||||
.RS 4
|
||||
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 be written relative to this directory so that it will be found by the chrooted
|
||||
\fBnamed\fR\&.
|
||||
.RE
|
||||
.PP
|
||||
\-u \fIuser\fR
|
||||
.RS 4
|
||||
Used with the
|
||||
\fB\-a\fR
|
||||
option to set the owner of the
|
||||
rndc\&.key
|
||||
file generated\&. If
|
||||
\fB\-t\fR
|
||||
is also specified only the file in the chroot area has its owner changed\&.
|
||||
.RE
|
||||
.SH "EXAMPLES"
|
||||
.PP
|
||||
To allow
|
||||
\fBrndc\fR
|
||||
to be used with no manual configuration, run
|
||||
.PP
|
||||
\fBrndc\-confgen \-a\fR
|
||||
.PP
|
||||
To print a sample
|
||||
rndc\&.conf
|
||||
file and corresponding
|
||||
\fBcontrols\fR
|
||||
and
|
||||
\fBkey\fR
|
||||
statements to be manually inserted into
|
||||
named\&.conf, run
|
||||
.PP
|
||||
\fBrndc\-confgen\fR
|
||||
.SH "SEE ALSO"
|
||||
.PP
|
||||
\fBrndc\fR(8),
|
||||
\fBrndc.conf\fR(5),
|
||||
\fBnamed\fR(8),
|
||||
BIND 9 Administrator Reference Manual\&.
|
||||
.SH "AUTHOR"
|
||||
.PP
|
||||
\fBInternet Systems Consortium, Inc\&.\fR
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
Copyright \(co 2001, 2003-2005, 2007, 2009, 2013-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.br
|
||||
@@ -20,16 +20,17 @@
|
||||
* controls statement altogether.
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdbool.h>
|
||||
#include <config.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#include <isc/assertions.h>
|
||||
#include <isc/attributes.h>
|
||||
#include <isc/base64.h>
|
||||
#include <isc/buffer.h>
|
||||
#include <isc/commandline.h>
|
||||
#include <isc/file.h>
|
||||
#include <isc/keyboard.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/net.h>
|
||||
#include <isc/print.h>
|
||||
@@ -44,28 +45,28 @@
|
||||
#include <dns/name.h>
|
||||
|
||||
#include <dst/dst.h>
|
||||
|
||||
#include <confgen/os.h>
|
||||
|
||||
#include "keygen.h"
|
||||
#include "util.h"
|
||||
#include "keygen.h"
|
||||
|
||||
#define DEFAULT_KEYNAME "rndc-key"
|
||||
#define DEFAULT_SERVER "127.0.0.1"
|
||||
#define DEFAULT_PORT 953
|
||||
#define DEFAULT_KEYNAME "rndc-key"
|
||||
#define DEFAULT_SERVER "127.0.0.1"
|
||||
#define DEFAULT_PORT 953
|
||||
|
||||
static char program[256];
|
||||
const char *progname;
|
||||
|
||||
bool verbose = false;
|
||||
isc_boolean_t verbose = ISC_FALSE;
|
||||
|
||||
const char *keyfile, *keydef;
|
||||
|
||||
ISC_NORETURN static void
|
||||
usage(int status);
|
||||
ISC_PLATFORM_NORETURN_PRE static void
|
||||
usage(int status) ISC_PLATFORM_NORETURN_POST;
|
||||
|
||||
static void
|
||||
usage(int status) {
|
||||
|
||||
fprintf(stderr, "\
|
||||
Usage:\n\
|
||||
%s [-a] [-b bits] [-c keyfile] [-k keyname] [-p port] \
|
||||
@@ -76,18 +77,17 @@ Usage:\n\
|
||||
-c keyfile: specify an alternate key file (requires -a)\n\
|
||||
-k keyname: the name as it will be used in named.conf and rndc.conf\n\
|
||||
-p port: the port named will listen on and rndc will connect to\n\
|
||||
-q: suppress printing written key path\n\
|
||||
-s addr: the address to which rndc should connect\n\
|
||||
-t chrootdir: write a keyfile in chrootdir as well (requires -a)\n\
|
||||
-u user: set the keyfile owner to \"user\" (requires -a)\n",
|
||||
progname, keydef);
|
||||
progname, keydef);
|
||||
|
||||
exit(status);
|
||||
exit (status);
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char **argv) {
|
||||
bool show_final_mem = false;
|
||||
isc_boolean_t show_final_mem = ISC_FALSE;
|
||||
isc_buffer_t key_txtbuffer;
|
||||
char key_txtsecret[256];
|
||||
isc_mem_t *mctx = NULL;
|
||||
@@ -104,16 +104,14 @@ main(int argc, char **argv) {
|
||||
struct in6_addr addr6_dummy;
|
||||
char *chrootdir = NULL;
|
||||
char *user = NULL;
|
||||
bool keyonly = false;
|
||||
bool quiet = false;
|
||||
isc_boolean_t keyonly = ISC_FALSE;
|
||||
int len;
|
||||
|
||||
keydef = keyfile = RNDC_KEYFILE;
|
||||
|
||||
result = isc_file_progname(*argv, program, sizeof(program));
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS)
|
||||
memmove(program, "rndc-confgen", 13);
|
||||
}
|
||||
progname = program;
|
||||
|
||||
keyname = DEFAULT_KEYNAME;
|
||||
@@ -121,27 +119,25 @@ main(int argc, char **argv) {
|
||||
serveraddr = DEFAULT_SERVER;
|
||||
port = DEFAULT_PORT;
|
||||
|
||||
isc_commandline_errprint = false;
|
||||
isc_commandline_errprint = ISC_FALSE;
|
||||
|
||||
while ((ch = isc_commandline_parse(argc, argv,
|
||||
"aA:b:c:hk:Mmp:r:s:t:u:Vy")) != -1)
|
||||
{
|
||||
switch (ch) {
|
||||
case 'a':
|
||||
keyonly = true;
|
||||
keyonly = ISC_TRUE;
|
||||
break;
|
||||
case 'A':
|
||||
algname = isc_commandline_argument;
|
||||
alg = alg_fromtext(algname);
|
||||
if (alg == DST_ALG_UNKNOWN) {
|
||||
if (alg == DST_ALG_UNKNOWN)
|
||||
fatal("Unsupported algorithm '%s'", algname);
|
||||
}
|
||||
break;
|
||||
case 'b':
|
||||
keysize = strtol(isc_commandline_argument, &p, 10);
|
||||
if (*p != '\0' || keysize < 0) {
|
||||
if (*p != '\0' || keysize < 0)
|
||||
fatal("-b requires a non-negative number");
|
||||
}
|
||||
break;
|
||||
case 'c':
|
||||
keyfile = isc_commandline_argument;
|
||||
@@ -149,7 +145,7 @@ main(int argc, char **argv) {
|
||||
case 'h':
|
||||
usage(0);
|
||||
case 'k':
|
||||
case 'y': /* Compatible with rndc -y. */
|
||||
case 'y': /* Compatible with rndc -y. */
|
||||
keyname = isc_commandline_argument;
|
||||
break;
|
||||
case 'M':
|
||||
@@ -157,17 +153,13 @@ main(int argc, char **argv) {
|
||||
break;
|
||||
|
||||
case 'm':
|
||||
show_final_mem = true;
|
||||
show_final_mem = ISC_TRUE;
|
||||
break;
|
||||
case 'p':
|
||||
port = strtol(isc_commandline_argument, &p, 10);
|
||||
if (*p != '\0' || port < 0 || port > 65535) {
|
||||
if (*p != '\0' || port < 0 || port > 65535)
|
||||
fatal("port '%s' out of range",
|
||||
isc_commandline_argument);
|
||||
}
|
||||
break;
|
||||
case 'q':
|
||||
quiet = true;
|
||||
break;
|
||||
case 'r':
|
||||
fatal("The -r option has been deprecated.");
|
||||
@@ -176,9 +168,7 @@ main(int argc, char **argv) {
|
||||
serveraddr = isc_commandline_argument;
|
||||
if (inet_pton(AF_INET, serveraddr, &addr4_dummy) != 1 &&
|
||||
inet_pton(AF_INET6, serveraddr, &addr6_dummy) != 1)
|
||||
{
|
||||
fatal("-s should be an IPv4 or IPv6 address");
|
||||
}
|
||||
break;
|
||||
case 't':
|
||||
chrootdir = isc_commandline_argument;
|
||||
@@ -187,20 +177,19 @@ main(int argc, char **argv) {
|
||||
user = isc_commandline_argument;
|
||||
break;
|
||||
case 'V':
|
||||
verbose = true;
|
||||
verbose = ISC_TRUE;
|
||||
break;
|
||||
case '?':
|
||||
if (isc_commandline_option != '?') {
|
||||
fprintf(stderr, "%s: invalid argument -%c\n",
|
||||
program, isc_commandline_option);
|
||||
usage(1);
|
||||
} else {
|
||||
} else
|
||||
usage(0);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr, "%s: unhandled option -%c\n", program,
|
||||
isc_commandline_option);
|
||||
fprintf(stderr, "%s: unhandled option -%c\n",
|
||||
program, isc_commandline_option);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
@@ -209,22 +198,20 @@ main(int argc, char **argv) {
|
||||
argv += isc_commandline_index;
|
||||
POST(argv);
|
||||
|
||||
if (argc > 0) {
|
||||
if (argc > 0)
|
||||
usage(1);
|
||||
}
|
||||
|
||||
if (alg == DST_ALG_HMACMD5) {
|
||||
fprintf(stderr, "warning: use of hmac-md5 for RNDC keys "
|
||||
"is deprecated; hmac-sha256 is now "
|
||||
"recommended.\n");
|
||||
fprintf(stderr,
|
||||
"warning: use of hmac-md5 for RNDC keys "
|
||||
"is deprecated; hmac-sha256 is now recommended.\n");
|
||||
}
|
||||
|
||||
if (keysize < 0) {
|
||||
if (keysize < 0)
|
||||
keysize = alg_bits(alg);
|
||||
}
|
||||
algname = alg_totext(alg);
|
||||
|
||||
isc_mem_create(&mctx);
|
||||
DO("create memory context", isc_mem_create(0, 0, &mctx));
|
||||
isc_buffer_init(&key_txtbuffer, &key_txtsecret, sizeof(key_txtsecret));
|
||||
|
||||
generate_key(mctx, alg, keysize, &key_txtbuffer);
|
||||
@@ -232,21 +219,17 @@ main(int argc, char **argv) {
|
||||
if (keyonly) {
|
||||
write_key_file(keyfile, chrootdir == NULL ? user : NULL,
|
||||
keyname, &key_txtbuffer, alg);
|
||||
if (!quiet) {
|
||||
printf("wrote key file \"%s\"\n", keyfile);
|
||||
}
|
||||
|
||||
if (chrootdir != NULL) {
|
||||
char *buf;
|
||||
len = strlen(chrootdir) + strlen(keyfile) + 2;
|
||||
buf = isc_mem_get(mctx, len);
|
||||
if (buf == NULL)
|
||||
fatal("isc_mem_get(%d) failed\n", len);
|
||||
snprintf(buf, len, "%s%s%s", chrootdir,
|
||||
(*keyfile != '/') ? "/" : "", keyfile);
|
||||
|
||||
write_key_file(buf, user, keyname, &key_txtbuffer, alg);
|
||||
if (!quiet) {
|
||||
printf("wrote key file \"%s\"\n", buf);
|
||||
}
|
||||
isc_mem_put(mctx, buf, len);
|
||||
}
|
||||
} else {
|
||||
@@ -277,16 +260,16 @@ options {\n\
|
||||
# End of named.conf\n",
|
||||
keyname, algname,
|
||||
(int)isc_buffer_usedlength(&key_txtbuffer),
|
||||
(char *)isc_buffer_base(&key_txtbuffer), keyname,
|
||||
serveraddr, port, keyname, algname,
|
||||
(char *)isc_buffer_base(&key_txtbuffer),
|
||||
keyname, serveraddr, port,
|
||||
keyname, algname,
|
||||
(int)isc_buffer_usedlength(&key_txtbuffer),
|
||||
(char *)isc_buffer_base(&key_txtbuffer), serveraddr,
|
||||
port, serveraddr, keyname);
|
||||
(char *)isc_buffer_base(&key_txtbuffer),
|
||||
serveraddr, port, serveraddr, keyname);
|
||||
}
|
||||
|
||||
if (show_final_mem) {
|
||||
if (show_final_mem)
|
||||
isc_mem_stats(mctx, stderr);
|
||||
}
|
||||
|
||||
isc_mem_destroy(&mctx);
|
||||
|
||||
|
||||
269
bin/confgen/rndc-confgen.docbook
Normal file
269
bin/confgen/rndc-confgen.docbook
Normal file
@@ -0,0 +1,269 @@
|
||||
<!--
|
||||
- Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
-
|
||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
-
|
||||
- See the COPYRIGHT file distributed with this work for additional
|
||||
- information regarding copyright ownership.
|
||||
-->
|
||||
|
||||
<!-- Converted by db4-upgrade version 1.0 -->
|
||||
<refentry xmlns:db="http://docbook.org/ns/docbook" version="5.0" xml:id="man.rndc-confgen">
|
||||
<info>
|
||||
<date>2013-03-14</date>
|
||||
</info>
|
||||
<refentryinfo>
|
||||
<corpname>ISC</corpname>
|
||||
<corpauthor>Internet Systems Consortium, Inc.</corpauthor>
|
||||
</refentryinfo>
|
||||
|
||||
<refmeta>
|
||||
<refentrytitle><application>rndc-confgen</application></refentrytitle>
|
||||
<manvolnum>8</manvolnum>
|
||||
<refmiscinfo>BIND9</refmiscinfo>
|
||||
</refmeta>
|
||||
|
||||
<refnamediv>
|
||||
<refname><application>rndc-confgen</application></refname>
|
||||
<refpurpose>rndc key generation tool</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<docinfo>
|
||||
<copyright>
|
||||
<year>2001</year>
|
||||
<year>2003</year>
|
||||
<year>2004</year>
|
||||
<year>2005</year>
|
||||
<year>2007</year>
|
||||
<year>2009</year>
|
||||
<year>2013</year>
|
||||
<year>2014</year>
|
||||
<year>2015</year>
|
||||
<year>2016</year>
|
||||
<year>2017</year>
|
||||
<year>2018</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis sepchar=" ">
|
||||
<command>rndc-confgen</command>
|
||||
<arg choice="opt" rep="norepeat"><option>-a</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-A <replaceable class="parameter">algorithm</replaceable></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>-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>
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
|
||||
<refsection><info><title>DESCRIPTION</title></info>
|
||||
|
||||
<para><command>rndc-confgen</command>
|
||||
generates configuration files
|
||||
for <command>rndc</command>. It can be used as a
|
||||
convenient alternative to writing the
|
||||
<filename>rndc.conf</filename> file
|
||||
and the corresponding <command>controls</command>
|
||||
and <command>key</command>
|
||||
statements in <filename>named.conf</filename> by hand.
|
||||
Alternatively, it can be run with the <command>-a</command>
|
||||
option to set up a <filename>rndc.key</filename> file and
|
||||
avoid the need for a <filename>rndc.conf</filename> file
|
||||
and a <command>controls</command> statement altogether.
|
||||
</para>
|
||||
|
||||
</refsection>
|
||||
|
||||
<refsection><info><title>OPTIONS</title></info>
|
||||
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>-a</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Do automatic <command>rndc</command> configuration.
|
||||
This creates a file <filename>rndc.key</filename>
|
||||
in <filename>/etc</filename> (or whatever
|
||||
<varname>sysconfdir</varname>
|
||||
was specified as when <acronym>BIND</acronym> was
|
||||
built)
|
||||
that is read by both <command>rndc</command>
|
||||
and <command>named</command> on startup. The
|
||||
<filename>rndc.key</filename> file defines a default
|
||||
command channel and authentication key allowing
|
||||
<command>rndc</command> to communicate with
|
||||
<command>named</command> on the local host
|
||||
with no further configuration.
|
||||
</para>
|
||||
<para>
|
||||
Running <command>rndc-confgen -a</command> allows
|
||||
BIND 9 and <command>rndc</command> to be used as
|
||||
drop-in
|
||||
replacements for BIND 8 and <command>ndc</command>,
|
||||
with no changes to the existing BIND 8
|
||||
<filename>named.conf</filename> file.
|
||||
</para>
|
||||
<para>
|
||||
If a more elaborate configuration than that
|
||||
generated by <command>rndc-confgen -a</command>
|
||||
is required, for example if rndc is to be used remotely,
|
||||
you should run <command>rndc-confgen</command> without
|
||||
the
|
||||
<command>-a</command> option and set up a
|
||||
<filename>rndc.conf</filename> and
|
||||
<filename>named.conf</filename>
|
||||
as directed.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-A <replaceable class="parameter">algorithm</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
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.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-b <replaceable class="parameter">keysize</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the size of the authentication key in bits.
|
||||
Must be between 1 and 512 bits; the default is the
|
||||
hash size.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-c <replaceable class="parameter">keyfile</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Used with the <command>-a</command> option to specify
|
||||
an alternate location for <filename>rndc.key</filename>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-h</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Prints a short summary of the options and arguments to
|
||||
<command>rndc-confgen</command>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-k <replaceable class="parameter">keyname</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the key name of the rndc authentication key.
|
||||
This must be a valid domain name.
|
||||
The default is <constant>rndc-key</constant>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-p <replaceable class="parameter">port</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the command channel port where <command>named</command>
|
||||
listens for connections from <command>rndc</command>.
|
||||
The default is 953.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-s <replaceable class="parameter">address</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the IP address where <command>named</command>
|
||||
listens for command channel connections from
|
||||
<command>rndc</command>. The default is the loopback
|
||||
address 127.0.0.1.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-t <replaceable class="parameter">chrootdir</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Used with the <command>-a</command> option to specify
|
||||
a directory where <command>named</command> will run
|
||||
chrooted. An additional copy of the <filename>rndc.key</filename>
|
||||
will be written relative to this directory so that
|
||||
it will be found by the chrooted <command>named</command>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-u <replaceable class="parameter">user</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Used with the <command>-a</command> option to set the
|
||||
owner
|
||||
of the <filename>rndc.key</filename> file generated.
|
||||
If
|
||||
<command>-t</command> is also specified only the file
|
||||
in
|
||||
the chroot area has its owner changed.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
</refsection>
|
||||
|
||||
<refsection><info><title>EXAMPLES</title></info>
|
||||
|
||||
<para>
|
||||
To allow <command>rndc</command> to be used with
|
||||
no manual configuration, run
|
||||
</para>
|
||||
<para><userinput>rndc-confgen -a</userinput>
|
||||
</para>
|
||||
<para>
|
||||
To print a sample <filename>rndc.conf</filename> file and
|
||||
corresponding <command>controls</command> and <command>key</command>
|
||||
statements to be manually inserted into <filename>named.conf</filename>,
|
||||
run
|
||||
</para>
|
||||
<para><userinput>rndc-confgen</userinput>
|
||||
</para>
|
||||
</refsection>
|
||||
|
||||
<refsection><info><title>SEE ALSO</title></info>
|
||||
|
||||
<para><citerefentry>
|
||||
<refentrytitle>rndc</refentrytitle><manvolnum>8</manvolnum>
|
||||
</citerefentry>,
|
||||
<citerefentry>
|
||||
<refentrytitle>rndc.conf</refentrytitle><manvolnum>5</manvolnum>
|
||||
</citerefentry>,
|
||||
<citerefentry>
|
||||
<refentrytitle>named</refentrytitle><manvolnum>8</manvolnum>
|
||||
</citerefentry>,
|
||||
<citetitle>BIND 9 Administrator Reference Manual</citetitle>.
|
||||
</para>
|
||||
</refsection>
|
||||
|
||||
</refentry>
|
||||
226
bin/confgen/rndc-confgen.html
Normal file
226
bin/confgen/rndc-confgen.html
Normal file
@@ -0,0 +1,226 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--
|
||||
- Copyright (C) 2001, 2003-2005, 2007, 2009, 2013-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
-
|
||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
-->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>rndc-confgen</title>
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry">
|
||||
<a name="man.rndc-confgen"></a><div class="titlepage"></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="refnamediv">
|
||||
<h2>Name</h2>
|
||||
<p>
|
||||
<span class="application">rndc-confgen</span>
|
||||
— rndc key generation tool
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="refsynopsisdiv">
|
||||
<h2>Synopsis</h2>
|
||||
<div class="cmdsynopsis"><p>
|
||||
<code class="command">rndc-confgen</code>
|
||||
[<code class="option">-a</code>]
|
||||
[<code class="option">-A <em class="replaceable"><code>algorithm</code></em></code>]
|
||||
[<code class="option">-b <em class="replaceable"><code>keysize</code></em></code>]
|
||||
[<code class="option">-c <em class="replaceable"><code>keyfile</code></em></code>]
|
||||
[<code class="option">-h</code>]
|
||||
[<code class="option">-k <em class="replaceable"><code>keyname</code></em></code>]
|
||||
[<code class="option">-p <em class="replaceable"><code>port</code></em></code>]
|
||||
[<code class="option">-s <em class="replaceable"><code>address</code></em></code>]
|
||||
[<code class="option">-t <em class="replaceable"><code>chrootdir</code></em></code>]
|
||||
[<code class="option">-u <em class="replaceable"><code>user</code></em></code>]
|
||||
</p></div>
|
||||
</div>
|
||||
|
||||
<div class="refsection">
|
||||
<a name="id-1.7"></a><h2>DESCRIPTION</h2>
|
||||
|
||||
<p><span class="command"><strong>rndc-confgen</strong></span>
|
||||
generates configuration files
|
||||
for <span class="command"><strong>rndc</strong></span>. It can be used as a
|
||||
convenient alternative to writing the
|
||||
<code class="filename">rndc.conf</code> file
|
||||
and the corresponding <span class="command"><strong>controls</strong></span>
|
||||
and <span class="command"><strong>key</strong></span>
|
||||
statements in <code class="filename">named.conf</code> by hand.
|
||||
Alternatively, it can be run with the <span class="command"><strong>-a</strong></span>
|
||||
option to set up a <code class="filename">rndc.key</code> file and
|
||||
avoid the need for a <code class="filename">rndc.conf</code> file
|
||||
and a <span class="command"><strong>controls</strong></span> statement altogether.
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="refsection">
|
||||
<a name="id-1.8"></a><h2>OPTIONS</h2>
|
||||
|
||||
|
||||
<div class="variablelist"><dl class="variablelist">
|
||||
<dt><span class="term">-a</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Do automatic <span class="command"><strong>rndc</strong></span> configuration.
|
||||
This creates a file <code class="filename">rndc.key</code>
|
||||
in <code class="filename">/etc</code> (or whatever
|
||||
<code class="varname">sysconfdir</code>
|
||||
was specified as when <acronym class="acronym">BIND</acronym> was
|
||||
built)
|
||||
that is read by both <span class="command"><strong>rndc</strong></span>
|
||||
and <span class="command"><strong>named</strong></span> on startup. The
|
||||
<code class="filename">rndc.key</code> file defines a default
|
||||
command channel and authentication key allowing
|
||||
<span class="command"><strong>rndc</strong></span> to communicate with
|
||||
<span class="command"><strong>named</strong></span> on the local host
|
||||
with no further configuration.
|
||||
</p>
|
||||
<p>
|
||||
Running <span class="command"><strong>rndc-confgen -a</strong></span> allows
|
||||
BIND 9 and <span class="command"><strong>rndc</strong></span> to be used as
|
||||
drop-in
|
||||
replacements for BIND 8 and <span class="command"><strong>ndc</strong></span>,
|
||||
with no changes to the existing BIND 8
|
||||
<code class="filename">named.conf</code> file.
|
||||
</p>
|
||||
<p>
|
||||
If a more elaborate configuration than that
|
||||
generated by <span class="command"><strong>rndc-confgen -a</strong></span>
|
||||
is required, for example if rndc is to be used remotely,
|
||||
you should run <span class="command"><strong>rndc-confgen</strong></span> without
|
||||
the
|
||||
<span class="command"><strong>-a</strong></span> option and set up a
|
||||
<code class="filename">rndc.conf</code> and
|
||||
<code class="filename">named.conf</code>
|
||||
as directed.
|
||||
</p>
|
||||
</dd>
|
||||
<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
|
||||
choices are: hmac-md5, hmac-sha1, hmac-sha224, hmac-sha256,
|
||||
hmac-sha384 and hmac-sha512. The default is hmac-sha256.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-b <em class="replaceable"><code>keysize</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Specifies the size of the authentication key in bits.
|
||||
Must be between 1 and 512 bits; the default is the
|
||||
hash size.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-c <em class="replaceable"><code>keyfile</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Used with the <span class="command"><strong>-a</strong></span> option to specify
|
||||
an alternate location for <code class="filename">rndc.key</code>.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-h</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Prints a short summary of the options and arguments to
|
||||
<span class="command"><strong>rndc-confgen</strong></span>.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-k <em class="replaceable"><code>keyname</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Specifies the key name of the rndc authentication key.
|
||||
This must be a valid domain name.
|
||||
The default is <code class="constant">rndc-key</code>.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-p <em class="replaceable"><code>port</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Specifies the command channel port where <span class="command"><strong>named</strong></span>
|
||||
listens for connections from <span class="command"><strong>rndc</strong></span>.
|
||||
The default is 953.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-s <em class="replaceable"><code>address</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Specifies the IP address where <span class="command"><strong>named</strong></span>
|
||||
listens for command channel connections from
|
||||
<span class="command"><strong>rndc</strong></span>. The default is the loopback
|
||||
address 127.0.0.1.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-t <em class="replaceable"><code>chrootdir</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Used with the <span class="command"><strong>-a</strong></span> option to specify
|
||||
a directory where <span class="command"><strong>named</strong></span> will run
|
||||
chrooted. An additional copy of the <code class="filename">rndc.key</code>
|
||||
will be written relative to this directory so that
|
||||
it will be found by the chrooted <span class="command"><strong>named</strong></span>.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-u <em class="replaceable"><code>user</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Used with the <span class="command"><strong>-a</strong></span> option to set the
|
||||
owner
|
||||
of the <code class="filename">rndc.key</code> file generated.
|
||||
If
|
||||
<span class="command"><strong>-t</strong></span> is also specified only the file
|
||||
in
|
||||
the chroot area has its owner changed.
|
||||
</p>
|
||||
</dd>
|
||||
</dl></div>
|
||||
</div>
|
||||
|
||||
<div class="refsection">
|
||||
<a name="id-1.9"></a><h2>EXAMPLES</h2>
|
||||
|
||||
<p>
|
||||
To allow <span class="command"><strong>rndc</strong></span> to be used with
|
||||
no manual configuration, run
|
||||
</p>
|
||||
<p><strong class="userinput"><code>rndc-confgen -a</code></strong>
|
||||
</p>
|
||||
<p>
|
||||
To print a sample <code class="filename">rndc.conf</code> file and
|
||||
corresponding <span class="command"><strong>controls</strong></span> and <span class="command"><strong>key</strong></span>
|
||||
statements to be manually inserted into <code class="filename">named.conf</code>,
|
||||
run
|
||||
</p>
|
||||
<p><strong class="userinput"><code>rndc-confgen</code></strong>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="refsection">
|
||||
<a name="id-1.10"></a><h2>SEE ALSO</h2>
|
||||
|
||||
<p><span class="citerefentry">
|
||||
<span class="refentrytitle">rndc</span>(8)
|
||||
</span>,
|
||||
<span class="citerefentry">
|
||||
<span class="refentrytitle">rndc.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></body>
|
||||
</html>
|
||||
@@ -1,119 +0,0 @@
|
||||
..
|
||||
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
|
||||
This Source Code Form is subject to the terms of the Mozilla Public
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
See the COPYRIGHT file distributed with this work for additional
|
||||
information regarding copyright ownership.
|
||||
|
||||
..
|
||||
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
|
||||
This Source Code Form is subject to the terms of the Mozilla Public
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
See the COPYRIGHT file distributed with this work for additional
|
||||
information regarding copyright ownership.
|
||||
|
||||
|
||||
.. highlight: console
|
||||
|
||||
.. _man_rndc-confgen:
|
||||
|
||||
rndc-confgen - rndc key generation tool
|
||||
---------------------------------------
|
||||
|
||||
Synopsis
|
||||
~~~~~~~~
|
||||
|
||||
:program:`rndc-confgen` [**-a**] [**-A** algorithm] [**-b** keysize] [**-c** keyfile] [**-h**] [**-k** keyname] [**-p** port] [**-s** address] [**-t** chrootdir] [**-u** user]
|
||||
|
||||
Description
|
||||
~~~~~~~~~~~
|
||||
|
||||
``rndc-confgen`` generates configuration files for ``rndc``. It can be
|
||||
used as a convenient alternative to writing the ``rndc.conf`` file and
|
||||
the corresponding ``controls`` and ``key`` statements in ``named.conf``
|
||||
by hand. Alternatively, it can be run with the ``-a`` option to set up a
|
||||
``rndc.key`` file and avoid the need for a ``rndc.conf`` file and a
|
||||
``controls`` statement altogether.
|
||||
|
||||
Options
|
||||
~~~~~~~
|
||||
|
||||
``-a``
|
||||
This option sets automatic ``rndc`` configuration, which creates a file ``rndc.key``
|
||||
in ``/etc`` (or a different ``sysconfdir`` specified when BIND
|
||||
was built) that is read by both ``rndc`` and ``named`` on startup.
|
||||
The ``rndc.key`` file defines a default command channel and
|
||||
authentication key allowing ``rndc`` to communicate with ``named`` on
|
||||
the local host with no further configuration.
|
||||
|
||||
If a more elaborate configuration than that generated by
|
||||
``rndc-confgen -a`` is required, for example if rndc is to be used
|
||||
remotely, run ``rndc-confgen`` without the ``-a`` option
|
||||
and set up ``rndc.conf`` and ``named.conf`` as directed.
|
||||
|
||||
``-A algorithm``
|
||||
This option 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.
|
||||
|
||||
``-b keysize``
|
||||
This option specifies the size of the authentication key in bits. The size must be between
|
||||
1 and 512 bits; the default is the hash size.
|
||||
|
||||
``-c keyfile``
|
||||
This option is used with the ``-a`` option to specify an alternate location for
|
||||
``rndc.key``.
|
||||
|
||||
``-h``
|
||||
This option prints a short summary of the options and arguments to
|
||||
``rndc-confgen``.
|
||||
|
||||
``-k keyname``
|
||||
This option specifies the key name of the ``rndc`` authentication key. This must be a
|
||||
valid domain name. The default is ``rndc-key``.
|
||||
|
||||
``-p port``
|
||||
This option specifies the command channel port where ``named`` listens for
|
||||
connections from ``rndc``. The default is 953.
|
||||
|
||||
``-q``
|
||||
This option prevets printing the written path in automatic configuration mode.
|
||||
|
||||
``-s address``
|
||||
This option specifies the IP address where ``named`` listens for command-channel
|
||||
connections from ``rndc``. The default is the loopback address
|
||||
127.0.0.1.
|
||||
|
||||
``-t chrootdir``
|
||||
This option is used with the ``-a`` option to specify a directory where ``named``
|
||||
runs chrooted. An additional copy of the ``rndc.key`` is
|
||||
written relative to this directory, so that it is found by the
|
||||
chrooted ``named``.
|
||||
|
||||
``-u user``
|
||||
This option is used with the ``-a`` option to set the owner of the generated ``rndc.key`` file.
|
||||
If ``-t`` is also specified, only the file in the chroot
|
||||
area has its owner changed.
|
||||
|
||||
Examples
|
||||
~~~~~~~~
|
||||
|
||||
To allow ``rndc`` to be used with no manual configuration, run:
|
||||
|
||||
``rndc-confgen -a``
|
||||
|
||||
To print a sample ``rndc.conf`` file and the corresponding ``controls`` and
|
||||
``key`` statements to be manually inserted into ``named.conf``, run:
|
||||
|
||||
``rndc-confgen``
|
||||
|
||||
See Also
|
||||
~~~~~~~~
|
||||
|
||||
:manpage:`rndc(8)`, :manpage:`rndc.conf(5)`, :manpage:`named(8)`, BIND 9 Administrator Reference Manual.
|
||||
28
bin/confgen/unix/Makefile.in
Normal file
28
bin/confgen/unix/Makefile.in
Normal file
@@ -0,0 +1,28 @@
|
||||
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
#
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
#
|
||||
# See the COPYRIGHT file distributed with this work for additional
|
||||
# information regarding copyright ownership.
|
||||
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
|
||||
@BIND9_MAKE_INCLUDES@
|
||||
|
||||
CINCLUDES = -I${srcdir}/include -I${srcdir}/../include \
|
||||
${DNS_INCLUDES} ${ISC_INCLUDES}
|
||||
|
||||
CDEFINES =
|
||||
CWARNINGS =
|
||||
|
||||
OBJS = os.@O@
|
||||
|
||||
SRCS = os.c
|
||||
|
||||
TARGETS = ${OBJS}
|
||||
|
||||
@BIND9_MAKE_RULES@
|
||||
@@ -9,18 +9,21 @@
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <pwd.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <config.h>
|
||||
|
||||
#include <confgen/os.h>
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <pwd.h>
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
int
|
||||
set_user(FILE *fd, const char *user) {
|
||||
struct passwd *pw;
|
||||
|
||||
@@ -9,17 +9,21 @@
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include "util.h"
|
||||
#include <stdarg.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <config.h>
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <isc/boolean.h>
|
||||
#include <isc/print.h>
|
||||
|
||||
extern bool verbose;
|
||||
#include "util.h"
|
||||
|
||||
extern isc_boolean_t verbose;
|
||||
extern const char *progname;
|
||||
|
||||
void
|
||||
@@ -30,7 +34,7 @@ notify(const char *fmt, ...) {
|
||||
va_start(ap, fmt);
|
||||
vfprintf(stderr, fmt, ap);
|
||||
va_end(ap);
|
||||
fprintf(stderr, "\n");
|
||||
fputs("\n", stderr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,26 +9,27 @@
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef RNDC_UTIL_H
|
||||
#define RNDC_UTIL_H 1
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <isc/attributes.h>
|
||||
#include <isc/formatcheck.h>
|
||||
#include <isc/lang.h>
|
||||
#include <isc/platform.h>
|
||||
|
||||
#define NS_CONTROL_PORT 953
|
||||
#include <isc/formatcheck.h>
|
||||
|
||||
#define NS_CONTROL_PORT 953
|
||||
|
||||
#undef DO
|
||||
#define DO(name, function) \
|
||||
do { \
|
||||
result = function; \
|
||||
if (result != ISC_R_SUCCESS) \
|
||||
#define DO(name, function) \
|
||||
do { \
|
||||
result = function; \
|
||||
if (result != ISC_R_SUCCESS) \
|
||||
fatal("%s: %s", name, isc_result_totext(result)); \
|
||||
else \
|
||||
notify("%s", name); \
|
||||
else \
|
||||
notify("%s", name); \
|
||||
} while (0)
|
||||
|
||||
ISC_LANG_BEGINDECLS
|
||||
@@ -36,8 +37,9 @@ ISC_LANG_BEGINDECLS
|
||||
void
|
||||
notify(const char *fmt, ...) ISC_FORMAT_PRINTF(1, 2);
|
||||
|
||||
ISC_NORETURN void
|
||||
fatal(const char *format, ...) ISC_FORMAT_PRINTF(1, 2);
|
||||
ISC_PLATFORM_NORETURN_PRE void
|
||||
fatal(const char *format, ...)
|
||||
ISC_FORMAT_PRINTF(1, 2) ISC_PLATFORM_NORETURN_POST;
|
||||
|
||||
ISC_LANG_ENDDECLS
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|@PLATFORM@">
|
||||
<Configuration>Debug</Configuration>
|
||||
@@ -14,21 +14,18 @@
|
||||
<ProjectGuid>{64964B03-4815-41F0-9057-E766A94AF197}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>confgentool</RootNamespace>
|
||||
@WINDOWS_TARGET_PLATFORM_VERSION@
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
@PLATFORM_TOOLSET@
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
@PLATFORM_TOOLSET@
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
@@ -44,20 +41,17 @@
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>.\$(Configuration)\</OutDir>
|
||||
<IntDir>.\$(Configuration)\</IntDir>
|
||||
<IntDirSharingDetected>None</IntDirSharingDetected>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>.\$(Configuration)\</OutDir>
|
||||
<IntDir>.\$(Configuration)\</IntDir>
|
||||
<IntDirSharingDetected>None</IntDirSharingDetected>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<TreatWarningAsError>false</TreatWarningAsError>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
@@ -66,7 +60,6 @@
|
||||
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
|
||||
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
<BrowseInformation>true</BrowseInformation>
|
||||
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
|
||||
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@..\include;..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
</ClCompile>
|
||||
@@ -77,8 +70,7 @@
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level1</WarningLevel>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
@@ -92,7 +84,6 @@
|
||||
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
|
||||
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
|
||||
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@..\include;..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
</ClCompile>
|
||||
@@ -114,14 +105,6 @@
|
||||
<ClCompile Include="..\util.c" />
|
||||
<ClCompile Include="os.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\lib\isc\win32\libisc.vcxproj">
|
||||
<Project>{3840E563-D180-4761-AA9C-E6155F02EAFF}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\lib\dns\win32\libdns.vcxproj">
|
||||
<Project>{5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
</Project>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|@PLATFORM@">
|
||||
<Configuration>Debug</Configuration>
|
||||
@@ -14,21 +14,18 @@
|
||||
<ProjectGuid>{1EA4FC64-F33B-4A50-970A-EA052BBE9CF1}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>ddnsconfgen</RootNamespace>
|
||||
@WINDOWS_TARGET_PLATFORM_VERSION@
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
@PLATFORM_TOOLSET@
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
@PLATFORM_TOOLSET@
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
@@ -44,22 +41,19 @@
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>..\..\..\Build\$(Configuration)\</OutDir>
|
||||
<IntDir>.\$(Configuration)\</IntDir>
|
||||
<IntDirSharingDetected>None</IntDirSharingDetected>
|
||||
<TargetName>ddns-confgen</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>..\..\..\Build\$(Configuration)\</OutDir>
|
||||
<IntDir>.\$(Configuration)\</IntDir>
|
||||
<IntDirSharingDetected>None</IntDirSharingDetected>
|
||||
<TargetName>ddns-confgen</TargetName>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<TreatWarningAsError>false</TreatWarningAsError>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
@@ -68,16 +62,15 @@
|
||||
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
|
||||
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
<BrowseInformation>true</BrowseInformation>
|
||||
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
|
||||
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@..\include;..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@..\include;..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;..\..\..\lib\isccc\include;..\..\..\lib\isccfg\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
|
||||
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>@OPENSSL_LIB@confgentool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\isccc\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>confgentool.lib;libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>cd ..\..\..\Build\$(Configuration)
|
||||
@@ -88,8 +81,7 @@ copy /Y ddns-confgen.ilk tsig-keygen.ilk
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level1</WarningLevel>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
@@ -103,8 +95,7 @@ copy /Y ddns-confgen.ilk tsig-keygen.ilk
|
||||
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
|
||||
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
|
||||
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@..\include;..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@..\include;..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;..\..\..\lib\isccc\include;..\..\..\lib\isccfg\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@@ -114,8 +105,8 @@ copy /Y ddns-confgen.ilk tsig-keygen.ilk
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
|
||||
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
|
||||
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>@OPENSSL_LIB@confgentool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\isccc\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>confgentool.lib;libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>cd ..\..\..\Build\$(Configuration)
|
||||
@@ -126,17 +117,6 @@ copy /Y ddns-confgen.exe tsig-keygen.exe
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\ddns-confgen.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\lib\isc\win32\libisc.vcxproj">
|
||||
<Project>{3840E563-D180-4761-AA9C-E6155F02EAFF}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\lib\dns\win32\libdns.vcxproj">
|
||||
<Project>{5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\bin\confgen\win32\confgentool.vcxproj">
|
||||
<Project>{64964B03-4815-41F0-9057-E766A94AF197}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
</Project>
|
||||
@@ -9,16 +9,19 @@
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <io.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <confgen/os.h>
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <io.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
int
|
||||
set_user(FILE *fd, const char *user) {
|
||||
return (0);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|@PLATFORM@">
|
||||
<Configuration>Debug</Configuration>
|
||||
@@ -14,21 +14,18 @@
|
||||
<ProjectGuid>{1E2C1635-3093-4D59-80E7-4743AC10F22F}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>rndcconfgen</RootNamespace>
|
||||
@WINDOWS_TARGET_PLATFORM_VERSION@
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
@PLATFORM_TOOLSET@
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
@PLATFORM_TOOLSET@
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
@@ -44,22 +41,19 @@
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>..\..\..\Build\$(Configuration)\</OutDir>
|
||||
<IntDir>.\$(Configuration)\</IntDir>
|
||||
<IntDirSharingDetected>None</IntDirSharingDetected>
|
||||
<TargetName>rndc-confgen</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>..\..\..\Build\$(Configuration)\</OutDir>
|
||||
<IntDir>.\$(Configuration)\</IntDir>
|
||||
<IntDirSharingDetected>None</IntDirSharingDetected>
|
||||
<TargetName>rndc-confgen</TargetName>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<TreatWarningAsError>false</TreatWarningAsError>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
@@ -68,22 +62,20 @@
|
||||
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
|
||||
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
<BrowseInformation>true</BrowseInformation>
|
||||
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
|
||||
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@..\include;..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@..\include;..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;..\..\..\lib\isccc\include;..\..\..\lib\isccfg\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
|
||||
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>@OPENSSL_LIB@confgentool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\isccc\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>confgentool.lib;libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level1</WarningLevel>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
@@ -97,8 +89,7 @@
|
||||
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
|
||||
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
|
||||
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@..\include;..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@..\include;..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;..\..\..\lib\isccc\include;..\..\..\lib\isccfg\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@@ -108,24 +99,13 @@
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
|
||||
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
|
||||
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>@OPENSSL_LIB@confgentool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\isccc\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>confgentool.lib;libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\rndc-confgen.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\lib\isc\win32\libisc.vcxproj">
|
||||
<Project>{3840E563-D180-4761-AA9C-E6155F02EAFF}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\lib\dns\win32\libdns.vcxproj">
|
||||
<Project>{5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\bin\confgen\win32\confgentool.vcxproj">
|
||||
<Project>{64964B03-4815-41F0-9057-E766A94AF197}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
</Project>
|
||||
@@ -1,21 +0,0 @@
|
||||
include $(top_srcdir)/Makefile.top
|
||||
|
||||
AM_CPPFLAGS += \
|
||||
-I$(top_builddir)/include \
|
||||
$(LIBISC_CFLAGS) \
|
||||
$(LIBDNS_CFLAGS) \
|
||||
$(LIBISCCFG_CFLAGS) \
|
||||
$(LIBIRS_CFLAGS)
|
||||
|
||||
AM_CPPFLAGS += \
|
||||
-DSYSCONFDIR=\"${sysconfdir}\"
|
||||
|
||||
bin_PROGRAMS = delv
|
||||
|
||||
delv_SOURCES = \
|
||||
delv.c
|
||||
delv_LDADD = \
|
||||
$(LIBISC_LIBS) \
|
||||
$(LIBDNS_LIBS) \
|
||||
$(LIBISCCFG_LIBS) \
|
||||
$(LIBIRS_LIBS)
|
||||
81
bin/delv/Makefile.in
Normal file
81
bin/delv/Makefile.in
Normal file
@@ -0,0 +1,81 @@
|
||||
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
#
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
#
|
||||
# See the COPYRIGHT file distributed with this work for additional
|
||||
# information regarding copyright ownership.
|
||||
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
|
||||
VERSION=@BIND9_VERSION@
|
||||
|
||||
@BIND9_MAKE_INCLUDES@
|
||||
|
||||
CINCLUDES = -I${srcdir}/include ${DNS_INCLUDES} ${ISC_INCLUDES} \
|
||||
${IRS_INCLUDES} ${ISCCFG_INCLUDES} @DST_OPENSSL_INC@
|
||||
|
||||
CDEFINES = -DVERSION=\"${VERSION}\" \
|
||||
-DSYSCONFDIR=\"${sysconfdir}\"
|
||||
CWARNINGS =
|
||||
|
||||
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
|
||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @ISC_OPENSSL_LIBS@
|
||||
ISCLIBS = ../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
|
||||
IRSLIBS = ../../lib/irs/libirs.@A@
|
||||
|
||||
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||
DNSDEPLIBS = ../../lib/dns/libdns.@A@
|
||||
ISCDEPLIBS = ../../lib/isc/libisc.@A@
|
||||
IRSDEPLIBS = ../../lib/irs/libirs.@A@
|
||||
|
||||
DEPLIBS = ${DNSDEPLIBS} ${IRSDEPLIBS} ${ISCCFGDEPLIBS} ${ISCDEPLIBS}
|
||||
|
||||
LIBS = ${DNSLIBS} ${IRSLIBS} ${ISCCFGLIBS} ${ISCLIBS} @LIBS@
|
||||
NOSYMLIBS = ${DNSLIBS} ${IRSLIBS} ${ISCCFGLIBS} ${ISCNOSYMLIBS} @LIBS@
|
||||
|
||||
SUBDIRS =
|
||||
|
||||
TARGETS = delv@EXEEXT@
|
||||
|
||||
OBJS = delv.@O@
|
||||
|
||||
SRCS = delv.c
|
||||
|
||||
MANPAGES = delv.1
|
||||
|
||||
HTMLPAGES = delv.html
|
||||
|
||||
MANOBJS = ${MANPAGES} ${HTMLPAGES}
|
||||
|
||||
@BIND9_MAKE_RULES@
|
||||
|
||||
delv@EXEEXT@: delv.@O@ ${DEPLIBS}
|
||||
export BASEOBJS="delv.@O@"; \
|
||||
export LIBS0="${DNSLIBS}"; \
|
||||
${FINALBUILDCMD}
|
||||
|
||||
installdirs:
|
||||
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${bindir}
|
||||
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man1
|
||||
|
||||
install:: delv@EXEEXT@ installdirs
|
||||
${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} \
|
||||
delv@EXEEXT@ ${DESTDIR}${bindir}
|
||||
${INSTALL_DATA} ${srcdir}/delv.1 ${DESTDIR}${mandir}/man1
|
||||
|
||||
uninstall::
|
||||
rm -f ${DESTDIR}${mandir}/man1/delv.1
|
||||
${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${bindir}/delv@EXEEXT@
|
||||
|
||||
doc man:: ${MANOBJS}
|
||||
|
||||
docclean manclean maintainer-clean::
|
||||
rm -f ${MANOBJS}
|
||||
|
||||
clean distclean maintainer-clean::
|
||||
rm -f ${TARGETS}
|
||||
441
bin/delv/delv.1
Normal file
441
bin/delv/delv.1
Normal file
@@ -0,0 +1,441 @@
|
||||
.\" Copyright (C) 2014-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\"
|
||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
||||
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
.\" file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
.\"
|
||||
.hy 0
|
||||
.ad l
|
||||
'\" t
|
||||
.\" Title: delv
|
||||
.\" Author:
|
||||
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
|
||||
.\" Date: 2014-04-23
|
||||
.\" Manual: BIND9
|
||||
.\" Source: ISC
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "DELV" "1" "2014\-04\-23" "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
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
.SH "NAME"
|
||||
delv \- DNS lookup and validation utility
|
||||
.SH "SYNOPSIS"
|
||||
.HP \w'\fBdelv\fR\ 'u
|
||||
\fBdelv\fR [@server] [[\fB\-4\fR] | [\fB\-6\fR]] [\fB\-a\ \fR\fB\fIanchor\-file\fR\fR] [\fB\-b\ \fR\fB\fIaddress\fR\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-d\ \fR\fB\fIlevel\fR\fR] [\fB\-i\fR] [\fB\-m\fR] [\fB\-p\ \fR\fB\fIport#\fR\fR] [\fB\-q\ \fR\fB\fIname\fR\fR] [\fB\-t\ \fR\fB\fItype\fR\fR] [\fB\-x\ \fR\fB\fIaddr\fR\fR] [name] [type] [class] [queryopt...]
|
||||
.HP \w'\fBdelv\fR\ 'u
|
||||
\fBdelv\fR [\fB\-h\fR]
|
||||
.HP \w'\fBdelv\fR\ 'u
|
||||
\fBdelv\fR [\fB\-v\fR]
|
||||
.HP \w'\fBdelv\fR\ 'u
|
||||
\fBdelv\fR [queryopt...] [query...]
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
\fBdelv\fR
|
||||
is a tool for sending DNS queries and validating the results, using the same internal resolver and validator logic as
|
||||
\fBnamed\fR\&.
|
||||
.PP
|
||||
\fBdelv\fR
|
||||
will send to a specified name server all queries needed to fetch and validate the requested data; this includes the original requested query, subsequent queries to follow CNAME or DNAME chains, and queries for DNSKEY, DS and DLV records to establish a chain of trust for DNSSEC validation\&. It does not perform iterative resolution, but simulates the behavior of a name server configured for DNSSEC validating and forwarding\&.
|
||||
.PP
|
||||
By default, responses are validated using built\-in DNSSEC trust anchor for the root zone ("\&.")\&. Records returned by
|
||||
\fBdelv\fR
|
||||
are either fully validated or were not signed\&. If validation fails, an explanation of the failure is included in the output; the validation process can be traced in detail\&. Because
|
||||
\fBdelv\fR
|
||||
does not rely on an external server to carry out validation, it can be used to check the validity of DNS responses in environments where local name servers may not be trustworthy\&.
|
||||
.PP
|
||||
Unless it is told to query a specific name server,
|
||||
\fBdelv\fR
|
||||
will try each of the servers listed in
|
||||
/etc/resolv\&.conf\&. If no usable server addresses are found,
|
||||
\fBdelv\fR
|
||||
will send queries to the localhost addresses (127\&.0\&.0\&.1 for IPv4, ::1 for IPv6)\&.
|
||||
.PP
|
||||
When no command line arguments or options are given,
|
||||
\fBdelv\fR
|
||||
will perform an NS query for "\&." (the root zone)\&.
|
||||
.SH "SIMPLE USAGE"
|
||||
.PP
|
||||
A typical invocation of
|
||||
\fBdelv\fR
|
||||
looks like:
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
delv @server name type
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.sp
|
||||
where:
|
||||
.PP
|
||||
\fBserver\fR
|
||||
.RS 4
|
||||
is the name or IP address of the name server to query\&. This can be an IPv4 address in dotted\-decimal notation or an IPv6 address in colon\-delimited notation\&. When the supplied
|
||||
\fIserver\fR
|
||||
argument is a hostname,
|
||||
\fBdelv\fR
|
||||
resolves that name before querying that name server (note, however, that this initial lookup is
|
||||
\fInot\fR
|
||||
validated by DNSSEC)\&.
|
||||
.sp
|
||||
If no
|
||||
\fIserver\fR
|
||||
argument is provided,
|
||||
\fBdelv\fR
|
||||
consults
|
||||
/etc/resolv\&.conf; if an address is found there, it queries the name server at that address\&. If either of the
|
||||
\fB\-4\fR
|
||||
or
|
||||
\fB\-6\fR
|
||||
options are in use, then only addresses for the corresponding transport will be tried\&. If no usable addresses are found,
|
||||
\fBdelv\fR
|
||||
will send queries to the localhost addresses (127\&.0\&.0\&.1 for IPv4, ::1 for IPv6)\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBname\fR
|
||||
.RS 4
|
||||
is the domain name to be looked up\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBtype\fR
|
||||
.RS 4
|
||||
indicates what type of query is required \(em ANY, A, MX, etc\&.
|
||||
\fItype\fR
|
||||
can be any valid query type\&. If no
|
||||
\fItype\fR
|
||||
argument is supplied,
|
||||
\fBdelv\fR
|
||||
will perform a lookup for an A record\&.
|
||||
.RE
|
||||
.SH "OPTIONS"
|
||||
.PP
|
||||
\-a \fIanchor\-file\fR
|
||||
.RS 4
|
||||
Specifies a file from which to read DNSSEC trust anchors\&. The default is
|
||||
/etc/bind\&.keys, which is included with
|
||||
BIND
|
||||
9 and contains one or more trust anchors for the root zone ("\&.")\&.
|
||||
.sp
|
||||
Keys that do not match the root zone name are ignored\&. An alternate key name can be specified using the
|
||||
\fB+root=NAME\fR
|
||||
options\&. DNSSEC Lookaside Validation can also be turned on by using the
|
||||
\fB+dlv=NAME\fR
|
||||
to specify the name of a zone containing DLV records\&.
|
||||
.sp
|
||||
Note: When reading the trust anchor file,
|
||||
\fBdelv\fR
|
||||
treats
|
||||
\fBmanaged\-keys\fR
|
||||
statements and
|
||||
\fBtrusted\-keys\fR
|
||||
statements identically\&. That is, for a managed key, it is the
|
||||
\fIinitial\fR
|
||||
key that is trusted; RFC 5011 key management is not supported\&.
|
||||
\fBdelv\fR
|
||||
will not consult the managed\-keys database maintained by
|
||||
\fBnamed\fR\&. This means that if either of the keys in
|
||||
/etc/bind\&.keys
|
||||
is revoked and rolled over, it will be necessary to update
|
||||
/etc/bind\&.keys
|
||||
to use DNSSEC validation in
|
||||
\fBdelv\fR\&.
|
||||
.RE
|
||||
.PP
|
||||
\-b \fIaddress\fR
|
||||
.RS 4
|
||||
Sets the source IP address of the query to
|
||||
\fIaddress\fR\&. This must be a valid address on one of the host\*(Aqs network interfaces or "0\&.0\&.0\&.0" or "::"\&. An optional source port may be specified by appending "#<port>"
|
||||
.RE
|
||||
.PP
|
||||
\-c \fIclass\fR
|
||||
.RS 4
|
||||
Sets the query class for the requested data\&. Currently, only class "IN" is supported in
|
||||
\fBdelv\fR
|
||||
and any other value is ignored\&.
|
||||
.RE
|
||||
.PP
|
||||
\-d \fIlevel\fR
|
||||
.RS 4
|
||||
Set the systemwide debug level to
|
||||
\fBlevel\fR\&. The allowed range is from 0 to 99\&. The default is 0 (no debugging)\&. Debugging traces from
|
||||
\fBdelv\fR
|
||||
become more verbose as the debug level increases\&. See the
|
||||
\fB+mtrace\fR,
|
||||
\fB+rtrace\fR, and
|
||||
\fB+vtrace\fR
|
||||
options below for additional debugging details\&.
|
||||
.RE
|
||||
.PP
|
||||
\-h
|
||||
.RS 4
|
||||
Display the
|
||||
\fBdelv\fR
|
||||
help usage output and exit\&.
|
||||
.RE
|
||||
.PP
|
||||
\-i
|
||||
.RS 4
|
||||
Insecure mode\&. This disables internal DNSSEC validation\&. (Note, however, this does not set the CD bit on upstream queries\&. If the server being queried is performing DNSSEC validation, then it will not return invalid data; this can cause
|
||||
\fBdelv\fR
|
||||
to time out\&. When it is necessary to examine invalid data to debug a DNSSEC problem, use
|
||||
\fBdig +cd\fR\&.)
|
||||
.RE
|
||||
.PP
|
||||
\-m
|
||||
.RS 4
|
||||
Enables memory usage debugging\&.
|
||||
.RE
|
||||
.PP
|
||||
\-p \fIport#\fR
|
||||
.RS 4
|
||||
Specifies a destination port to use for queries instead of the standard DNS port number 53\&. This option would be used with a name server that has been configured to listen for queries on a non\-standard port number\&.
|
||||
.RE
|
||||
.PP
|
||||
\-q \fIname\fR
|
||||
.RS 4
|
||||
Sets the query name to
|
||||
\fIname\fR\&. While the query name can be specified without using the
|
||||
\fB\-q\fR, it is sometimes necessary to disambiguate names from types or classes (for example, when looking up the name "ns", which could be misinterpreted as the type NS, or "ch", which could be misinterpreted as class CH)\&.
|
||||
.RE
|
||||
.PP
|
||||
\-t \fItype\fR
|
||||
.RS 4
|
||||
Sets the query type to
|
||||
\fItype\fR, which can be any valid query type supported in BIND 9 except for zone transfer types AXFR and IXFR\&. As with
|
||||
\fB\-q\fR, this is useful to distinguish query name type or class when they are ambiguous\&. it is sometimes necessary to disambiguate names from types\&.
|
||||
.sp
|
||||
The default query type is "A", unless the
|
||||
\fB\-x\fR
|
||||
option is supplied to indicate a reverse lookup, in which case it is "PTR"\&.
|
||||
.RE
|
||||
.PP
|
||||
\-v
|
||||
.RS 4
|
||||
Print the
|
||||
\fBdelv\fR
|
||||
version and exit\&.
|
||||
.RE
|
||||
.PP
|
||||
\-x \fIaddr\fR
|
||||
.RS 4
|
||||
Performs a reverse lookup, mapping an addresses to a name\&.
|
||||
\fIaddr\fR
|
||||
is an IPv4 address in dotted\-decimal notation, or a colon\-delimited IPv6 address\&. When
|
||||
\fB\-x\fR
|
||||
is used, there is no need to provide the
|
||||
\fIname\fR
|
||||
or
|
||||
\fItype\fR
|
||||
arguments\&.
|
||||
\fBdelv\fR
|
||||
automatically performs a lookup for a name like
|
||||
11\&.12\&.13\&.10\&.in\-addr\&.arpa
|
||||
and sets the query type to PTR\&. IPv6 addresses are looked up using nibble format under the IP6\&.ARPA domain\&.
|
||||
.RE
|
||||
.PP
|
||||
\-4
|
||||
.RS 4
|
||||
Forces
|
||||
\fBdelv\fR
|
||||
to only use IPv4\&.
|
||||
.RE
|
||||
.PP
|
||||
\-6
|
||||
.RS 4
|
||||
Forces
|
||||
\fBdelv\fR
|
||||
to only use IPv6\&.
|
||||
.RE
|
||||
.SH "QUERY OPTIONS"
|
||||
.PP
|
||||
\fBdelv\fR
|
||||
provides a number of query options which affect the way results are displayed, and in some cases the way lookups are performed\&.
|
||||
.PP
|
||||
Each query option is identified by a keyword preceded by a plus sign (+)\&. Some keywords set or reset an option\&. These may be preceded by the string
|
||||
no
|
||||
to negate the meaning of that keyword\&. Other keywords assign values to options like the timeout interval\&. They have the form
|
||||
\fB+keyword=value\fR\&. The query options are:
|
||||
.PP
|
||||
\fB+[no]cdflag\fR
|
||||
.RS 4
|
||||
Controls whether to set the CD (checking disabled) bit in queries sent by
|
||||
\fBdelv\fR\&. This may be useful when troubleshooting DNSSEC problems from behind a validating resolver\&. A validating resolver will block invalid responses, making it difficult to retrieve them for analysis\&. Setting the CD flag on queries will cause the resolver to return invalid responses, which
|
||||
\fBdelv\fR
|
||||
can then validate internally and report the errors in detail\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]class\fR
|
||||
.RS 4
|
||||
Controls whether to display the CLASS when printing a record\&. The default is to display the CLASS\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]ttl\fR
|
||||
.RS 4
|
||||
Controls whether to display the TTL when printing a record\&. The default is to display the TTL\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]rtrace\fR
|
||||
.RS 4
|
||||
Toggle resolver fetch logging\&. This reports the name and type of each query sent by
|
||||
\fBdelv\fR
|
||||
in the process of carrying out the resolution and validation process: this includes including the original query and all subsequent queries to follow CNAMEs and to establish a chain of trust for DNSSEC validation\&.
|
||||
.sp
|
||||
This is equivalent to setting the debug level to 1 in the "resolver" logging category\&. Setting the systemwide debug level to 1 using the
|
||||
\fB\-d\fR
|
||||
option will product the same output (but will affect other logging categories as well)\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]mtrace\fR
|
||||
.RS 4
|
||||
Toggle message logging\&. This produces a detailed dump of the responses received by
|
||||
\fBdelv\fR
|
||||
in the process of carrying out the resolution and validation process\&.
|
||||
.sp
|
||||
This is equivalent to setting the debug level to 10 for the "packets" module of the "resolver" logging category\&. Setting the systemwide debug level to 10 using the
|
||||
\fB\-d\fR
|
||||
option will produce the same output (but will affect other logging categories as well)\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]vtrace\fR
|
||||
.RS 4
|
||||
Toggle validation logging\&. This shows the internal process of the validator as it determines whether an answer is validly signed, unsigned, or invalid\&.
|
||||
.sp
|
||||
This is equivalent to setting the debug level to 3 for the "validator" module of the "dnssec" logging category\&. Setting the systemwide debug level to 3 using the
|
||||
\fB\-d\fR
|
||||
option will produce the same output (but will affect other logging categories as well)\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]short\fR
|
||||
.RS 4
|
||||
Provide a terse answer\&. The default is to print the answer in a verbose form\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]comments\fR
|
||||
.RS 4
|
||||
Toggle the display of comment lines in the output\&. The default is to print comments\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]rrcomments\fR
|
||||
.RS 4
|
||||
Toggle the display of per\-record comments in the output (for example, human\-readable key information about DNSKEY records)\&. The default is to print per\-record comments\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]crypto\fR
|
||||
.RS 4
|
||||
Toggle the display of cryptographic fields in DNSSEC records\&. The contents of these field are unnecessary to debug most DNSSEC validation failures and removing them makes it easier to see the common failures\&. The default is to display the fields\&. When omitted they are replaced by the string "[omitted]" or in the DNSKEY case the key id is displayed as the replacement, e\&.g\&. "[ key id = value ]"\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]trust\fR
|
||||
.RS 4
|
||||
Controls whether to display the trust level when printing a record\&. The default is to display the trust level\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]split[=W]\fR
|
||||
.RS 4
|
||||
Split long hex\- or base64\-formatted fields in resource records into chunks of
|
||||
\fIW\fR
|
||||
characters (where
|
||||
\fIW\fR
|
||||
is rounded up to the nearest multiple of 4)\&.
|
||||
\fI+nosplit\fR
|
||||
or
|
||||
\fI+split=0\fR
|
||||
causes fields not to be split at all\&. The default is 56 characters, or 44 characters when multiline mode is active\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]all\fR
|
||||
.RS 4
|
||||
Set or clear the display options
|
||||
\fB+[no]comments\fR,
|
||||
\fB+[no]rrcomments\fR, and
|
||||
\fB+[no]trust\fR
|
||||
as a group\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]multiline\fR
|
||||
.RS 4
|
||||
Print long records (such as RRSIG, DNSKEY, and SOA records) in a verbose multi\-line format with human\-readable comments\&. The default is to print each record on a single line, to facilitate machine parsing of the
|
||||
\fBdelv\fR
|
||||
output\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]dnssec\fR
|
||||
.RS 4
|
||||
Indicates whether to display RRSIG records in the
|
||||
\fBdelv\fR
|
||||
output\&. The default is to do so\&. Note that (unlike in
|
||||
\fBdig\fR) this does
|
||||
\fInot\fR
|
||||
control whether to request DNSSEC records or whether to validate them\&. DNSSEC records are always requested, and validation will always occur unless suppressed by the use of
|
||||
\fB\-i\fR
|
||||
or
|
||||
\fB+noroot\fR
|
||||
and
|
||||
\fB+nodlv\fR\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]root[=ROOT]\fR
|
||||
.RS 4
|
||||
Indicates whether to perform conventional (non\-lookaside) DNSSEC validation, and if so, specifies the name of a trust anchor\&. The default is to validate using a trust anchor of "\&." (the root zone), for which there is a built\-in key\&. If specifying a different trust anchor, then
|
||||
\fB\-a\fR
|
||||
must be used to specify a file containing the key\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]dlv[=DLV]\fR
|
||||
.RS 4
|
||||
Indicates whether to perform DNSSEC lookaside validation, and if so, specifies the name of the DLV trust anchor\&. The
|
||||
\fB\-a\fR
|
||||
option must also be used to specify a file containing the DLV key\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]tcp\fR
|
||||
.RS 4
|
||||
Controls whether to use TCP when sending queries\&. The default is to use UDP unless a truncated response has been received\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]unknownformat\fR
|
||||
.RS 4
|
||||
Print all RDATA in unknown RR type presentation format (RFC 3597)\&. The default is to print RDATA for known types in the type\*(Aqs presentation format\&.
|
||||
.RE
|
||||
.SH "FILES"
|
||||
.PP
|
||||
/etc/bind\&.keys
|
||||
.PP
|
||||
/etc/resolv\&.conf
|
||||
.SH "SEE ALSO"
|
||||
.PP
|
||||
\fBdig\fR(1),
|
||||
\fBnamed\fR(8),
|
||||
RFC4034,
|
||||
RFC4035,
|
||||
RFC4431,
|
||||
RFC5074,
|
||||
RFC5155\&.
|
||||
.SH "AUTHOR"
|
||||
.PP
|
||||
\fBInternet Systems Consortium, Inc\&.\fR
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
Copyright \(co 2014-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.br
|
||||
1242
bin/delv/delv.c
1242
bin/delv/delv.c
File diff suppressed because it is too large
Load Diff
700
bin/delv/delv.docbook
Normal file
700
bin/delv/delv.docbook
Normal file
@@ -0,0 +1,700 @@
|
||||
<!DOCTYPE book [
|
||||
<!ENTITY mdash "—">]>
|
||||
<!--
|
||||
- Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
-
|
||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
-
|
||||
- See the COPYRIGHT file distributed with this work for additional
|
||||
- information regarding copyright ownership.
|
||||
-->
|
||||
|
||||
<!-- Converted by db4-upgrade version 1.0 -->
|
||||
<refentry xmlns:db="http://docbook.org/ns/docbook" version="5.0" xml:id="man.delv">
|
||||
<info>
|
||||
<date>2014-04-23</date>
|
||||
</info>
|
||||
<refentryinfo>
|
||||
<corpname>ISC</corpname>
|
||||
<corpauthor>Internet Systems Consortium, Inc.</corpauthor>
|
||||
</refentryinfo>
|
||||
|
||||
<refmeta>
|
||||
<refentrytitle>delv</refentrytitle>
|
||||
<manvolnum>1</manvolnum>
|
||||
<refmiscinfo>BIND9</refmiscinfo>
|
||||
</refmeta>
|
||||
|
||||
<refnamediv>
|
||||
<refname>delv</refname>
|
||||
<refpurpose>DNS lookup and validation utility</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<docinfo>
|
||||
<copyright>
|
||||
<year>2014</year>
|
||||
<year>2015</year>
|
||||
<year>2016</year>
|
||||
<year>2017</year>
|
||||
<year>2018</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis sepchar=" ">
|
||||
<command>delv</command>
|
||||
<arg choice="opt" rep="norepeat">@server</arg>
|
||||
<group choice="opt" rep="norepeat">
|
||||
<arg choice="opt" rep="norepeat"><option>-4</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-6</option></arg>
|
||||
</group>
|
||||
<arg choice="opt" rep="norepeat"><option>-a <replaceable class="parameter">anchor-file</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-b <replaceable class="parameter">address</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-c <replaceable class="parameter">class</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-d <replaceable class="parameter">level</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-i</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-m</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-p <replaceable class="parameter">port#</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-q <replaceable class="parameter">name</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-t <replaceable class="parameter">type</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-x <replaceable class="parameter">addr</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat">name</arg>
|
||||
<arg choice="opt" rep="norepeat">type</arg>
|
||||
<arg choice="opt" rep="norepeat">class</arg>
|
||||
<arg choice="opt" rep="repeat">queryopt</arg>
|
||||
</cmdsynopsis>
|
||||
|
||||
<cmdsynopsis sepchar=" ">
|
||||
<command>delv</command>
|
||||
<arg choice="opt" rep="norepeat"><option>-h</option></arg>
|
||||
</cmdsynopsis>
|
||||
|
||||
<cmdsynopsis sepchar=" ">
|
||||
<command>delv</command>
|
||||
<arg choice="opt" rep="norepeat"><option>-v</option></arg>
|
||||
</cmdsynopsis>
|
||||
|
||||
<cmdsynopsis sepchar=" ">
|
||||
<command>delv</command>
|
||||
<arg choice="opt" rep="repeat">queryopt</arg>
|
||||
<arg choice="opt" rep="repeat">query</arg>
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
|
||||
<refsection><info><title>DESCRIPTION</title></info>
|
||||
|
||||
<para><command>delv</command>
|
||||
is a tool for sending
|
||||
DNS queries and validating the results, using the same internal
|
||||
resolver and validator logic as <command>named</command>.
|
||||
</para>
|
||||
<para>
|
||||
<command>delv</command> will send to a specified name server all
|
||||
queries needed to fetch and validate the requested data; this
|
||||
includes the original requested query, subsequent queries to follow
|
||||
CNAME or DNAME chains, and queries for DNSKEY, DS and DLV records
|
||||
to establish a chain of trust for DNSSEC validation.
|
||||
It does not perform iterative resolution, but simulates the
|
||||
behavior of a name server configured for DNSSEC validating and
|
||||
forwarding.
|
||||
</para>
|
||||
<para>
|
||||
By default, responses are validated using built-in DNSSEC trust
|
||||
anchor for the root zone ("."). Records returned by
|
||||
<command>delv</command> are either fully validated or
|
||||
were not signed. If validation fails, an explanation of
|
||||
the failure is included in the output; the validation process
|
||||
can be traced in detail. Because <command>delv</command> does
|
||||
not rely on an external server to carry out validation, it can
|
||||
be used to check the validity of DNS responses in environments
|
||||
where local name servers may not be trustworthy.
|
||||
</para>
|
||||
<para>
|
||||
Unless it is told to query a specific name server,
|
||||
<command>delv</command> will try each of the servers listed in
|
||||
<filename>/etc/resolv.conf</filename>. If no usable server
|
||||
addresses are found, <command>delv</command> will send
|
||||
queries to the localhost addresses (127.0.0.1 for IPv4, ::1
|
||||
for IPv6).
|
||||
</para>
|
||||
<para>
|
||||
When no command line arguments or options are given,
|
||||
<command>delv</command> will perform an NS query for "."
|
||||
(the root zone).
|
||||
</para>
|
||||
</refsection>
|
||||
|
||||
<refsection><info><title>SIMPLE USAGE</title></info>
|
||||
|
||||
|
||||
<para>
|
||||
A typical invocation of <command>delv</command> looks like:
|
||||
<programlisting> delv @server name type </programlisting>
|
||||
where:
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><constant>server</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
is the name or IP address of the name server to query. This
|
||||
can be an IPv4 address in dotted-decimal notation or an IPv6
|
||||
address in colon-delimited notation. When the supplied
|
||||
<parameter>server</parameter> argument is a hostname,
|
||||
<command>delv</command> resolves that name before
|
||||
querying that name server (note, however, that this
|
||||
initial lookup is <emphasis>not</emphasis> validated
|
||||
by DNSSEC).
|
||||
</para>
|
||||
<para>
|
||||
If no <parameter>server</parameter> argument is
|
||||
provided, <command>delv</command> consults
|
||||
<filename>/etc/resolv.conf</filename>; if an
|
||||
address is found there, it queries the name server at
|
||||
that address. If either of the <option>-4</option> or
|
||||
<option>-6</option> options are in use, then
|
||||
only addresses for the corresponding transport
|
||||
will be tried. If no usable addresses are found,
|
||||
<command>delv</command> will send queries to
|
||||
the localhost addresses (127.0.0.1 for IPv4,
|
||||
::1 for IPv6).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><constant>name</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
is the domain name to be looked up.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><constant>type</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
indicates what type of query is required —
|
||||
ANY, A, MX, etc.
|
||||
<parameter>type</parameter> can be any valid query
|
||||
type. If no
|
||||
<parameter>type</parameter> argument is supplied,
|
||||
<command>delv</command> will perform a lookup for an
|
||||
A record.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
</para>
|
||||
|
||||
</refsection>
|
||||
|
||||
<refsection><info><title>OPTIONS</title></info>
|
||||
|
||||
<variablelist>
|
||||
|
||||
<varlistentry>
|
||||
<term>-a <replaceable class="parameter">anchor-file</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies a file from which to read DNSSEC trust anchors.
|
||||
The default is <filename>/etc/bind.keys</filename>, which
|
||||
is included with <acronym>BIND</acronym> 9 and contains
|
||||
one or more trust anchors for the root zone (".").
|
||||
</para>
|
||||
<para>
|
||||
Keys that do not match the root zone name are ignored.
|
||||
An alternate key name can be specified using the
|
||||
<option>+root=NAME</option> options. DNSSEC Lookaside
|
||||
Validation can also be turned on by using the
|
||||
<option>+dlv=NAME</option> to specify the name of a
|
||||
zone containing DLV records.
|
||||
</para>
|
||||
<para>
|
||||
Note: When reading the trust anchor file,
|
||||
<command>delv</command> treats <option>managed-keys</option>
|
||||
statements and <option>trusted-keys</option> statements
|
||||
identically. That is, for a managed key, it is the
|
||||
<emphasis>initial</emphasis> key that is trusted; RFC 5011
|
||||
key management is not supported. <command>delv</command>
|
||||
will not consult the managed-keys database maintained by
|
||||
<command>named</command>. This means that if either of the
|
||||
keys in <filename>/etc/bind.keys</filename> is revoked
|
||||
and rolled over, it will be necessary to update
|
||||
<filename>/etc/bind.keys</filename> to use DNSSEC
|
||||
validation in <command>delv</command>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-b <replaceable class="parameter">address</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Sets the source IP address of the query to
|
||||
<parameter>address</parameter>. This must be a valid address
|
||||
on one of the host's network interfaces or "0.0.0.0" or "::".
|
||||
An optional source port may be specified by appending
|
||||
"#<port>"
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-c <replaceable class="parameter">class</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Sets the query class for the requested data. Currently,
|
||||
only class "IN" is supported in <command>delv</command>
|
||||
and any other value is ignored.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-d <replaceable class="parameter">level</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Set the systemwide debug level to <option>level</option>.
|
||||
The allowed range is from 0 to 99.
|
||||
The default is 0 (no debugging).
|
||||
Debugging traces from <command>delv</command> become
|
||||
more verbose as the debug level increases.
|
||||
See the <option>+mtrace</option>, <option>+rtrace</option>,
|
||||
and <option>+vtrace</option> options below for additional
|
||||
debugging details.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-h</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Display the <command>delv</command> help usage output and exit.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-i</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Insecure mode. This disables internal DNSSEC validation.
|
||||
(Note, however, this does not set the CD bit on upstream
|
||||
queries. If the server being queried is performing DNSSEC
|
||||
validation, then it will not return invalid data; this
|
||||
can cause <command>delv</command> to time out. When it
|
||||
is necessary to examine invalid data to debug a DNSSEC
|
||||
problem, use <command>dig +cd</command>.)
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-m</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Enables memory usage debugging.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-p <replaceable class="parameter">port#</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies a destination port to use for queries instead of
|
||||
the standard DNS port number 53. This option would be used
|
||||
with a name server that has been configured to listen
|
||||
for queries on a non-standard port number.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-q <replaceable class="parameter">name</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Sets the query name to <parameter>name</parameter>.
|
||||
While the query name can be specified without using the
|
||||
<option>-q</option>, it is sometimes necessary to disambiguate
|
||||
names from types or classes (for example, when looking up the
|
||||
name "ns", which could be misinterpreted as the type NS,
|
||||
or "ch", which could be misinterpreted as class CH).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-t <replaceable class="parameter">type</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Sets the query type to <parameter>type</parameter>, which
|
||||
can be any valid query type supported in BIND 9 except
|
||||
for zone transfer types AXFR and IXFR. As with
|
||||
<option>-q</option>, this is useful to distinguish
|
||||
query name type or class when they are ambiguous.
|
||||
it is sometimes necessary to disambiguate names from types.
|
||||
</para>
|
||||
<para>
|
||||
The default query type is "A", unless the <option>-x</option>
|
||||
option is supplied to indicate a reverse lookup, in which case
|
||||
it is "PTR".
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-v</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Print the <command>delv</command> version and exit.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-x <replaceable class="parameter">addr</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Performs a reverse lookup, mapping an addresses to
|
||||
a name. <parameter>addr</parameter> is an IPv4 address in
|
||||
dotted-decimal notation, or a colon-delimited IPv6 address.
|
||||
When <option>-x</option> is used, there is no need to provide
|
||||
the <parameter>name</parameter> or <parameter>type</parameter>
|
||||
arguments. <command>delv</command> automatically performs a
|
||||
lookup for a name like <literal>11.12.13.10.in-addr.arpa</literal>
|
||||
and sets the query type to PTR. IPv6 addresses are looked up
|
||||
using nibble format under the IP6.ARPA domain.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-4</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Forces <command>delv</command> to only use IPv4.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-6</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Forces <command>delv</command> to only use IPv6.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
</refsection>
|
||||
|
||||
<refsection><info><title>QUERY OPTIONS</title></info>
|
||||
|
||||
|
||||
<para><command>delv</command>
|
||||
provides a number of query options which affect the way results are
|
||||
displayed, and in some cases the way lookups are performed.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Each query option is identified by a keyword preceded by a plus sign
|
||||
(<literal>+</literal>). Some keywords set or reset an
|
||||
option. These may be preceded by the string
|
||||
<literal>no</literal> to negate the meaning of that keyword.
|
||||
Other keywords assign values to options like the timeout interval.
|
||||
They have the form <option>+keyword=value</option>.
|
||||
The query options are:
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><option>+[no]cdflag</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Controls whether to set the CD (checking disabled) bit in
|
||||
queries sent by <command>delv</command>. This may be useful
|
||||
when troubleshooting DNSSEC problems from behind a validating
|
||||
resolver. A validating resolver will block invalid responses,
|
||||
making it difficult to retrieve them for analysis. Setting
|
||||
the CD flag on queries will cause the resolver to return
|
||||
invalid responses, which <command>delv</command> can then
|
||||
validate internally and report the errors in detail.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>+[no]class</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Controls whether to display the CLASS when printing
|
||||
a record. The default is to display the CLASS.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>+[no]ttl</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Controls whether to display the TTL when printing
|
||||
a record. The default is to display the TTL.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>+[no]rtrace</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Toggle resolver fetch logging. This reports the
|
||||
name and type of each query sent by <command>delv</command>
|
||||
in the process of carrying out the resolution and validation
|
||||
process: this includes including the original query and
|
||||
all subsequent queries to follow CNAMEs and to establish a
|
||||
chain of trust for DNSSEC validation.
|
||||
</para>
|
||||
<para>
|
||||
This is equivalent to setting the debug level to 1 in
|
||||
the "resolver" logging category. Setting the systemwide
|
||||
debug level to 1 using the <option>-d</option> option will
|
||||
product the same output (but will affect other logging
|
||||
categories as well).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>+[no]mtrace</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Toggle message logging. This produces a detailed dump of
|
||||
the responses received by <command>delv</command> in the
|
||||
process of carrying out the resolution and validation process.
|
||||
</para>
|
||||
<para>
|
||||
This is equivalent to setting the debug level to 10
|
||||
for the "packets" module of the "resolver" logging
|
||||
category. Setting the systemwide debug level to 10 using
|
||||
the <option>-d</option> option will produce the same output
|
||||
(but will affect other logging categories as well).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>+[no]vtrace</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Toggle validation logging. This shows the internal
|
||||
process of the validator as it determines whether an
|
||||
answer is validly signed, unsigned, or invalid.
|
||||
</para>
|
||||
<para>
|
||||
This is equivalent to setting the debug level to 3
|
||||
for the "validator" module of the "dnssec" logging
|
||||
category. Setting the systemwide debug level to 3 using
|
||||
the <option>-d</option> option will produce the same output
|
||||
(but will affect other logging categories as well).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>+[no]short</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Provide a terse answer. The default is to print the answer in a
|
||||
verbose form.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>+[no]comments</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Toggle the display of comment lines in the output. The default
|
||||
is to print comments.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>+[no]rrcomments</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Toggle the display of per-record comments in the output (for
|
||||
example, human-readable key information about DNSKEY records).
|
||||
The default is to print per-record comments.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>+[no]crypto</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Toggle the display of cryptographic fields in DNSSEC records.
|
||||
The contents of these field are unnecessary to debug most DNSSEC
|
||||
validation failures and removing them makes it easier to see
|
||||
the common failures. The default is to display the fields.
|
||||
When omitted they are replaced by the string "[omitted]" or
|
||||
in the DNSKEY case the key id is displayed as the replacement,
|
||||
e.g. "[ key id = value ]".
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>+[no]trust</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Controls whether to display the trust level when printing
|
||||
a record. The default is to display the trust level.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>+[no]split[=W]</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Split long hex- or base64-formatted fields in resource
|
||||
records into chunks of <parameter>W</parameter> characters
|
||||
(where <parameter>W</parameter> is rounded up to the nearest
|
||||
multiple of 4).
|
||||
<parameter>+nosplit</parameter> or
|
||||
<parameter>+split=0</parameter> causes fields not to be
|
||||
split at all. The default is 56 characters, or 44 characters
|
||||
when multiline mode is active.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>+[no]all</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Set or clear the display options
|
||||
<option>+[no]comments</option>,
|
||||
<option>+[no]rrcomments</option>, and
|
||||
<option>+[no]trust</option> as a group.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>+[no]multiline</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Print long records (such as RRSIG, DNSKEY, and SOA records)
|
||||
in a verbose multi-line format with human-readable comments.
|
||||
The default is to print each record on a single line, to
|
||||
facilitate machine parsing of the <command>delv</command>
|
||||
output.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>+[no]dnssec</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Indicates whether to display RRSIG records in the
|
||||
<command>delv</command> output. The default is to
|
||||
do so. Note that (unlike in <command>dig</command>)
|
||||
this does <emphasis>not</emphasis> control whether to
|
||||
request DNSSEC records or whether to validate them.
|
||||
DNSSEC records are always requested, and validation
|
||||
will always occur unless suppressed by the use of
|
||||
<option>-i</option> or <option>+noroot</option> and
|
||||
<option>+nodlv</option>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>+[no]root[=ROOT]</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Indicates whether to perform conventional (non-lookaside)
|
||||
DNSSEC validation, and if so, specifies the
|
||||
name of a trust anchor. The default is to validate using
|
||||
a trust anchor of "." (the root zone), for which there is
|
||||
a built-in key. If specifying a different trust anchor,
|
||||
then <option>-a</option> must be used to specify a file
|
||||
containing the key.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>+[no]dlv[=DLV]</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Indicates whether to perform DNSSEC lookaside validation,
|
||||
and if so, specifies the name of the DLV trust anchor.
|
||||
The <option>-a</option> option must also be used to specify
|
||||
a file containing the DLV key.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>+[no]tcp</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Controls whether to use TCP when sending queries.
|
||||
The default is to use UDP unless a truncated
|
||||
response has been received.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>+[no]unknownformat</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Print all RDATA in unknown RR type presentation format
|
||||
(RFC 3597). The default is to print RDATA for known types
|
||||
in the type's presentation format.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
||||
</para>
|
||||
</refsection>
|
||||
|
||||
<refsection><info><title>FILES</title></info>
|
||||
|
||||
<para><filename>/etc/bind.keys</filename></para>
|
||||
<para><filename>/etc/resolv.conf</filename></para>
|
||||
</refsection>
|
||||
|
||||
<refsection><info><title>SEE ALSO</title></info>
|
||||
|
||||
<para><citerefentry>
|
||||
<refentrytitle>dig</refentrytitle><manvolnum>1</manvolnum>
|
||||
</citerefentry>,
|
||||
<citerefentry>
|
||||
<refentrytitle>named</refentrytitle><manvolnum>8</manvolnum>
|
||||
</citerefentry>,
|
||||
<citetitle>RFC4034</citetitle>,
|
||||
<citetitle>RFC4035</citetitle>,
|
||||
<citetitle>RFC4431</citetitle>,
|
||||
<citetitle>RFC5074</citetitle>,
|
||||
<citetitle>RFC5155</citetitle>.
|
||||
</para>
|
||||
</refsection>
|
||||
|
||||
</refentry>
|
||||
592
bin/delv/delv.html
Normal file
592
bin/delv/delv.html
Normal file
@@ -0,0 +1,592 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--
|
||||
- Copyright (C) 2014-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
-
|
||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
-->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>delv</title>
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry">
|
||||
<a name="man.delv"></a><div class="titlepage"></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="refnamediv">
|
||||
<h2>Name</h2>
|
||||
<p>
|
||||
delv
|
||||
— DNS lookup and validation utility
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="refsynopsisdiv">
|
||||
<h2>Synopsis</h2>
|
||||
<div class="cmdsynopsis"><p>
|
||||
<code class="command">delv</code>
|
||||
[@server]
|
||||
[
|
||||
[<code class="option">-4</code>]
|
||||
| [<code class="option">-6</code>]
|
||||
]
|
||||
[<code class="option">-a <em class="replaceable"><code>anchor-file</code></em></code>]
|
||||
[<code class="option">-b <em class="replaceable"><code>address</code></em></code>]
|
||||
[<code class="option">-c <em class="replaceable"><code>class</code></em></code>]
|
||||
[<code class="option">-d <em class="replaceable"><code>level</code></em></code>]
|
||||
[<code class="option">-i</code>]
|
||||
[<code class="option">-m</code>]
|
||||
[<code class="option">-p <em class="replaceable"><code>port#</code></em></code>]
|
||||
[<code class="option">-q <em class="replaceable"><code>name</code></em></code>]
|
||||
[<code class="option">-t <em class="replaceable"><code>type</code></em></code>]
|
||||
[<code class="option">-x <em class="replaceable"><code>addr</code></em></code>]
|
||||
[name]
|
||||
[type]
|
||||
[class]
|
||||
[queryopt...]
|
||||
</p></div>
|
||||
|
||||
<div class="cmdsynopsis"><p>
|
||||
<code class="command">delv</code>
|
||||
[<code class="option">-h</code>]
|
||||
</p></div>
|
||||
|
||||
<div class="cmdsynopsis"><p>
|
||||
<code class="command">delv</code>
|
||||
[<code class="option">-v</code>]
|
||||
</p></div>
|
||||
|
||||
<div class="cmdsynopsis"><p>
|
||||
<code class="command">delv</code>
|
||||
[queryopt...]
|
||||
[query...]
|
||||
</p></div>
|
||||
</div>
|
||||
|
||||
<div class="refsection">
|
||||
<a name="id-1.7"></a><h2>DESCRIPTION</h2>
|
||||
|
||||
<p><span class="command"><strong>delv</strong></span>
|
||||
is a tool for sending
|
||||
DNS queries and validating the results, using the same internal
|
||||
resolver and validator logic as <span class="command"><strong>named</strong></span>.
|
||||
</p>
|
||||
<p>
|
||||
<span class="command"><strong>delv</strong></span> will send to a specified name server all
|
||||
queries needed to fetch and validate the requested data; this
|
||||
includes the original requested query, subsequent queries to follow
|
||||
CNAME or DNAME chains, and queries for DNSKEY, DS and DLV records
|
||||
to establish a chain of trust for DNSSEC validation.
|
||||
It does not perform iterative resolution, but simulates the
|
||||
behavior of a name server configured for DNSSEC validating and
|
||||
forwarding.
|
||||
</p>
|
||||
<p>
|
||||
By default, responses are validated using built-in DNSSEC trust
|
||||
anchor for the root zone ("."). Records returned by
|
||||
<span class="command"><strong>delv</strong></span> are either fully validated or
|
||||
were not signed. If validation fails, an explanation of
|
||||
the failure is included in the output; the validation process
|
||||
can be traced in detail. Because <span class="command"><strong>delv</strong></span> does
|
||||
not rely on an external server to carry out validation, it can
|
||||
be used to check the validity of DNS responses in environments
|
||||
where local name servers may not be trustworthy.
|
||||
</p>
|
||||
<p>
|
||||
Unless it is told to query a specific name server,
|
||||
<span class="command"><strong>delv</strong></span> will try each of the servers listed in
|
||||
<code class="filename">/etc/resolv.conf</code>. If no usable server
|
||||
addresses are found, <span class="command"><strong>delv</strong></span> will send
|
||||
queries to the localhost addresses (127.0.0.1 for IPv4, ::1
|
||||
for IPv6).
|
||||
</p>
|
||||
<p>
|
||||
When no command line arguments or options are given,
|
||||
<span class="command"><strong>delv</strong></span> will perform an NS query for "."
|
||||
(the root zone).
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="refsection">
|
||||
<a name="id-1.8"></a><h2>SIMPLE USAGE</h2>
|
||||
|
||||
|
||||
<p>
|
||||
A typical invocation of <span class="command"><strong>delv</strong></span> looks like:
|
||||
</p>
|
||||
<pre class="programlisting"> delv @server name type </pre>
|
||||
<p>
|
||||
where:
|
||||
|
||||
</p>
|
||||
<div class="variablelist"><dl class="variablelist">
|
||||
<dt><span class="term"><code class="constant">server</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
is the name or IP address of the name server to query. This
|
||||
can be an IPv4 address in dotted-decimal notation or an IPv6
|
||||
address in colon-delimited notation. When the supplied
|
||||
<em class="parameter"><code>server</code></em> argument is a hostname,
|
||||
<span class="command"><strong>delv</strong></span> resolves that name before
|
||||
querying that name server (note, however, that this
|
||||
initial lookup is <span class="emphasis"><em>not</em></span> validated
|
||||
by DNSSEC).
|
||||
</p>
|
||||
<p>
|
||||
If no <em class="parameter"><code>server</code></em> argument is
|
||||
provided, <span class="command"><strong>delv</strong></span> consults
|
||||
<code class="filename">/etc/resolv.conf</code>; if an
|
||||
address is found there, it queries the name server at
|
||||
that address. If either of the <code class="option">-4</code> or
|
||||
<code class="option">-6</code> options are in use, then
|
||||
only addresses for the corresponding transport
|
||||
will be tried. If no usable addresses are found,
|
||||
<span class="command"><strong>delv</strong></span> will send queries to
|
||||
the localhost addresses (127.0.0.1 for IPv4,
|
||||
::1 for IPv6).
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="constant">name</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
is the domain name to be looked up.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="constant">type</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
indicates what type of query is required —
|
||||
ANY, A, MX, etc.
|
||||
<em class="parameter"><code>type</code></em> can be any valid query
|
||||
type. If no
|
||||
<em class="parameter"><code>type</code></em> argument is supplied,
|
||||
<span class="command"><strong>delv</strong></span> will perform a lookup for an
|
||||
A record.
|
||||
</p>
|
||||
</dd>
|
||||
</dl></div>
|
||||
<p>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="refsection">
|
||||
<a name="id-1.9"></a><h2>OPTIONS</h2>
|
||||
|
||||
<div class="variablelist"><dl class="variablelist">
|
||||
<dt><span class="term">-a <em class="replaceable"><code>anchor-file</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Specifies a file from which to read DNSSEC trust anchors.
|
||||
The default is <code class="filename">/etc/bind.keys</code>, which
|
||||
is included with <acronym class="acronym">BIND</acronym> 9 and contains
|
||||
one or more trust anchors for the root zone (".").
|
||||
</p>
|
||||
<p>
|
||||
Keys that do not match the root zone name are ignored.
|
||||
An alternate key name can be specified using the
|
||||
<code class="option">+root=NAME</code> options. DNSSEC Lookaside
|
||||
Validation can also be turned on by using the
|
||||
<code class="option">+dlv=NAME</code> to specify the name of a
|
||||
zone containing DLV records.
|
||||
</p>
|
||||
<p>
|
||||
Note: When reading the trust anchor file,
|
||||
<span class="command"><strong>delv</strong></span> treats <code class="option">managed-keys</code>
|
||||
statements and <code class="option">trusted-keys</code> statements
|
||||
identically. That is, for a managed key, it is the
|
||||
<span class="emphasis"><em>initial</em></span> key that is trusted; RFC 5011
|
||||
key management is not supported. <span class="command"><strong>delv</strong></span>
|
||||
will not consult the managed-keys database maintained by
|
||||
<span class="command"><strong>named</strong></span>. This means that if either of the
|
||||
keys in <code class="filename">/etc/bind.keys</code> is revoked
|
||||
and rolled over, it will be necessary to update
|
||||
<code class="filename">/etc/bind.keys</code> to use DNSSEC
|
||||
validation in <span class="command"><strong>delv</strong></span>.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-b <em class="replaceable"><code>address</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Sets the source IP address of the query to
|
||||
<em class="parameter"><code>address</code></em>. This must be a valid address
|
||||
on one of the host's network interfaces or "0.0.0.0" or "::".
|
||||
An optional source port may be specified by appending
|
||||
"#<port>"
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-c <em class="replaceable"><code>class</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Sets the query class for the requested data. Currently,
|
||||
only class "IN" is supported in <span class="command"><strong>delv</strong></span>
|
||||
and any other value is ignored.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-d <em class="replaceable"><code>level</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Set the systemwide debug level to <code class="option">level</code>.
|
||||
The allowed range is from 0 to 99.
|
||||
The default is 0 (no debugging).
|
||||
Debugging traces from <span class="command"><strong>delv</strong></span> become
|
||||
more verbose as the debug level increases.
|
||||
See the <code class="option">+mtrace</code>, <code class="option">+rtrace</code>,
|
||||
and <code class="option">+vtrace</code> options below for additional
|
||||
debugging details.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-h</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Display the <span class="command"><strong>delv</strong></span> help usage output and exit.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-i</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Insecure mode. This disables internal DNSSEC validation.
|
||||
(Note, however, this does not set the CD bit on upstream
|
||||
queries. If the server being queried is performing DNSSEC
|
||||
validation, then it will not return invalid data; this
|
||||
can cause <span class="command"><strong>delv</strong></span> to time out. When it
|
||||
is necessary to examine invalid data to debug a DNSSEC
|
||||
problem, use <span class="command"><strong>dig +cd</strong></span>.)
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-m</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Enables memory usage debugging.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-p <em class="replaceable"><code>port#</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Specifies a destination port to use for queries instead of
|
||||
the standard DNS port number 53. This option would be used
|
||||
with a name server that has been configured to listen
|
||||
for queries on a non-standard port number.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-q <em class="replaceable"><code>name</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Sets the query name to <em class="parameter"><code>name</code></em>.
|
||||
While the query name can be specified without using the
|
||||
<code class="option">-q</code>, it is sometimes necessary to disambiguate
|
||||
names from types or classes (for example, when looking up the
|
||||
name "ns", which could be misinterpreted as the type NS,
|
||||
or "ch", which could be misinterpreted as class CH).
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-t <em class="replaceable"><code>type</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Sets the query type to <em class="parameter"><code>type</code></em>, which
|
||||
can be any valid query type supported in BIND 9 except
|
||||
for zone transfer types AXFR and IXFR. As with
|
||||
<code class="option">-q</code>, this is useful to distinguish
|
||||
query name type or class when they are ambiguous.
|
||||
it is sometimes necessary to disambiguate names from types.
|
||||
</p>
|
||||
<p>
|
||||
The default query type is "A", unless the <code class="option">-x</code>
|
||||
option is supplied to indicate a reverse lookup, in which case
|
||||
it is "PTR".
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-v</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Print the <span class="command"><strong>delv</strong></span> version and exit.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-x <em class="replaceable"><code>addr</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Performs a reverse lookup, mapping an addresses to
|
||||
a name. <em class="parameter"><code>addr</code></em> is an IPv4 address in
|
||||
dotted-decimal notation, or a colon-delimited IPv6 address.
|
||||
When <code class="option">-x</code> is used, there is no need to provide
|
||||
the <em class="parameter"><code>name</code></em> or <em class="parameter"><code>type</code></em>
|
||||
arguments. <span class="command"><strong>delv</strong></span> automatically performs a
|
||||
lookup for a name like <code class="literal">11.12.13.10.in-addr.arpa</code>
|
||||
and sets the query type to PTR. IPv6 addresses are looked up
|
||||
using nibble format under the IP6.ARPA domain.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-4</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Forces <span class="command"><strong>delv</strong></span> to only use IPv4.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-6</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Forces <span class="command"><strong>delv</strong></span> to only use IPv6.
|
||||
</p>
|
||||
</dd>
|
||||
</dl></div>
|
||||
</div>
|
||||
|
||||
<div class="refsection">
|
||||
<a name="id-1.10"></a><h2>QUERY OPTIONS</h2>
|
||||
|
||||
|
||||
<p><span class="command"><strong>delv</strong></span>
|
||||
provides a number of query options which affect the way results are
|
||||
displayed, and in some cases the way lookups are performed.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Each query option is identified by a keyword preceded by a plus sign
|
||||
(<code class="literal">+</code>). Some keywords set or reset an
|
||||
option. These may be preceded by the string
|
||||
<code class="literal">no</code> to negate the meaning of that keyword.
|
||||
Other keywords assign values to options like the timeout interval.
|
||||
They have the form <code class="option">+keyword=value</code>.
|
||||
The query options are:
|
||||
|
||||
</p>
|
||||
<div class="variablelist"><dl class="variablelist">
|
||||
<dt><span class="term"><code class="option">+[no]cdflag</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Controls whether to set the CD (checking disabled) bit in
|
||||
queries sent by <span class="command"><strong>delv</strong></span>. This may be useful
|
||||
when troubleshooting DNSSEC problems from behind a validating
|
||||
resolver. A validating resolver will block invalid responses,
|
||||
making it difficult to retrieve them for analysis. Setting
|
||||
the CD flag on queries will cause the resolver to return
|
||||
invalid responses, which <span class="command"><strong>delv</strong></span> can then
|
||||
validate internally and report the errors in detail.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+[no]class</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Controls whether to display the CLASS when printing
|
||||
a record. The default is to display the CLASS.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+[no]ttl</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Controls whether to display the TTL when printing
|
||||
a record. The default is to display the TTL.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+[no]rtrace</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Toggle resolver fetch logging. This reports the
|
||||
name and type of each query sent by <span class="command"><strong>delv</strong></span>
|
||||
in the process of carrying out the resolution and validation
|
||||
process: this includes including the original query and
|
||||
all subsequent queries to follow CNAMEs and to establish a
|
||||
chain of trust for DNSSEC validation.
|
||||
</p>
|
||||
<p>
|
||||
This is equivalent to setting the debug level to 1 in
|
||||
the "resolver" logging category. Setting the systemwide
|
||||
debug level to 1 using the <code class="option">-d</code> option will
|
||||
product the same output (but will affect other logging
|
||||
categories as well).
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+[no]mtrace</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Toggle message logging. This produces a detailed dump of
|
||||
the responses received by <span class="command"><strong>delv</strong></span> in the
|
||||
process of carrying out the resolution and validation process.
|
||||
</p>
|
||||
<p>
|
||||
This is equivalent to setting the debug level to 10
|
||||
for the "packets" module of the "resolver" logging
|
||||
category. Setting the systemwide debug level to 10 using
|
||||
the <code class="option">-d</code> option will produce the same output
|
||||
(but will affect other logging categories as well).
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+[no]vtrace</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Toggle validation logging. This shows the internal
|
||||
process of the validator as it determines whether an
|
||||
answer is validly signed, unsigned, or invalid.
|
||||
</p>
|
||||
<p>
|
||||
This is equivalent to setting the debug level to 3
|
||||
for the "validator" module of the "dnssec" logging
|
||||
category. Setting the systemwide debug level to 3 using
|
||||
the <code class="option">-d</code> option will produce the same output
|
||||
(but will affect other logging categories as well).
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+[no]short</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Provide a terse answer. The default is to print the answer in a
|
||||
verbose form.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+[no]comments</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Toggle the display of comment lines in the output. The default
|
||||
is to print comments.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+[no]rrcomments</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Toggle the display of per-record comments in the output (for
|
||||
example, human-readable key information about DNSKEY records).
|
||||
The default is to print per-record comments.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+[no]crypto</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Toggle the display of cryptographic fields in DNSSEC records.
|
||||
The contents of these field are unnecessary to debug most DNSSEC
|
||||
validation failures and removing them makes it easier to see
|
||||
the common failures. The default is to display the fields.
|
||||
When omitted they are replaced by the string "[omitted]" or
|
||||
in the DNSKEY case the key id is displayed as the replacement,
|
||||
e.g. "[ key id = value ]".
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+[no]trust</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Controls whether to display the trust level when printing
|
||||
a record. The default is to display the trust level.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+[no]split[=W]</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Split long hex- or base64-formatted fields in resource
|
||||
records into chunks of <em class="parameter"><code>W</code></em> characters
|
||||
(where <em class="parameter"><code>W</code></em> is rounded up to the nearest
|
||||
multiple of 4).
|
||||
<em class="parameter"><code>+nosplit</code></em> or
|
||||
<em class="parameter"><code>+split=0</code></em> causes fields not to be
|
||||
split at all. The default is 56 characters, or 44 characters
|
||||
when multiline mode is active.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+[no]all</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Set or clear the display options
|
||||
<code class="option">+[no]comments</code>,
|
||||
<code class="option">+[no]rrcomments</code>, and
|
||||
<code class="option">+[no]trust</code> as a group.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+[no]multiline</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Print long records (such as RRSIG, DNSKEY, and SOA records)
|
||||
in a verbose multi-line format with human-readable comments.
|
||||
The default is to print each record on a single line, to
|
||||
facilitate machine parsing of the <span class="command"><strong>delv</strong></span>
|
||||
output.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+[no]dnssec</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Indicates whether to display RRSIG records in the
|
||||
<span class="command"><strong>delv</strong></span> output. The default is to
|
||||
do so. Note that (unlike in <span class="command"><strong>dig</strong></span>)
|
||||
this does <span class="emphasis"><em>not</em></span> control whether to
|
||||
request DNSSEC records or whether to validate them.
|
||||
DNSSEC records are always requested, and validation
|
||||
will always occur unless suppressed by the use of
|
||||
<code class="option">-i</code> or <code class="option">+noroot</code> and
|
||||
<code class="option">+nodlv</code>.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+[no]root[=ROOT]</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Indicates whether to perform conventional (non-lookaside)
|
||||
DNSSEC validation, and if so, specifies the
|
||||
name of a trust anchor. The default is to validate using
|
||||
a trust anchor of "." (the root zone), for which there is
|
||||
a built-in key. If specifying a different trust anchor,
|
||||
then <code class="option">-a</code> must be used to specify a file
|
||||
containing the key.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+[no]dlv[=DLV]</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Indicates whether to perform DNSSEC lookaside validation,
|
||||
and if so, specifies the name of the DLV trust anchor.
|
||||
The <code class="option">-a</code> option must also be used to specify
|
||||
a file containing the DLV key.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+[no]tcp</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Controls whether to use TCP when sending queries.
|
||||
The default is to use UDP unless a truncated
|
||||
response has been received.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+[no]unknownformat</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Print all RDATA in unknown RR type presentation format
|
||||
(RFC 3597). The default is to print RDATA for known types
|
||||
in the type's presentation format.
|
||||
</p>
|
||||
</dd>
|
||||
</dl></div>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="refsection">
|
||||
<a name="id-1.11"></a><h2>FILES</h2>
|
||||
|
||||
<p><code class="filename">/etc/bind.keys</code></p>
|
||||
<p><code class="filename">/etc/resolv.conf</code></p>
|
||||
</div>
|
||||
|
||||
<div class="refsection">
|
||||
<a name="id-1.12"></a><h2>SEE ALSO</h2>
|
||||
|
||||
<p><span class="citerefentry">
|
||||
<span class="refentrytitle">dig</span>(1)
|
||||
</span>,
|
||||
<span class="citerefentry">
|
||||
<span class="refentrytitle">named</span>(8)
|
||||
</span>,
|
||||
<em class="citetitle">RFC4034</em>,
|
||||
<em class="citetitle">RFC4035</em>,
|
||||
<em class="citetitle">RFC4431</em>,
|
||||
<em class="citetitle">RFC5074</em>,
|
||||
<em class="citetitle">RFC5155</em>.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div></body>
|
||||
</html>
|
||||
@@ -1,336 +0,0 @@
|
||||
..
|
||||
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
|
||||
This Source Code Form is subject to the terms of the Mozilla Public
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
See the COPYRIGHT file distributed with this work for additional
|
||||
information regarding copyright ownership.
|
||||
|
||||
..
|
||||
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
|
||||
This Source Code Form is subject to the terms of the Mozilla Public
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
See the COPYRIGHT file distributed with this work for additional
|
||||
information regarding copyright ownership.
|
||||
|
||||
|
||||
.. highlight: console
|
||||
|
||||
.. _man_delv:
|
||||
|
||||
delv - DNS lookup and validation utility
|
||||
----------------------------------------
|
||||
|
||||
Synopsis
|
||||
~~~~~~~~
|
||||
|
||||
:program:`delv` [@server] [ [**-4**] | [**-6**] ] [**-a** anchor-file] [**-b** address] [**-c** class] [**-d** level] [**-i**] [**-m**] [**-p** port#] [**-q** name] [**-t** type] [**-x** addr] [name] [type] [class] [queryopt...]
|
||||
|
||||
:program:`delv` [**-h**]
|
||||
|
||||
:program:`delv` [**-v**]
|
||||
|
||||
:program:`delv` [queryopt...] [query...]
|
||||
|
||||
Description
|
||||
~~~~~~~~~~~
|
||||
|
||||
``delv`` is a tool for sending DNS queries and validating the results,
|
||||
using the same internal resolver and validator logic as ``named``.
|
||||
|
||||
``delv`` sends to a specified name server all queries needed to
|
||||
fetch and validate the requested data; this includes the original
|
||||
requested query, subsequent queries to follow CNAME or DNAME chains,
|
||||
queries for DNSKEY, and DS records to establish a chain of trust for
|
||||
DNSSEC validation. It does not perform iterative resolution, but
|
||||
simulates the behavior of a name server configured for DNSSEC validating
|
||||
and forwarding.
|
||||
|
||||
By default, responses are validated using the built-in DNSSEC trust anchor
|
||||
for the root zone ("."). Records returned by ``delv`` are either fully
|
||||
validated or were not signed. If validation fails, an explanation of the
|
||||
failure is included in the output; the validation process can be traced
|
||||
in detail. Because ``delv`` does not rely on an external server to carry
|
||||
out validation, it can be used to check the validity of DNS responses in
|
||||
environments where local name servers may not be trustworthy.
|
||||
|
||||
Unless it is told to query a specific name server, ``delv`` tries
|
||||
each of the servers listed in ``/etc/resolv.conf``. If no usable server
|
||||
addresses are found, ``delv`` sends queries to the localhost
|
||||
addresses (127.0.0.1 for IPv4, ::1 for IPv6).
|
||||
|
||||
When no command-line arguments or options are given, ``delv``
|
||||
performs an NS query for "." (the root zone).
|
||||
|
||||
Simple Usage
|
||||
~~~~~~~~~~~~
|
||||
|
||||
A typical invocation of ``delv`` looks like:
|
||||
|
||||
::
|
||||
|
||||
delv @server name type
|
||||
|
||||
where:
|
||||
|
||||
``server``
|
||||
is the name or IP address of the name server to query. This can be an
|
||||
IPv4 address in dotted-decimal notation or an IPv6 address in
|
||||
colon-delimited notation. When the supplied ``server`` argument is a
|
||||
hostname, ``delv`` resolves that name before querying that name
|
||||
server (note, however, that this initial lookup is *not* validated by
|
||||
DNSSEC).
|
||||
|
||||
If no ``server`` argument is provided, ``delv`` consults
|
||||
``/etc/resolv.conf``; if an address is found there, it queries the
|
||||
name server at that address. If either of the ``-4`` or ``-6``
|
||||
options is in use, then only addresses for the corresponding
|
||||
transport are tried. If no usable addresses are found, ``delv``
|
||||
sends queries to the localhost addresses (127.0.0.1 for IPv4, ::1
|
||||
for IPv6).
|
||||
|
||||
``name``
|
||||
is the domain name to be looked up.
|
||||
|
||||
``type``
|
||||
indicates what type of query is required - ANY, A, MX, etc.
|
||||
``type`` can be any valid query type. If no ``type`` argument is
|
||||
supplied, ``delv`` performs a lookup for an A record.
|
||||
|
||||
Options
|
||||
~~~~~~~
|
||||
|
||||
``-a anchor-file``
|
||||
This option specifies a file from which to read DNSSEC trust anchors. The default
|
||||
is ``/etc/bind.keys``, which is included with BIND 9 and contains one
|
||||
or more trust anchors for the root zone (".").
|
||||
|
||||
Keys that do not match the root zone name are ignored. An alternate
|
||||
key name can be specified using the ``+root=NAME`` options.
|
||||
|
||||
Note: When reading the trust anchor file, ``delv`` treats ``trust-anchors``,
|
||||
``initial-key``, and ``static-key`` identically. That is, for a managed key,
|
||||
it is the *initial* key that is trusted; :rfc:`5011` key management is not
|
||||
supported. ``delv`` does not consult the managed-keys database maintained by
|
||||
``named``, which means that if either of the keys in ``/etc/bind.keys`` is
|
||||
revoked and rolled over, ``/etc/bind.keys`` must be updated to
|
||||
use DNSSEC validation in ``delv``.
|
||||
|
||||
``-b address``
|
||||
This option sets the source IP address of the query to ``address``. This must be
|
||||
a valid address on one of the host's network interfaces, or ``0.0.0.0``,
|
||||
or ``::``. An optional source port may be specified by appending
|
||||
``#<port>``
|
||||
|
||||
``-c class``
|
||||
This option sets the query class for the requested data. Currently, only class
|
||||
"IN" is supported in ``delv`` and any other value is ignored.
|
||||
|
||||
``-d level``
|
||||
This option sets the systemwide debug level to ``level``. The allowed range is
|
||||
from 0 to 99. The default is 0 (no debugging). Debugging traces from
|
||||
``delv`` become more verbose as the debug level increases. See the
|
||||
``+mtrace``, ``+rtrace``, and ``+vtrace`` options below for
|
||||
additional debugging details.
|
||||
|
||||
``-h``
|
||||
This option displays the ``delv`` help usage output and exits.
|
||||
|
||||
``-i``
|
||||
This option sets insecure mode, which disables internal DNSSEC validation. (Note,
|
||||
however, that this does not set the CD bit on upstream queries. If the
|
||||
server being queried is performing DNSSEC validation, then it does
|
||||
not return invalid data; this can cause ``delv`` to time out. When it
|
||||
is necessary to examine invalid data to debug a DNSSEC problem, use
|
||||
``dig +cd``.)
|
||||
|
||||
``-m``
|
||||
This option enables memory usage debugging.
|
||||
|
||||
``-p port#``
|
||||
This option specifies a destination port to use for queries, instead of the
|
||||
standard DNS port number 53. This option is used with a name
|
||||
server that has been configured to listen for queries on a
|
||||
non-standard port number.
|
||||
|
||||
``-q name``
|
||||
This option sets the query name to ``name``. While the query name can be
|
||||
specified without using the ``-q`` option, it is sometimes necessary to
|
||||
disambiguate names from types or classes (for example, when looking
|
||||
up the name "ns", which could be misinterpreted as the type NS, or
|
||||
"ch", which could be misinterpreted as class CH).
|
||||
|
||||
``-t type``
|
||||
This option sets the query type to ``type``, which can be any valid query type
|
||||
supported in BIND 9 except for zone transfer types AXFR and IXFR. As
|
||||
with ``-q``, this is useful to distinguish query-name types or classes
|
||||
when they are ambiguous. It is sometimes necessary to disambiguate
|
||||
names from types.
|
||||
|
||||
The default query type is "A", unless the ``-x`` option is supplied
|
||||
to indicate a reverse lookup, in which case it is "PTR".
|
||||
|
||||
``-v``
|
||||
This option prints the ``delv`` version and exits.
|
||||
|
||||
``-x addr``
|
||||
This option performs a reverse lookup, mapping an address to a name. ``addr``
|
||||
is an IPv4 address in dotted-decimal notation, or a colon-delimited
|
||||
IPv6 address. When ``-x`` is used, there is no need to provide the
|
||||
``name`` or ``type`` arguments; ``delv`` automatically performs a
|
||||
lookup for a name like ``11.12.13.10.in-addr.arpa`` and sets the
|
||||
query type to PTR. IPv6 addresses are looked up using nibble format
|
||||
under the IP6.ARPA domain.
|
||||
|
||||
``-4``
|
||||
This option forces ``delv`` to only use IPv4.
|
||||
|
||||
``-6``
|
||||
This option forces ``delv`` to only use IPv6.
|
||||
|
||||
Query Options
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
``delv`` provides a number of query options which affect the way results
|
||||
are displayed, and in some cases the way lookups are performed.
|
||||
|
||||
Each query option is identified by a keyword preceded by a plus sign
|
||||
(``+``). Some keywords set or reset an option. These may be preceded by
|
||||
the string ``no`` to negate the meaning of that keyword. Other keywords
|
||||
assign values to options like the timeout interval. They have the form
|
||||
``+keyword=value``. The query options are:
|
||||
|
||||
``+[no]cdflag``
|
||||
This option controls whether to set the CD (checking disabled) bit in queries
|
||||
sent by ``delv``. This may be useful when troubleshooting DNSSEC
|
||||
problems from behind a validating resolver. A validating resolver
|
||||
blocks invalid responses, making it difficult to retrieve them
|
||||
for analysis. Setting the CD flag on queries causes the resolver
|
||||
to return invalid responses, which ``delv`` can then validate
|
||||
internally and report the errors in detail.
|
||||
|
||||
``+[no]class``
|
||||
This option controls whether to display the CLASS when printing a record. The
|
||||
default is to display the CLASS.
|
||||
|
||||
``+[no]ttl``
|
||||
This option controls whether to display the TTL when printing a record. The
|
||||
default is to display the TTL.
|
||||
|
||||
``+[no]rtrace``
|
||||
This option toggles resolver fetch logging. This reports the name and type of each
|
||||
query sent by ``delv`` in the process of carrying out the resolution
|
||||
and validation process, including the original query
|
||||
and all subsequent queries to follow CNAMEs and to establish a chain
|
||||
of trust for DNSSEC validation.
|
||||
|
||||
This is equivalent to setting the debug level to 1 in the "resolver"
|
||||
logging category. Setting the systemwide debug level to 1 using the
|
||||
``-d`` option produces the same output, but affects other
|
||||
logging categories as well.
|
||||
|
||||
``+[no]mtrace``
|
||||
This option toggles message logging. This produces a detailed dump of the
|
||||
responses received by ``delv`` in the process of carrying out the
|
||||
resolution and validation process.
|
||||
|
||||
This is equivalent to setting the debug level to 10 for the "packets"
|
||||
module of the "resolver" logging category. Setting the systemwide
|
||||
debug level to 10 using the ``-d`` option produces the same
|
||||
output, but affects other logging categories as well.
|
||||
|
||||
``+[no]vtrace``
|
||||
This option toggles validation logging. This shows the internal process of the
|
||||
validator as it determines whether an answer is validly signed,
|
||||
unsigned, or invalid.
|
||||
|
||||
This is equivalent to setting the debug level to 3 for the
|
||||
"validator" module of the "dnssec" logging category. Setting the
|
||||
systemwide debug level to 3 using the ``-d`` option produces the
|
||||
same output, but affects other logging categories as well.
|
||||
|
||||
``+[no]short``
|
||||
This option toggles between verbose and terse answers. The default is to print the answer in a
|
||||
verbose form.
|
||||
|
||||
``+[no]comments``
|
||||
This option toggles the display of comment lines in the output. The default is to
|
||||
print comments.
|
||||
|
||||
``+[no]rrcomments``
|
||||
This option toggles the display of per-record comments in the output (for example,
|
||||
human-readable key information about DNSKEY records). The default is
|
||||
to print per-record comments.
|
||||
|
||||
``+[no]crypto``
|
||||
This option toggles the display of cryptographic fields in DNSSEC records. The
|
||||
contents of these fields are unnecessary to debug most DNSSEC
|
||||
validation failures and removing them makes it easier to see the
|
||||
common failures. The default is to display the fields. When omitted,
|
||||
they are replaced by the string ``[omitted]`` or, in the DNSKEY case, the
|
||||
key ID is displayed as the replacement, e.g. ``[ key id = value ]``.
|
||||
|
||||
``+[no]trust``
|
||||
This option controls whether to display the trust level when printing a record.
|
||||
The default is to display the trust level.
|
||||
|
||||
``+[no]split[=W]``
|
||||
This option splits long hex- or base64-formatted fields in resource records into
|
||||
chunks of ``W`` characters (where ``W`` is rounded up to the nearest
|
||||
multiple of 4). ``+nosplit`` or ``+split=0`` causes fields not to be
|
||||
split at all. The default is 56 characters, or 44 characters when
|
||||
multiline mode is active.
|
||||
|
||||
``+[no]all``
|
||||
This option sets or clears the display options ``+[no]comments``,
|
||||
``+[no]rrcomments``, and ``+[no]trust`` as a group.
|
||||
|
||||
``+[no]multiline``
|
||||
This option prints long records (such as RRSIG, DNSKEY, and SOA records) in a
|
||||
verbose multi-line format with human-readable comments. The default
|
||||
is to print each record on a single line, to facilitate machine
|
||||
parsing of the ``delv`` output.
|
||||
|
||||
``+[no]dnssec``
|
||||
This option indicates whether to display RRSIG records in the ``delv`` output.
|
||||
The default is to do so. Note that (unlike in ``dig``) this does
|
||||
*not* control whether to request DNSSEC records or to
|
||||
validate them. DNSSEC records are always requested, and validation
|
||||
always occurs unless suppressed by the use of ``-i`` or
|
||||
``+noroot``.
|
||||
|
||||
``+[no]root[=ROOT]``
|
||||
This option indicates whether to perform conventional DNSSEC validation, and if so,
|
||||
specifies the name of a trust anchor. The default is to validate using a
|
||||
trust anchor of "." (the root zone), for which there is a built-in key. If
|
||||
specifying a different trust anchor, then ``-a`` must be used to specify a
|
||||
file containing the key.
|
||||
|
||||
``+[no]tcp``
|
||||
This option controls whether to use TCP when sending queries. The default is to
|
||||
use UDP unless a truncated response has been received.
|
||||
|
||||
``+[no]unknownformat``
|
||||
This option prints all RDATA in unknown RR-type presentation format (:rfc:`3597`).
|
||||
The default is to print RDATA for known types in the type's
|
||||
presentation format.
|
||||
|
||||
``+[no]yaml``
|
||||
This option prints response data in YAML format.
|
||||
|
||||
Files
|
||||
~~~~~
|
||||
|
||||
``/etc/bind.keys``
|
||||
|
||||
``/etc/resolv.conf``
|
||||
|
||||
See Also
|
||||
~~~~~~~~
|
||||
|
||||
:manpage:`dig(1)`, :manpage:`named(8)`, :rfc:`4034`, :rfc:`4035`, :rfc:`4431`, :rfc:`5074`, :rfc:`5155`.
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|@PLATFORM@">
|
||||
<Configuration>Debug</Configuration>
|
||||
@@ -14,21 +14,18 @@
|
||||
<ProjectGuid>{BE172EFE-C1DC-4812-BFB9-8C5F8ADB7E9F}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>delv</RootNamespace>
|
||||
@WINDOWS_TARGET_PLATFORM_VERSION@
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
@PLATFORM_TOOLSET@
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
@PLATFORM_TOOLSET@
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
@@ -44,30 +41,26 @@
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>..\..\..\Build\$(Configuration)\</OutDir>
|
||||
<IntDir>.\$(Configuration)\</IntDir>
|
||||
<IntDirSharingDetected>None</IntDirSharingDetected>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>..\..\..\Build\$(Configuration)\</OutDir>
|
||||
<IntDir>.\$(Configuration)\</IntDir>
|
||||
<IntDirSharingDetected>None</IntDirSharingDetected>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<TreatWarningAsError>false</TreatWarningAsError>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
|
||||
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
<BrowseInformation>true</BrowseInformation>
|
||||
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
|
||||
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@@GEOIP_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\dns\win32\include;..\..\..\lib\dns\include;..\..\..\lib\irs\win32\include;..\..\..\lib\irs\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..\;@LIBXML2_INC@@OPENSSL_INC@@GEOIP_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\dns\win32\include;..\..\..\lib\dns\include;..\..\..\lib\irs\win32\include;..\..\..\lib\irs\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@@ -75,19 +68,18 @@
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>@OPENSSL_LIB@libisc.lib;libdns.lib;libisccfg.lib;libirs.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>libisc.lib;libdns.lib;libisccfg.lib;libirs.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level1</WarningLevel>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<StringPooling>true</StringPooling>
|
||||
@@ -95,8 +87,7 @@
|
||||
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
|
||||
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
|
||||
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@@GEOIP_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\dns\win32\include;..\..\..\lib\dns\include;..\..\..\lib\irs\win32\include;..\..\..\lib\irs\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..\;@LIBXML2_INC@@OPENSSL_INC@@GEOIP_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\dns\win32\include;..\..\..\lib\dns\include;..\..\..\lib\irs\win32\include;..\..\..\lib\irs\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@@ -107,26 +98,12 @@
|
||||
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
|
||||
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>@OPENSSL_LIB@libisc.lib;libdns.lib;libisccfg.lib;libirs.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>libisc.lib;libdns.lib;libisccfg.lib;libirs.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\delv.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\lib\isc\win32\libisc.vcxproj">
|
||||
<Project>{3840E563-D180-4761-AA9C-E6155F02EAFF}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\lib\dns\win32\libdns.vcxproj">
|
||||
<Project>{5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\lib\isccfg\win32\libisccfg.vcxproj">
|
||||
<Project>{B2DFA58C-6347-478E-81E8-01E06999D4F1}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\lib\irs\win32\libirs.vcxproj">
|
||||
<Project>{A4F29CEB-7644-4A7F-BE9E-02B6A90E4919}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
</Project>
|
||||
@@ -1,30 +0,0 @@
|
||||
include $(top_srcdir)/Makefile.top
|
||||
|
||||
AM_CPPFLAGS += \
|
||||
$(LIBISC_CFLAGS) \
|
||||
$(LIBDNS_CFLAGS) \
|
||||
$(LIBISCCFG_CFLAGS) \
|
||||
$(LIBIRS_CFLAGS) \
|
||||
$(LIBBIND9_CFLAGS) \
|
||||
$(LIBIDN2_CFLAGS)
|
||||
|
||||
LDADD = \
|
||||
libdighost.la \
|
||||
$(LIBISC_LIBS) \
|
||||
$(LIBDNS_LIBS) \
|
||||
$(LIBISCCFG_LIBS) \
|
||||
$(LIBIRS_LIBS) \
|
||||
$(LIBBIND9_LIBS) \
|
||||
$(LIBIDN2_LIBS)
|
||||
|
||||
noinst_LTLIBRARIES = libdighost.la
|
||||
|
||||
libdighost_la_SOURCES = \
|
||||
dighost.h \
|
||||
dighost.c
|
||||
|
||||
bin_PROGRAMS = dig host nslookup
|
||||
|
||||
nslookup_LDADD = \
|
||||
$(LDADD) \
|
||||
$(READLINE_LIB)
|
||||
111
bin/dig/Makefile.in
Normal file
111
bin/dig/Makefile.in
Normal file
@@ -0,0 +1,111 @@
|
||||
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
#
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
#
|
||||
# See the COPYRIGHT file distributed with this work for additional
|
||||
# information regarding copyright ownership.
|
||||
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
|
||||
VERSION=@BIND9_VERSION@
|
||||
|
||||
@BIND9_MAKE_INCLUDES@
|
||||
|
||||
READLINE_LIB = @READLINE_LIB@
|
||||
|
||||
CINCLUDES = -I${srcdir}/include ${DNS_INCLUDES} \
|
||||
${BIND9_INCLUDES} ${ISC_INCLUDES} \
|
||||
${IRS_INCLUDES} ${ISCCFG_INCLUDES} @LIBIDN2_CFLAGS@ @DST_OPENSSL_INC@
|
||||
|
||||
CDEFINES = -DVERSION=\"${VERSION}\"
|
||||
CWARNINGS =
|
||||
|
||||
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
|
||||
BIND9LIBS = ../../lib/bind9/libbind9.@A@
|
||||
ISCLIBS = ../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
|
||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @ISC_OPENSSL_LIBS@
|
||||
IRSLIBS = ../../lib/irs/libirs.@A@
|
||||
|
||||
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||
DNSDEPLIBS = ../../lib/dns/libdns.@A@
|
||||
BIND9DEPLIBS = ../../lib/bind9/libbind9.@A@
|
||||
ISCDEPLIBS = ../../lib/isc/libisc.@A@
|
||||
IRSDEPLIBS = ../../lib/irs/libirs.@A@
|
||||
|
||||
DEPLIBS = ${DNSDEPLIBS} ${IRSDEPLIBS} ${BIND9DEPLIBS} \
|
||||
${ISCDEPLIBS} ${ISCCFGDEPLIBS}
|
||||
|
||||
LIBS = ${DNSLIBS} ${IRSLIBS} ${BIND9LIBS} ${ISCCFGLIBS} \
|
||||
${ISCLIBS} @LIBIDN2_LIBS@ @LIBS@
|
||||
|
||||
NOSYMLIBS = ${DNSLIBS} ${IRSLIBS} ${BIND9LIBS} ${ISCCFGLIBS} \
|
||||
${ISCNOSYMLIBS} @LIBIDN2_LIBS@ @LIBS@
|
||||
|
||||
SUBDIRS =
|
||||
|
||||
TARGETS = dig@EXEEXT@ host@EXEEXT@ nslookup@EXEEXT@
|
||||
|
||||
OBJS = dig.@O@ dighost.@O@ host.@O@ nslookup.@O@
|
||||
|
||||
UOBJS =
|
||||
|
||||
SRCS = dig.c dighost.c host.c nslookup.c
|
||||
|
||||
MANPAGES = dig.1 host.1 nslookup.1
|
||||
|
||||
HTMLPAGES = dig.html host.html nslookup.html
|
||||
|
||||
MANOBJS = ${MANPAGES} ${HTMLPAGES}
|
||||
|
||||
@BIND9_MAKE_RULES@
|
||||
|
||||
dig@EXEEXT@: dig.@O@ dighost.@O@ ${UOBJS} ${DEPLIBS}
|
||||
export BASEOBJS="dig.@O@ dighost.@O@ ${UOBJS}"; \
|
||||
export LIBS0="${DNSLIBS} ${IRSLIBS}"; \
|
||||
${FINALBUILDCMD}
|
||||
|
||||
host@EXEEXT@: host.@O@ dighost.@O@ ${UOBJS} ${DEPLIBS}
|
||||
export BASEOBJS="host.@O@ dighost.@O@ ${UOBJS}"; \
|
||||
export LIBS0="${DNSLIBS} ${IRSLIBS}"; \
|
||||
${FINALBUILDCMD}
|
||||
|
||||
nslookup@EXEEXT@: nslookup.@O@ dighost.@O@ ${UOBJS} ${DEPLIBS}
|
||||
export BASEOBJS="nslookup.@O@ dighost.@O@ ${READLINE_LIB} ${UOBJS}"; \
|
||||
export LIBS0="${DNSLIBS} ${IRSLIBS}"; \
|
||||
${FINALBUILDCMD}
|
||||
|
||||
doc man:: ${MANOBJS}
|
||||
|
||||
docclean manclean maintainer-clean::
|
||||
rm -f ${MANOBJS}
|
||||
|
||||
clean distclean maintainer-clean::
|
||||
rm -f ${TARGETS}
|
||||
|
||||
installdirs:
|
||||
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${bindir}
|
||||
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man1
|
||||
|
||||
install:: dig@EXEEXT@ host@EXEEXT@ nslookup@EXEEXT@ installdirs
|
||||
${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} \
|
||||
dig@EXEEXT@ ${DESTDIR}${bindir}
|
||||
${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} \
|
||||
host@EXEEXT@ ${DESTDIR}${bindir}
|
||||
${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} \
|
||||
nslookup@EXEEXT@ ${DESTDIR}${bindir}
|
||||
for m in ${MANPAGES}; do \
|
||||
${INSTALL_DATA} ${srcdir}/$$m ${DESTDIR}${mandir}/man1; \
|
||||
done
|
||||
|
||||
uninstall::
|
||||
for m in ${MANPAGES}; do \
|
||||
rm -f ${DESTDIR}${mandir}/man1/$$m ; \
|
||||
done
|
||||
${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${bindir}/nslookup@EXEEXT@
|
||||
${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${bindir}/host@EXEEXT@
|
||||
${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${bindir}/dig@EXEEXT@
|
||||
820
bin/dig/dig.1
Normal file
820
bin/dig/dig.1
Normal file
@@ -0,0 +1,820 @@
|
||||
.\" Copyright (C) 2000-2011, 2013-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\"
|
||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
||||
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
.\" file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
.\"
|
||||
.hy 0
|
||||
.ad l
|
||||
'\" t
|
||||
.\" Title: dig
|
||||
.\" Author:
|
||||
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
|
||||
.\" Date: 2014-02-19
|
||||
.\" Manual: BIND9
|
||||
.\" Source: ISC
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "DIG" "1" "2014\-02\-19" "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
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
.SH "NAME"
|
||||
dig \- DNS lookup utility
|
||||
.SH "SYNOPSIS"
|
||||
.HP \w'\fBdig\fR\ 'u
|
||||
\fBdig\fR [@server] [\fB\-b\ \fR\fB\fIaddress\fR\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-f\ \fR\fB\fIfilename\fR\fR] [\fB\-k\ \fR\fB\fIfilename\fR\fR] [\fB\-m\fR] [\fB\-p\ \fR\fB\fIport#\fR\fR] [\fB\-q\ \fR\fB\fIname\fR\fR] [\fB\-t\ \fR\fB\fItype\fR\fR] [\fB\-v\fR] [\fB\-x\ \fR\fB\fIaddr\fR\fR] [\fB\-y\ \fR\fB\fI[hmac:]\fR\fIname:key\fR\fR] [[\fB\-4\fR] | [\fB\-6\fR]] [name] [type] [class] [queryopt...]
|
||||
.HP \w'\fBdig\fR\ 'u
|
||||
\fBdig\fR [\fB\-h\fR]
|
||||
.HP \w'\fBdig\fR\ 'u
|
||||
\fBdig\fR [global\-queryopt...] [query...]
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
\fBdig\fR
|
||||
is a flexible tool for interrogating DNS name servers\&. It performs DNS lookups and displays the answers that are returned from the name server(s) that were queried\&. Most DNS administrators use
|
||||
\fBdig\fR
|
||||
to troubleshoot DNS problems because of its flexibility, ease of use and clarity of output\&. Other lookup tools tend to have less functionality than
|
||||
\fBdig\fR\&.
|
||||
.PP
|
||||
Although
|
||||
\fBdig\fR
|
||||
is normally used with command\-line arguments, it also has a batch mode of operation for reading lookup requests from a file\&. A brief summary of its command\-line arguments and options is printed when the
|
||||
\fB\-h\fR
|
||||
option is given\&. Unlike earlier versions, the BIND 9 implementation of
|
||||
\fBdig\fR
|
||||
allows multiple lookups to be issued from the command line\&.
|
||||
.PP
|
||||
Unless it is told to query a specific name server,
|
||||
\fBdig\fR
|
||||
will try each of the servers listed in
|
||||
/etc/resolv\&.conf\&. If no usable server addresses are found,
|
||||
\fBdig\fR
|
||||
will send the query to the local host\&.
|
||||
.PP
|
||||
When no command line arguments or options are given,
|
||||
\fBdig\fR
|
||||
will perform an NS query for "\&." (the root)\&.
|
||||
.PP
|
||||
It is possible to set per\-user defaults for
|
||||
\fBdig\fR
|
||||
via
|
||||
${HOME}/\&.digrc\&. This file is read and any options in it are applied before the command line arguments\&.
|
||||
.PP
|
||||
The IN and CH class names overlap with the IN and CH top level domain names\&. Either use the
|
||||
\fB\-t\fR
|
||||
and
|
||||
\fB\-c\fR
|
||||
options to specify the type and class, use the
|
||||
\fB\-q\fR
|
||||
the specify the domain name, or use "IN\&." and "CH\&." when looking up these top level domains\&.
|
||||
.SH "SIMPLE USAGE"
|
||||
.PP
|
||||
A typical invocation of
|
||||
\fBdig\fR
|
||||
looks like:
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
dig @server name type
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.sp
|
||||
where:
|
||||
.PP
|
||||
\fBserver\fR
|
||||
.RS 4
|
||||
is the name or IP address of the name server to query\&. This can be an IPv4 address in dotted\-decimal notation or an IPv6 address in colon\-delimited notation\&. When the supplied
|
||||
\fIserver\fR
|
||||
argument is a hostname,
|
||||
\fBdig\fR
|
||||
resolves that name before querying that name server\&.
|
||||
.sp
|
||||
If no
|
||||
\fIserver\fR
|
||||
argument is provided,
|
||||
\fBdig\fR
|
||||
consults
|
||||
/etc/resolv\&.conf; if an address is found there, it queries the name server at that address\&. If either of the
|
||||
\fB\-4\fR
|
||||
or
|
||||
\fB\-6\fR
|
||||
options are in use, then only addresses for the corresponding transport will be tried\&. If no usable addresses are found,
|
||||
\fBdig\fR
|
||||
will send the query to the local host\&. The reply from the name server that responds is displayed\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBname\fR
|
||||
.RS 4
|
||||
is the name of the resource record that is to be looked up\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBtype\fR
|
||||
.RS 4
|
||||
indicates what type of query is required \(em ANY, A, MX, SIG, etc\&.
|
||||
\fItype\fR
|
||||
can be any valid query type\&. If no
|
||||
\fItype\fR
|
||||
argument is supplied,
|
||||
\fBdig\fR
|
||||
will perform a lookup for an A record\&.
|
||||
.RE
|
||||
.SH "OPTIONS"
|
||||
.PP
|
||||
\-4
|
||||
.RS 4
|
||||
Use IPv4 only\&.
|
||||
.RE
|
||||
.PP
|
||||
\-6
|
||||
.RS 4
|
||||
Use IPv6 only\&.
|
||||
.RE
|
||||
.PP
|
||||
\-b \fIaddress\fR\fI[#port]\fR
|
||||
.RS 4
|
||||
Set the source IP address of the query\&. The
|
||||
\fIaddress\fR
|
||||
must be a valid address on one of the host\*(Aqs network interfaces, or "0\&.0\&.0\&.0" or "::"\&. An optional port may be specified by appending "#<port>"
|
||||
.RE
|
||||
.PP
|
||||
\-c \fIclass\fR
|
||||
.RS 4
|
||||
Set the query class\&. The default
|
||||
\fIclass\fR
|
||||
is IN; other classes are HS for Hesiod records or CH for Chaosnet records\&.
|
||||
.RE
|
||||
.PP
|
||||
\-f \fIfile\fR
|
||||
.RS 4
|
||||
Batch mode:
|
||||
\fBdig\fR
|
||||
reads a list of lookup requests to process from the given
|
||||
\fIfile\fR\&. Each line in the file should be organized in the same way they would be presented as queries to
|
||||
\fBdig\fR
|
||||
using the command\-line interface\&.
|
||||
.RE
|
||||
.PP
|
||||
\-i
|
||||
.RS 4
|
||||
Do reverse IPv6 lookups using the obsolete RFC 1886 IP6\&.INT domain, which is no longer in use\&. Obsolete bit string label queries (RFC 2874) are not attempted\&.
|
||||
.RE
|
||||
.PP
|
||||
\-k \fIkeyfile\fR
|
||||
.RS 4
|
||||
Sign queries using TSIG using a key read from the given file\&. Key files can be generated using
|
||||
\fBtsig-keygen\fR(8)\&. When using TSIG authentication with
|
||||
\fBdig\fR, the name server that is queried needs to know the key and algorithm that is being used\&. In BIND, this is done by providing appropriate
|
||||
\fBkey\fR
|
||||
and
|
||||
\fBserver\fR
|
||||
statements in
|
||||
named\&.conf\&.
|
||||
.RE
|
||||
.PP
|
||||
\-m
|
||||
.RS 4
|
||||
Enable memory usage debugging\&.
|
||||
.RE
|
||||
.PP
|
||||
\-p \fIport\fR
|
||||
.RS 4
|
||||
Send the query to a non\-standard port on the server, instead of the default port 53\&. This option would be used to test a name server that has been configured to listen for queries on a non\-standard port number\&.
|
||||
.RE
|
||||
.PP
|
||||
\-q \fIname\fR
|
||||
.RS 4
|
||||
The domain name to query\&. This is useful to distinguish the
|
||||
\fIname\fR
|
||||
from other arguments\&.
|
||||
.RE
|
||||
.PP
|
||||
\-t \fItype\fR
|
||||
.RS 4
|
||||
The resource record type to query\&. It can be any valid query type\&. If it is a resource record type supported in BIND 9, it can be given by the type mnemonic (such as "NS" or "AAAA")\&. The default query type is "A", unless the
|
||||
\fB\-x\fR
|
||||
option is supplied to indicate a reverse lookup\&. A zone transfer can be requested by specifying a type of AXFR\&. When an incremental zone transfer (IXFR) is required, set the
|
||||
\fItype\fR
|
||||
to
|
||||
ixfr=N\&. The incremental zone transfer will contain the changes made to the zone since the serial number in the zone\*(Aqs SOA record was
|
||||
\fIN\fR\&.
|
||||
.sp
|
||||
All resource record types can be expressed as "TYPEnn", where "nn" is the number of the type\&. If the resource record type is not supported in BIND 9, the result will be displayed as described in RFC 3597\&.
|
||||
.RE
|
||||
.PP
|
||||
\-u
|
||||
.RS 4
|
||||
Print query times in microseconds instead of milliseconds\&.
|
||||
.RE
|
||||
.PP
|
||||
\-v
|
||||
.RS 4
|
||||
Print the version number and exit\&.
|
||||
.RE
|
||||
.PP
|
||||
\-x \fIaddr\fR
|
||||
.RS 4
|
||||
Simplified reverse lookups, for mapping addresses to names\&. The
|
||||
\fIaddr\fR
|
||||
is an IPv4 address in dotted\-decimal notation, or a colon\-delimited IPv6 address\&. When the
|
||||
\fB\-x\fR
|
||||
is used, there is no need to provide the
|
||||
\fIname\fR,
|
||||
\fIclass\fR
|
||||
and
|
||||
\fItype\fR
|
||||
arguments\&.
|
||||
\fBdig\fR
|
||||
automatically performs a lookup for a name like
|
||||
94\&.2\&.0\&.192\&.in\-addr\&.arpa
|
||||
and sets the query type and class to PTR and IN respectively\&. IPv6 addresses are looked up using nibble format under the IP6\&.ARPA domain (but see also the
|
||||
\fB\-i\fR
|
||||
option)\&.
|
||||
.RE
|
||||
.PP
|
||||
\-y \fI[hmac:]\fR\fIkeyname:secret\fR
|
||||
.RS 4
|
||||
Sign queries using TSIG with the given authentication key\&.
|
||||
\fIkeyname\fR
|
||||
is the name of the key, and
|
||||
\fIsecret\fR
|
||||
is the base64 encoded shared secret\&.
|
||||
\fIhmac\fR
|
||||
is the name of the key algorithm; valid choices are
|
||||
hmac\-md5,
|
||||
hmac\-sha1,
|
||||
hmac\-sha224,
|
||||
hmac\-sha256,
|
||||
hmac\-sha384, or
|
||||
hmac\-sha512\&. If
|
||||
\fIhmac\fR
|
||||
is not specified, the default is
|
||||
hmac\-md5
|
||||
or if MD5 was disabled
|
||||
hmac\-sha256\&.
|
||||
.sp
|
||||
NOTE: You should use the
|
||||
\fB\-k\fR
|
||||
option and avoid the
|
||||
\fB\-y\fR
|
||||
option, because with
|
||||
\fB\-y\fR
|
||||
the shared secret is supplied as a command line argument in clear text\&. This may be visible in the output from
|
||||
\fBps\fR(1)
|
||||
or in a history file maintained by the user\*(Aqs shell\&.
|
||||
.RE
|
||||
.SH "QUERY OPTIONS"
|
||||
.PP
|
||||
\fBdig\fR
|
||||
provides a number of query options which affect the way in which lookups are made and the results displayed\&. Some of these set or reset flag bits in the query header, some determine which sections of the answer get printed, and others determine the timeout and retry strategies\&.
|
||||
.PP
|
||||
Each query option is identified by a keyword preceded by a plus sign (+)\&. Some keywords set or reset an option\&. These may be preceded by the string
|
||||
no
|
||||
to negate the meaning of that keyword\&. Other keywords assign values to options like the timeout interval\&. They have the form
|
||||
\fB+keyword=value\fR\&. Keywords may be abbreviated, provided the abbreviation is unambiguous; for example,
|
||||
+cd
|
||||
is equivalent to
|
||||
+cdflag\&. The query options are:
|
||||
.PP
|
||||
\fB+[no]aaflag\fR
|
||||
.RS 4
|
||||
A synonym for
|
||||
\fI+[no]aaonly\fR\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]aaonly\fR
|
||||
.RS 4
|
||||
Sets the "aa" flag in the query\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]additional\fR
|
||||
.RS 4
|
||||
Display [do not display] the additional section of a reply\&. The default is to display it\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]adflag\fR
|
||||
.RS 4
|
||||
Set [do not set] the AD (authentic data) bit in the query\&. This requests the server to return whether all of the answer and authority sections have all been validated as secure according to the security policy of the server\&. AD=1 indicates that all records have been validated as secure and the answer is not from a OPT\-OUT range\&. AD=0 indicate that some part of the answer was insecure or not validated\&. This bit is set by default\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]all\fR
|
||||
.RS 4
|
||||
Set or clear all display flags\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]answer\fR
|
||||
.RS 4
|
||||
Display [do not display] the answer section of a reply\&. The default is to display it\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]authority\fR
|
||||
.RS 4
|
||||
Display [do not display] the authority section of a reply\&. The default is to display it\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]badcookie\fR
|
||||
.RS 4
|
||||
Retry lookup with the new server cookie if a BADCOOKIE response is received\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]besteffort\fR
|
||||
.RS 4
|
||||
Attempt to display the contents of messages which are malformed\&. The default is to not display malformed answers\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+bufsize=B\fR
|
||||
.RS 4
|
||||
Set the UDP message buffer size advertised using EDNS0 to
|
||||
\fIB\fR
|
||||
bytes\&. The maximum and minimum sizes of this buffer are 65535 and 0 respectively\&. Values outside this range are rounded up or down appropriately\&. Values other than zero will cause a EDNS query to be sent\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]cdflag\fR
|
||||
.RS 4
|
||||
Set [do not set] the CD (checking disabled) bit in the query\&. This requests the server to not perform DNSSEC validation of responses\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]class\fR
|
||||
.RS 4
|
||||
Display [do not display] the CLASS when printing the record\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]cmd\fR
|
||||
.RS 4
|
||||
Toggles the printing of the initial comment in the output identifying the version of
|
||||
\fBdig\fR
|
||||
and the query options that have been applied\&. This comment is printed by default\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]comments\fR
|
||||
.RS 4
|
||||
Toggle the display of comment lines in the output\&. The default is to print comments\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]cookie\fR\fB[=####]\fR
|
||||
.RS 4
|
||||
Send a COOKIE EDNS option, with optional value\&. Replaying a COOKIE from a previous response will allow the server to identify a previous client\&. The default is
|
||||
\fB+cookie\fR\&.
|
||||
.sp
|
||||
\fB+cookie\fR
|
||||
is also set when +trace is set to better emulate the default queries from a nameserver\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]crypto\fR
|
||||
.RS 4
|
||||
Toggle the display of cryptographic fields in DNSSEC records\&. The contents of these field are unnecessary to debug most DNSSEC validation failures and removing them makes it easier to see the common failures\&. The default is to display the fields\&. When omitted they are replaced by the string "[omitted]" or in the DNSKEY case the key id is displayed as the replacement, e\&.g\&. "[ key id = value ]"\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]defname\fR
|
||||
.RS 4
|
||||
Deprecated, treated as a synonym for
|
||||
\fI+[no]search\fR
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]dnssec\fR
|
||||
.RS 4
|
||||
Requests DNSSEC records be sent by setting the DNSSEC OK bit (DO) in the OPT record in the additional section of the query\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+domain=somename\fR
|
||||
.RS 4
|
||||
Set the search list to contain the single domain
|
||||
\fIsomename\fR, as if specified in a
|
||||
\fBdomain\fR
|
||||
directive in
|
||||
/etc/resolv\&.conf, and enable search list processing as if the
|
||||
\fI+search\fR
|
||||
option were given\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+dscp=value\fR
|
||||
.RS 4
|
||||
Set the DSCP code point to be used when sending the query\&. Valid DSCP code points are in the range [0\&.\&.63]\&. By default no code point is explicitly set\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]edns[=#]\fR
|
||||
.RS 4
|
||||
Specify the EDNS version to query with\&. Valid values are 0 to 255\&. Setting the EDNS version will cause a EDNS query to be sent\&.
|
||||
\fB+noedns\fR
|
||||
clears the remembered EDNS version\&. EDNS is set to 0 by default\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]ednsflags[=#]\fR
|
||||
.RS 4
|
||||
Set the must\-be\-zero EDNS flags bits (Z bits) to the specified value\&. Decimal, hex and octal encodings are accepted\&. Setting a named flag (e\&.g\&. DO) will silently be ignored\&. By default, no Z bits are set\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]ednsnegotiation\fR
|
||||
.RS 4
|
||||
Enable / disable EDNS version negotiation\&. By default EDNS version negotiation is enabled\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]ednsopt[=code[:value]]\fR
|
||||
.RS 4
|
||||
Specify EDNS option with code point
|
||||
\fBcode\fR
|
||||
and optionally payload of
|
||||
\fBvalue\fR
|
||||
as a hexadecimal string\&.
|
||||
\fBcode\fR
|
||||
can be either an EDNS option name (for example,
|
||||
NSID
|
||||
or
|
||||
ECS), or an arbitrary numeric value\&.
|
||||
\fB+noednsopt\fR
|
||||
clears the EDNS options to be sent\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]expire\fR
|
||||
.RS 4
|
||||
Send an EDNS Expire option\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]fail\fR
|
||||
.RS 4
|
||||
Do not try the next server if you receive a SERVFAIL\&. The default is to not try the next server which is the reverse of normal stub resolver behavior\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]header\-only\fR
|
||||
.RS 4
|
||||
Send a query with a DNS header without a question section\&. The default is to add a question section\&. The query type and query name are ignored when this is set\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]identify\fR
|
||||
.RS 4
|
||||
Show [or do not show] the IP address and port number that supplied the answer when the
|
||||
\fI+short\fR
|
||||
option is enabled\&. If short form answers are requested, the default is not to show the source address and port number of the server that provided the answer\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]idnin\fR
|
||||
.RS 4
|
||||
Process [do not process] IDN domain names on input\&. This requires IDN SUPPORT to have been enabled at compile time\&. The default is to process IDN input\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]idnout\fR
|
||||
.RS 4
|
||||
Convert [do not convert] puny code on output\&. This requires IDN SUPPORT to have been enabled at compile time\&. The default is to convert output\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]ignore\fR
|
||||
.RS 4
|
||||
Ignore truncation in UDP responses instead of retrying with TCP\&. By default, TCP retries are performed\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]keepalive\fR
|
||||
.RS 4
|
||||
Send [or do not send] an EDNS Keepalive option\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]keepopen\fR
|
||||
.RS 4
|
||||
Keep the TCP socket open between queries and reuse it rather than creating a new TCP socket for each lookup\&. The default is
|
||||
\fB+nokeepopen\fR\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]mapped\fR
|
||||
.RS 4
|
||||
Allow mapped IPv4 over IPv6 addresses to be used\&. The default is
|
||||
\fB+mapped\fR\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]multiline\fR
|
||||
.RS 4
|
||||
Print records like the SOA records in a verbose multi\-line format with human\-readable comments\&. The default is to print each record on a single line, to facilitate machine parsing of the
|
||||
\fBdig\fR
|
||||
output\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+ndots=D\fR
|
||||
.RS 4
|
||||
Set the number of dots that have to appear in
|
||||
\fIname\fR
|
||||
to
|
||||
\fID\fR
|
||||
for it to be considered absolute\&. The default value is that defined using the ndots statement in
|
||||
/etc/resolv\&.conf, or 1 if no ndots statement is present\&. Names with fewer dots are interpreted as relative names and will be searched for in the domains listed in the
|
||||
\fBsearch\fR
|
||||
or
|
||||
\fBdomain\fR
|
||||
directive in
|
||||
/etc/resolv\&.conf
|
||||
if
|
||||
\fB+search\fR
|
||||
is set\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]nsid\fR
|
||||
.RS 4
|
||||
Include an EDNS name server ID request when sending a query\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]nssearch\fR
|
||||
.RS 4
|
||||
When this option is set,
|
||||
\fBdig\fR
|
||||
attempts to find the authoritative name servers for the zone containing the name being looked up and display the SOA record that each name server has for the zone\&. Addresses of servers that that did not respond are also printed\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]onesoa\fR
|
||||
.RS 4
|
||||
Print only one (starting) SOA record when performing an AXFR\&. The default is to print both the starting and ending SOA records\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]opcode=value\fR
|
||||
.RS 4
|
||||
Set [restore] the DNS message opcode to the specified value\&. The default value is QUERY (0)\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+padding=value\fR
|
||||
.RS 4
|
||||
Pad the size of the query packet using the EDNS Padding option to blocks of
|
||||
\fIvalue\fR
|
||||
bytes\&. For example,
|
||||
\fB+padding=32\fR
|
||||
would cause a 48\-byte query to be padded to 64 bytes\&. The default block size is 0, which disables padding\&. The maximum is 512\&. Values are ordinarily expected to be powers of two, such as 128; however, this is not mandatory\&. Responses to padded queries may also be padded, but only if the query uses TCP or DNS COOKIE\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]qr\fR
|
||||
.RS 4
|
||||
Print [do not print] the query as it is sent\&. By default, the query is not printed\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]question\fR
|
||||
.RS 4
|
||||
Print [do not print] the question section of a query when an answer is returned\&. The default is to print the question section as a comment\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]raflag\fR
|
||||
.RS 4
|
||||
Set [do not set] the RA (Recursion Available) bit in the query\&. The default is +noraflag\&. This bit should be ignored by the server for QUERY\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]rdflag\fR
|
||||
.RS 4
|
||||
A synonym for
|
||||
\fI+[no]recurse\fR\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]recurse\fR
|
||||
.RS 4
|
||||
Toggle the setting of the RD (recursion desired) bit in the query\&. This bit is set by default, which means
|
||||
\fBdig\fR
|
||||
normally sends recursive queries\&. Recursion is automatically disabled when the
|
||||
\fI+nssearch\fR
|
||||
or
|
||||
\fI+trace\fR
|
||||
query options are used\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+retry=T\fR
|
||||
.RS 4
|
||||
Sets the number of times to retry UDP queries to server to
|
||||
\fIT\fR
|
||||
instead of the default, 2\&. Unlike
|
||||
\fI+tries\fR, this does not include the initial query\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]rrcomments\fR
|
||||
.RS 4
|
||||
Toggle the display of per\-record comments in the output (for example, human\-readable key information about DNSKEY records)\&. The default is not to print record comments unless multiline mode is active\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]search\fR
|
||||
.RS 4
|
||||
Use [do not use] the search list defined by the searchlist or domain directive in
|
||||
resolv\&.conf
|
||||
(if any)\&. The search list is not used by default\&.
|
||||
.sp
|
||||
\*(Aqndots\*(Aq from
|
||||
resolv\&.conf
|
||||
(default 1) which may be overridden by
|
||||
\fI+ndots\fR
|
||||
determines if the name will be treated as relative or not and hence whether a search is eventually performed or not\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]short\fR
|
||||
.RS 4
|
||||
Provide a terse answer\&. The default is to print the answer in a verbose form\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]showsearch\fR
|
||||
.RS 4
|
||||
Perform [do not perform] a search showing intermediate results\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]sigchase\fR
|
||||
.RS 4
|
||||
This feature is now obsolete and has been removed; use
|
||||
\fBdelv\fR
|
||||
instead\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+split=W\fR
|
||||
.RS 4
|
||||
Split long hex\- or base64\-formatted fields in resource records into chunks of
|
||||
\fIW\fR
|
||||
characters (where
|
||||
\fIW\fR
|
||||
is rounded up to the nearest multiple of 4)\&.
|
||||
\fI+nosplit\fR
|
||||
or
|
||||
\fI+split=0\fR
|
||||
causes fields not to be split at all\&. The default is 56 characters, or 44 characters when multiline mode is active\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]stats\fR
|
||||
.RS 4
|
||||
This query option toggles the printing of statistics: when the query was made, the size of the reply and so on\&. The default behavior is to print the query statistics\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]subnet=addr[/prefix\-length]\fR
|
||||
.RS 4
|
||||
Send (don\*(Aqt send) an EDNS Client Subnet option with the specified IP address or network prefix\&.
|
||||
.sp
|
||||
\fBdig +subnet=0\&.0\&.0\&.0/0\fR, or simply
|
||||
\fBdig +subnet=0\fR
|
||||
for short, sends an EDNS CLIENT\-SUBNET option with an empty address and a source prefix\-length of zero, which signals a resolver that the client\*(Aqs address information must
|
||||
\fInot\fR
|
||||
be used when resolving this query\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]tcflag\fR
|
||||
.RS 4
|
||||
Set [do not set] the TC (TrunCation) bit in the query\&. The default is +notcflag\&. This bit should be ignored by the server for QUERY\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]tcp\fR
|
||||
.RS 4
|
||||
Use [do not use] TCP when querying name servers\&. The default behavior is to use UDP unless a type
|
||||
any
|
||||
or
|
||||
ixfr=N
|
||||
query is requested, in which case the default is TCP\&. AXFR queries always use TCP\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+timeout=T\fR
|
||||
.RS 4
|
||||
Sets the timeout for a query to
|
||||
\fIT\fR
|
||||
seconds\&. The default timeout is 5 seconds\&. An attempt to set
|
||||
\fIT\fR
|
||||
to less than 1 will result in a query timeout of 1 second being applied\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]topdown\fR
|
||||
.RS 4
|
||||
This feature is related to
|
||||
\fBdig +sigchase\fR, which is obsolete and has been removed\&. Use
|
||||
\fBdelv\fR
|
||||
instead\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]trace\fR
|
||||
.RS 4
|
||||
Toggle tracing of the delegation path from the root name servers for the name being looked up\&. Tracing is disabled by default\&. When tracing is enabled,
|
||||
\fBdig\fR
|
||||
makes iterative queries to resolve the name being looked up\&. It will follow referrals from the root servers, showing the answer from each server that was used to resolve the lookup\&.
|
||||
.sp
|
||||
If @server is also specified, it affects only the initial query for the root zone name servers\&.
|
||||
.sp
|
||||
\fB+dnssec\fR
|
||||
is also set when +trace is set to better emulate the default queries from a nameserver\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+tries=T\fR
|
||||
.RS 4
|
||||
Sets the number of times to try UDP queries to server to
|
||||
\fIT\fR
|
||||
instead of the default, 3\&. If
|
||||
\fIT\fR
|
||||
is less than or equal to zero, the number of tries is silently rounded up to 1\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+trusted\-key=####\fR
|
||||
.RS 4
|
||||
Formerly specified trusted keys for use with
|
||||
\fBdig +sigchase\fR\&. This feature is now obsolete and has been removed; use
|
||||
\fBdelv\fR
|
||||
instead\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]ttlid\fR
|
||||
.RS 4
|
||||
Display [do not display] the TTL when printing the record\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]ttlunits\fR
|
||||
.RS 4
|
||||
Display [do not display] the TTL in friendly human\-readable time units of "s", "m", "h", "d", and "w", representing seconds, minutes, hours, days and weeks\&. Implies +ttlid\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]unknownformat\fR
|
||||
.RS 4
|
||||
Print all RDATA in unknown RR type presentation format (RFC 3597)\&. The default is to print RDATA for known types in the type\*(Aqs presentation format\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]vc\fR
|
||||
.RS 4
|
||||
Use [do not use] TCP when querying name servers\&. This alternate syntax to
|
||||
\fI+[no]tcp\fR
|
||||
is provided for backwards compatibility\&. The "vc" stands for "virtual circuit"\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]zflag\fR
|
||||
.RS 4
|
||||
Set [do not set] the last unassigned DNS header flag in a DNS query\&. This flag is off by default\&.
|
||||
.RE
|
||||
.SH "MULTIPLE QUERIES"
|
||||
.PP
|
||||
The BIND 9 implementation of
|
||||
\fBdig \fR
|
||||
supports specifying multiple queries on the command line (in addition to supporting the
|
||||
\fB\-f\fR
|
||||
batch file option)\&. Each of those queries can be supplied with its own set of flags, options and query options\&.
|
||||
.PP
|
||||
In this case, each
|
||||
\fIquery\fR
|
||||
argument represent an individual query in the command\-line syntax described above\&. Each consists of any of the standard options and flags, the name to be looked up, an optional query type and class and any query options that should be applied to that query\&.
|
||||
.PP
|
||||
A global set of query options, which should be applied to all queries, can also be supplied\&. These global query options must precede the first tuple of name, class, type, options, flags, and query options supplied on the command line\&. Any global query options (except
|
||||
\fB+[no]cmd\fR
|
||||
and
|
||||
\fB+[no]short\fR
|
||||
options) can be overridden by a query\-specific set of query options\&. For example:
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
dig +qr www\&.isc\&.org any \-x 127\&.0\&.0\&.1 isc\&.org ns +noqr
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.sp
|
||||
shows how
|
||||
\fBdig\fR
|
||||
could be used from the command line to make three lookups: an ANY query for
|
||||
www\&.isc\&.org, a reverse lookup of 127\&.0\&.0\&.1 and a query for the NS records of
|
||||
isc\&.org\&. A global query option of
|
||||
\fI+qr\fR
|
||||
is applied, so that
|
||||
\fBdig\fR
|
||||
shows the initial query it made for each lookup\&. The final query has a local query option of
|
||||
\fI+noqr\fR
|
||||
which means that
|
||||
\fBdig\fR
|
||||
will not print the initial query when it looks up the NS records for
|
||||
isc\&.org\&.
|
||||
.SH "IDN SUPPORT"
|
||||
.PP
|
||||
If
|
||||
\fBdig\fR
|
||||
has been built with IDN (internationalized domain name) support, it can accept and display non\-ASCII domain names\&.
|
||||
\fBdig\fR
|
||||
appropriately converts character encoding of domain name before sending a request to DNS server or displaying a reply from the server\&. If you\*(Aqd like to turn off the IDN support for some reason, use parameters
|
||||
\fI+noidnin\fR
|
||||
and
|
||||
\fI+noidnout\fR\&.
|
||||
.SH "FILES"
|
||||
.PP
|
||||
/etc/resolv\&.conf
|
||||
.PP
|
||||
${HOME}/\&.digrc
|
||||
.SH "SEE ALSO"
|
||||
.PP
|
||||
\fBdelv\fR(1),
|
||||
\fBhost\fR(1),
|
||||
\fBnamed\fR(8),
|
||||
\fBdnssec-keygen\fR(8),
|
||||
RFC 1035\&.
|
||||
.SH "BUGS"
|
||||
.PP
|
||||
There are probably too many query options\&.
|
||||
.SH "AUTHOR"
|
||||
.PP
|
||||
\fBInternet Systems Consortium, Inc\&.\fR
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
Copyright \(co 2000-2011, 2013-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.br
|
||||
1735
bin/dig/dig.c
1735
bin/dig/dig.c
File diff suppressed because it is too large
Load Diff
1370
bin/dig/dig.docbook
Normal file
1370
bin/dig/dig.docbook
Normal file
File diff suppressed because it is too large
Load Diff
1105
bin/dig/dig.html
Normal file
1105
bin/dig/dig.html
Normal file
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user