Compare commits

..
5455 changed files with 699895 additions and 221006 deletions
-114
View File
@@ -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")))
)
)
)
))
+2 -9
View File
@@ -1,10 +1,3 @@
*.sln.in eol=crlf *.sln.in eol=crlf
*.vcxproj.* eol=crlf *.vcxproj.in eol=crlf
*.vcxproj.filters.in 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/mksymtbl.pl -export-ignore
+54 -56
View File
@@ -1,63 +1,61 @@
*-symtbl.c Makefile
*.a config.log
*.gcda config.h
*.gcno config.cache
*.la config.status
*.lo libtool
/isc-config.sh
/configure.lineno
autom4te.cache/
*.o *.o
*.orig *.lo
*.plist/ # ccc-analyzer store its results in .plist directories
*.rej
*.so *.so
*.a
*.la
*.gcno
*.gcda
*_test *_test
*.ipch # vscode/intellisense precompiled header *-symtbl.c
*~ timestamp
.ccache/ ans.run
.cproject named.run
named.memstats
gen.dSYM/
.libs/
.deps/ .deps/
.dirstamp .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 .project
.cproject
.settings .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
ans.run
gen.dSYM/
kyua.log
named.memstats
named.run
timestamp
/compile_commands.json
/cppcheck_html/
/cppcheck.results
/tsan
-1222
View File
File diff suppressed because it is too large Load Diff
-46
View File
@@ -1,46 +0,0 @@
<!--
If the bug you are reporting is potentially security-related - for example,
if it involves an assertion failure or other crash in `named` that can be
triggered repeatedly - then please do *NOT* report it here, but send an
email to [security-officer@isc.org](security-officer@isc.org).
-->
### Summary
(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.)
### What is the current *bug* behavior?
(What actually happens.)
### What is the expected *correct* behavior?
(What you should see instead.)
### Relevant configuration files
(Paste any relevant configuration files - please use code blocks (```)
to format console output. 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`.)
### Relevant logs and/or screenshots
(Paste any relevant logs - please use code blocks (```) to format console
output, logs, and code, as it's very hard to read otherwise.)
### Possible fixes
(If you can, link to the line of code that might be responsible for the
problem.)
/label ~bug
@@ -1,11 +0,0 @@
### Description
(Describe the problem, use cases, benefits, and/or goals.)
### Request
(Describe the solution you'd like to see.)
### Links / references
/label ~"feature request"
-65
View File
@@ -1,65 +0,0 @@
## Release Schedule
**Tagging Deadline:**
**Public Release:**
## Release Checklist
## 2 Working Days Before the Tagging Deadline
- [ ] ***(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)*** Inform Support/Marketing of impending release (and give estimated release dates).
- [ ] ***(QA)*** Check Perflab to ensure there has been no unexplained drop in performance for the versions being released.
- [ ] ***(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 contents of release notes match the merge requests comprising the releases.
- [ ] ***(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)*** Push tags for the published releases to the public repository.
- [ ] ***(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`).
[^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.
-1434
View File
File diff suppressed because it is too large Load Diff
+5
View File
@@ -0,0 +1,5 @@
Content-Type: application/X-atf-atffile; version="1"
prop: test-suite = bind9
tp: lib
+7 -2023
View File
File diff suppressed because it is too large Load Diff
-79
View File
@@ -1,79 +0,0 @@
CODE OF CONDUCT
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. For more details please see our
Reporting Guidelines.
* 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 project.
-71
View File
@@ -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.
-196
View File
@@ -1,196 +0,0 @@
CONTRIBUTING
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).
At Internet Systems Consortium, 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, the Internet Systems
Consortium has adopted the Contributor Covenant version 1.4 as our Code of
Conduct for BIND 9 project, as well as for the conduct of our developers
throughout the industry.
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.
-209
View File
@@ -1,209 +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.
-->
## BIND Source Access and Contributor Guidelines
*Feb 22, 2018*
### Contents
1. [Access to source code](#access)
1. [Reporting bugs](#bugs)
1. [Contributing code](#contrib)
### 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](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.
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 [Internet Systems Consortium](https://www.isc.org), 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, the [Internet Systems
Consortium](https://www.isc.org) has adopted the Contributor Covenant version
1.4 as our Code of Conduct for 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
[ISC FTP site](ftp://ftp.isc.org/isc/bind9).
A public-access GIT repository is also available at
[https://gitlab.isc.org](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](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`.
### <a name="bugs"></a>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](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](https://www.isc.org/downloads/software-support-policy/openpgp-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](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/article/AA-00340/89/What-to-do-if-your-BIND-or-DHCP-server-has-crashed.html)
### <a name="contrib"></a>Contributing code
BIND is licensed under the
[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 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.
#### <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
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](doc/dev/dev.md) 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](doc/dev/dev.md#reviews) 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](doc/dev/style.md).
* 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](doc/dev/dev.md#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](doc/dev/dev.md#testing)
for more information.
#### Thanks
Thank you for your interest in contributing to the ongoing development
of BIND.
+226 -1
View File
@@ -1,4 +1,4 @@
Copyright (C) 1996-2020 Internet Systems Consortium, Inc. ("ISC") Copyright (C) 1996-2017 Internet Systems Consortium, Inc. ("ISC")
This Source Code Form is subject to the terms of the Mozilla Public 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 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. Copyright (c) 1993 by Digital Equipment Corporation.
Permission to use, copy, modify, and distribute this software for any 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. Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
All rights reserved. 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. Copyright (C) 2004 Nominet, Ltd.
Permission to use, copy, modify, and distribute this software for any 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) 1996, David Mazieres <dm@uun.org>
Copyright (c) 2008, Damien Miller <djm@openbsd.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. Copyright (c) 1995, 1997, 1998 The NetBSD Foundation, Inc.
All rights reserved. All rights reserved.
+5 -80
View File
@@ -1,81 +1,5 @@
HISTORY
Functional enhancements from prior major releases of BIND 9 Functional enhancements from prior major releases of BIND 9
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 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 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
BIND 9.11.0 includes a number of changes from BIND 9.10 and earlier BIND 9.11.0 includes a number of changes from BIND 9.10 and earlier
@@ -507,11 +431,11 @@ BIND 9.4.0
* Detect duplicates of UDP queries we are recursing on and drop them. * Detect duplicates of UDP queries we are recursing on and drop them.
New stats category "duplicates". New stats category "duplicates".
* "USE INTERNAL MALLOC" is now runtime selectable. * "USE INTERNAL MALLOC" is now runtime selectable.
* The lame cache is now done on a <qname,qclass,qtype> basis as some * The lame cache is now done on a basis as some servers only appear to
servers only appear to be lame for certain query types. be lame for certain query types.
* Limit the number of recursive clients that can be waiting for a single * Limit the number of recursive clients that can be waiting for a single
query (<qname,qtype,qclass>) to resolve. New options clients-per-query query () to resolve. New options clients-per-query and
and max-clients-per-query. max-clients-per-query.
* dig: report the number of extra bytes still left in the packet after * dig: report the number of extra bytes still left in the packet after
processing all the records. processing all the records.
* Support for IPSECKEY rdata type. * Support for IPSECKEY rdata type.
@@ -598,3 +522,4 @@ BIND 9.2.0
DNSSEC implementation is still considered experimental. For detailed DNSSEC implementation is still considered experimental. For detailed
information about the state of the DNSSEC implementation, see the file information about the state of the DNSSEC implementation, see the file
doc/misc/dnssec. doc/misc/dnssec.
+2 -80
View File
@@ -1,90 +1,12 @@
<!-- <!--
- Copyright (C) Internet Systems Consortium, Inc. ("ISC") - Copyright (C) 2017 Internet Systems Consortium, Inc. ("ISC")
- -
- This Source Code Form is subject to the terms of the Mozilla Public - 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 - 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/. - 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.
--> -->
### Functional enhancements from prior major releases of BIND 9 ### Functional enhancements from prior major releases of BIND 9
#### 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
BIND 9.11.0 includes a number of changes from BIND 9.10 and earlier BIND 9.11.0 includes a number of changes from BIND 9.10 and earlier
@@ -150,7 +72,7 @@ releases. New features include:
- "rndc modzone" reconfigures a single zone, without requiring the entire - "rndc modzone" reconfigures a single zone, without requiring the entire
server to be reconfigured. server to be reconfigured.
- "rndc showzone" displays the current configuration of a zone. - "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. trust anchors, or to force trust anchors to be refreshed.
- "max-cache-size" can now be set to a percentage of available memory. The - "max-cache-size" can now be set to a percentage of available memory. The
default is 90%. default is 90%.
-4
View File
@@ -1,4 +0,0 @@
syntax(2)
test_suite('bind9')
include('lib/Kyuafile')
+32 -39
View File
@@ -1,25 +1,24 @@
# Copyright (C) Internet Systems Consortium, Inc. ("ISC") # Copyright (C) 1998-2002, 2004-2009, 2011-2017 Internet Systems Consortium, Inc. ("ISC")
# #
# This Source Code Form is subject to the terms of the Mozilla Public # 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 # 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/. # 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@ srcdir = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
top_srcdir = @top_srcdir@ top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
VERSION=@BIND9_VERSION@ VERSION=@BIND9_VERSION@
SUBDIRS = make lib fuzz bin doc SUBDIRS = make unit lib bin doc
TARGETS = TARGETS =
PREREQS = bind.keys.h PREREQS = bind.keys.h
MANOBJS = README HISTORY OPTIONS CONTRIBUTING PLATFORMS CODE_OF_CONDUCT \ MANPAGES = isc-config.sh.1
${MANPAGES} ${HTMLPAGES}
HTMLPAGES = isc-config.sh.html
MANOBJS = README HISTORY OPTIONS ${MANPAGES} ${HTMLPAGES}
@BIND9_MAKE_RULES@ @BIND9_MAKE_RULES@
@@ -31,7 +30,7 @@ bind.keys.h: ${top_srcdir}/bind.keys ${srcdir}/util/bindkeys.pl
distclean:: distclean::
rm -f config.cache config.h config.log config.status TAGS rm -f config.cache config.h config.log config.status TAGS
rm -f libtool configure.lineno rm -f libtool isc-config.sh configure.lineno
rm -f util/conf.sh docutil/docbook2man-wrapper.sh rm -f util/conf.sh docutil/docbook2man-wrapper.sh
# XXX we should clean libtool stuff too. Only do this after we add rules # XXX we should clean libtool stuff too. Only do this after we add rules
@@ -50,14 +49,28 @@ installdirs:
${DESTDIR}${localstatedir}/run ${DESTDIR}${sysconfdir} ${DESTDIR}${localstatedir}/run ${DESTDIR}${sysconfdir}
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man1 $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man1
install:: installdirs 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} ${INSTALL_DATA} ${top_srcdir}/bind.keys ${DESTDIR}${sysconfdir}
uninstall:: uninstall::
rm -f ${DESTDIR}${sysconfdir}/bind.keys 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: test check:
@if test -n "`${PERL} ${top_srcdir}/bin/tests/system/testsock.pl 2>/dev/null || echo fail`"; then \ @if test -n "`${PERL} ${top_srcdir}/bin/tests/system/testsock.pl 2>&- || echo fail`"; then \
echo I: NOTE: The tests were not run because they require that; \ 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: 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: as alias addresses on the loopback interface. Please run; \
@@ -72,43 +85,23 @@ force-test: test-force
test-force: test-force:
status=0; \ status=0; \
(cd fuzz && ${MAKE} check) || status=1; \
(cd bin/tests && ${MAKE} ${MAKEDEFS} test) || status=1; \ (cd bin/tests && ${MAKE} ${MAKEDEFS} test) || status=1; \
(test -f ${top_builddir}/unit/unittest.sh && \ (test -f unit/unittest.sh && $(SHELL) unit/unittest.sh) || status=1; \
$(SHELL) ${top_builddir}/unit/unittest.sh) || status=1; \
exit $$status exit $$status
README: README.md README: README.md
${PANDOC} --email-obfuscation=none -s --metadata title="README" -f markdown-smart -t html README.md | \ ${PANDOC} --email-obfuscation=none -s -t html README.md | \
${W3M} -dump -cols 75 -O ascii -T text/html | \ ${W3M} -dump -cols 75 -O ascii -T text/html > $@
sed -e '$${/^$$/d;}' > $@
HISTORY: HISTORY.md HISTORY: HISTORY.md
${PANDOC} --email-obfuscation=none -s --metadata title="HISTORY" -f markdown-smart -t html HISTORY.md | \ ${PANDOC} --email-obfuscation=none -s -t html HISTORY.md | \
${W3M} -dump -cols 75 -O ascii -T text/html | \ ${W3M} -dump -cols 75 -O ascii -T text/html > $@
sed -e '$${/^$$/d;}' > $@
OPTIONS: OPTIONS.md OPTIONS: OPTIONS.md
${PANDOC} --email-obfuscation=none -s --metadata title="OPTIONS" -f markdown-smart -t html OPTIONS.md | \ ${PANDOC} --email-obfuscation=none -s -t html OPTIONS.md | \
${W3M} -dump -cols 75 -O ascii -T text/html | \ ${W3M} -dump -cols 75 -O ascii -T text/html > $@
sed -e '$${/^$$/d;}' > $@
CONTRIBUTING: CONTRIBUTING.md
${PANDOC} --email-obfuscation=none -s --metadata title="CONTRIBUTING" -f markdown-smart -t html CONTRIBUTING.md | \
${W3M} -dump -cols 75 -O ascii -T text/html | \
sed -e '$${/^$$/d;}' > $@
PLATFORMS: PLATFORMS.md
${PANDOC} --email-obfuscation=none -s --metadata title="PLATFORMS" -f markdown-smart -t html PLATFORMS.md | \
${W3M} -dump -cols 75 -O ascii -T text/html | \
sed -e '$${/^$$/d;}' > $@
CODE_OF_CONDUCT: CODE_OF_CONDUCT.md
${PANDOC} --email-obfuscation=none -s --metadata title="CODE OF CONDUCT" -f markdown-smart -t html CODE_OF_CONDUCT.md | \
${W3M} -dump -cols 75 -O ascii -T text/html | \
sed -e '$${/^$$/d;}' > $@
unit:: unit::
sh ${top_builddir}/unit/unittest.sh sh ${top_srcdir}/unit/unittest.sh
clean:: clean::
+5 -8
View File
@@ -1,12 +1,10 @@
OPTIONS
Setting the STD_CDEFINES environment variable before running configure can Setting the STD_CDEFINES environment variable before running configure can
be used to enable certain compile-time options that are not explicitly be used to enable certain compile-time options that are not explicitly
defined in configure. defined in configure.
Some of these settings are: Some of these settings are:
Setting Description Setting Description
Overwrite memory with tag values when allocating Overwrite memory with tag values when allocating
-DISC_MEM_DEFAULTFILL=1 or freeing it; this impairs performance but -DISC_MEM_DEFAULTFILL=1 or freeing it; this impairs performance but
makes debugging of memory problems easier. makes debugging of memory problems easier.
@@ -21,8 +19,7 @@ Some of these settings are:
named-checkzone named-checkzone
-DNS_RUN_PID_DIR=0 Create default PID files in ${localstatedir}/run -DNS_RUN_PID_DIR=0 Create default PID files in ${localstatedir}/run
rather than ${localstatedir}/run/named/ rather than ${localstatedir}/run/named/
Disable the use of inline functions to implement Increase the maximum number of configurable
-DISC_BUFFER_USEINLINE=0 the isc_buffer API: this reduces performance but -DNS_RPZ_MAX_ZONES=64 response policy zones from 32 to 64; this is the
may be useful when debugging highest possible setting
-DISC_HEAP_CHECK Test heap consistency after every heap
operation; used when debugging
+2 -6
View File
@@ -1,12 +1,9 @@
<!-- <!--
- Copyright (C) Internet Systems Consortium, Inc. ("ISC") - Copyright (C) 2017 Internet Systems Consortium, Inc. ("ISC")
- -
- This Source Code Form is subject to the terms of the Mozilla Public - 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 - 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/. - 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.
--> -->
Setting the `STD_CDEFINES` environment variable before running `configure` Setting the `STD_CDEFINES` environment variable before running `configure`
can be used to enable certain compile-time options that are not explicitly can be used to enable certain compile-time options that are not explicitly
@@ -23,5 +20,4 @@ Some of these settings are:
|`-DCHECK_SIBLING=0`|Don't check sibling glue in `named-checkzone`| |`-DCHECK_SIBLING=0`|Don't check sibling glue in `named-checkzone`|
|`-DCHECK_LOCAL=0`|Don't check out-of-zone addresses 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/`| |`-DNS_RUN_PID_DIR=0`|Create default PID files in `${localstatedir}/run` rather than `${localstatedir}/run/named/`|
|`-DISC_BUFFER_USEINLINE=0`|Disable the use of inline functions to implement the `isc_buffer` API: this reduces performance but may be useful when debugging | |`-DNS_RPZ_MAX_ZONES=64`|Increase the maximum number of configurable response policy zones from 32 to 64; this is the highest possible setting|
|`-DISC_HEAP_CHECK`|Test heap consistency after every heap operation; used when debugging|
-99
View File
@@ -1,99 +0,0 @@
PLATFORMS
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.15 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 Dec 2019, BIND 9.15 is fully supported and regularly tested on the
following systems:
* Debian 9, 10
* Ubuntu LTS 16.04, 18.04
* Fedora 31
* Red Hat Enterprise Linux / CentOS 7, 8
* FreeBSD 11.3, 12.0
* OpenBSD 6.5
* Alpine Linux
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.15 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
-105
View File
@@ -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.15 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 Dec 2019, BIND 9.15 is fully supported and regularly tested on the
following systems:
* Debian 9, 10
* Ubuntu LTS 16.04, 18.04
* Fedora 31
* Red Hat Enterprise Linux / CentOS 7, 8
* FreeBSD 11.3, 12.0
* OpenBSD 6.5
* Alpine Linux
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.15 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
+131 -165
View File
@@ -1,5 +1,3 @@
README
BIND 9 BIND 9
Contents Contents
@@ -7,15 +5,13 @@ Contents
1. Introduction 1. Introduction
2. Reporting bugs and getting help 2. Reporting bugs and getting help
3. Contributing to BIND 3. Contributing to BIND
4. BIND 9.15 features 4. BIND 9.12 features
5. Building BIND 5. Building BIND
6. macOS 6. Compile-time options
7. Dependencies 7. Automated testing
8. Compile-time options 8. Documentation
9. Automated testing 9. Change log
10. Documentation 10. Acknowledgments
11. Change log
12. Acknowledgments
Introduction Introduction
@@ -34,12 +30,12 @@ administrative tools, including the dig and delv DNS lookup tools,
nsupdate for dynamic DNS zone updates, rndc for remote name server nsupdate for dynamic DNS zone updates, rndc for remote name server
administration, and more. administration, and more.
BIND 9 began as a complete re-write of the BIND architecture that was used BIND 9 is a complete re-write of the BIND architecture that was used in
in versions 4 and 8. Internet Systems Consortium (https://www.isc.org), a versions 4 and 8. Internet Systems Consortium (https://www.isc.org), a 501
501(c)(3) public benefit corporation dedicated to providing software and (c)(3) public benefit corporation dedicated to providing software and
services in support of the Internet infrastructure, developed BIND 9 and services in support of the Internet infrastructure, developed BIND 9 and
is responsible for its ongoing maintenance and improvement. BIND is open is responsible for its ongoing maintenance and improvement. BIND is open
source software licensed under the terms of the Mozilla Public License, source software licenced under the terms of the Mozilla Public License,
version 2.0. version 2.0.
For a summary of features introduced in past major releases of BIND, see For a summary of features introduced in past major releases of BIND, see
@@ -48,31 +44,24 @@ the file HISTORY.
For a detailed list of changes made throughout the history of BIND 9, see 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. the file CHANGES. See below for details on the CHANGES file format.
For up-to-date versions and release notes, see https://www.isc.org/ For up-to-date release notes and errata, see http://www.isc.org/software/
download/. bind9/releasenotes
For information about supported platforms, see PLATFORMS.
Reporting bugs and getting help Reporting bugs and getting help
To report non-security-sensitive bugs or request new features, you may Please report assertion failure errors and suspected security issues to
open an Issue in the BIND 9 project on the ISC GitLab server at https:// security-officer@isc.org.
gitlab.isc.org/isc-projects/bind9.
Please note that, unless you explicitly mark the newly created Issue as General bug reports can be sent to bind9-bugs@isc.org.
"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 Feature requests can be sent to bind-suggest@isc.org.
assertion failure or other crash in named, please do NOT use GitLab to
report it. Instead, please send mail to security-officer@isc.org.
For a general overview of ISC security policies, read the Knowledge Base Please note that, while tickets submitted to ISC's ticketing system are
article at https://kb.isc.org/docs/aa-00861. not initially publicly readable by default, they can be made publicly
acessible afterward. Please do not include information in bug reports that
you consider to be confidential. In particular, when sending the contents
of your configuration file, it is advisable to obscure key secrets: this
can be done automatically by using named-checkconf -px.
Professional support and training for BIND are available from ISC at Professional support and training for BIND are available from ISC at
https://www.isc.org/support. https://www.isc.org/support.
@@ -87,57 +76,59 @@ mailman/listinfo/bind-workers.
Contributing to BIND Contributing to BIND
ISC maintains a public git repository for BIND; details can be found at ISC maintains a public git repository for BIND; details can be found at
http://www.isc.org/git/. http://www.isc.org/git/, and also on Github at https://github.com/
isc-projects.
Information for BIND contributors can be found in the following files: - Information for BIND contributors can be found in the following files: -
General information: CONTRIBUTING.md - Code of Conduct: CODE_OF_CONDUCT.md General information: doc/dev/contrib.md - BIND 9 code style: doc/dev/
- BIND 9 code style: doc/dev/style.md - BIND architecture and developer style.md - BIND architecture and developer guide: doc/dev/dev.md
guide: doc/dev/dev.md
Patches for BIND may be submitted as merge requests in the ISC GitLab Patches for BIND may be submitted either as Github pull requests or via
server at at https://gitlab.isc.org/isc-projects/bind9/merge_requests. email. When submitting a patch via email, please prepend the subject
header with "[PATCH]" so it will be easier for us to find. If your patch
introduces a new feature in BIND, please submit it to bind-suggest@isc.org
; if it fixes a bug, please submit it to bind9-bugs@isc.org.
By default, external contributors don't have ability to fork BIND in the BIND 9.12 features
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 BIND 9.12.0 is the newest development branch of BIND 9. It includes a
including your patch as an attachment, preferably generated by git number of changes from BIND 9.11 and earlier releases. New features
format-patch. include:
BIND 9.15 features * named and related libraries have been substantially refactored for
improved query performance -- particularly on delegation heavy zones
BIND 9.15 is the newest development branch of BIND 9. It includes a number -- and for improved readability, maintainability, and testability.
of changes from BIND 9.14 and earlier releases. New features include: * Code implementing the name server query processing logic has been
moved into a new libns library, for easier testing and use in tools
* New dnssec-policy statement to configure a key and signing policy for other than named.
zones, enabling automatic key regeneration and rollover. * Cached, validated NSEC and other records can now be used to synthesize
* New network manager based on libuv. NXDOMAIN responses.
* Added support for the new GeoIP2 geolocation API, libmaxminddb. * The DNS Response Policy Service API (DNSRPS) is now supported.
* Improved DNSSEC trust anchor configuration using the trust-anchors * Setting 'max-journal-size default' now limits the size of journal
statement, permitting configuration of trust anchors in DS as well as files to twice the size of the zone.
DNSKEY format. * dnstap-read -x prints a hex dump of the wire format of each logged DNS
* YAML output for dig, mdig, and delv. 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
Building BIND Building BIND
Minimally, BIND requires a UNIX or Linux system with an ANSI C compiler, BIND requires a UNIX or Linux system with an ANSI C compiler, basic POSIX
basic POSIX support, and a 64-bit integer type. BIND also requires the support, and a 64-bit integer type. Successful builds have been observed
libuv asynchronous I/O library, and a cryptography provider library such on many versions of Linux and UNIX, including RedHat, Fedora, Debian,
as OpenSSL or a hardware service module supporting PKCS#11. On Linux, BIND Ubuntu, SuSE, Slackware, FreeBSD, NetBSD, OpenBSD, Mac OS X, Solaris,
requires the libcap library to set process privileges, though this HP-UX, AIX, SCO OpenServer, and OpenWRT.
requirement can be overridden by disabling capability support at compile
time. See Compile-time options below for details on other libraries that
may be required to support optional features.
Successful builds have been observed on many versions of Linux and UNIX, BIND is also available for Windows XP, 2003, 2008, and higher. See
including RHEL/CentOS, Fedora, Debian, Ubuntu, SLES, openSUSE, Slackware, win32utils/readme1st.txt for details on building for Windows systems.
Alpine, FreeBSD, NetBSD, OpenBSD, macOS, Solaris, OpenIndiana, OmniOS CE,
HP-UX, and OpenWRT.
BIND is also available for Windows Server 2012 R2 and higher. See
win32utils/build.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:
@@ -150,7 +141,7 @@ make depend. If you're using Emacs, you might find make tags helpful.
Several environment variables that can be set before running configure Several environment variables that can be set before running configure
will affect compilation: will affect compilation:
Variable Description Variable Description
CC The C compiler to use. configure tries to figure out the CC The C compiler to use. configure tries to figure out the
right one for supported systems. right one for supported systems.
C compiler flags. Defaults to include -g and/or -O2 as C compiler flags. Defaults to include -g and/or -O2 as
@@ -165,68 +156,28 @@ STD_CDEFINES Defaults to empty string. For a list of possible settings,
LDFLAGS Linker flags. Defaults to empty string. LDFLAGS Linker flags. Defaults to empty string.
BUILD_CC Needed when cross-compiling: the native C compiler to use BUILD_CC Needed when cross-compiling: the native C compiler to use
when building for the target system. when building for the target system.
BUILD_CFLAGS CFLAGS for the target system during cross-compiling. BUILD_CFLAGS Optional, used for cross-compiling
BUILD_CPPFLAGS CPPFLAGS for the target system during cross-compiling. BUILD_CPPFLAGS
BUILD_LDFLAGS LDFLAGS for the target system during cross-compiling. BUILD_LDFLAGS
BUILD_LIBS LIBS for the target system during cross-compiling. 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.
Dependencies
Portions of BIND that are written in Python, including dnssec-keymgr,
dnssec-coverage, dnssec-checkds, and some of the system tests, require the
argparse, ply and distutils.core 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. distutils.core is required for
installation.
Compile-time options Compile-time options
To see a full list of configuration options, run configure --help. 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 To build shared libraries, specify --with-libtool on the configure command
line. line.
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 libraries: libxml2 http://xmlsoft.org or 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.
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 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.
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.
Certain compiled-in constants and default settings can be increased to Certain compiled-in constants and default settings can be increased to
values better suited to large servers with abundant memory resources (e.g, 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= 64-bit servers with 12G or more of memory) by specifying --with-tuning=
@@ -234,10 +185,43 @@ large on the configure command line. This can improve performance on big
servers, but will consume more memory and may degrade performance on servers, but will consume more memory and may degrade performance on
smaller systems. smaller systems.
On Linux, process capabilities are managed in user space using the libcap For the server to support DNSSEC, you need to build it with crypto
library, which can be installed on most Linux systems via the libcap-dev support. To use OpenSSL, you should have OpenSSL 1.0.2e or newer
or libcap-devel package. Process capability support can also be disabled installed. If the OpenSSL library is installed in a nonstandard location,
by configuring with --disable-linux-caps. 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 On some platforms it is necessary to explicitly request large file support
to handle files bigger than 2GB. This can be done by using to handle files bigger than 2GB. This can be done by using
@@ -248,9 +232,9 @@ specifying --enable-fixed-rrset or --disable-fixed-rrset on the configure
command line. By default, fixed rrset-order is disabled to reduce memory command line. By default, fixed rrset-order is disabled to reduce memory
footprint. footprint.
The --enable-querytrace option causes named to log every step of If your operating system has integrated support for IPv6, it will be used
processing every query. This should only be enabled when debugging, automatically. If you have installed KAME IPv6 separately, use --with-kame
because it has a significant negative impact on query performance. [=PATH] to specify its location.
make install will install 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 default, installation is into /usr/local, but this can be changed with the
@@ -258,8 +242,11 @@ default, installation is into /usr/local, but this can be changed with the
You may specify the option --sysconfdir to set the directory where You may specify the option --sysconfdir to set the directory where
configuration files like named.conf go by default, and --localstatedir to configuration files like named.conf go by default, and --localstatedir to
set the default parent directory of run/named.pid. --sysconfdir defaults set the default parent directory of run/named.pid. For backwards
to $prefix/etc and --localstatedir defaults to $prefix/var. 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 Automated testing
@@ -271,18 +258,16 @@ ifconfig.sh up as root.
Some tests require Perl and the Net::DNS and/or IO::Socket::INET6 modules, 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 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. and the 'dnspython' module and will be skipped if these are not available.
See bin/tests/system/README for further details. See bin/tests/system/README for further details.
Unit tests are implemented using the CMocka unit testing framework. To Unit tests are implemented using Automated Testing Framework (ATF). To run
build them, use configure --with-cmocka. Execution of tests is done by the them, use configure --with-atf, then run make test or make unit.
Kyua test execution engine; if the kyua command is available, then unit
tests can be run via make test or make unit.
Documentation Documentation
The BIND 9 Administrator Reference Manual is included with the source The BIND 9 Administrator Reference Manual is included with the source
distribution, in DocBook XML, HTML, and PDF format, in the doc/arm distribution, in DocBook XML, HTML and PDF format, in the doc/arm
directory. directory.
Some of the programs in the BIND 9 distribution have man pages in their Some of the programs in the BIND 9 distribution have man pages in their
@@ -302,7 +287,7 @@ development BIND 9 is included in the file CHANGES, with the most recent
changes listed first. Change notes include tags indicating the category of changes listed first. Change notes include tags indicating the category of
the change that was made; these categories are: the change that was made; these categories are:
Category Description Category Description
[func] New feature [func] New feature
[bug] General bug fix [bug] General bug fix
[security] Fix for a significant security flaw [security] Fix for a significant security flaw
@@ -330,24 +315,6 @@ 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. 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. 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. To look up a merge request,
use https://gitlab.isc.org/isc-projects/bind9/merge_requests/NNN.
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.
Acknowledgments Acknowledgments
* The original development of BIND 9 was underwritten by the following * The original development of BIND 9 was underwritten by the following
@@ -367,9 +334,8 @@ Acknowledgments
* This product includes software developed by the OpenSSL Project for * This product includes software developed by the OpenSSL Project for
use in the OpenSSL Toolkit. http://www.OpenSSL.org/ use in the OpenSSL Toolkit. http://www.OpenSSL.org/
* This product includes cryptographic software written by Eric Young * This product includes cryptographic software written by Eric Young
(eay@cryptsoft.com) (eay@cryptsoft.com)
* This product includes software written by Tim Hudson * This product includes software written by Tim Hudson
(tjh@cryptsoft.com) (tjh@cryptsoft.com)
+129 -170
View File
@@ -1,12 +1,9 @@
<!-- <!--
- Copyright (C) Internet Systems Consortium, Inc. ("ISC") - Copyright (C) 2017 Internet Systems Consortium, Inc. ("ISC")
- -
- This Source Code Form is subject to the terms of the Mozilla Public - 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 - 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/. - 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.
--> -->
# BIND 9 # BIND 9
@@ -15,10 +12,8 @@
1. [Introduction](#intro) 1. [Introduction](#intro)
1. [Reporting bugs and getting help](#help) 1. [Reporting bugs and getting help](#help)
1. [Contributing to BIND](#contrib) 1. [Contributing to BIND](#contrib)
1. [BIND 9.15 features](#features) 1. [BIND 9.12 features](#features)
1. [Building BIND](#build) 1. [Building BIND](#build)
1. [macOS](#macos)
1. [Dependencies](#dependencies)
1. [Compile-time options](#opts) 1. [Compile-time options](#opts)
1. [Automated testing](#testing) 1. [Automated testing](#testing)
1. [Documentation](#doc) 1. [Documentation](#doc)
@@ -42,13 +37,13 @@ administrative tools, including the `dig` and `delv` DNS lookup tools,
`nsupdate` for dynamic DNS zone updates, `rndc` for remote name server `nsupdate` for dynamic DNS zone updates, `rndc` for remote name server
administration, and more. administration, and more.
BIND 9 began as a complete re-write of the BIND architecture that was BIND 9 is a complete re-write of the BIND architecture that was used in
used in versions 4 and 8. Internet Systems Consortium versions 4 and 8. Internet Systems Consortium
([https://www.isc.org](https://www.isc.org)), a 501(c)(3) public benefit ([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 corporation dedicated to providing software and services in support of the
Internet infrastructure, developed BIND 9 and is responsible for its Internet infrastructure, developed BIND 9 and is responsible for its
ongoing maintenance and improvement. BIND is open source software ongoing maintenance and improvement. BIND is open source software
licensed under the terms of the Mozilla Public License, version 2.0. licenced under the terms of the Mozilla Public License, version 2.0.
For a summary of features introduced in past major releases of BIND, For a summary of features introduced in past major releases of BIND,
see the file [HISTORY](HISTORY.md). see the file [HISTORY](HISTORY.md).
@@ -57,33 +52,26 @@ 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 the file [CHANGES](CHANGES). See [below](#changes) for details on the
CHANGES file format. CHANGES file format.
For up-to-date versions and release notes, see For up-to-date release notes and errata, see
[https://www.isc.org/download/](https://www.isc.org/download/). [http://www.isc.org/software/bind9/releasenotes](http://www.isc.org/software/bind9/releasenotes)
For information about supported platforms, see [PLATFORMS](PLATFORMS.md).
### <a name="help"/> Reporting bugs and getting help ### <a name="help"/> Reporting bugs and getting help
To report non-security-sensitive bugs or request new features, you may Please report assertion failure errors and suspected security issues to
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
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](mailto:security-officer@isc.org). [security-officer@isc.org](mailto:security-officer@isc.org).
For a general overview of ISC security policies, read the Knowledge Base General bug reports can be sent to
article at [https://kb.isc.org/docs/aa-00861](https://kb.isc.org/docs/aa-00861). [bind9-bugs@isc.org](mailto:bind9-bugs@isc.org).
Feature requests can be sent to
[bind-suggest@isc.org](mailto:bind-suggest@isc.org).
Please note that, while tickets submitted to ISC's ticketing system
are not initially publicly readable by default, they can be made publicly
acessible afterward. Please do not include information in bug reports that
you consider to be confidential. In particular, when sending the contents of
your configuration file, it is advisable to obscure key secrets: this can
be done automatically by using `named-checkconf -px`.
Professional support and training for BIND are available from Professional support and training for BIND are available from
ISC at [https://www.isc.org/support](https://www.isc.org/support). ISC at [https://www.isc.org/support](https://www.isc.org/support).
@@ -98,64 +86,61 @@ may also want to join the __BIND Workers__ mailing list, at
### <a name="contrib"/> Contributing to BIND ### <a name="contrib"/> Contributing to BIND
ISC maintains a public git repository for BIND; details can be found ISC maintains a public git repository for BIND; details can be found
at [http://www.isc.org/git/](http://www.isc.org/git/). at [http://www.isc.org/git/](http://www.isc.org/git/), and also on Github
at [https://github.com/isc-projects](https://github.com/isc-projects).
Information for BIND contributors can be found in the following files: Information for BIND contributors can be found in the following files:
- General information: [CONTRIBUTING.md](CONTRIBUTING.md) - General information: [doc/dev/contrib.md](doc/dev/contrib.md)
- Code of Conduct: [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md)
- BIND 9 code style: [doc/dev/style.md](doc/dev/style.md) - 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) - BIND architecture and developer guide: [doc/dev/dev.md](doc/dev/dev.md)
Patches for BIND may be submitted as Patches for BIND may be submitted either as Github pull requests
[merge requests](https://gitlab.isc.org/isc-projects/bind9/merge_requests) or via email. When submitting a patch via email, please prepend the
in the [ISC GitLab server](https://gitlab.isc.org) at subject header with "`[PATCH]`" so it will be easier for us to find.
at [https://gitlab.isc.org/isc-projects/bind9/merge_requests](https://gitlab.isc.org/isc-projects/bind9/merge_requests). If your patch introduces a new feature in BIND, please submit it to
[bind-suggest@isc.org](mailto:bind-suggest@isc.org); if it fixes a bug,
please submit it to [bind9-bugs@isc.org](mailto:bind9-bugs@isc.org).
By default, external contributors don't have ability to fork BIND in the ### <a name="features"/> BIND 9.12 features
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 BIND 9.12.0 is the newest development branch of BIND 9. It includes a
[GitLab Issue](https://gitlab.isc.org/isc-projects/bind9/issues) and number of changes from BIND 9.11 and earlier releases. New features
including your patch as an attachment, preferably generated by
`git format-patch`.
### <a name="features"/> BIND 9.15 features
BIND 9.15 is the newest development branch of BIND 9. It includes a
number of changes from BIND 9.14 and earlier releases. New features
include: include:
* New `dnssec-policy` statement to configure a key and signing policy * `named` and related libraries have been substantially refactored for
for zones, enabling automatic key regeneration and rollover. improved query performance -- particularly on delegation heavy zones --
* New network manager based on libuv. and for improved readability, maintainability, and testability.
* Added support for the new GeoIP2 geolocation API, `libmaxminddb`. * Code implementing the name server query processing logic has been moved
* Improved DNSSEC trust anchor configuration using the `trust-anchors` into a new `libns` library, for easier testing and use in tools other
statement, permitting configuration of trust anchors in DS as well as than `named`.
DNSKEY format. * Cached, validated NSEC and other records can now be used to synthesize
* YAML output for `dig`, `mdig`, and `delv`. 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
### <a name="build"/> Building BIND ### <a name="build"/> Building BIND
Minimally, BIND requires a UNIX or Linux system with an ANSI C compiler, BIND requires a UNIX or Linux system with an ANSI C compiler, basic POSIX
basic POSIX support, and a 64-bit integer type. BIND also requires the support, and a 64-bit integer type. Successful builds have been observed on
`libuv` asynchronous I/O library, and a cryptography provider library many versions of Linux and UNIX, including RedHat, Fedora, Debian, Ubuntu,
such as OpenSSL or a hardware service module supporting PKCS#11. On SuSE, Slackware, FreeBSD, NetBSD, OpenBSD, Mac OS X, Solaris, HP-UX, AIX,
Linux, BIND requires the `libcap` library to set process privileges, SCO OpenServer, and OpenWRT.
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.
Successful builds have been observed on many versions of Linux and BIND is also available for Windows XP, 2003, 2008, and higher. See
UNIX, including RHEL/CentOS, Fedora, Debian, Ubuntu, SLES, openSUSE, `win32utils/readme1st.txt` for details on building for Windows systems.
Slackware, Alpine, FreeBSD, NetBSD, OpenBSD, macOS, Solaris,
OpenIndiana, OmniOS CE, HP-UX, and OpenWRT.
BIND is also available for Windows Server 2012 R2 and higher. See
`win32utils/build.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:
@@ -176,71 +161,28 @@ affect compilation:
|`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).| |`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.| |`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_CC`|Needed when cross-compiling: the native C compiler to use when building for the target system.|
|`BUILD_CFLAGS`|`CFLAGS` for the target system during cross-compiling.| |`BUILD_CFLAGS`|Optional, used for cross-compiling|
|`BUILD_CPPFLAGS`|`CPPFLAGS` for the target system during cross-compiling.| |`BUILD_CPPFLAGS`||
|`BUILD_LDFLAGS`|`LDFLAGS` for the target system during cross-compiling.| |`BUILD_LDFLAGS`||
|`BUILD_LIBS`|`LIBS` for the target system during cross-compiling.| |`BUILD_LIBS`||
#### <a name="macos"> macOS
Building on macOS assumes that the "Command Tools for Xcode" is installed.
This 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`.
### <a name="dependencies"/> Dependencies
Portions of BIND that are written in Python, including
`dnssec-keymgr`, `dnssec-coverage`, `dnssec-checkds`, and some of the
system tests, require the `argparse`, `ply` and `distutils.core` 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).
`distutils.core` is required for installation.
#### <a name="opts"/> Compile-time options #### <a name="opts"/> Compile-time options
To see a full list of configuration options, run `configure --help`. 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` To build shared libraries, specify `--with-libtool` on the `configure`
command line. command line.
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 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`.
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 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`.
For DNSTAP packet logging, you must have installed `libfstrm`
[https://github.com/farsightsec/fstrm](https://github.com/farsightsec/fstrm)
and `libprotobuf-c`
[https://developers.google.com/protocol-buffers](https://developers.google.com/protocol-buffers),
and BIND must be configured with `--enable-dnstap`.
Certain compiled-in constants and default settings can be increased to Certain compiled-in constants and default settings can be increased to
values better suited to large servers with abundant memory resources (e.g, values better suited to large servers with abundant memory resources (e.g,
64-bit servers with 12G or more of memory) by specifying 64-bit servers with 12G or more of memory) by specifying
@@ -248,10 +190,45 @@ values better suited to large servers with abundant memory resources (e.g,
performance on big servers, but will consume more memory and may degrade performance on big servers, but will consume more memory and may degrade
performance on smaller systems. performance on smaller systems.
On Linux, process capabilities are managed in user space using For the server to support DNSSEC, you need to build it with crypto support.
the `libcap` library, which can be installed on most Linux systems via To use OpenSSL, you should have OpenSSL 1.0.2e or newer installed. If the
the `libcap-dev` or `libcap-devel` package. Process capability support can OpenSSL library is installed in a nonstandard location, specify the prefix
also be disabled by configuring with `--disable-linux-caps`. using "--with-openssl=&lt;PREFIX&gt;" 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=&lt;PREFIX&gt;", 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](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,
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](https://github.com/farsightsec/fstrm)
and libprotobuf-c
[https://developers.google.com/protocol-buffers](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](https://pypi.python.org/pypi/ply).
On some platforms it is necessary to explicitly request large file support On some platforms it is necessary to explicitly request large file support
to handle files bigger than 2GB. This can be done by using to handle files bigger than 2GB. This can be done by using
@@ -262,9 +239,9 @@ 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. reduce memory footprint.
The `--enable-querytrace` option causes `named` to log every step of If your operating system has integrated support for IPv6, it will be used
processing every query. This should only be enabled when debugging, because automatically. If you have installed KAME IPv6 separately, use
it has a significant negative impact on query performance. `--with-kame[=PATH]` to specify its location.
`make install` will install `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 default, installation is into /usr/local, but this can be changed with the
@@ -272,8 +249,11 @@ default, installation is into /usr/local, but this can be changed with the
You may specify the option `--sysconfdir` to set the directory where You may specify the option `--sysconfdir` to set the directory where
configuration files like `named.conf` go by default, and `--localstatedir` configuration files like `named.conf` go by default, and `--localstatedir`
to set the default parent directory of `run/named.pid`. `--sysconfdir` to set the default parent directory of `run/named.pid`. For backwards
defaults to `$prefix/etc` and `--localstatedir` defaults to `$prefix/var`. 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 name="testing"/> Automated testing
@@ -283,21 +263,19 @@ multiple servers to run locally and communicate with one another). These
IP addresses can be configured by running the command IP addresses can be configured by running the command
`bin/tests/system/ifconfig.sh up` as root. `bin/tests/system/ifconfig.sh up` as root.
Some tests require Perl and the `Net::DNS` and/or `IO::Socket::INET6` modules, 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 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. and the 'dnspython' module and will be skipped if these are not available.
See bin/tests/system/README for further details. See bin/tests/system/README for further details.
Unit tests are implemented using the [CMocka unit testing framework](https://cmocka.org/). Unit tests are implemented using Automated Testing Framework (ATF).
To build them, use `configure --with-cmocka`. Execution of tests is done To run them, use `configure --with-atf`, then run `make test` or
by the [Kyua test execution engine](https://github.com/jmmv/kyua); if the `make unit`.
`kyua` command is available, then unit tests can be run via `make test`
or `make unit`.
### <a name="doc"/> Documentation ### <a name="doc"/> Documentation
The *BIND 9 Administrator Reference Manual* is included with the source The *BIND 9 Administrator Reference Manual* is included with the source
distribution, in DocBook XML, HTML, and PDF format, in the `doc/arm` distribution, in DocBook XML, HTML and PDF format, in the `doc/arm`
directory. directory.
Some of the programs in the BIND 9 distribution have man pages in their Some of the programs in the BIND 9 distribution have man pages in their
@@ -340,25 +318,6 @@ 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. 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. 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.
### <a name="ack"/> Acknowledgments ### <a name="ack"/> Acknowledgments
* The original development of BIND 9 was underwritten by the * The original development of BIND 9 was underwritten by the
+136
View File
@@ -0,0 +1,136 @@
/*
* Copyright (C) 1999-2005, 2007, 2008, 2012, 2014, 2016 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/.
*/
/* $Id: acconfig.h,v 1.53 2008/12/01 23:47:44 tbox Exp $ */
/*! \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
Vendored
+15 -385
View File
@@ -1,387 +1,17 @@
# generated automatically by aclocal 1.16.1 -*- Autoconf -*- 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
# Copyright (C) 1996-2018 Free Software Foundation, Inc. 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.
# This file is free software; the Free Software Foundation Help can also often be found on the BIND Users mailing list
# gives unlimited permission to copy and/or distribute it, (https://lists.isc.org/mailman/listinfo/bind-users) or in the #bind
# with or without modifications, as long as this notice is preserved. channel of the Freenode IRC service.]])
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
# serial 12 (pkg-config-0.29.2)
dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
dnl
dnl This program is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2 of the License, or
dnl (at your option) any later version.
dnl
dnl This program is distributed in the hope that it will be useful, but
dnl WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
dnl General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
dnl 02111-1307, USA.
dnl
dnl As a special exception to the GNU General Public License, if you
dnl distribute this file as part of a program that contains a
dnl configuration script generated by Autoconf, you may include it under
dnl the same distribution terms that you use for the rest of that
dnl program.
dnl PKG_PREREQ(MIN-VERSION)
dnl -----------------------
dnl Since: 0.29
dnl
dnl Verify that the version of the pkg-config macros are at least
dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
dnl installed version of pkg-config, this checks the developer's version
dnl of pkg.m4 when generating configure.
dnl
dnl To ensure that this macro is defined, also add:
dnl m4_ifndef([PKG_PREREQ],
dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
dnl
dnl See the "Since" comment for each macro you use to see what version
dnl of the macros you require.
m4_defun([PKG_PREREQ],
[m4_define([PKG_MACROS_VERSION], [0.29.2])
m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
[m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
])dnl PKG_PREREQ
dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
dnl ----------------------------------
dnl Since: 0.16
dnl
dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
dnl first found in the path. Checks that the version of pkg-config found
dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
dnl used since that's the first version where most current features of
dnl pkg-config existed.
AC_DEFUN([PKG_PROG_PKG_CONFIG],
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
fi
if test -n "$PKG_CONFIG"; then
_pkg_min_version=m4_default([$1], [0.9.0])
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
PKG_CONFIG=""
fi
fi[]dnl
])dnl PKG_PROG_PKG_CONFIG
dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
dnl -------------------------------------------------------------------
dnl Since: 0.18
dnl
dnl Check to see whether a particular set of modules exists. Similar to
dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
dnl
dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
dnl only at the first occurence in configure.ac, so if the first place
dnl it's called might be skipped (such as if it is within an "if", you
dnl have to call PKG_CHECK_EXISTS manually
AC_DEFUN([PKG_CHECK_EXISTS],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
if test -n "$PKG_CONFIG" && \
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
m4_default([$2], [:])
m4_ifvaln([$3], [else
$3])dnl
fi])
dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
dnl ---------------------------------------------
dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
dnl pkg_failed based on the result.
m4_define([_PKG_CONFIG],
[if test -n "$$1"; then
pkg_cv_[]$1="$$1"
elif test -n "$PKG_CONFIG"; then
PKG_CHECK_EXISTS([$3],
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes ],
[pkg_failed=yes])
else
pkg_failed=untried
fi[]dnl
])dnl _PKG_CONFIG
dnl _PKG_SHORT_ERRORS_SUPPORTED
dnl ---------------------------
dnl Internal check to see if pkg-config supports short errors.
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
_pkg_short_errors_supported=yes
else
_pkg_short_errors_supported=no
fi[]dnl
])dnl _PKG_SHORT_ERRORS_SUPPORTED
dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
dnl [ACTION-IF-NOT-FOUND])
dnl --------------------------------------------------------------
dnl Since: 0.4.0
dnl
dnl Note that if there is a possibility the first call to
dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
AC_DEFUN([PKG_CHECK_MODULES],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
pkg_failed=no
AC_MSG_CHECKING([for $2])
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
and $1[]_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.])
if test $pkg_failed = yes; then
AC_MSG_RESULT([no])
_PKG_SHORT_ERRORS_SUPPORTED
if test $_pkg_short_errors_supported = yes; then
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
else
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
m4_default([$4], [AC_MSG_ERROR(
[Package requirements ($2) were not met:
$$1_PKG_ERRORS
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
_PKG_TEXT])[]dnl
])
elif test $pkg_failed = untried; then
AC_MSG_RESULT([no])
m4_default([$4], [AC_MSG_FAILURE(
[The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
_PKG_TEXT
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
])
else
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
AC_MSG_RESULT([yes])
$3
fi[]dnl
])dnl PKG_CHECK_MODULES
dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
dnl [ACTION-IF-NOT-FOUND])
dnl ---------------------------------------------------------------------
dnl Since: 0.29
dnl
dnl Checks for existence of MODULES and gathers its build flags with
dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
dnl and VARIABLE-PREFIX_LIBS from --libs.
dnl
dnl Note that if there is a possibility the first call to
dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
dnl configure.ac.
AC_DEFUN([PKG_CHECK_MODULES_STATIC],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
_save_PKG_CONFIG=$PKG_CONFIG
PKG_CONFIG="$PKG_CONFIG --static"
PKG_CHECK_MODULES($@)
PKG_CONFIG=$_save_PKG_CONFIG[]dnl
])dnl PKG_CHECK_MODULES_STATIC
dnl PKG_INSTALLDIR([DIRECTORY])
dnl -------------------------
dnl Since: 0.27
dnl
dnl Substitutes the variable pkgconfigdir as the location where a module
dnl should install pkg-config .pc files. By default the directory is
dnl $libdir/pkgconfig, but the default can be changed by passing
dnl DIRECTORY. The user can override through the --with-pkgconfigdir
dnl parameter.
AC_DEFUN([PKG_INSTALLDIR],
[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
m4_pushdef([pkg_description],
[pkg-config installation directory @<:@]pkg_default[@:>@])
AC_ARG_WITH([pkgconfigdir],
[AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
[with_pkgconfigdir=]pkg_default)
AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
m4_popdef([pkg_default])
m4_popdef([pkg_description])
])dnl PKG_INSTALLDIR
dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
dnl --------------------------------
dnl Since: 0.27
dnl
dnl Substitutes the variable noarch_pkgconfigdir as the location where a
dnl module should install arch-independent pkg-config .pc files. By
dnl default the directory is $datadir/pkgconfig, but the default can be
dnl changed by passing DIRECTORY. The user can override through the
dnl --with-noarch-pkgconfigdir parameter.
AC_DEFUN([PKG_NOARCH_INSTALLDIR],
[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
m4_pushdef([pkg_description],
[pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
AC_ARG_WITH([noarch-pkgconfigdir],
[AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
[with_noarch_pkgconfigdir=]pkg_default)
AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
m4_popdef([pkg_default])
m4_popdef([pkg_description])
])dnl PKG_NOARCH_INSTALLDIR
dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
dnl -------------------------------------------
dnl Since: 0.28
dnl
dnl Retrieves the value of the pkg-config variable for the given module.
AC_DEFUN([PKG_CHECK_VAR],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
_PKG_CONFIG([$1], [variable="][$3]["], [$2])
AS_VAR_COPY([$1], [pkg_cv_][$1])
AS_VAR_IF([$1], [""], [$5], [$4])dnl
])dnl PKG_CHECK_VAR
# AM_CONDITIONAL -*- Autoconf -*-
# Copyright (C) 1997-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
# -------------------------------------
# Define a conditional.
AC_DEFUN([AM_CONDITIONAL],
[AC_PREREQ([2.52])dnl
m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
AC_SUBST([$1_TRUE])dnl
AC_SUBST([$1_FALSE])dnl
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
m4_define([_AM_COND_VALUE_$1], [$2])dnl
if $2; then
$1_TRUE=
$1_FALSE='#'
else
$1_TRUE='#'
$1_FALSE=
fi
AC_CONFIG_COMMANDS_PRE(
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
AC_MSG_ERROR([[conditional "$1" was never defined.
Usually this means the macro was only invoked conditionally.]])
fi])])
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
# From Jim Meyering
# Copyright (C) 1996-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# AM_MAINTAINER_MODE([DEFAULT-MODE])
# ----------------------------------
# Control maintainer-specific portions of Makefiles.
# Default is to disable them, unless 'enable' is passed literally.
# For symmetry, 'disable' may be passed as well. Anyway, the user
# can override the default with the --enable/--disable switch.
AC_DEFUN([AM_MAINTAINER_MODE],
[m4_case(m4_default([$1], [disable]),
[enable], [m4_define([am_maintainer_other], [disable])],
[disable], [m4_define([am_maintainer_other], [enable])],
[m4_define([am_maintainer_other], [enable])
m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
dnl maintainer-mode's default is 'disable' unless 'enable' is passed
AC_ARG_ENABLE([maintainer-mode],
[AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
am_maintainer_other[ make rules and dependencies not useful
(and sometimes confusing) to the casual installer])],
[USE_MAINTAINER_MODE=$enableval],
[USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
MAINT=$MAINTAINER_MODE_TRUE
AC_SUBST([MAINT])dnl
]
)
# Copyright (C) 2006-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# _AM_SUBST_NOTMAKE(VARIABLE)
# ---------------------------
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
# This macro is traced by Automake.
AC_DEFUN([_AM_SUBST_NOTMAKE])
# AM_SUBST_NOTMAKE(VARIABLE)
# --------------------------
# Public sister of _AM_SUBST_NOTMAKE.
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
m4_include([m4/ax_check_compile_flag.m4])
m4_include([m4/ax_check_openssl.m4])
m4_include([m4/ax_posix_shell.m4])
m4_include([m4/ax_pthread.m4])
m4_include([m4/ax_restore_flags.m4])
m4_include([m4/ax_save_flags.m4])
m4_include([m4/libtool.m4])
m4_include([m4/ltoptions.m4])
m4_include([m4/ltsugar.m4])
m4_include([m4/ltversion.m4])
m4_include([m4/lt~obsolete.m4])
+2 -5
View File
@@ -1,13 +1,10 @@
#!/bin/sh #!/bin/sh
# #
# Copyright (C) Internet Systems Consortium, Inc. ("ISC") # Copyright (C) 2015, 2016 Internet Systems Consortium, Inc. ("ISC")
# #
# This Source Code Form is subject to the terms of the Mozilla Public # 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 # 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/. # 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 # Run this script after modifying configure.in to generate configure
autoreconf -f -i autoreconf -i
+5 -6
View File
@@ -1,18 +1,17 @@
# Copyright (C) Internet Systems Consortium, Inc. ("ISC") # Copyright (C) 1998-2001, 2004, 2007, 2009, 2012-2014, 2016 Internet Systems Consortium, Inc. ("ISC")
# #
# This Source Code Form is subject to the terms of the Mozilla Public # 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 # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# See the COPYRIGHT file distributed with this work for additional # $Id: Makefile.in,v 1.29 2009/10/05 12:07:08 fdupont Exp $
# information regarding copyright ownership.
srcdir = @srcdir@ srcdir = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
top_srcdir = @top_srcdir@ top_srcdir = @top_srcdir@
SUBDIRS = named rndc dig delv dnssec tools nsupdate check confgen \ SUBDIRS = named rndc dig delv dnssec tools tests nsupdate \
@NZD_TOOLS@ @PYTHON_TOOLS@ @PKCS11_TOOLS@ plugins tests check confgen @NZD_TOOLS@ @PYTHON_TOOLS@ @PKCS11_TOOLS@
TARGETS = TARGETS =
@BIND9_MAKE_RULES@ @BIND9_MAKE_RULES@
+9 -13
View File
@@ -1,11 +1,8 @@
# Copyright (C) Internet Systems Consortium, Inc. ("ISC") # Copyright (C) 2000-2007, 2009, 2012, 2014-2017 Internet Systems Consortium, Inc. ("ISC")
# #
# This Source Code Form is subject to the terms of the Mozilla Public # 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 # 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/. # 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@ srcdir = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
@@ -16,16 +13,15 @@ VERSION=@BIND9_VERSION@
@BIND9_MAKE_INCLUDES@ @BIND9_MAKE_INCLUDES@
CINCLUDES = ${NS_INCLUDES} ${BIND9_INCLUDES} ${DNS_INCLUDES} ${ISCCFG_INCLUDES} \ CINCLUDES = ${NS_INCLUDES} ${BIND9_INCLUDES} ${DNS_INCLUDES} ${ISCCFG_INCLUDES} \
${ISC_INCLUDES} \ ${ISC_INCLUDES} @DST_OPENSSL_INC@
${OPENSSL_CFLAGS}
CDEFINES = -DNAMED_CONFFILE=\"${sysconfdir}/named.conf\" CDEFINES = @CRYPTO@ -DNAMED_CONFFILE=\"${sysconfdir}/named.conf\"
CWARNINGS = CWARNINGS =
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@ DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@ ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ISCLIBS = ../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @ISC_OPENSSL_LIBS@
BIND9LIBS = ../../lib/bind9/libbind9.@A@ BIND9LIBS = ../../lib/bind9/libbind9.@A@
NSLIBS = ../../lib/ns/libns.@A@ NSLIBS = ../../lib/ns/libns.@A@
@@ -67,7 +63,7 @@ named-checkzone.@O@: named-checkzone.c
named-checkconf@EXEEXT@: named-checkconf.@O@ check-tool.@O@ ${ISCDEPLIBS} \ named-checkconf@EXEEXT@: named-checkconf.@O@ check-tool.@O@ ${ISCDEPLIBS} \
${NSDEPENDLIBS} ${DNSDEPLIBS} ${ISCCFGDEPLIBS} ${BIND9DEPLIBS} ${NSDEPENDLIBS} ${DNSDEPLIBS} ${ISCCFGDEPLIBS} ${BIND9DEPLIBS}
export BASEOBJS="named-checkconf.@O@ check-tool.@O@"; \ export BASEOBJS="named-checkconf.@O@ check-tool.@O@"; \
export LIBS0="${BIND9LIBS} ${NSLIBS} ${ISCCFGLIBS} ${DNSLIBS}"; \ export LIBS0="${NSLIBS} ${BIND9LIBS} ${ISCCFGLIBS} ${DNSLIBS}"; \
${FINALBUILDCMD} ${FINALBUILDCMD}
named-checkzone@EXEEXT@: named-checkzone.@O@ check-tool.@O@ ${ISCDEPLIBS} \ named-checkzone@EXEEXT@: named-checkzone.@O@ check-tool.@O@ ${ISCDEPLIBS} \
@@ -89,12 +85,12 @@ install:: named-checkconf@EXEEXT@ named-checkzone@EXEEXT@ installdirs
${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} named-checkconf@EXEEXT@ ${DESTDIR}${sbindir} ${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} named-checkconf@EXEEXT@ ${DESTDIR}${sbindir}
${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} named-checkzone@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@) (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 || exit 1; done 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) (cd ${DESTDIR}${mandir}/man8; rm -f named-compilezone.8; ${LINK_PROGRAM} named-checkzone.8 named-compilezone.8)
uninstall:: uninstall::
rm -f ${DESTDIR}${mandir}/man8/named-compilezone.8 rm -f ${DESTDIR}${mandir}/man8/named-compilezone.8
for m in ${MANPAGES}; do rm -f ${DESTDIR}${mandir}/man8/$$m || exit 1; done for m in ${MANPAGES}; do rm -f ${DESTDIR}${mandir}/man8/$$m ; done
rm -f ${DESTDIR}${sbindir}/named-compilezone@EXEEXT@ 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-checkconf@EXEEXT@
${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${sbindir}/named-checkzone@EXEEXT@ ${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${sbindir}/named-checkzone@EXEEXT@
+84 -58
View File
@@ -1,20 +1,18 @@
/* /*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2000-2002, 2004-2017 Internet Systems Consortium, Inc. ("ISC")
* *
* This Source Code Form is subject to the terms of the Mozilla Public * 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 * 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/. * 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.
*/ */
/* $Id: check-tool.c,v 1.44 2011/12/22 07:32:39 each Exp $ */
/*! \file */ /*! \file */
#include <stdbool.h> #include <config.h>
#include <stdio.h> #include <stdio.h>
#include <inttypes.h>
#ifdef _WIN32 #ifdef _WIN32
#include <Winsock2.h> #include <Winsock2.h>
@@ -60,6 +58,14 @@
#define CHECK_LOCAL 1 #define CHECK_LOCAL 1
#endif #endif
#ifdef HAVE_ADDRINFO
#ifdef HAVE_GETADDRINFO
#ifdef HAVE_GAISTRERROR
#define USE_GETADDRINFO
#endif
#endif
#endif
#define CHECK(r) \ #define CHECK(r) \
do { \ do { \
result = (r); \ result = (r); \
@@ -80,17 +86,17 @@ static const char *dbtype[] = { "rbt" };
int debug = 0; int debug = 0;
const char *journal = NULL; const char *journal = NULL;
bool nomerge = true; isc_boolean_t nomerge = ISC_TRUE;
#if CHECK_LOCAL #if CHECK_LOCAL
bool docheckmx = true; isc_boolean_t docheckmx = ISC_TRUE;
bool dochecksrv = true; isc_boolean_t dochecksrv = ISC_TRUE;
bool docheckns = true; isc_boolean_t docheckns = ISC_TRUE;
#else #else
bool docheckmx = false; isc_boolean_t docheckmx = ISC_FALSE;
bool dochecksrv = false; isc_boolean_t dochecksrv = ISC_FALSE;
bool docheckns = false; isc_boolean_t docheckns = ISC_FALSE;
#endif #endif
dns_zoneopt_t zone_options = DNS_ZONEOPT_CHECKNS | unsigned int zone_options = DNS_ZONEOPT_CHECKNS |
DNS_ZONEOPT_CHECKMX | DNS_ZONEOPT_CHECKMX |
DNS_ZONEOPT_MANYERRORS | DNS_ZONEOPT_MANYERRORS |
DNS_ZONEOPT_CHECKNAMES | DNS_ZONEOPT_CHECKNAMES |
@@ -101,6 +107,7 @@ dns_zoneopt_t zone_options = DNS_ZONEOPT_CHECKNS |
DNS_ZONEOPT_CHECKWILDCARD | DNS_ZONEOPT_CHECKWILDCARD |
DNS_ZONEOPT_WARNMXCNAME | DNS_ZONEOPT_WARNMXCNAME |
DNS_ZONEOPT_WARNSRVCNAME; DNS_ZONEOPT_WARNSRVCNAME;
unsigned int zone_options2 = 0;
/* /*
* This needs to match the list in bin/named/log.c. * This needs to match the list in bin/named/log.c.
@@ -127,17 +134,21 @@ add(char *key, int value) {
isc_symvalue_t symvalue; isc_symvalue_t symvalue;
if (sym_mctx == NULL) { 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) { if (symtab == NULL) {
result = isc_symtab_create(sym_mctx, 100, freekey, sym_mctx, result = isc_symtab_create(sym_mctx, 100, freekey, sym_mctx,
false, &symtab); ISC_FALSE, &symtab);
if (result != ISC_R_SUCCESS) if (result != ISC_R_SUCCESS)
return; return;
} }
key = isc_mem_strdup(sym_mctx, key); key = isc_mem_strdup(sym_mctx, key);
if (key == NULL)
return;
symvalue.as_pointer = NULL; symvalue.as_pointer = NULL;
result = isc_symtab_define(symtab, key, value, symvalue, result = isc_symtab_define(symtab, key, value, symvalue,
@@ -146,31 +157,32 @@ add(char *key, int value) {
isc_mem_free(sym_mctx, key); isc_mem_free(sym_mctx, key);
} }
static bool static isc_boolean_t
logged(char *key, int value) { logged(char *key, int value) {
isc_result_t result; isc_result_t result;
if (symtab == NULL) if (symtab == NULL)
return (false); return (ISC_FALSE);
result = isc_symtab_lookup(symtab, key, value, NULL); result = isc_symtab_lookup(symtab, key, value, NULL);
if (result == ISC_R_SUCCESS) if (result == ISC_R_SUCCESS)
return (true); return (ISC_TRUE);
return (false); return (ISC_FALSE);
} }
static bool static isc_boolean_t
checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner, 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_rdataset_t *rdataset;
dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdata_t rdata = DNS_RDATA_INIT;
struct addrinfo hints, *ai, *cur; struct addrinfo hints, *ai, *cur;
char namebuf[DNS_NAME_FORMATSIZE + 1]; char namebuf[DNS_NAME_FORMATSIZE + 1];
char ownerbuf[DNS_NAME_FORMATSIZE]; char ownerbuf[DNS_NAME_FORMATSIZE];
char addrbuf[sizeof("xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:123.123.123.123")]; char addrbuf[sizeof("xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:123.123.123.123")];
bool answer = true; isc_boolean_t answer = ISC_TRUE;
bool match; isc_boolean_t match;
const char *type; const char *type;
void *ptr = NULL; void *ptr = NULL;
int result; int result;
@@ -219,7 +231,7 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
ownerbuf, namebuf, ownerbuf, namebuf,
cur->ai_canonname); cur->ai_canonname);
/* XXX950 make fatal for 9.5.0 */ /* XXX950 make fatal for 9.5.0 */
/* answer = false; */ /* answer = ISC_FALSE; */
add(namebuf, ERR_IS_CNAME); add(namebuf, ERR_IS_CNAME);
} }
break; break;
@@ -235,7 +247,7 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
add(namebuf, ERR_NO_ADDRESSES); add(namebuf, ERR_NO_ADDRESSES);
} }
/* XXX950 make fatal for 9.5.0 */ /* XXX950 make fatal for 9.5.0 */
return (true); return (ISC_TRUE);
default: default:
if (!logged(namebuf, ERR_LOOKUP_FAILURE)) { if (!logged(namebuf, ERR_LOOKUP_FAILURE)) {
@@ -244,7 +256,7 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
namebuf, gai_strerror(result)); namebuf, gai_strerror(result));
add(namebuf, ERR_LOOKUP_FAILURE); add(namebuf, ERR_LOOKUP_FAILURE);
} }
return (true); return (ISC_TRUE);
} }
/* /*
@@ -255,13 +267,13 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
result = dns_rdataset_first(a); result = dns_rdataset_first(a);
while (result == ISC_R_SUCCESS) { while (result == ISC_R_SUCCESS) {
dns_rdataset_current(a, &rdata); dns_rdataset_current(a, &rdata);
match = false; match = ISC_FALSE;
for (cur = ai; cur != NULL; cur = cur->ai_next) { for (cur = ai; cur != NULL; cur = cur->ai_next) {
if (cur->ai_family != AF_INET) if (cur->ai_family != AF_INET)
continue; continue;
ptr = &((struct sockaddr_in *)(cur->ai_addr))->sin_addr; ptr = &((struct sockaddr_in *)(cur->ai_addr))->sin_addr;
if (memcmp(ptr, rdata.data, rdata.length) == 0) { if (memcmp(ptr, rdata.data, rdata.length) == 0) {
match = true; match = ISC_TRUE;
break; break;
} }
} }
@@ -273,7 +285,7 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
addrbuf, sizeof(addrbuf))); addrbuf, sizeof(addrbuf)));
add(namebuf, ERR_EXTRA_A); add(namebuf, ERR_EXTRA_A);
/* XXX950 make fatal for 9.5.0 */ /* XXX950 make fatal for 9.5.0 */
/* answer = false; */ /* answer = ISC_FALSE; */
} }
dns_rdata_reset(&rdata); dns_rdata_reset(&rdata);
result = dns_rdataset_next(a); result = dns_rdataset_next(a);
@@ -285,13 +297,13 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
result = dns_rdataset_first(aaaa); result = dns_rdataset_first(aaaa);
while (result == ISC_R_SUCCESS) { while (result == ISC_R_SUCCESS) {
dns_rdataset_current(aaaa, &rdata); dns_rdataset_current(aaaa, &rdata);
match = false; match = ISC_FALSE;
for (cur = ai; cur != NULL; cur = cur->ai_next) { for (cur = ai; cur != NULL; cur = cur->ai_next) {
if (cur->ai_family != AF_INET6) if (cur->ai_family != AF_INET6)
continue; 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) { if (memcmp(ptr, rdata.data, rdata.length) == 0) {
match = true; match = ISC_TRUE;
break; break;
} }
} }
@@ -303,7 +315,7 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
addrbuf, sizeof(addrbuf))); addrbuf, sizeof(addrbuf)));
add(namebuf, ERR_EXTRA_AAAA); add(namebuf, ERR_EXTRA_AAAA);
/* XXX950 make fatal for 9.5.0. */ /* XXX950 make fatal for 9.5.0. */
/* answer = false; */ /* answer = ISC_FALSE; */
} }
dns_rdata_reset(&rdata); dns_rdata_reset(&rdata);
result = dns_rdataset_next(aaaa); result = dns_rdataset_next(aaaa);
@@ -314,7 +326,7 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
* Check that all addresses appear in the glue. * Check that all addresses appear in the glue.
*/ */
if (!logged(namebuf, ERR_MISSING_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) { for (cur = ai; cur != NULL; cur = cur->ai_next) {
switch (cur->ai_family) { switch (cur->ai_family) {
case AF_INET: case AF_INET:
@@ -330,7 +342,7 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
default: default:
continue; continue;
} }
match = false; match = ISC_FALSE;
if (dns_rdataset_isassociated(rdataset)) if (dns_rdataset_isassociated(rdataset))
result = dns_rdataset_first(rdataset); result = dns_rdataset_first(rdataset);
else else
@@ -338,7 +350,7 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
while (result == ISC_R_SUCCESS && !match) { while (result == ISC_R_SUCCESS && !match) {
dns_rdataset_current(rdataset, &rdata); dns_rdataset_current(rdataset, &rdata);
if (memcmp(ptr, rdata.data, rdata.length) == 0) if (memcmp(ptr, rdata.data, rdata.length) == 0)
match = true; match = ISC_TRUE;
dns_rdata_reset(&rdata); dns_rdata_reset(&rdata);
result = dns_rdataset_next(rdataset); result = dns_rdataset_next(rdataset);
} }
@@ -349,8 +361,8 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
inet_ntop(cur->ai_family, ptr, inet_ntop(cur->ai_family, ptr,
addrbuf, sizeof(addrbuf))); addrbuf, sizeof(addrbuf)));
/* XXX950 make fatal for 9.5.0. */ /* XXX950 make fatal for 9.5.0. */
/* answer = false; */ /* answer = ISC_FALSE; */
missing_glue = true; missing_glue = ISC_TRUE;
} }
} }
if (missing_glue) if (missing_glue)
@@ -358,16 +370,20 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
} }
freeaddrinfo(ai); freeaddrinfo(ai);
return (answer); 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) { checkmx(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
#ifdef USE_GETADDRINFO
struct addrinfo hints, *ai, *cur; struct addrinfo hints, *ai, *cur;
char namebuf[DNS_NAME_FORMATSIZE + 1]; char namebuf[DNS_NAME_FORMATSIZE + 1];
char ownerbuf[DNS_NAME_FORMATSIZE]; char ownerbuf[DNS_NAME_FORMATSIZE];
int result; int result;
int level = ISC_LOG_ERROR; int level = ISC_LOG_ERROR;
bool answer = true; isc_boolean_t answer = ISC_TRUE;
memset(&hints, 0, sizeof(hints)); memset(&hints, 0, sizeof(hints));
hints.ai_flags = AI_CANONNAME; hints.ai_flags = AI_CANONNAME;
@@ -411,7 +427,7 @@ checkmx(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
add(namebuf, ERR_IS_MXCNAME); add(namebuf, ERR_IS_MXCNAME);
} }
if (level == ISC_LOG_ERROR) if (level == ISC_LOG_ERROR)
answer = false; answer = ISC_FALSE;
} }
} }
freeaddrinfo(ai); freeaddrinfo(ai);
@@ -429,7 +445,7 @@ checkmx(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
add(namebuf, ERR_NO_ADDRESSES); add(namebuf, ERR_NO_ADDRESSES);
} }
/* XXX950 make fatal for 9.5.0. */ /* XXX950 make fatal for 9.5.0. */
return (true); return (ISC_TRUE);
default: default:
if (!logged(namebuf, ERR_LOOKUP_FAILURE)) { if (!logged(namebuf, ERR_LOOKUP_FAILURE)) {
@@ -438,18 +454,22 @@ checkmx(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
namebuf, gai_strerror(result)); namebuf, gai_strerror(result));
add(namebuf, ERR_LOOKUP_FAILURE); 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) { checksrv(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
#ifdef USE_GETADDRINFO
struct addrinfo hints, *ai, *cur; struct addrinfo hints, *ai, *cur;
char namebuf[DNS_NAME_FORMATSIZE + 1]; char namebuf[DNS_NAME_FORMATSIZE + 1];
char ownerbuf[DNS_NAME_FORMATSIZE]; char ownerbuf[DNS_NAME_FORMATSIZE];
int result; int result;
int level = ISC_LOG_ERROR; int level = ISC_LOG_ERROR;
bool answer = true; isc_boolean_t answer = ISC_TRUE;
memset(&hints, 0, sizeof(hints)); memset(&hints, 0, sizeof(hints));
hints.ai_flags = AI_CANONNAME; hints.ai_flags = AI_CANONNAME;
@@ -492,7 +512,7 @@ checksrv(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
add(namebuf, ERR_IS_SRVCNAME); add(namebuf, ERR_IS_SRVCNAME);
} }
if (level == ISC_LOG_ERROR) if (level == ISC_LOG_ERROR)
answer = false; answer = ISC_FALSE;
} }
} }
freeaddrinfo(ai); freeaddrinfo(ai);
@@ -510,7 +530,7 @@ checksrv(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
add(namebuf, ERR_NO_ADDRESSES); add(namebuf, ERR_NO_ADDRESSES);
} }
/* XXX950 make fatal for 9.5.0. */ /* XXX950 make fatal for 9.5.0. */
return (true); return (ISC_TRUE);
default: default:
if (!logged(namebuf, ERR_LOOKUP_FAILURE)) { if (!logged(namebuf, ERR_LOOKUP_FAILURE)) {
@@ -519,8 +539,11 @@ checksrv(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
namebuf, gai_strerror(result)); namebuf, gai_strerror(result));
add(namebuf, ERR_LOOKUP_FAILURE); add(namebuf, ERR_LOOKUP_FAILURE);
} }
return (true); return (ISC_TRUE);
} }
#else
return (ISC_TRUE);
#endif
} }
isc_result_t isc_result_t
@@ -564,7 +587,8 @@ check_ttls(dns_zone_t *zone, dns_ttl_t maxttl) {
dns_rdataset_t rdataset; dns_rdataset_t rdataset;
dns_fixedname_t fname; dns_fixedname_t fname;
dns_name_t *name; dns_name_t *name;
name = dns_fixedname_initname(&fname); dns_fixedname_init(&fname);
name = dns_fixedname_name(&fname);
dns_rdataset_init(&rdataset); dns_rdataset_init(&rdataset);
CHECK(dns_zone_getdb(zone, &db)); CHECK(dns_zone_getdb(zone, &db));
@@ -626,7 +650,7 @@ check_ttls(dns_zone_t *zone, dns_ttl_t maxttl) {
if (dbiter != NULL) if (dbiter != NULL)
dns_dbiterator_destroy(&dbiter); dns_dbiterator_destroy(&dbiter);
if (version != NULL) if (version != NULL)
dns_db_closeversion(db, &version, false); dns_db_closeversion(db, &version, ISC_FALSE);
if (db != NULL) if (db != NULL)
dns_db_detach(&db); dns_db_detach(&db);
@@ -659,12 +683,12 @@ load_zone(isc_mem_t *mctx, const char *zonename, const char *filename,
isc_buffer_constinit(&buffer, zonename, strlen(zonename)); isc_buffer_constinit(&buffer, zonename, strlen(zonename));
isc_buffer_add(&buffer, strlen(zonename)); isc_buffer_add(&buffer, strlen(zonename));
origin = dns_fixedname_initname(&fixorigin); dns_fixedname_init(&fixorigin);
origin = dns_fixedname_name(&fixorigin);
CHECK(dns_name_fromtext(origin, &buffer, dns_rootname, 0, NULL)); CHECK(dns_name_fromtext(origin, &buffer, dns_rootname, 0, NULL));
CHECK(dns_zone_setorigin(zone, origin)); CHECK(dns_zone_setorigin(zone, origin));
dns_zone_setdbtype(zone, 1, (const char * const *) dbtype); CHECK(dns_zone_setdbtype(zone, 1, (const char * const *) dbtype));
CHECK(dns_zone_setfile(zone, filename, fileformat, CHECK(dns_zone_setfile2(zone, filename, fileformat));
&dns_master_style_default));
if (journal != NULL) if (journal != NULL)
CHECK(dns_zone_setjournal(zone, journal)); CHECK(dns_zone_setjournal(zone, journal));
@@ -673,7 +697,8 @@ load_zone(isc_mem_t *mctx, const char *zonename, const char *filename,
CHECK(dns_rdataclass_fromtext(&rdclass, &region)); CHECK(dns_rdataclass_fromtext(&rdclass, &region));
dns_zone_setclass(zone, rdclass); dns_zone_setclass(zone, rdclass);
dns_zone_setoption(zone, zone_options, true); dns_zone_setoption(zone, zone_options, ISC_TRUE);
dns_zone_setoption2(zone, zone_options2, ISC_TRUE);
dns_zone_setoption(zone, DNS_ZONEOPT_NOMERGE, nomerge); dns_zone_setoption(zone, DNS_ZONEOPT_NOMERGE, nomerge);
dns_zone_setmaxttl(zone, maxttl); dns_zone_setmaxttl(zone, maxttl);
@@ -685,7 +710,7 @@ load_zone(isc_mem_t *mctx, const char *zonename, const char *filename,
if (dochecksrv) if (dochecksrv)
dns_zone_setchecksrv(zone, checksrv); 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 * When loading map files we can't catch oversize TTLs during
@@ -710,13 +735,13 @@ load_zone(isc_mem_t *mctx, const char *zonename, const char *filename,
isc_result_t isc_result_t
dump_zone(const char *zonename, dns_zone_t *zone, const char *filename, dump_zone(const char *zonename, dns_zone_t *zone, const char *filename,
dns_masterformat_t fileformat, const dns_master_style_t *style, dns_masterformat_t fileformat, const dns_master_style_t *style,
const uint32_t rawversion) const isc_uint32_t rawversion)
{ {
isc_result_t result; isc_result_t result;
FILE *output = stdout; FILE *output = stdout;
const char *flags; const char *flags;
flags = (fileformat == dns_masterformat_text) ? "w" : "wb"; flags = (fileformat == dns_masterformat_text) ? "w+" : "wb+";
if (debug) { if (debug) {
if (filename != NULL && strcmp(filename, "-") != 0) if (filename != NULL && strcmp(filename, "-") != 0)
@@ -736,7 +761,7 @@ dump_zone(const char *zonename, dns_zone_t *zone, const char *filename,
} }
} }
result = dns_zone_dumptostream(zone, output, fileformat, style, result = dns_zone_dumptostream3(zone, output, fileformat, style,
rawversion); rawversion);
if (output != stdout) if (output != stdout)
(void)isc_stdio_close(output); (void)isc_stdio_close(output);
@@ -765,3 +790,4 @@ DestroySockets(void) {
WSACleanup(); WSACleanup();
} }
#endif #endif
+9 -14
View File
@@ -1,30 +1,24 @@
/* /*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2000-2002, 2004, 2005, 2007, 2010, 2011, 2013, 2014, 2016 Internet Systems Consortium, Inc. ("ISC")
* *
* This Source Code Form is subject to the terms of the Mozilla Public * 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 * 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/. * 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.
*/ */
/* $Id: check-tool.h,v 1.18 2011/12/09 23:47:02 tbox Exp $ */
#ifndef CHECK_TOOL_H #ifndef CHECK_TOOL_H
#define CHECK_TOOL_H #define CHECK_TOOL_H
/*! \file */ /*! \file */
#include <inttypes.h>
#include <stdbool.h>
#include <isc/lang.h> #include <isc/lang.h>
#include <isc/stdio.h> #include <isc/stdio.h>
#include <isc/types.h> #include <isc/types.h>
#include <dns/masterdump.h> #include <dns/masterdump.h>
#include <dns/types.h> #include <dns/types.h>
#include <dns/zone.h>
ISC_LANG_BEGINDECLS ISC_LANG_BEGINDECLS
@@ -39,7 +33,7 @@ load_zone(isc_mem_t *mctx, const char *zonename, const char *filename,
isc_result_t isc_result_t
dump_zone(const char *zonename, dns_zone_t *zone, const char *filename, dump_zone(const char *zonename, dns_zone_t *zone, const char *filename,
dns_masterformat_t fileformat, const dns_master_style_t *style, dns_masterformat_t fileformat, const dns_master_style_t *style,
const uint32_t rawversion); const isc_uint32_t rawversion);
#ifdef _WIN32 #ifdef _WIN32
void InitSockets(void); void InitSockets(void);
@@ -48,11 +42,12 @@ void DestroySockets(void);
extern int debug; extern int debug;
extern const char *journal; extern const char *journal;
extern bool nomerge; extern isc_boolean_t nomerge;
extern bool docheckmx; extern isc_boolean_t docheckmx;
extern bool docheckns; extern isc_boolean_t docheckns;
extern bool dochecksrv; extern isc_boolean_t dochecksrv;
extern dns_zoneopt_t zone_options; extern unsigned int zone_options;
extern unsigned int zone_options2;
ISC_LANG_ENDDECLS ISC_LANG_ENDDECLS
+3 -15
View File
@@ -1,4 +1,4 @@
.\" Copyright (C) 2000-2002, 2004, 2005, 2007, 2009, 2014-2016, 2018-2020 Internet Systems Consortium, Inc. ("ISC") .\" Copyright (C) 2000-2002, 2004, 2005, 2007, 2009, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
.\" .\"
.\" This Source Code Form is subject to the terms of the Mozilla Public .\" 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 .\" License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -39,7 +39,7 @@
named-checkconf \- named configuration file syntax checking tool named-checkconf \- named configuration file syntax checking tool
.SH "SYNOPSIS" .SH "SYNOPSIS"
.HP \w'\fBnamed\-checkconf\fR\ 'u .HP \w'\fBnamed\-checkconf\fR\ 'u
\fBnamed\-checkconf\fR [\fB\-chjlvz\fR] [\fB\-p\fR\ [\fB\-x\fR\ ]] [\fB\-t\ \fR\fB\fIdirectory\fR\fR] {filename} \fBnamed\-checkconf\fR [\fB\-hjlvz\fR] [\fB\-p\fR\ [\fB\-x\fR\ ]] [\fB\-t\ \fR\fB\fIdirectory\fR\fR] {filename}
.SH "DESCRIPTION" .SH "DESCRIPTION"
.PP .PP
\fBnamed\-checkconf\fR \fBnamed\-checkconf\fR
@@ -79,18 +79,6 @@ When loading a zonefile read the journal if it exists\&.
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)\&. 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 .RE
.PP .PP
\-c
.RS 4
Check "core" configuration only\&. This suppresses the loading of plugin modules, and causes all parameters to
\fBplugin\fR
statements to be ignored\&.
.RE
.PP
\-i
.RS 4
Ignore warnings on deprecated options\&.
.RE
.PP
\-p \-p
.RS 4 .RS 4
Print out the Print out the
@@ -148,5 +136,5 @@ BIND 9 Administrator Reference Manual\&.
\fBInternet Systems Consortium, Inc\&.\fR \fBInternet Systems Consortium, Inc\&.\fR
.SH "COPYRIGHT" .SH "COPYRIGHT"
.br .br
Copyright \(co 2000-2002, 2004, 2005, 2007, 2009, 2014-2016, 2018-2020 Internet Systems Consortium, Inc. ("ISC") Copyright \(co 2000-2002, 2004, 2005, 2007, 2009, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
.br .br
+57 -87
View File
@@ -1,24 +1,24 @@
/* /*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1999-2002, 2004-2007, 2009-2016 Internet Systems Consortium, Inc. ("ISC")
* *
* This Source Code Form is subject to the terms of the Mozilla Public * 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 * 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/. * 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.
*/ */
/* $Id: named-checkconf.c,v 1.56 2011/03/12 04:59:46 tbox Exp $ */
/*! \file */ /*! \file */
#include <config.h>
#include <errno.h> #include <errno.h>
#include <stdbool.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <isc/commandline.h> #include <isc/commandline.h>
#include <isc/dir.h> #include <isc/dir.h>
#include <isc/entropy.h>
#include <isc/hash.h> #include <isc/hash.h>
#include <isc/log.h> #include <isc/log.h>
#include <isc/mem.h> #include <isc/mem.h>
@@ -28,7 +28,6 @@
#include <isc/util.h> #include <isc/util.h>
#include <isccfg/namedconf.h> #include <isccfg/namedconf.h>
#include <isccfg/grammar.h>
#include <bind9/check.h> #include <bind9/check.h>
@@ -45,8 +44,6 @@
static const char *program = "named-checkconf"; static const char *program = "named-checkconf";
static bool loadplugins = true;
isc_log_t *logc = NULL; isc_log_t *logc = NULL;
#define CHECK(r)\ #define CHECK(r)\
@@ -62,7 +59,7 @@ usage(void) ISC_PLATFORM_NORETURN_POST;
static void static void
usage(void) { usage(void) {
fprintf(stderr, "usage: %s [-chijlvz] [-p [-x]] [-t directory] " fprintf(stderr, "usage: %s [-hjlvz] [-p [-x]] [-t directory] "
"[named.conf]\n", program); "[named.conf]\n", program);
exit(1); exit(1);
} }
@@ -93,18 +90,18 @@ directory_callback(const char *clausename, const cfg_obj_t *obj, void *arg) {
return (ISC_R_SUCCESS); 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) { get_maps(const cfg_obj_t **maps, const char *name, const cfg_obj_t **obj) {
int i; int i;
for (i = 0;; i++) { for (i = 0;; i++) {
if (maps[i] == NULL) if (maps[i] == NULL)
return (false); return (ISC_FALSE);
if (cfg_map_get(maps[i], name, obj) == ISC_R_SUCCESS) if (cfg_map_get(maps[i], name, obj) == ISC_R_SUCCESS)
return (true); return (ISC_TRUE);
} }
} }
static bool static isc_boolean_t
get_checknames(const cfg_obj_t **maps, const cfg_obj_t **obj) { get_checknames(const cfg_obj_t **maps, const cfg_obj_t **obj) {
const cfg_listelt_t *element; const cfg_listelt_t *element;
const cfg_obj_t *checknames; const cfg_obj_t *checknames;
@@ -115,29 +112,24 @@ get_checknames(const cfg_obj_t **maps, const cfg_obj_t **obj) {
for (i = 0;; i++) { for (i = 0;; i++) {
if (maps[i] == NULL) if (maps[i] == NULL)
return (false); return (ISC_FALSE);
checknames = NULL; checknames = NULL;
result = cfg_map_get(maps[i], "check-names", &checknames); result = cfg_map_get(maps[i], "check-names", &checknames);
if (result != ISC_R_SUCCESS) if (result != ISC_R_SUCCESS)
continue; continue;
if (checknames != NULL && !cfg_obj_islist(checknames)) { if (checknames != NULL && !cfg_obj_islist(checknames)) {
*obj = checknames; *obj = checknames;
return (true); return (ISC_TRUE);
} }
for (element = cfg_list_first(checknames); for (element = cfg_list_first(checknames);
element != NULL; element != NULL;
element = cfg_list_next(element)) { element = cfg_list_next(element)) {
value = cfg_listelt_value(element); value = cfg_listelt_value(element);
type = cfg_tuple_get(value, "type"); type = cfg_tuple_get(value, "type");
if ((strcasecmp(cfg_obj_asstring(type), if (strcasecmp(cfg_obj_asstring(type), "master") != 0)
"primary") != 0) &&
(strcasecmp(cfg_obj_asstring(type),
"master") != 0))
{
continue; continue;
}
*obj = cfg_tuple_get(value, "mode"); *obj = cfg_tuple_get(value, "mode");
return (true); return (ISC_TRUE);
} }
} }
} }
@@ -170,7 +162,7 @@ configure_hint(const char *zfile, const char *zclass, isc_mem_t *mctx) {
static isc_result_t static isc_result_t
configure_zone(const char *vclass, const char *view, configure_zone(const char *vclass, const char *view,
const cfg_obj_t *zconfig, const cfg_obj_t *vconfig, const cfg_obj_t *zconfig, const cfg_obj_t *vconfig,
const cfg_obj_t *config, isc_mem_t *mctx, bool list) const cfg_obj_t *config, isc_mem_t *mctx, isc_boolean_t list)
{ {
int i = 0; int i = 0;
isc_result_t result; isc_result_t result;
@@ -251,14 +243,11 @@ configure_zone(const char *vclass, const char *view,
* Skip loading checks for any type other than * Skip loading checks for any type other than
* master and redirect * master and redirect
*/ */
if (strcasecmp(cfg_obj_asstring(typeobj), "hint") == 0) { if (strcasecmp(cfg_obj_asstring(typeobj), "hint") == 0)
return (configure_hint(zfile, zclass, mctx)); return (configure_hint(zfile, zclass, mctx));
} else if ((strcasecmp(cfg_obj_asstring(typeobj), "primary") != 0) && else if ((strcasecmp(cfg_obj_asstring(typeobj), "master") != 0) &&
(strcasecmp(cfg_obj_asstring(typeobj), "master") != 0) &&
(strcasecmp(cfg_obj_asstring(typeobj), "redirect") != 0)) (strcasecmp(cfg_obj_asstring(typeobj), "redirect") != 0))
{
return (ISC_R_SUCCESS); return (ISC_R_SUCCESS);
}
/* /*
* Is the redirect zone configured as a slave? * Is the redirect zone configured as a slave?
@@ -283,10 +272,8 @@ configure_zone(const char *vclass, const char *view,
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) { } else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
zone_options &= ~DNS_ZONEOPT_CHECKDUPRR; zone_options &= ~DNS_ZONEOPT_CHECKDUPRR;
zone_options &= ~DNS_ZONEOPT_CHECKDUPRRFAIL; zone_options &= ~DNS_ZONEOPT_CHECKDUPRRFAIL;
} else { } else
INSIST(0); INSIST(0);
ISC_UNREACHABLE();
}
} else { } else {
zone_options |= DNS_ZONEOPT_CHECKDUPRR; zone_options |= DNS_ZONEOPT_CHECKDUPRR;
zone_options &= ~DNS_ZONEOPT_CHECKDUPRRFAIL; zone_options &= ~DNS_ZONEOPT_CHECKDUPRRFAIL;
@@ -303,10 +290,8 @@ configure_zone(const char *vclass, const char *view,
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) { } else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
zone_options &= ~DNS_ZONEOPT_CHECKMX; zone_options &= ~DNS_ZONEOPT_CHECKMX;
zone_options &= ~DNS_ZONEOPT_CHECKMXFAIL; zone_options &= ~DNS_ZONEOPT_CHECKMXFAIL;
} else { } else
INSIST(0); INSIST(0);
ISC_UNREACHABLE();
}
} else { } else {
zone_options |= DNS_ZONEOPT_CHECKMX; zone_options |= DNS_ZONEOPT_CHECKMX;
zone_options &= ~DNS_ZONEOPT_CHECKMXFAIL; zone_options &= ~DNS_ZONEOPT_CHECKMXFAIL;
@@ -332,10 +317,8 @@ configure_zone(const char *vclass, const char *view,
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) { } else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
zone_options |= DNS_ZONEOPT_WARNMXCNAME; zone_options |= DNS_ZONEOPT_WARNMXCNAME;
zone_options |= DNS_ZONEOPT_IGNOREMXCNAME; zone_options |= DNS_ZONEOPT_IGNOREMXCNAME;
} else { } else
INSIST(0); INSIST(0);
ISC_UNREACHABLE();
}
} else { } else {
zone_options |= DNS_ZONEOPT_WARNMXCNAME; zone_options |= DNS_ZONEOPT_WARNMXCNAME;
zone_options &= ~DNS_ZONEOPT_IGNOREMXCNAME; zone_options &= ~DNS_ZONEOPT_IGNOREMXCNAME;
@@ -352,10 +335,8 @@ configure_zone(const char *vclass, const char *view,
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) { } else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
zone_options |= DNS_ZONEOPT_WARNSRVCNAME; zone_options |= DNS_ZONEOPT_WARNSRVCNAME;
zone_options |= DNS_ZONEOPT_IGNORESRVCNAME; zone_options |= DNS_ZONEOPT_IGNORESRVCNAME;
} else { } else
INSIST(0); INSIST(0);
ISC_UNREACHABLE();
}
} else { } else {
zone_options |= DNS_ZONEOPT_WARNSRVCNAME; zone_options |= DNS_ZONEOPT_WARNSRVCNAME;
zone_options &= ~DNS_ZONEOPT_IGNORESRVCNAME; zone_options &= ~DNS_ZONEOPT_IGNORESRVCNAME;
@@ -375,10 +356,8 @@ configure_zone(const char *vclass, const char *view,
zone_options |= DNS_ZONEOPT_CHECKSPF; zone_options |= DNS_ZONEOPT_CHECKSPF;
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) { } else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
zone_options &= ~DNS_ZONEOPT_CHECKSPF; zone_options &= ~DNS_ZONEOPT_CHECKSPF;
} else { } else
INSIST(0); INSIST(0);
ISC_UNREACHABLE();
}
} else { } else {
zone_options |= DNS_ZONEOPT_CHECKSPF; zone_options |= DNS_ZONEOPT_CHECKSPF;
} }
@@ -394,10 +373,8 @@ configure_zone(const char *vclass, const char *view,
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) { } else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
zone_options &= ~DNS_ZONEOPT_CHECKNAMES; zone_options &= ~DNS_ZONEOPT_CHECKNAMES;
zone_options &= ~DNS_ZONEOPT_CHECKNAMESFAIL; zone_options &= ~DNS_ZONEOPT_CHECKNAMESFAIL;
} else { } else
INSIST(0); INSIST(0);
ISC_UNREACHABLE();
}
} else { } else {
zone_options |= DNS_ZONEOPT_CHECKNAMES; zone_options |= DNS_ZONEOPT_CHECKNAMES;
zone_options |= DNS_ZONEOPT_CHECKNAMESFAIL; zone_options |= DNS_ZONEOPT_CHECKNAMESFAIL;
@@ -407,22 +384,20 @@ configure_zone(const char *vclass, const char *view,
fmtobj = NULL; fmtobj = NULL;
if (get_maps(maps, "masterfile-format", &fmtobj)) { if (get_maps(maps, "masterfile-format", &fmtobj)) {
const char *masterformatstr = cfg_obj_asstring(fmtobj); const char *masterformatstr = cfg_obj_asstring(fmtobj);
if (strcasecmp(masterformatstr, "text") == 0) { if (strcasecmp(masterformatstr, "text") == 0)
masterformat = dns_masterformat_text; masterformat = dns_masterformat_text;
} else if (strcasecmp(masterformatstr, "raw") == 0) { else if (strcasecmp(masterformatstr, "raw") == 0)
masterformat = dns_masterformat_raw; masterformat = dns_masterformat_raw;
} else if (strcasecmp(masterformatstr, "map") == 0) { else if (strcasecmp(masterformatstr, "map") == 0)
masterformat = dns_masterformat_map; masterformat = dns_masterformat_map;
} else { else
INSIST(0); INSIST(0);
ISC_UNREACHABLE();
}
} }
obj = NULL; obj = NULL;
if (get_maps(maps, "max-zone-ttl", &obj)) { if (get_maps(maps, "max-zone-ttl", &obj)) {
maxttl = cfg_obj_asduration(obj); maxttl = cfg_obj_asuint32(obj);
zone_options |= DNS_ZONEOPT_CHECKTTL; zone_options2 |= DNS_ZONEOPT2_CHECKTTL;
} }
result = load_zone(mctx, zname, zfile, masterformat, result = load_zone(mctx, zname, zfile, masterformat,
@@ -436,7 +411,7 @@ configure_zone(const char *vclass, const char *view,
/*% configure a view */ /*% configure a view */
static isc_result_t static isc_result_t
configure_view(const char *vclass, const char *view, const cfg_obj_t *config, 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_listelt_t *element;
const cfg_obj_t *voptions; const cfg_obj_t *voptions;
@@ -485,7 +460,7 @@ config_getclass(const cfg_obj_t *classobj, dns_rdataclass_t defclass,
/*% load zones from the configuration */ /*% load zones from the configuration */
static isc_result_t static isc_result_t
load_zones_fromconfig(const cfg_obj_t *config, isc_mem_t *mctx, 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_listelt_t *element;
const cfg_obj_t *views; const cfg_obj_t *views;
@@ -553,18 +528,18 @@ main(int argc, char **argv) {
isc_mem_t *mctx = NULL; isc_mem_t *mctx = NULL;
isc_result_t result; isc_result_t result;
int exit_status = 0; int exit_status = 0;
bool load_zones = false; isc_entropy_t *ectx = NULL;
bool list_zones = false; isc_boolean_t load_zones = ISC_FALSE;
bool print = false; isc_boolean_t list_zones = ISC_FALSE;
bool nodeprecate = false; isc_boolean_t print = ISC_FALSE;
unsigned int flags = 0; unsigned int flags = 0;
isc_commandline_errprint = false; isc_commandline_errprint = ISC_FALSE;
/* /*
* Process memory debugging argument first. * 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) { while ((c = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != -1) {
switch (c) { switch (c) {
case 'm': case 'm':
@@ -583,30 +558,22 @@ main(int argc, char **argv) {
break; 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) { while ((c = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != EOF) {
switch (c) { switch (c) {
case 'c':
loadplugins = false;
break;
case 'd': case 'd':
debug++; debug++;
break; break;
case 'i':
nodeprecate = true;
break;
case 'j': case 'j':
nomerge = false; nomerge = ISC_FALSE;
break; break;
case 'l': case 'l':
list_zones = true; list_zones = ISC_TRUE;
break; break;
case 'm': case 'm':
@@ -622,7 +589,7 @@ main(int argc, char **argv) {
break; break;
case 'p': case 'p':
print = true; print = ISC_TRUE;
break; break;
case 'v': case 'v':
@@ -634,10 +601,10 @@ main(int argc, char **argv) {
break; break;
case 'z': case 'z':
load_zones = true; load_zones = ISC_TRUE;
docheckmx = false; docheckmx = ISC_FALSE;
docheckns = false; docheckns = ISC_FALSE;
dochecksrv = false; dochecksrv = ISC_FALSE;
break; break;
case '?': case '?':
@@ -677,25 +644,23 @@ main(int argc, char **argv) {
RUNTIME_CHECK(setup_logging(mctx, stdout, &logc) == ISC_R_SUCCESS); RUNTIME_CHECK(setup_logging(mctx, stdout, &logc) == ISC_R_SUCCESS);
RUNTIME_CHECK(isc_entropy_create(mctx, &ectx) == ISC_R_SUCCESS);
RUNTIME_CHECK(isc_hash_create(mctx, ectx, DNS_NAME_MAXWIRE)
== ISC_R_SUCCESS);
dns_result_register(); dns_result_register();
RUNTIME_CHECK(cfg_parser_create(mctx, logc, &parser) == ISC_R_SUCCESS); 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); cfg_parser_setcallback(parser, directory_callback, NULL);
if (cfg_parse_file(parser, conffile, &cfg_type_namedconf, &config) != if (cfg_parse_file(parser, conffile, &cfg_type_namedconf, &config) !=
ISC_R_SUCCESS) ISC_R_SUCCESS)
{
exit(1); exit(1);
}
result = bind9_check_namedconf(config, loadplugins, logc, mctx); result = bind9_check_namedconf(config, logc, mctx);
if (result != ISC_R_SUCCESS) { if (result != ISC_R_SUCCESS)
exit_status = 1; exit_status = 1;
}
if (result == ISC_R_SUCCESS && (load_zones || list_zones)) { if (result == ISC_R_SUCCESS && (load_zones || list_zones)) {
result = load_zones_fromconfig(config, mctx, list_zones); result = load_zones_fromconfig(config, mctx, list_zones);
@@ -709,8 +674,13 @@ main(int argc, char **argv) {
cfg_parser_destroy(&parser); cfg_parser_destroy(&parser);
dns_name_destroy();
isc_log_destroy(&logc); isc_log_destroy(&logc);
isc_hash_destroy();
isc_entropy_detach(&ectx);
isc_mem_destroy(&mctx); isc_mem_destroy(&mctx);
#ifdef _WIN32 #ifdef _WIN32
+2 -28
View File
@@ -1,14 +1,11 @@
<!DOCTYPE book [ <!DOCTYPE book [
<!ENTITY mdash "&#8212;">]> <!ENTITY mdash "&#8212;">]>
<!-- <!--
- Copyright (C) Internet Systems Consortium, Inc. ("ISC") - Copyright (C) 2000-2002, 2004, 2005, 2007, 2009, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
- -
- This Source Code Form is subject to the terms of the Mozilla Public - 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 - 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/. - 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 --> <!-- Converted by db4-upgrade version 1.0 -->
@@ -39,9 +36,6 @@
<year>2014</year> <year>2014</year>
<year>2015</year> <year>2015</year>
<year>2016</year> <year>2016</year>
<year>2018</year>
<year>2019</year>
<year>2020</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder> <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright> </copyright>
</docinfo> </docinfo>
@@ -54,7 +48,7 @@
<refsynopsisdiv> <refsynopsisdiv>
<cmdsynopsis sepchar=" "> <cmdsynopsis sepchar=" ">
<command>named-checkconf</command> <command>named-checkconf</command>
<arg choice="opt" rep="norepeat"><option>-chjlvz</option></arg> <arg choice="opt" rep="norepeat"><option>-hjlvz</option></arg>
<arg choice="opt" rep="norepeat"><option>-p</option> <arg choice="opt" rep="norepeat"><option>-p</option>
<arg choice="opt" rep="norepeat"><option>-x</option> <arg choice="opt" rep="norepeat"><option>-x</option>
</arg></arg> </arg></arg>
@@ -116,26 +110,6 @@
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term>-c</term>
<listitem>
<para>
Check "core" configuration only. This suppresses the loading
of plugin modules, and causes all parameters to
<command>plugin</command> statements to be ignored.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-i</term>
<listitem>
<para>
Ignore warnings on deprecated options.
</para>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term>-p</term> <term>-p</term>
<listitem> <listitem>
+2 -16
View File
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!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-2020 Internet Systems Consortium, Inc. ("ISC") - Copyright (C) 2000-2002, 2004, 2005, 2007, 2009, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
- -
- This Source Code Form is subject to the terms of the Mozilla Public - 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 - License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -33,7 +33,7 @@
<h2>Synopsis</h2> <h2>Synopsis</h2>
<div class="cmdsynopsis"><p> <div class="cmdsynopsis"><p>
<code class="command">named-checkconf</code> <code class="command">named-checkconf</code>
[<code class="option">-chjlvz</code>] [<code class="option">-hjlvz</code>]
[<code class="option">-p</code> [<code class="option">-p</code>
[<code class="option">-x</code> [<code class="option">-x</code>
]] ]]
@@ -88,20 +88,6 @@
(e.g. master or slave). (e.g. master or slave).
</p> </p>
</dd> </dd>
<dt><span class="term">-c</span></dt>
<dd>
<p>
Check "core" configuration only. This suppresses the loading
of plugin modules, and causes all parameters to
<span class="command"><strong>plugin</strong></span> statements to be ignored.
</p>
</dd>
<dt><span class="term">-i</span></dt>
<dd>
<p>
Ignore warnings on deprecated options.
</p>
</dd>
<dt><span class="term">-p</span></dt> <dt><span class="term">-p</span></dt>
<dd> <dd>
<p> <p>
+2 -2
View File
@@ -1,4 +1,4 @@
.\" Copyright (C) 2000-2002, 2004-2007, 2009-2016, 2018-2020 Internet Systems Consortium, Inc. ("ISC") .\" Copyright (C) 2000-2002, 2004-2007, 2009-2016 Internet Systems Consortium, Inc. ("ISC")
.\" .\"
.\" This Source Code Form is subject to the terms of the Mozilla Public .\" 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 .\" License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -325,5 +325,5 @@ BIND 9 Administrator Reference Manual\&.
\fBInternet Systems Consortium, Inc\&.\fR \fBInternet Systems Consortium, Inc\&.\fR
.SH "COPYRIGHT" .SH "COPYRIGHT"
.br .br
Copyright \(co 2000-2002, 2004-2007, 2009-2016, 2018-2020 Internet Systems Consortium, Inc. ("ISC") Copyright \(co 2000-2002, 2004-2007, 2009-2016 Internet Systems Consortium, Inc. ("ISC")
.br .br
+41 -38
View File
@@ -1,24 +1,23 @@
/* /*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1999-2016 Internet Systems Consortium, Inc. ("ISC")
* *
* This Source Code Form is subject to the terms of the Mozilla Public * 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 * 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/. * 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.
*/ */
/* $Id: named-checkzone.c,v 1.65.32.2 2012/02/07 02:45:21 each Exp $ */
/*! \file */ /*! \file */
#include <stdbool.h> #include <config.h>
#include <stdlib.h> #include <stdlib.h>
#include <inttypes.h>
#include <isc/app.h> #include <isc/app.h>
#include <isc/commandline.h> #include <isc/commandline.h>
#include <isc/dir.h> #include <isc/dir.h>
#include <isc/entropy.h>
#include <isc/hash.h> #include <isc/hash.h>
#include <isc/log.h> #include <isc/log.h>
#include <isc/mem.h> #include <isc/mem.h>
@@ -45,6 +44,7 @@
static int quiet = 0; static int quiet = 0;
static isc_mem_t *mctx = NULL; static isc_mem_t *mctx = NULL;
static isc_entropy_t *ectx = NULL;
dns_zone_t *zone = NULL; dns_zone_t *zone = NULL;
dns_zonetype_t zonetype = dns_zone_master; dns_zonetype_t zonetype = dns_zone_master;
static int dumpzone = 0; static int dumpzone = 0;
@@ -85,9 +85,9 @@ usage(void) {
static void static void
destroy(void) { destroy(void) {
if (zone != NULL) { if (zone != NULL)
dns_zone_detach(&zone); dns_zone_detach(&zone);
} dns_name_destroy();
} }
/*% main processing routine */ /*% main processing routine */
@@ -106,10 +106,10 @@ main(int argc, char **argv) {
dns_masterformat_t inputformat = dns_masterformat_text; dns_masterformat_t inputformat = dns_masterformat_text;
dns_masterformat_t outputformat = dns_masterformat_text; dns_masterformat_t outputformat = dns_masterformat_text;
dns_masterrawheader_t header; dns_masterrawheader_t header;
uint32_t rawversion = 1, serialnum = 0; isc_uint32_t rawversion = 1, serialnum = 0;
dns_ttl_t maxttl = 0; dns_ttl_t maxttl = 0;
bool snset = false; isc_boolean_t snset = ISC_FALSE;
bool logdump = false; isc_boolean_t logdump = ISC_FALSE;
FILE *errout = stdout; FILE *errout = stdout;
char *endp; char *endp;
@@ -137,14 +137,12 @@ main(int argc, char **argv) {
#define PROGCMP(X) \ #define PROGCMP(X) \
(strcasecmp(prog_name, X) == 0 || strcasecmp(prog_name, X ".exe") == 0) (strcasecmp(prog_name, X) == 0 || strcasecmp(prog_name, X ".exe") == 0)
if (PROGCMP("named-checkzone")) { if (PROGCMP("named-checkzone"))
progmode = progmode_check; progmode = progmode_check;
} else if (PROGCMP("named-compilezone")) { else if (PROGCMP("named-compilezone"))
progmode = progmode_compile; progmode = progmode_compile;
} else { else
INSIST(0); INSIST(0);
ISC_UNREACHABLE();
}
/* Compilation specific defaults */ /* Compilation specific defaults */
if (progmode == progmode_compile) { if (progmode == progmode_compile) {
@@ -161,7 +159,7 @@ main(int argc, char **argv) {
#define ARGCMP(X) (strcmp(isc_commandline_argument, X) == 0) #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, 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:")) "c:df:hi:jJ:k:L:l:m:n:qr:s:t:o:vw:DF:M:S:T:W:"))
@@ -179,33 +177,33 @@ main(int argc, char **argv) {
if (ARGCMP("full")) { if (ARGCMP("full")) {
zone_options |= DNS_ZONEOPT_CHECKINTEGRITY | zone_options |= DNS_ZONEOPT_CHECKINTEGRITY |
DNS_ZONEOPT_CHECKSIBLING; DNS_ZONEOPT_CHECKSIBLING;
docheckmx = true; docheckmx = ISC_TRUE;
docheckns = true; docheckns = ISC_TRUE;
dochecksrv = true; dochecksrv = ISC_TRUE;
} else if (ARGCMP("full-sibling")) { } else if (ARGCMP("full-sibling")) {
zone_options |= DNS_ZONEOPT_CHECKINTEGRITY; zone_options |= DNS_ZONEOPT_CHECKINTEGRITY;
zone_options &= ~DNS_ZONEOPT_CHECKSIBLING; zone_options &= ~DNS_ZONEOPT_CHECKSIBLING;
docheckmx = true; docheckmx = ISC_TRUE;
docheckns = true; docheckns = ISC_TRUE;
dochecksrv = true; dochecksrv = ISC_TRUE;
} else if (ARGCMP("local")) { } else if (ARGCMP("local")) {
zone_options |= DNS_ZONEOPT_CHECKINTEGRITY; zone_options |= DNS_ZONEOPT_CHECKINTEGRITY;
zone_options |= DNS_ZONEOPT_CHECKSIBLING; zone_options |= DNS_ZONEOPT_CHECKSIBLING;
docheckmx = false; docheckmx = ISC_FALSE;
docheckns = false; docheckns = ISC_FALSE;
dochecksrv = false; dochecksrv = ISC_FALSE;
} else if (ARGCMP("local-sibling")) { } else if (ARGCMP("local-sibling")) {
zone_options |= DNS_ZONEOPT_CHECKINTEGRITY; zone_options |= DNS_ZONEOPT_CHECKINTEGRITY;
zone_options &= ~DNS_ZONEOPT_CHECKSIBLING; zone_options &= ~DNS_ZONEOPT_CHECKSIBLING;
docheckmx = false; docheckmx = ISC_FALSE;
docheckns = false; docheckns = ISC_FALSE;
dochecksrv = false; dochecksrv = ISC_FALSE;
} else if (ARGCMP("none")) { } else if (ARGCMP("none")) {
zone_options &= ~DNS_ZONEOPT_CHECKINTEGRITY; zone_options &= ~DNS_ZONEOPT_CHECKINTEGRITY;
zone_options &= ~DNS_ZONEOPT_CHECKSIBLING; zone_options &= ~DNS_ZONEOPT_CHECKSIBLING;
docheckmx = false; docheckmx = ISC_FALSE;
docheckns = false; docheckns = ISC_FALSE;
dochecksrv = false; dochecksrv = ISC_FALSE;
} else { } else {
fprintf(stderr, "invalid argument to -i: %s\n", fprintf(stderr, "invalid argument to -i: %s\n",
isc_commandline_argument); isc_commandline_argument);
@@ -222,12 +220,12 @@ main(int argc, char **argv) {
break; break;
case 'j': case 'j':
nomerge = false; nomerge = ISC_FALSE;
break; break;
case 'J': case 'J':
journal = isc_commandline_argument; journal = isc_commandline_argument;
nomerge = false; nomerge = ISC_FALSE;
break; break;
case 'k': case 'k':
@@ -248,7 +246,7 @@ main(int argc, char **argv) {
break; break;
case 'L': case 'L':
snset = true; snset = ISC_TRUE;
endp = NULL; endp = NULL;
serialnum = strtol(isc_commandline_argument, &endp, 0); serialnum = strtol(isc_commandline_argument, &endp, 0);
if (*endp != '\0') { if (*endp != '\0') {
@@ -259,7 +257,7 @@ main(int argc, char **argv) {
break; break;
case 'l': case 'l':
zone_options |= DNS_ZONEOPT_CHECKTTL; zone_options2 |= DNS_ZONEOPT2_CHECKTTL;
endp = NULL; endp = NULL;
maxttl = strtol(isc_commandline_argument, &endp, 0); maxttl = strtol(isc_commandline_argument, &endp, 0);
if (*endp != '\0') { if (*endp != '\0') {
@@ -507,7 +505,7 @@ main(int argc, char **argv) {
strcmp(output_filename, "/dev/fd/1") == 0 || strcmp(output_filename, "/dev/fd/1") == 0 ||
strcmp(output_filename, "/dev/stdout") == 0)) { strcmp(output_filename, "/dev/stdout") == 0)) {
errout = stderr; errout = stderr;
logdump = false; logdump = ISC_FALSE;
} }
if (isc_commandline_index + 2 != argc) if (isc_commandline_index + 2 != argc)
@@ -517,10 +515,13 @@ main(int argc, char **argv) {
InitSockets(); InitSockets();
#endif #endif
isc_mem_create(&mctx); RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
if (!quiet) if (!quiet)
RUNTIME_CHECK(setup_logging(mctx, errout, &lctx) RUNTIME_CHECK(setup_logging(mctx, errout, &lctx)
== ISC_R_SUCCESS); == ISC_R_SUCCESS);
RUNTIME_CHECK(isc_entropy_create(mctx, &ectx) == ISC_R_SUCCESS);
RUNTIME_CHECK(isc_hash_create(mctx, ectx, DNS_NAME_MAXWIRE)
== ISC_R_SUCCESS);
dns_result_register(); dns_result_register();
@@ -552,6 +553,8 @@ main(int argc, char **argv) {
destroy(); destroy();
if (lctx != NULL) if (lctx != NULL)
isc_log_destroy(&lctx); isc_log_destroy(&lctx);
isc_hash_destroy();
isc_entropy_detach(&ectx);
isc_mem_destroy(&mctx); isc_mem_destroy(&mctx);
#ifdef _WIN32 #ifdef _WIN32
DestroySockets(); DestroySockets();
+1 -7
View File
@@ -1,12 +1,9 @@
<!-- <!--
- Copyright (C) Internet Systems Consortium, Inc. ("ISC") - Copyright (C) 2000-2002, 2004-2007, 2009-2016 Internet Systems Consortium, Inc. ("ISC")
- -
- This Source Code Form is subject to the terms of the Mozilla Public - 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 - 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/. - 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 --> <!-- Converted by db4-upgrade version 1.0 -->
@@ -42,9 +39,6 @@
<year>2014</year> <year>2014</year>
<year>2015</year> <year>2015</year>
<year>2016</year> <year>2016</year>
<year>2018</year>
<year>2019</year>
<year>2020</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder> <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright> </copyright>
</docinfo> </docinfo>
+1 -1
View File
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!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-2020 Internet Systems Consortium, Inc. ("ISC") - Copyright (C) 2000-2002, 2004-2007, 2009-2016 Internet Systems Consortium, Inc. ("ISC")
- -
- This Source Code Form is subject to the terms of the Mozilla Public - 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 - License, v. 2.0. If a copy of the MPL was not distributed with this
+5 -10
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?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"> <ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@"> <ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
@@ -14,21 +14,18 @@
<ProjectGuid>{03A96113-CB14-43AA-AEB2-48950E3915C5}</ProjectGuid> <ProjectGuid>{03A96113-CB14-43AA-AEB2-48950E3915C5}</ProjectGuid>
<Keyword>Win32Proj</Keyword> <Keyword>Win32Proj</Keyword>
<RootNamespace>checkconf</RootNamespace> <RootNamespace>checkconf</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings"> <ImportGroup Label="ExtensionSettings">
@@ -58,14 +55,13 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile> <PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation> <AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
<ObjectFileName>.\$(Configuration)\</ObjectFileName> <ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName> <ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<BrowseInformation>true</BrowseInformation> <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> <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> <CompileAs>CompileAsC</CompileAs>
</ClCompile> </ClCompile>
@@ -74,7 +70,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile> <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> <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> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
@@ -85,7 +81,7 @@
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions> <IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization> <WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
@@ -93,7 +89,6 @@
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation> <AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
<ObjectFileName>.\$(Configuration)\</ObjectFileName> <ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName> <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> <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> <CompileAs>CompileAsC</CompileAs>
</ClCompile> </ClCompile>
@@ -104,7 +99,7 @@
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile> <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> <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> <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
+3 -8
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?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"> <ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@"> <ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
@@ -17,21 +17,18 @@
<ProjectGuid>{2C1F7096-C5B5-48D4-846F-A7ACA454335D}</ProjectGuid> <ProjectGuid>{2C1F7096-C5B5-48D4-846F-A7ACA454335D}</ProjectGuid>
<Keyword>Win32Proj</Keyword> <Keyword>Win32Proj</Keyword>
<RootNamespace>checktool</RootNamespace> <RootNamespace>checktool</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType> <ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType> <ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings"> <ImportGroup Label="ExtensionSettings">
@@ -61,14 +58,13 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile> <PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation> <AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
<ObjectFileName>.\$(Configuration)\</ObjectFileName> <ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName> <ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<BrowseInformation>true</BrowseInformation> <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> <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> <CompileAs>CompileAsC</CompileAs>
</ClCompile> </ClCompile>
@@ -84,7 +80,7 @@
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions> <IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization> <WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
@@ -92,7 +88,6 @@
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation> <AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
<ObjectFileName>.\$(Configuration)\</ObjectFileName> <ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName> <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> <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> <CompileAs>CompileAsC</CompileAs>
</ClCompile> </ClCompile>
+9 -14
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?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"> <ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@"> <ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
@@ -14,21 +14,18 @@
<ProjectGuid>{66028555-7DD5-4016-B601-9EF9A1EE8BFA}</ProjectGuid> <ProjectGuid>{66028555-7DD5-4016-B601-9EF9A1EE8BFA}</ProjectGuid>
<Keyword>Win32Proj</Keyword> <Keyword>Win32Proj</Keyword>
<RootNamespace>checkzone</RootNamespace> <RootNamespace>checkzone</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings"> <ImportGroup Label="ExtensionSettings">
@@ -58,23 +55,22 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile> <PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation> <AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
<ObjectFileName>.\$(Configuration)\</ObjectFileName> <ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName> <ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<BrowseInformation>true</BrowseInformation> <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;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Console</SubSystem> <SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile> <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> <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>@OPENSSL_LIB@checktool.lib;libisc.lib;libdns.lib;libisccfg.lib;libns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>checktool.lib;libisc.lib;libdns.lib;libisccfg.lib;libbind9.lib;libns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
<PostBuildEvent> <PostBuildEvent>
<Command>cd ..\..\..\Build\$(Configuration) <Command>cd ..\..\..\Build\$(Configuration)
@@ -91,7 +87,7 @@ copy /Y named-checkzone.ilk named-compilezone.ilk
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions> <IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization> <WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
@@ -99,8 +95,7 @@ copy /Y named-checkzone.ilk named-compilezone.ilk
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation> <AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
<ObjectFileName>.\$(Configuration)\</ObjectFileName> <ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName> <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;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
</ClCompile> </ClCompile>
<Link> <Link>
@@ -109,8 +104,8 @@ copy /Y named-checkzone.ilk named-compilezone.ilk
<EnableCOMDATFolding>true</EnableCOMDATFolding> <EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile> <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> <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>@OPENSSL_LIB@checktool.lib;libisc.lib;libdns.lib;libisccfg.lib;libns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>checktool.lib;libisc.lib;libdns.lib;libisccfg.lib;libbind9.lib;libns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration> <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
</Link> </Link>
<PostBuildEvent> <PostBuildEvent>
+6 -13
View File
@@ -1,20 +1,13 @@
# Copyright (C) Internet Systems Consortium, Inc. ("ISC") # Copyright (C) 2009, 2012, 2014-2017 Internet Systems Consortium, Inc. ("ISC")
# #
# This Source Code Form is subject to the terms of the Mozilla Public # 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 # 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/. # 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@ srcdir = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
top_srcdir = @top_srcdir@ top_srcdir = @top_srcdir@
# Attempt to disable parallel processing.
.NOTPARALLEL:
.NO_PARALLEL:
VERSION=@BIND9_VERSION@ VERSION=@BIND9_VERSION@
@BIND9_MAKE_INCLUDES@ @BIND9_MAKE_INCLUDES@
@@ -27,9 +20,9 @@ CWARNINGS =
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@ ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
ISCCCLIBS = ../../lib/isccc/libisccc.@A@ ISCCCLIBS = ../../lib/isccc/libisccc.@A@
ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ISCLIBS = ../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @ISC_OPENSSL_LIBS@
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@ DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
BIND9LIBS = ../../lib/bind9/libbind9.@A@ BIND9LIBS = ../../lib/bind9/libbind9.@A@
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@ ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
@@ -71,11 +64,11 @@ rndc-confgen.@O@: rndc-confgen.c
ddns-confgen.@O@: ddns-confgen.c ddns-confgen.@O@: ddns-confgen.c
${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} -c ${srcdir}/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} rndc-confgen@EXEEXT@: rndc-confgen.@O@ util.@O@ keygen.@O@ ${UOBJS} ${CONFDEPLIBS}
export BASEOBJS="rndc-confgen.@O@ util.@O@ keygen.@O@ ${UOBJS}"; \ export BASEOBJS="rndc-confgen.@O@ util.@O@ keygen.@O@ ${UOBJS}"; \
${FINALBUILDCMD} ${FINALBUILDCMD}
ddns-confgen@EXEEXT@: ddns-confgen.@O@ util.@O@ keygen.@O@ ${CONFDEPLIBS} ddns-confgen@EXEEXT@: ddns-confgen.@O@ util.@O@ keygen.@O@ ${UOBJS} ${CONFDEPLIBS}
export BASEOBJS="ddns-confgen.@O@ util.@O@ keygen.@O@ ${UOBJS}"; \ export BASEOBJS="ddns-confgen.@O@ util.@O@ keygen.@O@ ${UOBJS}"; \
${FINALBUILDCMD} ${FINALBUILDCMD}
+14 -3
View File
@@ -1,4 +1,4 @@
.\" Copyright (C) 2009, 2014-2016, 2018-2020 Internet Systems Consortium, Inc. ("ISC") .\" Copyright (C) 2009, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
.\" .\"
.\" This Source Code Form is subject to the terms of the Mozilla Public .\" 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 .\" License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -39,7 +39,7 @@
ddns-confgen \- ddns key generation tool ddns-confgen \- ddns key generation tool
.SH "SYNOPSIS" .SH "SYNOPSIS"
.HP \w'\fBtsig\-keygen\fR\ 'u .HP \w'\fBtsig\-keygen\fR\ 'u
\fBtsig\-keygen\fR [\fB\-a\ \fR\fB\fIalgorithm\fR\fR] [\fB\-h\fR] [name] \fBtsig\-keygen\fR [\fB\-a\ \fR\fB\fIalgorithm\fR\fR] [\fB\-h\fR] [\fB\-r\ \fR\fB\fIrandomfile\fR\fR] [name]
.HP \w'\fBddns\-confgen\fR\ 'u .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] \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" .SH "DESCRIPTION"
@@ -109,6 +109,17 @@ only\&.) Quiet mode: Print only the key, with no explanatory text or usage examp
\fBtsig\-keygen\fR\&. \fBtsig\-keygen\fR\&.
.RE .RE
.PP .PP
\-r \fIrandomfile\fR
.RS 4
Specifies a source of random data for generating the authorization\&. If the operating system does not provide a
/dev/random
or equivalent device, the default source of randomness is keyboard input\&.
randomdev
specifies the name of a character device or file containing random data to be used instead of the default\&. The special value
keyboard
indicates that keyboard input should be used\&.
.RE
.PP
\-s \fIname\fR \-s \fIname\fR
.RS 4 .RS 4
(\fBddns\-confgen\fR (\fBddns\-confgen\fR
@@ -144,5 +155,5 @@ BIND 9 Administrator Reference Manual\&.
\fBInternet Systems Consortium, Inc\&.\fR \fBInternet Systems Consortium, Inc\&.\fR
.SH "COPYRIGHT" .SH "COPYRIGHT"
.br .br
Copyright \(co 2009, 2014-2016, 2018-2020 Internet Systems Consortium, Inc. ("ISC") Copyright \(co 2009, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
.br .br
+28 -25
View File
@@ -1,12 +1,9 @@
/* /*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2009, 2011, 2014, 2016 Internet Systems Consortium, Inc. ("ISC")
* *
* This Source Code Form is subject to the terms of the Mozilla Public * 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 * 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/. * 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 */ /*! \file */
@@ -17,15 +14,18 @@
* and the corresponding key and update-policy statements in named.conf. * and the corresponding key and update-policy statements in named.conf.
*/ */
#include <stdarg.h> #include <config.h>
#include <stdbool.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdarg.h>
#include <isc/assertions.h> #include <isc/assertions.h>
#include <isc/base64.h> #include <isc/base64.h>
#include <isc/buffer.h> #include <isc/buffer.h>
#include <isc/commandline.h> #include <isc/commandline.h>
#include <isc/entropy.h>
#include <isc/file.h> #include <isc/file.h>
#include <isc/keyboard.h>
#include <isc/mem.h> #include <isc/mem.h>
#include <isc/net.h> #include <isc/net.h>
#include <isc/print.h> #include <isc/print.h>
@@ -34,7 +34,7 @@
#include <isc/time.h> #include <isc/time.h>
#include <isc/util.h> #include <isc/util.h>
#if USE_PKCS11 #ifdef PKCS11CRYPTO
#include <pk11/result.h> #include <pk11/result.h>
#endif #endif
@@ -54,7 +54,7 @@
static char program[256]; static char program[256];
const char *progname; const char *progname;
static enum { progmode_keygen, progmode_confgen} progmode; static enum { progmode_keygen, progmode_confgen} progmode;
bool verbose = false; /* needed by util.c but not used here */ isc_boolean_t verbose = ISC_FALSE; /* needed by util.c but not used here */
ISC_PLATFORM_NORETURN_PRE static void ISC_PLATFORM_NORETURN_PRE static void
usage(int status) ISC_PLATFORM_NORETURN_POST; usage(int status) ISC_PLATFORM_NORETURN_POST;
@@ -64,9 +64,10 @@ usage(int status) {
if (progmode == progmode_confgen) { if (progmode == progmode_confgen) {
fprintf(stderr, "\ fprintf(stderr, "\
Usage:\n\ Usage:\n\
%s [-a alg] [-k keyname] [-q] [-s name | -z zone]\n\ %s [-a alg] [-k keyname] [-r randomfile] [-q] [-s name | -z zone]\n\
-a alg: algorithm (default hmac-sha256)\n\ -a alg: algorithm (default hmac-sha256)\n\
-k keyname: name of the key as it will be used in named.conf\n\ -k keyname: name of the key as it will be used in named.conf\n\
-r randomfile: source of random data (use \"keyboard\" for key timing)\n\
-s name: domain name to be updated using the created key\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\ -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", -q: quiet mode: print the key, with no explanatory text\n",
@@ -74,8 +75,9 @@ Usage:\n\
} else { } else {
fprintf(stderr, "\ fprintf(stderr, "\
Usage:\n\ Usage:\n\
%s [-a alg] [keyname]\n\ %s [-a alg] [-r randomfile] [keyname]\n\
-a alg: algorithm (default hmac-sha256)\n\n", -a alg: algorithm (default hmac-sha256)\n\
-r randomfile: source of random data (use \"keyboard\" for key timing)\n",
progname); progname);
} }
@@ -85,11 +87,12 @@ Usage:\n\
int int
main(int argc, char **argv) { main(int argc, char **argv) {
isc_result_t result = ISC_R_SUCCESS; isc_result_t result = ISC_R_SUCCESS;
bool show_final_mem = false; isc_boolean_t show_final_mem = ISC_FALSE;
bool quiet = false; isc_boolean_t quiet = ISC_FALSE;
isc_buffer_t key_txtbuffer; isc_buffer_t key_txtbuffer;
char key_txtsecret[256]; char key_txtsecret[256];
isc_mem_t *mctx = NULL; isc_mem_t *mctx = NULL;
const char *randomfile = NULL;
const char *keyname = NULL; const char *keyname = NULL;
const char *zone = NULL; const char *zone = NULL;
const char *self_domain = NULL; const char *self_domain = NULL;
@@ -100,7 +103,7 @@ main(int argc, char **argv) {
int len = 0; int len = 0;
int ch; int ch;
#if USE_PKCS11 #ifdef PKCS11CRYPTO
pk11_result_register(); pk11_result_register();
#endif #endif
dns_result_register(); dns_result_register();
@@ -122,15 +125,13 @@ main(int argc, char **argv) {
if (PROGCMP("tsig-keygen")) { if (PROGCMP("tsig-keygen")) {
progmode = progmode_keygen; progmode = progmode_keygen;
quiet = true; quiet = ISC_TRUE;
} else if (PROGCMP("ddns-confgen")) { } else if (PROGCMP("ddns-confgen"))
progmode = progmode_confgen; progmode = progmode_confgen;
} else { else
INSIST(0); INSIST(0);
ISC_UNREACHABLE();
}
isc_commandline_errprint = false; isc_commandline_errprint = ISC_FALSE;
while ((ch = isc_commandline_parse(argc, argv, while ((ch = isc_commandline_parse(argc, argv,
"a:hk:Mmr:qs:y:z:")) != -1) { "a:hk:Mmr:qs:y:z:")) != -1) {
@@ -155,16 +156,16 @@ main(int argc, char **argv) {
isc_mem_debugging = ISC_MEM_DEBUGTRACE; isc_mem_debugging = ISC_MEM_DEBUGTRACE;
break; break;
case 'm': case 'm':
show_final_mem = true; show_final_mem = ISC_TRUE;
break; break;
case 'q': case 'q':
if (progmode == progmode_confgen) if (progmode == progmode_confgen)
quiet = true; quiet = ISC_TRUE;
else else
usage(1); usage(1);
break; break;
case 'r': case 'r':
fatal("The -r option has been deprecated."); randomfile = isc_commandline_argument;
break; break;
case 's': case 's':
if (progmode == progmode_confgen) if (progmode == progmode_confgen)
@@ -207,7 +208,7 @@ main(int argc, char **argv) {
/* Use canonical algorithm name */ /* Use canonical algorithm name */
algname = alg_totext(alg); algname = alg_totext(alg);
isc_mem_create(&mctx); DO("create memory context", isc_mem_create(0, 0, &mctx));
if (keyname == NULL) { if (keyname == NULL) {
const char *suffix = NULL; const char *suffix = NULL;
@@ -222,6 +223,8 @@ main(int argc, char **argv) {
if (suffix != NULL) { if (suffix != NULL) {
len = strlen(keyname) + strlen(suffix) + 2; len = strlen(keyname) + strlen(suffix) + 2;
keybuf = isc_mem_get(mctx, len); keybuf = isc_mem_get(mctx, len);
if (keybuf == NULL)
fatal("failed to allocate memory for keyname");
snprintf(keybuf, len, "%s.%s", keyname, suffix); snprintf(keybuf, len, "%s.%s", keyname, suffix);
keyname = (const char *) keybuf; keyname = (const char *) keybuf;
} }
@@ -229,7 +232,7 @@ main(int argc, char **argv) {
isc_buffer_init(&key_txtbuffer, &key_txtsecret, sizeof(key_txtsecret)); isc_buffer_init(&key_txtbuffer, &key_txtsecret, sizeof(key_txtsecret));
generate_key(mctx, alg, keysize, &key_txtbuffer); generate_key(mctx, randomfile, alg, keysize, &key_txtbuffer);
if (!quiet) if (!quiet)
+19 -7
View File
@@ -1,12 +1,9 @@
<!-- <!--
- Copyright (C) Internet Systems Consortium, Inc. ("ISC") - Copyright (C) 2009, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
- -
- This Source Code Form is subject to the terms of the Mozilla Public - 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 - 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/. - 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 --> <!-- Converted by db4-upgrade version 1.0 -->
@@ -36,9 +33,6 @@
<year>2014</year> <year>2014</year>
<year>2015</year> <year>2015</year>
<year>2016</year> <year>2016</year>
<year>2018</year>
<year>2019</year>
<year>2020</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder> <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright> </copyright>
</docinfo> </docinfo>
@@ -48,6 +42,7 @@
<command>tsig-keygen</command> <command>tsig-keygen</command>
<arg choice="opt" rep="norepeat"><option>-a <replaceable class="parameter">algorithm</replaceable></option></arg> <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>-h</option></arg>
<arg choice="opt" rep="norepeat"><option>-r <replaceable class="parameter">randomfile</replaceable></option></arg>
<arg choice="opt" rep="norepeat">name</arg> <arg choice="opt" rep="norepeat">name</arg>
</cmdsynopsis> </cmdsynopsis>
<cmdsynopsis sepchar=" "> <cmdsynopsis sepchar=" ">
@@ -158,6 +153,23 @@
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term>-r <replaceable class="parameter">randomfile</replaceable></term>
<listitem>
<para>
Specifies a source of random data for generating the
authorization. If the operating system does not provide a
<filename>/dev/random</filename> or equivalent device, the
default source of randomness is keyboard input.
<filename>randomdev</filename> specifies the name of a
character device or file containing random data to be used
instead of the default. The special value
<filename>keyboard</filename> indicates that keyboard input
should be used.
</para>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term>-s <replaceable class="parameter">name</replaceable></term> <term>-s <replaceable class="parameter">name</replaceable></term>
<listitem> <listitem>
+16 -1
View File
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- <!--
- Copyright (C) 2009, 2014-2016, 2018-2020 Internet Systems Consortium, Inc. ("ISC") - Copyright (C) 2009, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
- -
- This Source Code Form is subject to the terms of the Mozilla Public - 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 - License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -35,6 +35,7 @@
<code class="command">tsig-keygen</code> <code class="command">tsig-keygen</code>
[<code class="option">-a <em class="replaceable"><code>algorithm</code></em></code>] [<code class="option">-a <em class="replaceable"><code>algorithm</code></em></code>]
[<code class="option">-h</code>] [<code class="option">-h</code>]
[<code class="option">-r <em class="replaceable"><code>randomfile</code></em></code>]
[name] [name]
</p></div> </p></div>
<div class="cmdsynopsis"><p> <div class="cmdsynopsis"><p>
@@ -135,6 +136,20 @@
This is essentially identical to <span class="command"><strong>tsig-keygen</strong></span>. This is essentially identical to <span class="command"><strong>tsig-keygen</strong></span>.
</p> </p>
</dd> </dd>
<dt><span class="term">-r <em class="replaceable"><code>randomfile</code></em></span></dt>
<dd>
<p>
Specifies a source of random data for generating the
authorization. If the operating system does not provide a
<code class="filename">/dev/random</code> or equivalent device, the
default source of randomness is keyboard input.
<code class="filename">randomdev</code> specifies the name of a
character device or file containing random data to be used
instead of the default. The special value
<code class="filename">keyboard</code> indicates that keyboard input
should be used.
</p>
</dd>
<dt><span class="term">-s <em class="replaceable"><code>name</code></em></span></dt> <dt><span class="term">-s <em class="replaceable"><code>name</code></em></span></dt>
<dd> <dd>
<p> <p>
+2 -4
View File
@@ -1,14 +1,12 @@
/* /*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2009, 2016 Internet Systems Consortium, Inc. ("ISC")
* *
* This Source Code Form is subject to the terms of the Mozilla Public * 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 * 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/. * 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.
*/ */
/* $Id: os.h,v 1.3 2009/06/11 23:47:55 tbox Exp $ */
/*! \file */ /*! \file */
+52 -11
View File
@@ -1,23 +1,25 @@
/* /*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2009, 2012-2017 Internet Systems Consortium, Inc. ("ISC")
* *
* This Source Code Form is subject to the terms of the Mozilla Public * 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 * 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/. * 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.
*/ */
/* $Id: keygen.c,v 1.4 2009/11/12 14:02:38 marka Exp $ */
/*! \file */ /*! \file */
#include <config.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdarg.h> #include <stdarg.h>
#include <isc/base64.h> #include <isc/base64.h>
#include <isc/buffer.h> #include <isc/buffer.h>
#include <isc/entropy.h>
#include <isc/file.h> #include <isc/file.h>
#include <isc/keyboard.h>
#include <isc/mem.h> #include <isc/mem.h>
#include <isc/print.h> #include <isc/print.h>
#include <isc/result.h> #include <isc/result.h>
@@ -40,8 +42,10 @@
const char * const char *
alg_totext(dns_secalg_t alg) { alg_totext(dns_secalg_t alg) {
switch (alg) { switch (alg) {
#ifndef PK11_MD5_DISABLE
case DST_ALG_HMACMD5: case DST_ALG_HMACMD5:
return "hmac-md5"; return "hmac-md5";
#endif
case DST_ALG_HMACSHA1: case DST_ALG_HMACSHA1:
return "hmac-sha1"; return "hmac-sha1";
case DST_ALG_HMACSHA224: case DST_ALG_HMACSHA224:
@@ -66,8 +70,10 @@ alg_fromtext(const char *name) {
if (strncasecmp(p, "hmac-", 5) == 0) if (strncasecmp(p, "hmac-", 5) == 0)
p = &name[5]; p = &name[5];
#ifndef PK11_MD5_DISABLE
if (strcasecmp(p, "md5") == 0) if (strcasecmp(p, "md5") == 0)
return DST_ALG_HMACMD5; return DST_ALG_HMACMD5;
#endif
if (strcasecmp(p, "sha1") == 0) if (strcasecmp(p, "sha1") == 0)
return DST_ALG_HMACSHA1; return DST_ALG_HMACSHA1;
if (strcasecmp(p, "sha224") == 0) if (strcasecmp(p, "sha224") == 0)
@@ -105,19 +111,26 @@ alg_bits(dns_secalg_t alg) {
} }
/*% /*%
* Generate a key of size 'keysize' and place it in 'key_txtbuffer' * Generate a key of size 'keysize' using entropy source 'randomfile',
* and place it in 'key_txtbuffer'
*/ */
void void
generate_key(isc_mem_t *mctx, dns_secalg_t alg, int keysize, generate_key(isc_mem_t *mctx, const char *randomfile, dns_secalg_t alg,
isc_buffer_t *key_txtbuffer) { int keysize, isc_buffer_t *key_txtbuffer) {
isc_result_t result = ISC_R_SUCCESS; isc_result_t result = ISC_R_SUCCESS;
isc_entropysource_t *entropy_source = NULL;
int open_keyboard = ISC_ENTROPY_KEYBOARDMAYBE;
int entropy_flags = 0;
isc_entropy_t *ectx = NULL;
isc_buffer_t key_rawbuffer; isc_buffer_t key_rawbuffer;
isc_region_t key_rawregion; isc_region_t key_rawregion;
char key_rawsecret[64]; char key_rawsecret[64];
dst_key_t *key = NULL; dst_key_t *key = NULL;
switch (alg) { switch (alg) {
#ifndef PK11_MD5_DISABLE
case DST_ALG_HMACMD5: case DST_ALG_HMACMD5:
#endif
case DST_ALG_HMACSHA1: case DST_ALG_HMACSHA1:
case DST_ALG_HMACSHA224: case DST_ALG_HMACSHA224:
case DST_ALG_HMACSHA256: case DST_ALG_HMACSHA256:
@@ -135,12 +148,31 @@ generate_key(isc_mem_t *mctx, dns_secalg_t alg, int keysize,
fatal("unsupported algorithm %d\n", alg); fatal("unsupported algorithm %d\n", alg);
} }
DO("initialize dst library", dst_lib_init(mctx, NULL));
DO("create entropy context", isc_entropy_create(mctx, &ectx));
#ifdef ISC_PLATFORM_CRYPTORANDOM
if (randomfile == NULL) {
isc_entropy_usehook(ectx, ISC_TRUE);
}
#endif
if (randomfile != NULL && strcmp(randomfile, "keyboard") == 0) {
randomfile = NULL;
open_keyboard = ISC_ENTROPY_KEYBOARDYES;
}
DO("start entropy source", isc_entropy_usebestsource(ectx,
&entropy_source,
randomfile,
open_keyboard));
entropy_flags = ISC_ENTROPY_BLOCKING | ISC_ENTROPY_GOODONLY;
DO("initialize dst library", dst_lib_init(mctx, ectx, entropy_flags));
DO("generate key", dst_key_generate(dns_rootname, alg, DO("generate key", dst_key_generate(dns_rootname, alg,
keysize, 0, 0, DNS_KEYPROTO_ANY, keysize, 0, 0,
dns_rdataclass_in, mctx, &key, DNS_KEYPROTO_ANY,
NULL)); dns_rdataclass_in, mctx, &key));
isc_buffer_init(&key_rawbuffer, &key_rawsecret, sizeof(key_rawsecret)); isc_buffer_init(&key_rawbuffer, &key_rawsecret, sizeof(key_rawsecret));
@@ -151,9 +183,17 @@ generate_key(isc_mem_t *mctx, dns_secalg_t alg, int keysize,
DO("bsse64 encode secret", isc_base64_totext(&key_rawregion, -1, "", DO("bsse64 encode secret", isc_base64_totext(&key_rawregion, -1, "",
key_txtbuffer)); key_txtbuffer));
/*
* Shut down the entropy source now so the "stop typing" message
* does not muck with the output.
*/
if (entropy_source != NULL)
isc_entropy_destroysource(&entropy_source);
if (key != NULL) if (key != NULL)
dst_key_free(&key); dst_key_free(&key);
isc_entropy_detach(&ectx);
dst_lib_destroy(); dst_lib_destroy();
} }
@@ -189,3 +229,4 @@ write_key_file(const char *keyfile, const char *user,
fatal("fclose(%s) failed\n", keyfile); fatal("fclose(%s) failed\n", keyfile);
fprintf(stderr, "wrote key file \"%s\"\n", keyfile); fprintf(stderr, "wrote key file \"%s\"\n", keyfile);
} }
+4 -6
View File
@@ -1,14 +1,12 @@
/* /*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2009, 2016 Internet Systems Consortium, Inc. ("ISC")
* *
* This Source Code Form is subject to the terms of the Mozilla Public * 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 * 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/. * 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.
*/ */
/* $Id: keygen.h,v 1.3 2009/06/11 23:47:55 tbox Exp $ */
#ifndef RNDC_KEYGEN_H #ifndef RNDC_KEYGEN_H
#define RNDC_KEYGEN_H 1 #define RNDC_KEYGEN_H 1
@@ -19,8 +17,8 @@
ISC_LANG_BEGINDECLS ISC_LANG_BEGINDECLS
void generate_key(isc_mem_t *mctx, dns_secalg_t alg, int keysize, void generate_key(isc_mem_t *mctx, const char *randomfile, dns_secalg_t alg,
isc_buffer_t *key_txtbuffer); int keysize, isc_buffer_t *key_txtbuffer);
void write_key_file(const char *keyfile, const char *user, void write_key_file(const char *keyfile, const char *user,
const char *keyname, isc_buffer_t *secret, const char *keyname, isc_buffer_t *secret,
+15 -4
View File
@@ -1,4 +1,4 @@
.\" Copyright (C) 2001, 2003-2005, 2007, 2009, 2013-2020 Internet Systems Consortium, Inc. ("ISC") .\" Copyright (C) 2001, 2003-2005, 2007, 2009, 2013-2016 Internet Systems Consortium, Inc. ("ISC")
.\" .\"
.\" This Source Code Form is subject to the terms of the Mozilla Public .\" 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 .\" License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -39,7 +39,7 @@
rndc-confgen \- rndc key generation tool rndc-confgen \- rndc key generation tool
.SH "SYNOPSIS" .SH "SYNOPSIS"
.HP \w'\fBrndc\-confgen\fR\ 'u .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] \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\-r\ \fR\fB\fIrandomfile\fR\fR] [\fB\-s\ \fR\fB\fIaddress\fR\fR] [\fB\-t\ \fR\fB\fIchrootdir\fR\fR] [\fB\-u\ \fR\fB\fIuser\fR\fR]
.SH "DESCRIPTION" .SH "DESCRIPTION"
.PP .PP
\fBrndc\-confgen\fR \fBrndc\-confgen\fR
@@ -111,7 +111,7 @@ as directed\&.
.PP .PP
\-A \fIalgorithm\fR \-A \fIalgorithm\fR
.RS 4 .RS 4
Specifies the algorithm to use for the TSIG key\&. Available choices are: hmac\-md5, hmac\-sha1, hmac\-sha224, hmac\-sha256, hmac\-sha384 and hmac\-sha512\&. The default is hmac\-sha256\&. Specifies the algorithm to use for the TSIG key\&. Available choices are: hmac\-md5, hmac\-sha1, hmac\-sha224, hmac\-sha256, hmac\-sha384 and hmac\-sha512\&. The default is hmac\-md5 or if MD5 was disabled hmac\-sha256\&.
.RE .RE
.PP .PP
\-b \fIkeysize\fR \-b \fIkeysize\fR
@@ -147,6 +147,17 @@ listens for connections from
\fBrndc\fR\&. The default is 953\&. \fBrndc\fR\&. The default is 953\&.
.RE .RE
.PP .PP
\-r \fIrandomfile\fR
.RS 4
Specifies a source of random data for generating the authorization\&. If the operating system does not provide a
/dev/random
or equivalent device, the default source of randomness is keyboard input\&.
randomdev
specifies the name of a character device or file containing random data to be used instead of the default\&. The special value
keyboard
indicates that keyboard input should be used\&.
.RE
.PP
\-s \fIaddress\fR \-s \fIaddress\fR
.RS 4 .RS 4
Specifies the IP address where Specifies the IP address where
@@ -206,5 +217,5 @@ BIND 9 Administrator Reference Manual\&.
\fBInternet Systems Consortium, Inc\&.\fR \fBInternet Systems Consortium, Inc\&.\fR
.SH "COPYRIGHT" .SH "COPYRIGHT"
.br .br
Copyright \(co 2001, 2003-2005, 2007, 2009, 2013-2020 Internet Systems Consortium, Inc. ("ISC") Copyright \(co 2001, 2003-2005, 2007, 2009, 2013-2016 Internet Systems Consortium, Inc. ("ISC")
.br .br
+56 -18
View File
@@ -1,14 +1,13 @@
/* /*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2001, 2003-2005, 2007-2009, 2011, 2013, 2014, 2016 Internet Systems Consortium, Inc. ("ISC")
* *
* This Source Code Form is subject to the terms of the Mozilla Public * 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 * 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/. * 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.
*/ */
/* $Id: rndc-confgen.c,v 1.7 2011/03/12 04:59:46 tbox Exp $ */
/*! \file */ /*! \file */
/** /**
@@ -20,15 +19,18 @@
* controls statement altogether. * controls statement altogether.
*/ */
#include <stdarg.h> #include <config.h>
#include <stdbool.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdarg.h>
#include <isc/assertions.h> #include <isc/assertions.h>
#include <isc/base64.h> #include <isc/base64.h>
#include <isc/buffer.h> #include <isc/buffer.h>
#include <isc/commandline.h> #include <isc/commandline.h>
#include <isc/entropy.h>
#include <isc/file.h> #include <isc/file.h>
#include <isc/keyboard.h>
#include <isc/mem.h> #include <isc/mem.h>
#include <isc/net.h> #include <isc/net.h>
#include <isc/print.h> #include <isc/print.h>
@@ -55,7 +57,7 @@
static char program[256]; static char program[256];
const char *progname; const char *progname;
bool verbose = false; isc_boolean_t verbose = ISC_FALSE;
const char *keyfile, *keydef; const char *keyfile, *keydef;
@@ -65,9 +67,26 @@ usage(int status) ISC_PLATFORM_NORETURN_POST;
static void static void
usage(int status) { usage(int status) {
#ifndef PK11_MD5_DISABLE
fprintf(stderr, "\ fprintf(stderr, "\
Usage:\n\ Usage:\n\
%s [-a] [-b bits] [-c keyfile] [-k keyname] [-p port] \ %s [-a] [-b bits] [-c keyfile] [-k keyname] [-p port] [-r randomfile] \
[-s addr] [-t chrootdir] [-u user]\n\
-a: generate just the key clause and write it to keyfile (%s)\n\
-A alg: algorithm (default hmac-md5 (deprecated and will change))\n\
-b bits: from 1 through 512, default 256; total length of the secret\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\
-r randomfile: source of random data (use \"keyboard\" for key timing)\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);
#else
fprintf(stderr, "\
Usage:\n\
%s [-a] [-b bits] [-c keyfile] [-k keyname] [-p port] [-r randomfile] \
[-s addr] [-t chrootdir] [-u user]\n\ [-s addr] [-t chrootdir] [-u user]\n\
-a: generate just the key clause and write it to keyfile (%s)\n\ -a: generate just the key clause and write it to keyfile (%s)\n\
-A alg: algorithm (default hmac-sha256)\n\ -A alg: algorithm (default hmac-sha256)\n\
@@ -75,24 +94,28 @@ Usage:\n\
-c keyfile: specify an alternate key file (requires -a)\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\ -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\ -p port: the port named will listen on and rndc will connect to\n\
-r randomfile: source of random data (use \"keyboard\" for key timing)\n\
-s addr: the address to which rndc should connect\n\ -s addr: the address to which rndc should connect\n\
-t chrootdir: write a keyfile in chrootdir as well (requires -a)\n\ -t chrootdir: write a keyfile in chrootdir as well (requires -a)\n\
-u user: set the keyfile owner to \"user\" (requires -a)\n", -u user: set the keyfile owner to \"user\" (requires -a)\n",
progname, keydef); progname, keydef);
#endif
exit (status); exit (status);
} }
int int
main(int argc, char **argv) { main(int argc, char **argv) {
bool show_final_mem = false; isc_boolean_t show_final_mem = ISC_FALSE;
isc_buffer_t key_txtbuffer; isc_buffer_t key_txtbuffer;
char key_txtsecret[256]; char key_txtsecret[256];
isc_mem_t *mctx = NULL; isc_mem_t *mctx = NULL;
isc_result_t result = ISC_R_SUCCESS; isc_result_t result = ISC_R_SUCCESS;
const char *keyname = NULL; const char *keyname = NULL;
const char *randomfile = NULL;
const char *serveraddr = NULL; const char *serveraddr = NULL;
dns_secalg_t alg; dns_secalg_t alg;
isc_boolean_t algset = ISC_FALSE;
const char *algname; const char *algname;
char *p; char *p;
int ch; int ch;
@@ -102,7 +125,7 @@ main(int argc, char **argv) {
struct in6_addr addr6_dummy; struct in6_addr addr6_dummy;
char *chrootdir = NULL; char *chrootdir = NULL;
char *user = NULL; char *user = NULL;
bool keyonly = false; isc_boolean_t keyonly = ISC_FALSE;
int len; int len;
keydef = keyfile = RNDC_KEYFILE; keydef = keyfile = RNDC_KEYFILE;
@@ -113,20 +136,25 @@ main(int argc, char **argv) {
progname = program; progname = program;
keyname = DEFAULT_KEYNAME; keyname = DEFAULT_KEYNAME;
#ifndef PK11_MD5_DISABLE
alg = DST_ALG_HMACMD5;
#else
alg = DST_ALG_HMACSHA256; alg = DST_ALG_HMACSHA256;
#endif
serveraddr = DEFAULT_SERVER; serveraddr = DEFAULT_SERVER;
port = DEFAULT_PORT; port = DEFAULT_PORT;
isc_commandline_errprint = false; isc_commandline_errprint = ISC_FALSE;
while ((ch = isc_commandline_parse(argc, argv, while ((ch = isc_commandline_parse(argc, argv,
"aA:b:c:hk:Mmp:r:s:t:u:Vy")) != -1) "aA:b:c:hk:Mmp:r:s:t:u:Vy")) != -1)
{ {
switch (ch) { switch (ch) {
case 'a': case 'a':
keyonly = true; keyonly = ISC_TRUE;
break; break;
case 'A': case 'A':
algset = ISC_TRUE;
algname = isc_commandline_argument; algname = isc_commandline_argument;
alg = alg_fromtext(algname); alg = alg_fromtext(algname);
if (alg == DST_ALG_UNKNOWN) if (alg == DST_ALG_UNKNOWN)
@@ -151,7 +179,7 @@ main(int argc, char **argv) {
break; break;
case 'm': case 'm':
show_final_mem = true; show_final_mem = ISC_TRUE;
break; break;
case 'p': case 'p':
port = strtol(isc_commandline_argument, &p, 10); port = strtol(isc_commandline_argument, &p, 10);
@@ -160,7 +188,7 @@ main(int argc, char **argv) {
isc_commandline_argument); isc_commandline_argument);
break; break;
case 'r': case 'r':
fatal("The -r option has been deprecated."); randomfile = isc_commandline_argument;
break; break;
case 's': case 's':
serveraddr = isc_commandline_argument; serveraddr = isc_commandline_argument;
@@ -175,7 +203,7 @@ main(int argc, char **argv) {
user = isc_commandline_argument; user = isc_commandline_argument;
break; break;
case 'V': case 'V':
verbose = true; verbose = ISC_TRUE;
break; break;
case '?': case '?':
if (isc_commandline_option != '?') { if (isc_commandline_option != '?') {
@@ -200,19 +228,27 @@ main(int argc, char **argv) {
usage(1); usage(1);
if (alg == DST_ALG_HMACMD5) { if (alg == DST_ALG_HMACMD5) {
if (algset) {
fprintf(stderr, fprintf(stderr,
"warning: use of hmac-md5 for RNDC keys " "warning: use of hmac-md5 for RNDC keys "
"is deprecated; hmac-sha256 is now recommended.\n"); "is deprecated; hmac-sha256 is now "
"recommended.\n");
} else {
fprintf(stderr,
"warning: the default algorithm hmac-md5 "
"is deprecated and will be\n"
"changed to hmac-sha256 in a future release\n")
}
} }
if (keysize < 0) if (keysize < 0)
keysize = alg_bits(alg); keysize = alg_bits(alg);
algname = alg_totext(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)); isc_buffer_init(&key_txtbuffer, &key_txtsecret, sizeof(key_txtsecret));
generate_key(mctx, alg, keysize, &key_txtbuffer); generate_key(mctx, randomfile, alg, keysize, &key_txtbuffer);
if (keyonly) { if (keyonly) {
write_key_file(keyfile, chrootdir == NULL ? user : NULL, write_key_file(keyfile, chrootdir == NULL ? user : NULL,
@@ -222,6 +258,8 @@ main(int argc, char **argv) {
char *buf; char *buf;
len = strlen(chrootdir) + strlen(keyfile) + 2; len = strlen(chrootdir) + strlen(keyfile) + 2;
buf = isc_mem_get(mctx, len); buf = isc_mem_get(mctx, len);
if (buf == NULL)
fatal("isc_mem_get(%d) failed\n", len);
snprintf(buf, len, "%s%s%s", chrootdir, snprintf(buf, len, "%s%s%s", chrootdir,
(*keyfile != '/') ? "/" : "", keyfile); (*keyfile != '/') ? "/" : "", keyfile);
+26 -9
View File
@@ -1,12 +1,9 @@
<!-- <!--
- Copyright (C) Internet Systems Consortium, Inc. ("ISC") - Copyright (C) 2001, 2003-2005, 2007, 2009, 2013-2016 Internet Systems Consortium, Inc. ("ISC")
- -
- This Source Code Form is subject to the terms of the Mozilla Public - 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 - 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/. - 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 --> <!-- Converted by db4-upgrade version 1.0 -->
@@ -42,10 +39,6 @@
<year>2014</year> <year>2014</year>
<year>2015</year> <year>2015</year>
<year>2016</year> <year>2016</year>
<year>2017</year>
<year>2018</year>
<year>2019</year>
<year>2020</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder> <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright> </copyright>
</docinfo> </docinfo>
@@ -60,6 +53,7 @@
<arg choice="opt" rep="norepeat"><option>-h</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>-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>-p <replaceable class="parameter">port</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-r <replaceable class="parameter">randomfile</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-s <replaceable class="parameter">address</replaceable></option></arg> <arg choice="opt" rep="norepeat"><option>-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>-t <replaceable class="parameter">chrootdir</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-u <replaceable class="parameter">user</replaceable></option></arg> <arg choice="opt" rep="norepeat"><option>-u <replaceable class="parameter">user</replaceable></option></arg>
@@ -134,7 +128,12 @@
<para> <para>
Specifies the algorithm to use for the TSIG key. Available Specifies the algorithm to use for the TSIG key. Available
choices are: hmac-md5, hmac-sha1, hmac-sha224, hmac-sha256, choices are: hmac-md5, hmac-sha1, hmac-sha224, hmac-sha256,
hmac-sha384 and hmac-sha512. The default is hmac-sha256. hmac-sha384 and hmac-sha512. The default is hmac-md5, or
if MD5 was disabled at compile time, hmac-sha256.
</para>
<para>
Note: Use of hmac-md5 is no longer recommended, and the default
value will be changed to hmac-sha256 in a future release.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@@ -192,6 +191,24 @@
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term>-r <replaceable class="parameter">randomfile</replaceable></term>
<listitem>
<para>
Specifies a source of random data for generating the
authorization. If the operating
system does not provide a <filename>/dev/random</filename>
or equivalent device, the default source of randomness
is keyboard input. <filename>randomdev</filename>
specifies
the name of a character device or file containing random
data to be used instead of the default. The special value
<filename>keyboard</filename> indicates that keyboard
input should be used.
</para>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term>-s <replaceable class="parameter">address</replaceable></term> <term>-s <replaceable class="parameter">address</replaceable></term>
<listitem> <listitem>
+19 -2
View File
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!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-2020 Internet Systems Consortium, Inc. ("ISC") - Copyright (C) 2001, 2003-2005, 2007, 2009, 2013-2016 Internet Systems Consortium, Inc. ("ISC")
- -
- This Source Code Form is subject to the terms of the Mozilla Public - 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 - License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -40,6 +40,7 @@
[<code class="option">-h</code>] [<code class="option">-h</code>]
[<code class="option">-k <em class="replaceable"><code>keyname</code></em></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">-p <em class="replaceable"><code>port</code></em></code>]
[<code class="option">-r <em class="replaceable"><code>randomfile</code></em></code>]
[<code class="option">-s <em class="replaceable"><code>address</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">-t <em class="replaceable"><code>chrootdir</code></em></code>]
[<code class="option">-u <em class="replaceable"><code>user</code></em></code>] [<code class="option">-u <em class="replaceable"><code>user</code></em></code>]
@@ -112,7 +113,8 @@
<p> <p>
Specifies the algorithm to use for the TSIG key. Available Specifies the algorithm to use for the TSIG key. Available
choices are: hmac-md5, hmac-sha1, hmac-sha224, hmac-sha256, choices are: hmac-md5, hmac-sha1, hmac-sha224, hmac-sha256,
hmac-sha384 and hmac-sha512. The default is hmac-sha256. hmac-sha384 and hmac-sha512. The default is hmac-md5 or
if MD5 was disabled hmac-sha256.
</p> </p>
</dd> </dd>
<dt><span class="term">-b <em class="replaceable"><code>keysize</code></em></span></dt> <dt><span class="term">-b <em class="replaceable"><code>keysize</code></em></span></dt>
@@ -153,6 +155,21 @@
The default is 953. The default is 953.
</p> </p>
</dd> </dd>
<dt><span class="term">-r <em class="replaceable"><code>randomfile</code></em></span></dt>
<dd>
<p>
Specifies a source of random data for generating the
authorization. If the operating
system does not provide a <code class="filename">/dev/random</code>
or equivalent device, the default source of randomness
is keyboard input. <code class="filename">randomdev</code>
specifies
the name of a character device or file containing random
data to be used instead of the default. The special value
<code class="filename">keyboard</code> indicates that keyboard
input should be used.
</p>
</dd>
<dt><span class="term">-s <em class="replaceable"><code>address</code></em></span></dt> <dt><span class="term">-s <em class="replaceable"><code>address</code></em></span></dt>
<dd> <dd>
<p> <p>
+3 -4
View File
@@ -1,11 +1,10 @@
# Copyright (C) Internet Systems Consortium, Inc. ("ISC") # Copyright (C) 2009, 2012, 2016 Internet Systems Consortium, Inc. ("ISC")
# #
# This Source Code Form is subject to the terms of the Mozilla Public # 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 # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# See the COPYRIGHT file distributed with this work for additional # $Id: Makefile.in,v 1.3 2009/06/11 23:47:55 tbox Exp $
# information regarding copyright ownership.
srcdir = @srcdir@ srcdir = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
+4 -4
View File
@@ -1,17 +1,17 @@
/* /*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2009, 2016 Internet Systems Consortium, Inc. ("ISC")
* *
* This Source Code Form is subject to the terms of the Mozilla Public * 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 * 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/. * 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.
*/ */
/* $Id: os.c,v 1.3 2009/06/11 23:47:55 tbox Exp $ */
/*! \file */ /*! \file */
#include <config.h>
#include <confgen/os.h> #include <confgen/os.h>
#include <fcntl.h> #include <fcntl.h>
+6 -6
View File
@@ -1,27 +1,27 @@
/* /*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2009, 2015, 2016 Internet Systems Consortium, Inc. ("ISC")
* *
* This Source Code Form is subject to the terms of the Mozilla Public * 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 * 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/. * 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.
*/ */
/* $Id: util.c,v 1.3 2009/06/11 23:47:55 tbox Exp $ */
/*! \file */ /*! \file */
#include <config.h>
#include <stdarg.h> #include <stdarg.h>
#include <stdbool.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <isc/boolean.h>
#include <isc/print.h> #include <isc/print.h>
#include "util.h" #include "util.h"
extern bool verbose; extern isc_boolean_t verbose;
extern const char *progname; extern const char *progname;
void void
+2 -4
View File
@@ -1,14 +1,12 @@
/* /*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2009, 2016 Internet Systems Consortium, Inc. ("ISC")
* *
* This Source Code Form is subject to the terms of the Mozilla Public * 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 * 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/. * 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.
*/ */
/* $Id: util.h,v 1.4 2009/09/29 15:06:05 fdupont Exp $ */
#ifndef RNDC_UTIL_H #ifndef RNDC_UTIL_H
#define RNDC_UTIL_H 1 #define RNDC_UTIL_H 1
+1 -6
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?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"> <ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@"> <ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
@@ -14,21 +14,18 @@
<ProjectGuid>{64964B03-4815-41F0-9057-E766A94AF197}</ProjectGuid> <ProjectGuid>{64964B03-4815-41F0-9057-E766A94AF197}</ProjectGuid>
<Keyword>Win32Proj</Keyword> <Keyword>Win32Proj</Keyword>
<RootNamespace>confgentool</RootNamespace> <RootNamespace>confgentool</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType> <ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType> <ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings"> <ImportGroup Label="ExtensionSettings">
@@ -63,7 +60,6 @@
<ObjectFileName>.\$(Configuration)\</ObjectFileName> <ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName> <ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<BrowseInformation>true</BrowseInformation> <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;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
</ClCompile> </ClCompile>
@@ -88,7 +84,6 @@
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation> <AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
<ObjectFileName>.\$(Configuration)\</ObjectFileName> <ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName> <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;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
</ClCompile> </ClCompile>
+3 -8
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?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"> <ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@"> <ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
@@ -14,21 +14,18 @@
<ProjectGuid>{1EA4FC64-F33B-4A50-970A-EA052BBE9CF1}</ProjectGuid> <ProjectGuid>{1EA4FC64-F33B-4A50-970A-EA052BBE9CF1}</ProjectGuid>
<Keyword>Win32Proj</Keyword> <Keyword>Win32Proj</Keyword>
<RootNamespace>ddnsconfgen</RootNamespace> <RootNamespace>ddnsconfgen</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings"> <ImportGroup Label="ExtensionSettings">
@@ -65,7 +62,6 @@
<ObjectFileName>.\$(Configuration)\</ObjectFileName> <ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName> <ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<BrowseInformation>true</BrowseInformation> <BrowseInformation>true</BrowseInformation>
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
<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> <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> <CompileAs>CompileAsC</CompileAs>
</ClCompile> </ClCompile>
@@ -74,7 +70,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile> <OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\isccc\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\isccc\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@confgentool.lib;libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>confgentool.lib;libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
<PostBuildEvent> <PostBuildEvent>
<Command>cd ..\..\..\Build\$(Configuration) <Command>cd ..\..\..\Build\$(Configuration)
@@ -99,7 +95,6 @@ copy /Y ddns-confgen.ilk tsig-keygen.ilk
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation> <AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
<ObjectFileName>.\$(Configuration)\</ObjectFileName> <ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName> <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;..\..\..\lib\isccc\include;..\..\..\lib\isccfg\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> <CompileAs>CompileAsC</CompileAs>
</ClCompile> </ClCompile>
@@ -111,7 +106,7 @@ copy /Y ddns-confgen.ilk tsig-keygen.ilk
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile> <OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration> <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\isccc\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\isccc\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@confgentool.lib;libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>confgentool.lib;libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
<PostBuildEvent> <PostBuildEvent>
<Command>cd ..\..\..\Build\$(Configuration) <Command>cd ..\..\..\Build\$(Configuration)
+5 -4
View File
@@ -1,14 +1,15 @@
/* /*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2009, 2016 Internet Systems Consortium, Inc. ("ISC")
* *
* This Source Code Form is subject to the terms of the Mozilla Public * 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 * 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/. * 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.
*/ */
/* $Id: os.c,v 1.3 2009/06/11 23:47:55 tbox Exp $ */
#include <config.h>
#include <confgen/os.h> #include <confgen/os.h>
#include <fcntl.h> #include <fcntl.h>
+3 -8
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?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"> <ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@"> <ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
@@ -14,21 +14,18 @@
<ProjectGuid>{1E2C1635-3093-4D59-80E7-4743AC10F22F}</ProjectGuid> <ProjectGuid>{1E2C1635-3093-4D59-80E7-4743AC10F22F}</ProjectGuid>
<Keyword>Win32Proj</Keyword> <Keyword>Win32Proj</Keyword>
<RootNamespace>rndcconfgen</RootNamespace> <RootNamespace>rndcconfgen</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings"> <ImportGroup Label="ExtensionSettings">
@@ -65,7 +62,6 @@
<ObjectFileName>.\$(Configuration)\</ObjectFileName> <ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName> <ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<BrowseInformation>true</BrowseInformation> <BrowseInformation>true</BrowseInformation>
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
<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> <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> <CompileAs>CompileAsC</CompileAs>
</ClCompile> </ClCompile>
@@ -74,7 +70,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile> <OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\isccc\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\isccc\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@confgentool.lib;libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>confgentool.lib;libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
@@ -93,7 +89,6 @@
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation> <AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
<ObjectFileName>.\$(Configuration)\</ObjectFileName> <ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName> <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;..\..\..\lib\isccc\include;..\..\..\lib\isccfg\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> <CompileAs>CompileAsC</CompileAs>
</ClCompile> </ClCompile>
@@ -105,7 +100,7 @@
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile> <OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration> <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\isccc\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\isccc\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@confgentool.lib;libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>confgentool.lib;libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
+6 -10
View File
@@ -1,11 +1,8 @@
# Copyright (C) Internet Systems Consortium, Inc. ("ISC") # Copyright (C) 2014-2017 Internet Systems Consortium, Inc. ("ISC")
# #
# This Source Code Form is subject to the terms of the Mozilla Public # 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 # 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/. # 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@ srcdir = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
@@ -16,17 +13,16 @@ VERSION=@BIND9_VERSION@
@BIND9_MAKE_INCLUDES@ @BIND9_MAKE_INCLUDES@
CINCLUDES = -I${srcdir}/include ${DNS_INCLUDES} ${ISC_INCLUDES} \ CINCLUDES = -I${srcdir}/include ${DNS_INCLUDES} ${ISC_INCLUDES} \
${IRS_INCLUDES} ${ISCCFG_INCLUDES} \ ${IRS_INCLUDES} ${ISCCFG_INCLUDES} @DST_OPENSSL_INC@
${OPENSSL_CFLAGS}
CDEFINES = -DVERSION=\"${VERSION}\" \ CDEFINES = @CRYPTO@ -DVERSION=\"${VERSION}\" \
-DSYSCONFDIR=\"${sysconfdir}\" -DSYSCONFDIR=\"${sysconfdir}\"
CWARNINGS = CWARNINGS =
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@ ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@ DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @ISC_OPENSSL_LIBS@
ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ISCLIBS = ../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
IRSLIBS = ../../lib/irs/libirs.@A@ IRSLIBS = ../../lib/irs/libirs.@A@
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@ ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
+24 -20
View File
@@ -1,4 +1,4 @@
.\" Copyright (C) 2014-2020 Internet Systems Consortium, Inc. ("ISC") .\" Copyright (C) 2014-2017 Internet Systems Consortium, Inc. ("ISC")
.\" .\"
.\" This Source Code Form is subject to the terms of the Mozilla Public .\" 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 .\" License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -53,7 +53,7 @@ is a tool for sending DNS queries and validating the results, using the same int
\fBnamed\fR\&. \fBnamed\fR\&.
.PP .PP
\fBdelv\fR \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 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\&. 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 .PP
By default, responses are validated using built\-in DNSSEC trust anchor for the root zone ("\&.")\&. Records returned by By default, responses are validated using built\-in DNSSEC trust anchor for the root zone ("\&.")\&. Records returned by
\fBdelv\fR \fBdelv\fR
@@ -139,21 +139,21 @@ BIND
.sp .sp
Keys that do not match the root zone name are ignored\&. An alternate key name can be specified using the Keys that do not match the root zone name are ignored\&. An alternate key name can be specified using the
\fB+root=NAME\fR \fB+root=NAME\fR
options\&. 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 .sp
Note: When reading the trust anchor file, Note: When reading the trust anchor file,
\fBdelv\fR \fBdelv\fR
treats treats
\fBtrust\-anchors\fR\fBinitial\-key\fR \fBmanaged\-keys\fR
and statements and
\fBstatic\-key\fR \fBtrusted\-keys\fR
entries identically\&. That is, even if a key is configured with statements identically\&. That is, for a managed key, it is the
\fBinitial\-key\fR, indicating that it is meant to be used only as an initializing key for RFC 5011 key maintenance, it is still treated by \fIinitial\fR
key that is trusted; RFC 5011 key management is not supported\&.
\fBdelv\fR \fBdelv\fR
as if it had been configured as a will not consult the managed\-keys database maintained by
\fBstatic\-key\fR\&.
\fBdelv\fR
does not consult the managed keys database maintained by
\fBnamed\fR\&. This means that if either of the keys in \fBnamed\fR\&. This means that if either of the keys in
/etc/bind\&.keys /etc/bind\&.keys
is revoked and rolled over, it will be necessary to update is revoked and rolled over, it will be necessary to update
@@ -390,16 +390,25 @@ output\&. The default is to do so\&. Note that (unlike in
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 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 \fB\-i\fR
or or
\fB+noroot\fR\&. \fB+noroot\fR
and
\fB+nodlv\fR\&.
.RE .RE
.PP .PP
\fB+[no]root[=ROOT]\fR \fB+[no]root[=ROOT]\fR
.RS 4 .RS 4
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 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 \fB\-a\fR
must be used to specify a file containing the key\&. must be used to specify a file containing the key\&.
.RE .RE
.PP .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 \fB+[no]tcp\fR
.RS 4 .RS 4
Controls whether to use TCP when sending queries\&. The default is to use UDP unless a truncated response has been received\&. Controls whether to use TCP when sending queries\&. The default is to use UDP unless a truncated response has been received\&.
@@ -409,11 +418,6 @@ Controls whether to use TCP when sending queries\&. The default is to use UDP un
.RS 4 .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\&. 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 .RE
.PP
\fB+[no]yaml\fR
.RS 4
Print response data in YAML format\&.
.RE
.SH "FILES" .SH "FILES"
.PP .PP
/etc/bind\&.keys /etc/bind\&.keys
@@ -433,5 +437,5 @@ RFC5155\&.
\fBInternet Systems Consortium, Inc\&.\fR \fBInternet Systems Consortium, Inc\&.\fR
.SH "COPYRIGHT" .SH "COPYRIGHT"
.br .br
Copyright \(co 2014-2020 Internet Systems Consortium, Inc. ("ISC") Copyright \(co 2014-2017 Internet Systems Consortium, Inc. ("ISC")
.br .br
+276 -415
View File
File diff suppressed because it is too large Load Diff
+29 -32
View File
@@ -1,14 +1,11 @@
<!DOCTYPE book [ <!DOCTYPE book [
<!ENTITY mdash "&#8212;">]> <!ENTITY mdash "&#8212;">]>
<!-- <!--
- Copyright (C) Internet Systems Consortium, Inc. ("ISC") - Copyright (C) 2014-2017 Internet Systems Consortium, Inc. ("ISC")
- -
- This Source Code Form is subject to the terms of the Mozilla Public - 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 - 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/. - 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 --> <!-- Converted by db4-upgrade version 1.0 -->
@@ -38,9 +35,6 @@
<year>2015</year> <year>2015</year>
<year>2016</year> <year>2016</year>
<year>2017</year> <year>2017</year>
<year>2018</year>
<year>2019</year>
<year>2020</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder> <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright> </copyright>
</docinfo> </docinfo>
@@ -97,7 +91,7 @@
<command>delv</command> will send to a specified name server all <command>delv</command> will send to a specified name server all
queries needed to fetch and validate the requested data; this queries needed to fetch and validate the requested data; this
includes the original requested query, subsequent queries to follow includes the original requested query, subsequent queries to follow
CNAME or DNAME chains, and queries for DNSKEY and DS records CNAME or DNAME chains, and queries for DNSKEY, DS and DLV records
to establish a chain of trust for DNSSEC validation. to establish a chain of trust for DNSSEC validation.
It does not perform iterative resolution, but simulates the It does not perform iterative resolution, but simulates the
behavior of a name server configured for DNSSEC validating and behavior of a name server configured for DNSSEC validating and
@@ -212,21 +206,21 @@
<para> <para>
Keys that do not match the root zone name are ignored. Keys that do not match the root zone name are ignored.
An alternate key name can be specified using the An alternate key name can be specified using the
<option>+root=NAME</option> options. <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>
<para> <para>
Note: When reading the trust anchor file, Note: When reading the trust anchor file,
<command>delv</command> treats <option>trust-anchors</option> <command>delv</command> treats <option>managed-keys</option>
<option>initial-key</option> and <option>static-key</option> statements and <option>trusted-keys</option> statements
entries identically. That is, even if a key is configured identically. That is, for a managed key, it is the
with <command>initial-key</command>, indicating that it is <emphasis>initial</emphasis> key that is trusted; RFC 5011
meant to be used only as an initializing key for RFC 5011 key management is not supported. <command>delv</command>
key maintenance, it is still treated by <command>delv</command> will not consult the managed-keys database maintained by
as if it had been configured as a <command>static-key</command>. <command>named</command>. This means that if either of the
<command>delv</command> does not consult the managed keys keys in <filename>/etc/bind.keys</filename> is revoked
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 and rolled over, it will be necessary to update
<filename>/etc/bind.keys</filename> to use DNSSEC <filename>/etc/bind.keys</filename> to use DNSSEC
validation in <command>delv</command>. validation in <command>delv</command>.
@@ -618,7 +612,8 @@
request DNSSEC records or whether to validate them. request DNSSEC records or whether to validate them.
DNSSEC records are always requested, and validation DNSSEC records are always requested, and validation
will always occur unless suppressed by the use of will always occur unless suppressed by the use of
<option>-i</option> or <option>+noroot</option>. <option>-i</option> or <option>+noroot</option> and
<option>+nodlv</option>.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@@ -627,7 +622,7 @@
<term><option>+[no]root[=ROOT]</option></term> <term><option>+[no]root[=ROOT]</option></term>
<listitem> <listitem>
<para> <para>
Indicates whether to perform conventional Indicates whether to perform conventional (non-lookaside)
DNSSEC validation, and if so, specifies the DNSSEC validation, and if so, specifies the
name of a trust anchor. The default is to validate using name of a trust anchor. The default is to validate using
a trust anchor of "." (the root zone), for which there is a trust anchor of "." (the root zone), for which there is
@@ -638,6 +633,18 @@
</listitem> </listitem>
</varlistentry> </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> <varlistentry>
<term><option>+[no]tcp</option></term> <term><option>+[no]tcp</option></term>
<listitem> <listitem>
@@ -659,16 +666,6 @@
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><option>+[no]yaml</option></term>
<listitem>
<para>
Print response data in YAML format.
</para>
</listitem>
</varlistentry>
</variablelist> </variablelist>
</para> </para>
+26 -22
View File
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- <!--
- Copyright (C) 2014-2020 Internet Systems Consortium, Inc. ("ISC") - Copyright (C) 2014-2017 Internet Systems Consortium, Inc. ("ISC")
- -
- This Source Code Form is subject to the terms of the Mozilla Public - 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 - License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -83,7 +83,7 @@
<span class="command"><strong>delv</strong></span> will send to a specified name server all <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 queries needed to fetch and validate the requested data; this
includes the original requested query, subsequent queries to follow includes the original requested query, subsequent queries to follow
CNAME or DNAME chains, and queries for DNSKEY and DS records CNAME or DNAME chains, and queries for DNSKEY, DS and DLV records
to establish a chain of trust for DNSSEC validation. to establish a chain of trust for DNSSEC validation.
It does not perform iterative resolution, but simulates the It does not perform iterative resolution, but simulates the
behavior of a name server configured for DNSSEC validating and behavior of a name server configured for DNSSEC validating and
@@ -193,21 +193,21 @@
<p> <p>
Keys that do not match the root zone name are ignored. Keys that do not match the root zone name are ignored.
An alternate key name can be specified using the An alternate key name can be specified using the
<code class="option">+root=NAME</code> options. <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>
<p> <p>
Note: When reading the trust anchor file, Note: When reading the trust anchor file,
<span class="command"><strong>delv</strong></span> treats <code class="option">trust-anchors</code> <span class="command"><strong>delv</strong></span> treats <code class="option">managed-keys</code>
<code class="option">initial-key</code> and <code class="option">static-key</code> statements and <code class="option">trusted-keys</code> statements
entries identically. That is, even if a key is configured identically. That is, for a managed key, it is the
with <span class="command"><strong>initial-key</strong></span>, indicating that it is <span class="emphasis"><em>initial</em></span> key that is trusted; RFC 5011
meant to be used only as an initializing key for RFC 5011 key management is not supported. <span class="command"><strong>delv</strong></span>
key maintenance, it is still treated by <span class="command"><strong>delv</strong></span> will not consult the managed-keys database maintained by
as if it had been configured as a <span class="command"><strong>static-key</strong></span>. <span class="command"><strong>named</strong></span>. This means that if either of the
<span class="command"><strong>delv</strong></span> does not consult the managed keys keys in <code class="filename">/etc/bind.keys</code> is revoked
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 and rolled over, it will be necessary to update
<code class="filename">/etc/bind.keys</code> to use DNSSEC <code class="filename">/etc/bind.keys</code> to use DNSSEC
validation in <span class="command"><strong>delv</strong></span>. validation in <span class="command"><strong>delv</strong></span>.
@@ -517,13 +517,14 @@
request DNSSEC records or whether to validate them. request DNSSEC records or whether to validate them.
DNSSEC records are always requested, and validation DNSSEC records are always requested, and validation
will always occur unless suppressed by the use of will always occur unless suppressed by the use of
<code class="option">-i</code> or <code class="option">+noroot</code>. <code class="option">-i</code> or <code class="option">+noroot</code> and
<code class="option">+nodlv</code>.
</p> </p>
</dd> </dd>
<dt><span class="term"><code class="option">+[no]root[=ROOT]</code></span></dt> <dt><span class="term"><code class="option">+[no]root[=ROOT]</code></span></dt>
<dd> <dd>
<p> <p>
Indicates whether to perform conventional Indicates whether to perform conventional (non-lookaside)
DNSSEC validation, and if so, specifies the DNSSEC validation, and if so, specifies the
name of a trust anchor. The default is to validate using name of a trust anchor. The default is to validate using
a trust anchor of "." (the root zone), for which there is a trust anchor of "." (the root zone), for which there is
@@ -532,6 +533,15 @@
containing the key. containing the key.
</p> </p>
</dd> </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> <dt><span class="term"><code class="option">+[no]tcp</code></span></dt>
<dd> <dd>
<p> <p>
@@ -548,12 +558,6 @@
in the type's presentation format. in the type's presentation format.
</p> </p>
</dd> </dd>
<dt><span class="term"><code class="option">+[no]yaml</code></span></dt>
<dd>
<p>
Print response data in YAML format.
</p>
</dd>
</dl></div> </dl></div>
<p> <p>
+7 -12
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?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"> <ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@"> <ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
@@ -14,21 +14,18 @@
<ProjectGuid>{BE172EFE-C1DC-4812-BFB9-8C5F8ADB7E9F}</ProjectGuid> <ProjectGuid>{BE172EFE-C1DC-4812-BFB9-8C5F8ADB7E9F}</ProjectGuid>
<Keyword>Win32Proj</Keyword> <Keyword>Win32Proj</Keyword>
<RootNamespace>delv</RootNamespace> <RootNamespace>delv</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings"> <ImportGroup Label="ExtensionSettings">
@@ -56,15 +53,14 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile> <PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation> <AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
<ObjectFileName>.\$(Configuration)\</ObjectFileName> <ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName> <ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<BrowseInformation>true</BrowseInformation> <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> <CompileAs>CompileAsC</CompileAs>
</ClCompile> </ClCompile>
<Link> <Link>
@@ -72,7 +68,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile> <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> <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> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
@@ -83,7 +79,7 @@
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions> <IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization> <WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
@@ -91,8 +87,7 @@
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation> <AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
<ObjectFileName>.\$(Configuration)\</ObjectFileName> <ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName> <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> <CompileAs>CompileAsC</CompileAs>
</ClCompile> </ClCompile>
<Link> <Link>
@@ -103,7 +98,7 @@
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile> <OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration> <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<AdditionalLibraryDirectories>..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <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> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
+10 -16
View File
@@ -1,11 +1,8 @@
# Copyright (C) Internet Systems Consortium, Inc. ("ISC") # Copyright (C) 2000-2002, 2004, 2005, 2007, 2009, 2012-2017 Internet Systems Consortium, Inc. ("ISC")
# #
# This Source Code Form is subject to the terms of the Mozilla Public # 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 # 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/. # 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@ srcdir = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
@@ -19,17 +16,16 @@ READLINE_LIB = @READLINE_LIB@
CINCLUDES = -I${srcdir}/include ${DNS_INCLUDES} \ CINCLUDES = -I${srcdir}/include ${DNS_INCLUDES} \
${BIND9_INCLUDES} ${ISC_INCLUDES} \ ${BIND9_INCLUDES} ${ISC_INCLUDES} \
${IRS_INCLUDES} ${ISCCFG_INCLUDES} @LIBIDN2_CFLAGS@ \ ${IRS_INCLUDES} ${ISCCFG_INCLUDES} @DST_OPENSSL_INC@
${OPENSSL_CFLAGS}
CDEFINES = -DVERSION=\"${VERSION}\" CDEFINES = -DVERSION=\"${VERSION}\" @CRYPTO@
CWARNINGS = CWARNINGS =
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@ ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@ DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
BIND9LIBS = ../../lib/bind9/libbind9.@A@ BIND9LIBS = ../../lib/bind9/libbind9.@A@
ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ISCLIBS = ../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @ISC_OPENSSL_LIBS@
IRSLIBS = ../../lib/irs/libirs.@A@ IRSLIBS = ../../lib/irs/libirs.@A@
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@ ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
@@ -42,10 +38,10 @@ DEPLIBS = ${DNSDEPLIBS} ${IRSDEPLIBS} ${BIND9DEPLIBS} \
${ISCDEPLIBS} ${ISCCFGDEPLIBS} ${ISCDEPLIBS} ${ISCCFGDEPLIBS}
LIBS = ${DNSLIBS} ${IRSLIBS} ${BIND9LIBS} ${ISCCFGLIBS} \ LIBS = ${DNSLIBS} ${IRSLIBS} ${BIND9LIBS} ${ISCCFGLIBS} \
${ISCLIBS} @LIBIDN2_LIBS@ @LIBS@ ${ISCLIBS} @IDNLIBS@ @LIBS@
NOSYMLIBS = ${DNSLIBS} ${IRSLIBS} ${BIND9LIBS} ${ISCCFGLIBS} \ NOSYMLIBS = ${DNSLIBS} ${IRSLIBS} ${BIND9LIBS} ${ISCCFGLIBS} \
${ISCNOSYMLIBS} @LIBIDN2_LIBS@ @LIBS@ ${ISCNOSYMLIBS} @IDNLIBS@ @LIBS@
SUBDIRS = SUBDIRS =
@@ -65,8 +61,6 @@ MANOBJS = ${MANPAGES} ${HTMLPAGES}
@BIND9_MAKE_RULES@ @BIND9_MAKE_RULES@
LDFLAGS = @LDFLAGS@ @LIBIDN2_LDFLAGS@
dig@EXEEXT@: dig.@O@ dighost.@O@ ${UOBJS} ${DEPLIBS} dig@EXEEXT@: dig.@O@ dighost.@O@ ${UOBJS} ${DEPLIBS}
export BASEOBJS="dig.@O@ dighost.@O@ ${UOBJS}"; \ export BASEOBJS="dig.@O@ dighost.@O@ ${UOBJS}"; \
export LIBS0="${DNSLIBS} ${IRSLIBS}"; \ export LIBS0="${DNSLIBS} ${IRSLIBS}"; \
@@ -102,12 +96,12 @@ install:: dig@EXEEXT@ host@EXEEXT@ nslookup@EXEEXT@ installdirs
${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} \ ${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} \
nslookup@EXEEXT@ ${DESTDIR}${bindir} nslookup@EXEEXT@ ${DESTDIR}${bindir}
for m in ${MANPAGES}; do \ for m in ${MANPAGES}; do \
${INSTALL_DATA} ${srcdir}/$$m ${DESTDIR}${mandir}/man1 || exit 1; \ ${INSTALL_DATA} ${srcdir}/$$m ${DESTDIR}${mandir}/man1; \
done done
uninstall:: uninstall::
for m in ${MANPAGES}; do \ for m in ${MANPAGES}; do \
rm -f ${DESTDIR}${mandir}/man1/$$m || exit 1; \ rm -f ${DESTDIR}${mandir}/man1/$$m ; \
done done
${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${bindir}/nslookup@EXEEXT@ ${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}/host@EXEEXT@
+29 -88
View File
@@ -1,4 +1,4 @@
.\" Copyright (C) 2000-2011, 2013-2020 Internet Systems Consortium, Inc. ("ISC") .\" Copyright (C) 2000-2011, 2013-2017 Internet Systems Consortium, Inc. ("ISC")
.\" .\"
.\" This Source Code Form is subject to the terms of the Mozilla Public .\" 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 .\" License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -74,9 +74,7 @@ will perform an NS query for "\&." (the root)\&.
It is possible to set per\-user defaults for It is possible to set per\-user defaults for
\fBdig\fR \fBdig\fR
via via
${HOME}/\&.digrc\&. This file is read and any options in it are applied before the command line arguments\&. The ${HOME}/\&.digrc\&. This file is read and any options in it are applied before the command line arguments\&.
\fB\-r\fR
option disables this feature, for scripts that need predictable behaviour\&.
.PP .PP
The IN and CH class names overlap with the IN and CH top level domain names\&. Either use the The IN and CH class names overlap with the IN and CH top level domain names\&. Either use the
\fB\-t\fR \fB\-t\fR
@@ -176,6 +174,11 @@ reads a list of lookup requests to process from the given
using the command\-line interface\&. using the command\-line interface\&.
.RE .RE
.PP .PP
\-i
.RS 4
Do reverse IPv6 lookups using the obsolete RFC1886 IP6\&.INT domain, which is no longer in use\&. Obsolete bit string label queries (RFC2874) are not attempted\&.
.RE
.PP
\-k \fIkeyfile\fR \-k \fIkeyfile\fR
.RS 4 .RS 4
Sign queries using TSIG using a key read from the given file\&. Key files can be generated using Sign queries using TSIG using a key read from the given file\&. Key files can be generated using
@@ -205,28 +208,15 @@ The domain name to query\&. This is useful to distinguish the
from other arguments\&. from other arguments\&.
.RE .RE
.PP .PP
\-r
.RS 4
Do not read options from
${HOME}/\&.digrc\&. This is useful for scripts that need predictable behaviour\&.
.RE
.PP
\-t \fItype\fR \-t \fItype\fR
.RS 4 .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 The resource record type to query\&. It can be any valid query type which is supported in BIND 9\&. The default query type is "A", unless the
\fB\-x\fR \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 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 \fItype\fR
to 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 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\&. \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 .RE
.PP .PP
\-v \-v
@@ -249,7 +239,9 @@ arguments\&.
\fBdig\fR \fBdig\fR
automatically performs a lookup for a name like automatically performs a lookup for a name like
94\&.2\&.0\&.192\&.in\-addr\&.arpa 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\&. 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 .RE
.PP .PP
\-y \fI[hmac:]\fR\fIkeyname:secret\fR \-y \fI[hmac:]\fR\fIkeyname:secret\fR
@@ -361,20 +353,14 @@ Display [do not display] the CLASS when printing the record\&.
.PP .PP
\fB+[no]cmd\fR \fB+[no]cmd\fR
.RS 4 .RS 4
Toggles the printing of the initial comment in the output, identifying the version of Toggles the printing of the initial comment in the output identifying the version of
\fBdig\fR \fBdig\fR
and the query options that have been applied\&. This option always has global effect; it cannot be set globally and then overridden on a per\-lookup basis\&. The default is to print this comment\&. and the query options that have been applied\&. This comment is printed by default\&.
.RE .RE
.PP .PP
\fB+[no]comments\fR \fB+[no]comments\fR
.RS 4 .RS 4
Toggles the display of some comment lines in the output, containing information about the packet header and OPT pseudosection, and the names of the response section\&. The default is to print these comments\&. Toggle the display of comment lines in the output\&. The default is to print comments\&.
.sp
Other types of comments in the output are not affected by this option, but can be controlled using other command line switches\&. These include
\fB+[no]cmd\fR,
\fB+[no]question\fR,
\fB+[no]stats\fR, and
\fB+[no]rrcomments\fR\&.
.RE .RE
.PP .PP
\fB+[no]cookie\fR\fB[=####]\fR \fB+[no]cookie\fR\fB[=####]\fR
@@ -456,11 +442,6 @@ clears the EDNS options to be sent\&.
Send an EDNS Expire option\&. Send an EDNS Expire option\&.
.RE .RE
.PP .PP
\fB+[no]expandaaaa\fR
.RS 4
When printing AAAA record print all zero nibbles rather than the default RFC 5952 preferred presentation format\&.
.RE
.PP
\fB+[no]fail\fR \fB+[no]fail\fR
.RS 4 .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\&. 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\&.
@@ -478,18 +459,9 @@ Show [or do not show] the IP address and port number that supplied the answer wh
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\&. 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 .RE
.PP .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\&.
.sp
The default is to process IDN input when standard output is a tty\&. The IDN processing on input is disabled when dig output is redirected to files, pipes, and other non\-tty file descriptors\&.
.RE
.PP
\fB+[no]idnout\fR \fB+[no]idnout\fR
.RS 4 .RS 4
Convert [do not convert] puny code on output\&. This requires IDN SUPPORT to have been enabled at compile time\&. 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\&.
.sp
The default is to process puny code on output when standard output is a tty\&. The puny code processing on output is disabled when dig output is redirected to files, pipes, and other non\-tty file descriptors\&.
.RE .RE
.PP .PP
\fB+[no]ignore\fR \fB+[no]ignore\fR
@@ -497,11 +469,6 @@ The default is to process puny code on output when standard output is a tty\&. T
Ignore truncation in UDP responses instead of retrying with TCP\&. By default, TCP retries are performed\&. Ignore truncation in UDP responses instead of retrying with TCP\&. By default, TCP retries are performed\&.
.RE .RE
.PP .PP
\fB+[no]keepalive\fR
.RS 4
Send [or do not send] an EDNS Keepalive option\&.
.RE
.PP
\fB+[no]keepopen\fR \fB+[no]keepopen\fR
.RS 4 .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 Keep the TCP socket open between queries and reuse it rather than creating a new TCP socket for each lookup\&. The default is
@@ -548,7 +515,7 @@ Include an EDNS name server ID request when sending a query\&.
.RS 4 .RS 4
When this option is set, When this option is set,
\fBdig\fR \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\&. 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\&.
.RE .RE
.PP .PP
\fB+[no]onesoa\fR \fB+[no]onesoa\fR
@@ -572,17 +539,12 @@ would cause a 48\-byte query to be padded to 64 bytes\&. The default block size
.PP .PP
\fB+[no]qr\fR \fB+[no]qr\fR
.RS 4 .RS 4
Toggles the display of the query message as it is sent\&. By default, the query is not printed\&. Print [do not print] the query as it is sent\&. By default, the query is not printed\&.
.RE .RE
.PP .PP
\fB+[no]question\fR \fB+[no]question\fR
.RS 4 .RS 4
Toggles the display of the question section of a query when an answer is returned\&. The default is to print the question section as a comment\&. 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 .RE
.PP .PP
\fB+[no]rdflag\fR \fB+[no]rdflag\fR
@@ -595,11 +557,11 @@ A synonym for
.RS 4 .RS 4
Toggle the setting of the RD (recursion desired) bit in the query\&. This bit is set by default, which means Toggle the setting of the RD (recursion desired) bit in the query\&. This bit is set by default, which means
\fBdig\fR \fBdig\fR
normally sends recursive queries\&. Recursion is automatically disabled when using the normally sends recursive queries\&. Recursion is automatically disabled when the
\fI+nssearch\fR \fI+nssearch\fR
option, and when using or
\fI+trace\fR \fI+trace\fR
except for an initial recursive query to get the list of root servers\&. query options are used\&.
.RE .RE
.PP .PP
\fB+retry=T\fR \fB+retry=T\fR
@@ -630,7 +592,7 @@ determines if the name will be treated as relative or not and hence whether a se
.PP .PP
\fB+[no]short\fR \fB+[no]short\fR
.RS 4 .RS 4
Provide a terse answer\&. The default is to print the answer in a verbose form\&. This option always has global effect; it cannot be set globally and then overridden on a per\-lookup basis\&. Provide a terse answer\&. The default is to print the answer in a verbose form\&.
.RE .RE
.PP .PP
\fB+[no]showsearch\fR \fB+[no]showsearch\fR
@@ -660,7 +622,7 @@ causes fields not to be split at all\&. The default is 56 characters, or 44 char
.PP .PP
\fB+[no]stats\fR \fB+[no]stats\fR
.RS 4 .RS 4
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 as a comment after each lookup\&. 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 .RE
.PP .PP
\fB+[no]subnet=addr[/prefix\-length]\fR \fB+[no]subnet=addr[/prefix\-length]\fR
@@ -674,11 +636,6 @@ for short, sends an EDNS CLIENT\-SUBNET option with an empty address and a sourc
be used when resolving this query\&. be used when resolving this query\&.
.RE .RE
.PP .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 \fB+[no]tcp\fR
.RS 4 .RS 4
Use [do not use] TCP when querying name servers\&. The default behavior is to use UDP unless a type Use [do not use] TCP when querying name servers\&. The default behavior is to use UDP unless a type
@@ -744,13 +701,6 @@ Display [do not display] the TTL when printing the record\&.
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\&. 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 .RE
.PP .PP
\fB+[no]unexpected\fR
.RS 4
Accept [do not accept] answers from unexpected sources\&. By default,
\fBdig\fR
won\*(Aqt accept a reply from a source other than the one to which it sent the query\&.
.RE
.PP
\fB+[no]unknownformat\fR \fB+[no]unknownformat\fR
.RS 4 .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\&. 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\&.
@@ -763,13 +713,6 @@ Use [do not use] TCP when querying name servers\&. This alternate syntax to
is provided for backwards compatibility\&. The "vc" stands for "virtual circuit"\&. is provided for backwards compatibility\&. The "vc" stands for "virtual circuit"\&.
.RE .RE
.PP .PP
\fB+[no]yaml\fR
.RS 4
Print the responses (and, if
\fB+qr\fR
is in use, also the outgoing queries) in a detailed YAML format\&.
.RE
.PP
\fB+[no]zflag\fR \fB+[no]zflag\fR
.RS 4 .RS 4
Set [do not set] the last unassigned DNS header flag in a DNS query\&. This flag is off by default\&. Set [do not set] the last unassigned DNS header flag in a DNS query\&. This flag is off by default\&.
@@ -822,13 +765,11 @@ If
\fBdig\fR \fBdig\fR
has been built with IDN (internationalized domain name) support, it can accept and display non\-ASCII domain names\&. has been built with IDN (internationalized domain name) support, it can accept and display non\-ASCII domain names\&.
\fBdig\fR \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 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, defines the
\fI+noidnin\fR
and
\fI+noidnout\fR
or define the
\fBIDN_DISABLE\fR \fBIDN_DISABLE\fR
environment variable\&. environment variable\&. The IDN support is disabled if the variable is set when
\fBdig\fR
runs\&.
.SH "FILES" .SH "FILES"
.PP .PP
/etc/resolv\&.conf /etc/resolv\&.conf
@@ -840,7 +781,7 @@ ${HOME}/\&.digrc
\fBhost\fR(1), \fBhost\fR(1),
\fBnamed\fR(8), \fBnamed\fR(8),
\fBdnssec-keygen\fR(8), \fBdnssec-keygen\fR(8),
RFC 1035\&. RFC1035\&.
.SH "BUGS" .SH "BUGS"
.PP .PP
There are probably too many query options\&. There are probably too many query options\&.
@@ -849,5 +790,5 @@ There are probably too many query options\&.
\fBInternet Systems Consortium, Inc\&.\fR \fBInternet Systems Consortium, Inc\&.\fR
.SH "COPYRIGHT" .SH "COPYRIGHT"
.br .br
Copyright \(co 2000-2011, 2013-2020 Internet Systems Consortium, Inc. ("ISC") Copyright \(co 2000-2011, 2013-2017 Internet Systems Consortium, Inc. ("ISC")
.br .br
+308 -652
View File
File diff suppressed because it is too large Load Diff
+43 -166
View File
@@ -1,14 +1,11 @@
<!DOCTYPE book [ <!DOCTYPE book [
<!ENTITY mdash "&#8212;">]> <!ENTITY mdash "&#8212;">]>
<!-- <!--
- Copyright (C) Internet Systems Consortium, Inc. ("ISC") - Copyright (C) 2000-2011, 2013-2017 Internet Systems Consortium, Inc. ("ISC")
- -
- This Source Code Form is subject to the terms of the Mozilla Public - 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 - 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/. - 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 --> <!-- Converted by db4-upgrade version 1.0 -->
@@ -51,9 +48,6 @@
<year>2015</year> <year>2015</year>
<year>2016</year> <year>2016</year>
<year>2017</year> <year>2017</year>
<year>2018</year>
<year>2019</year>
<year>2020</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder> <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright> </copyright>
</docinfo> </docinfo>
@@ -133,10 +127,9 @@
<para> <para>
It is possible to set per-user defaults for <command>dig</command> via It is possible to set per-user defaults for <command>dig</command> via
<filename>${HOME}/.digrc</filename>. This file is read and any <filename>${HOME}/.digrc</filename>. This file is read and
options in it are applied before the command line arguments. any options in it
The <option>-r</option> option disables this feature, for are applied before the command line arguments.
scripts that need predictable behaviour.
</para> </para>
<para> <para>
@@ -274,6 +267,17 @@
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term>-i</term>
<listitem>
<para>
Do reverse IPv6 lookups using the obsolete RFC1886 IP6.INT
domain, which is no longer in use. Obsolete bit string
label queries (RFC2874) are not attempted.
</para>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term>-k <replaceable class="parameter">keyfile</replaceable></term> <term>-k <replaceable class="parameter">keyfile</replaceable></term>
<listitem> <listitem>
@@ -326,26 +330,15 @@
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term>-r</term>
<listitem>
<para>
Do not read options from <filename>${HOME}/.digrc</filename>.
This is useful for scripts that need predictable behaviour.
</para>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term>-t <replaceable class="parameter">type</replaceable></term> <term>-t <replaceable class="parameter">type</replaceable></term>
<listitem> <listitem>
<para> <para>
The resource record type to query. It can be any valid query The resource record type to query. It can be any valid query type
type. If it is a resource record type supported in BIND 9, it which is
can be given by the type mnemonic (such as "NS" or "AAAA"). supported in BIND 9. The default query type is "A", unless the
The default query type is "A", unless the <option>-x</option> <option>-x</option> option is supplied to indicate a reverse lookup.
option is supplied to indicate a reverse lookup. A zone A zone transfer can be requested by specifying a type of AXFR. When
transfer can be requested by specifying a type of AXFR. When
an incremental zone transfer (IXFR) is required, set the an incremental zone transfer (IXFR) is required, set the
<parameter>type</parameter> to <literal>ixfr=N</literal>. <parameter>type</parameter> to <literal>ixfr=N</literal>.
The incremental zone transfer will contain the changes The incremental zone transfer will contain the changes
@@ -353,21 +346,6 @@
record was record was
<parameter>N</parameter>. <parameter>N</parameter>.
</para> </para>
<para>
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.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-u</term>
<listitem>
<para>
Print query times in microseconds instead of milliseconds.
</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@@ -396,7 +374,8 @@
<literal>94.2.0.192.in-addr.arpa</literal> and sets the <literal>94.2.0.192.in-addr.arpa</literal> and sets the
query type and class to PTR and IN respectively. IPv6 query type and class to PTR and IN respectively. IPv6
addresses are looked up using nibble format under the addresses are looked up using nibble format under the
IP6.ARPA domain. IP6.ARPA domain (but see also the <option>-i</option>
option).
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@@ -594,11 +573,9 @@
<listitem> <listitem>
<para> <para>
Toggles the printing of the initial comment in the Toggles the printing of the initial comment in the
output, identifying the version of <command>dig</command> output identifying the version of <command>dig</command>
and the query options that have been applied. This option and the query options that have been applied. This
always has global effect; it cannot be set globally comment is printed by default.
and then overridden on a per-lookup basis. The default
is to print this comment.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@@ -607,18 +584,8 @@
<term><option>+[no]comments</option></term> <term><option>+[no]comments</option></term>
<listitem> <listitem>
<para> <para>
Toggles the display of some comment lines in the output, Toggle the display of comment lines in the output.
containing information about the packet header and The default is to print comments.
OPT pseudosection, and the names of the response
section. The default is to print these comments.
</para>
<para>
Other types of comments in the output are not affected by
this option, but can be controlled using other command
line switches. These include <command>+[no]cmd</command>,
<command>+[no]question</command>,
<command>+[no]stats</command>, and
<command>+[no]rrcomments</command>.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@@ -760,16 +727,6 @@
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><option>+[no]expandaaaa</option></term>
<listitem>
<para>
When printing AAAA record print all zero nibbles rather
than the default RFC 5952 preferred presentation format.
</para>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><option>+[no]fail</option></term> <term><option>+[no]fail</option></term>
<listitem> <listitem>
@@ -806,36 +763,13 @@
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><option>+[no]idnin</option></term>
<listitem>
<para>
Process [do not process] IDN domain names on input.
This requires IDN SUPPORT to have been enabled at
compile time.
</para>
<para>
The default is to process IDN input when standard output
is a tty. The IDN processing on input is disabled when
dig output is redirected to files, pipes, and other
non-tty file descriptors.
</para>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><option>+[no]idnout</option></term> <term><option>+[no]idnout</option></term>
<listitem> <listitem>
<para> <para>
Convert [do not convert] puny code on output. Convert [do not convert] puny code on output.
This requires IDN SUPPORT to have been enabled at This requires IDN SUPPORT to have been enabled at
compile time. compile time. The default is to convert output.
</para>
<para>
The default is to process puny code on output when
standard output is a tty. The puny code processing on
output is disabled when dig output is redirected to
files, pipes, and other non-tty file descriptors.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@@ -850,15 +784,6 @@
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><option>+[no]keepalive</option></term>
<listitem>
<para>
Send [or do not send] an EDNS Keepalive option.
</para>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><option>+[no]keepopen</option></term> <term><option>+[no]keepopen</option></term>
<listitem> <listitem>
@@ -930,8 +855,7 @@
attempts to find the authoritative name servers for attempts to find the authoritative name servers for
the zone containing the name being looked up and the zone containing the name being looked up and
display the SOA record that each name server has for display the SOA record that each name server has for
the zone. Addresses of servers that that did not the zone.
respond are also printed.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@@ -978,8 +902,8 @@
<term><option>+[no]qr</option></term> <term><option>+[no]qr</option></term>
<listitem> <listitem>
<para> <para>
Toggles the display of the query message as it is sent. Print [do not print] the query as it is sent. By
By default, the query is not printed. default, the query is not printed.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@@ -988,24 +912,13 @@
<term><option>+[no]question</option></term> <term><option>+[no]question</option></term>
<listitem> <listitem>
<para> <para>
Toggles the display of the question section of a query Print [do not print] the question section of a query
when an answer is returned. The default is to print when an answer is returned. The default is to print
the question section as a comment. the question section as a comment.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><option>+[no]raflag</option></term>
<listitem>
<para>
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.
</para>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><option>+[no]rdflag</option></term> <term><option>+[no]rdflag</option></term>
<listitem> <listitem>
@@ -1023,10 +936,8 @@
in the query. This bit is set by default, which means in the query. This bit is set by default, which means
<command>dig</command> normally sends recursive <command>dig</command> normally sends recursive
queries. Recursion is automatically disabled when queries. Recursion is automatically disabled when
using the <parameter>+nssearch</parameter> option, and the <parameter>+nssearch</parameter> or
when using <parameter>+trace</parameter> except for <parameter>+trace</parameter> query options are used.
an initial recursive query to get the list of root
servers.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@@ -1079,9 +990,7 @@
<listitem> <listitem>
<para> <para>
Provide a terse answer. The default is to print the Provide a terse answer. The default is to print the
answer in a verbose form. This option always has global answer in a verbose form.
effect; it cannot be set globally and then overridden on
a per-lookup basis.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@@ -1126,9 +1035,10 @@
<term><option>+[no]stats</option></term> <term><option>+[no]stats</option></term>
<listitem> <listitem>
<para> <para>
Toggles the printing of statistics: when the query was made, This query option toggles the printing of statistics:
the size of the reply and so on. The default behavior is to when the query was made, the size of the reply and
print the query statistics as a comment after each lookup. so on. The default behavior is to print the query
statistics.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@@ -1152,17 +1062,6 @@
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><option>+[no]tcflag</option></term>
<listitem>
<para>
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.
</para>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><option>+[no]tcp</option></term> <term><option>+[no]tcp</option></term>
<listitem> <listitem>
@@ -1270,17 +1169,6 @@
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><option>+[no]unexpected</option></term>
<listitem>
<para>
Accept [do not accept] answers from unexpected sources. By
default, <command>dig</command> won't accept a reply from a
source other than the one to which it sent the query.
</para>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><option>+[no]unknownformat</option></term> <term><option>+[no]unknownformat</option></term>
<listitem> <listitem>
@@ -1304,16 +1192,6 @@
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><option>+[no]yaml</option></term>
<listitem>
<para>
Print the responses (and, if <option>+qr</option> is in use,
also the outgoing queries) in a detailed YAML format.
</para>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><option>+[no]zflag</option></term> <term><option>+[no]zflag</option></term>
<listitem> <listitem>
@@ -1387,11 +1265,10 @@ dig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr
<command>dig</command> appropriately converts character encoding of <command>dig</command> appropriately converts character encoding of
domain name before sending a request to DNS server or displaying a domain name before sending a request to DNS server or displaying a
reply from the server. reply from the server.
If you'd like to turn off the IDN support for some reason, use If you'd like to turn off the IDN support for some reason, defines
parameters <parameter>+noidnin</parameter> and
<parameter>+noidnout</parameter> or define
the <envar>IDN_DISABLE</envar> environment variable. the <envar>IDN_DISABLE</envar> environment variable.
The IDN support is disabled if the variable is set when
<command>dig</command> runs.
</para> </para>
</refsection> </refsection>
@@ -1417,7 +1294,7 @@ dig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr
<citerefentry> <citerefentry>
<refentrytitle>dnssec-keygen</refentrytitle><manvolnum>8</manvolnum> <refentrytitle>dnssec-keygen</refentrytitle><manvolnum>8</manvolnum>
</citerefentry>, </citerefentry>,
<citetitle>RFC 1035</citetitle>. <citetitle>RFC1035</citetitle>.
</para> </para>
</refsection> </refsection>
+40 -133
View File
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- <!--
- Copyright (C) 2000-2011, 2013-2020 Internet Systems Consortium, Inc. ("ISC") - Copyright (C) 2000-2011, 2013-2017 Internet Systems Consortium, Inc. ("ISC")
- -
- This Source Code Form is subject to the terms of the Mozilla Public - 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 - License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -106,10 +106,9 @@
<p> <p>
It is possible to set per-user defaults for <span class="command"><strong>dig</strong></span> via It is possible to set per-user defaults for <span class="command"><strong>dig</strong></span> via
<code class="filename">${HOME}/.digrc</code>. This file is read and any <code class="filename">${HOME}/.digrc</code>. This file is read and
options in it are applied before the command line arguments. any options in it
The <code class="option">-r</code> option disables this feature, for are applied before the command line arguments.
scripts that need predictable behaviour.
</p> </p>
<p> <p>
@@ -228,6 +227,14 @@
<span class="command"><strong>dig</strong></span> using the command-line interface. <span class="command"><strong>dig</strong></span> using the command-line interface.
</p> </p>
</dd> </dd>
<dt><span class="term">-i</span></dt>
<dd>
<p>
Do reverse IPv6 lookups using the obsolete RFC1886 IP6.INT
domain, which is no longer in use. Obsolete bit string
label queries (RFC2874) are not attempted.
</p>
</dd>
<dt><span class="term">-k <em class="replaceable"><code>keyfile</code></em></span></dt> <dt><span class="term">-k <em class="replaceable"><code>keyfile</code></em></span></dt>
<dd> <dd>
<p> <p>
@@ -267,22 +274,14 @@
the <em class="parameter"><code>name</code></em> from other arguments. the <em class="parameter"><code>name</code></em> from other arguments.
</p> </p>
</dd> </dd>
<dt><span class="term">-r</span></dt>
<dd>
<p>
Do not read options from <code class="filename">${HOME}/.digrc</code>.
This is useful for scripts that need predictable behaviour.
</p>
</dd>
<dt><span class="term">-t <em class="replaceable"><code>type</code></em></span></dt> <dt><span class="term">-t <em class="replaceable"><code>type</code></em></span></dt>
<dd> <dd>
<p> <p>
The resource record type to query. It can be any valid query The resource record type to query. It can be any valid query type
type. If it is a resource record type supported in BIND 9, it which is
can be given by the type mnemonic (such as "NS" or "AAAA"). supported in BIND 9. The default query type is "A", unless the
The default query type is "A", unless the <code class="option">-x</code> <code class="option">-x</code> option is supplied to indicate a reverse lookup.
option is supplied to indicate a reverse lookup. A zone A zone transfer can be requested by specifying a type of AXFR. When
transfer can be requested by specifying a type of AXFR. When
an incremental zone transfer (IXFR) is required, set the an incremental zone transfer (IXFR) is required, set the
<em class="parameter"><code>type</code></em> to <code class="literal">ixfr=N</code>. <em class="parameter"><code>type</code></em> to <code class="literal">ixfr=N</code>.
The incremental zone transfer will contain the changes The incremental zone transfer will contain the changes
@@ -290,18 +289,6 @@
record was record was
<em class="parameter"><code>N</code></em>. <em class="parameter"><code>N</code></em>.
</p> </p>
<p>
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.
</p>
</dd>
<dt><span class="term">-u</span></dt>
<dd>
<p>
Print query times in microseconds instead of milliseconds.
</p>
</dd> </dd>
<dt><span class="term">-v</span></dt> <dt><span class="term">-v</span></dt>
<dd> <dd>
@@ -324,7 +311,8 @@
<code class="literal">94.2.0.192.in-addr.arpa</code> and sets the <code class="literal">94.2.0.192.in-addr.arpa</code> and sets the
query type and class to PTR and IN respectively. IPv6 query type and class to PTR and IN respectively. IPv6
addresses are looked up using nibble format under the addresses are looked up using nibble format under the
IP6.ARPA domain. IP6.ARPA domain (but see also the <code class="option">-i</code>
option).
</p> </p>
</dd> </dd>
<dt><span class="term">-y <em class="replaceable"><code>[<span class="optional">hmac:</span>]keyname:secret</code></em></span></dt> <dt><span class="term">-y <em class="replaceable"><code>[<span class="optional">hmac:</span>]keyname:secret</code></em></span></dt>
@@ -481,28 +469,16 @@
<dd> <dd>
<p> <p>
Toggles the printing of the initial comment in the Toggles the printing of the initial comment in the
output, identifying the version of <span class="command"><strong>dig</strong></span> output identifying the version of <span class="command"><strong>dig</strong></span>
and the query options that have been applied. This option and the query options that have been applied. This
always has global effect; it cannot be set globally comment is printed by default.
and then overridden on a per-lookup basis. The default
is to print this comment.
</p> </p>
</dd> </dd>
<dt><span class="term"><code class="option">+[no]comments</code></span></dt> <dt><span class="term"><code class="option">+[no]comments</code></span></dt>
<dd> <dd>
<p> <p>
Toggles the display of some comment lines in the output, Toggle the display of comment lines in the output.
containing information about the packet header and The default is to print comments.
OPT pseudosection, and the names of the response
section. The default is to print these comments.
</p>
<p>
Other types of comments in the output are not affected by
this option, but can be controlled using other command
line switches. These include <span class="command"><strong>+[no]cmd</strong></span>,
<span class="command"><strong>+[no]question</strong></span>,
<span class="command"><strong>+[no]stats</strong></span>, and
<span class="command"><strong>+[no]rrcomments</strong></span>.
</p> </p>
</dd> </dd>
<dt><span class="term"><code class="option">+[no]cookie[<span class="optional">=####</span>]</code></span></dt> <dt><span class="term"><code class="option">+[no]cookie[<span class="optional">=####</span>]</code></span></dt>
@@ -610,13 +586,6 @@
Send an EDNS Expire option. Send an EDNS Expire option.
</p> </p>
</dd> </dd>
<dt><span class="term"><code class="option">+[no]expandaaaa</code></span></dt>
<dd>
<p>
When printing AAAA record print all zero nibbles rather
than the default RFC 5952 preferred presentation format.
</p>
</dd>
<dt><span class="term"><code class="option">+[no]fail</code></span></dt> <dt><span class="term"><code class="option">+[no]fail</code></span></dt>
<dd> <dd>
<p> <p>
@@ -644,32 +613,12 @@
server that provided the answer. server that provided the answer.
</p> </p>
</dd> </dd>
<dt><span class="term"><code class="option">+[no]idnin</code></span></dt>
<dd>
<p>
Process [do not process] IDN domain names on input.
This requires IDN SUPPORT to have been enabled at
compile time.
</p>
<p>
The default is to process IDN input when standard output
is a tty. The IDN processing on input is disabled when
dig output is redirected to files, pipes, and other
non-tty file descriptors.
</p>
</dd>
<dt><span class="term"><code class="option">+[no]idnout</code></span></dt> <dt><span class="term"><code class="option">+[no]idnout</code></span></dt>
<dd> <dd>
<p> <p>
Convert [do not convert] puny code on output. Convert [do not convert] puny code on output.
This requires IDN SUPPORT to have been enabled at This requires IDN SUPPORT to have been enabled at
compile time. compile time. The default is to convert output.
</p>
<p>
The default is to process puny code on output when
standard output is a tty. The puny code processing on
output is disabled when dig output is redirected to
files, pipes, and other non-tty file descriptors.
</p> </p>
</dd> </dd>
<dt><span class="term"><code class="option">+[no]ignore</code></span></dt> <dt><span class="term"><code class="option">+[no]ignore</code></span></dt>
@@ -679,12 +628,6 @@
with TCP. By default, TCP retries are performed. with TCP. By default, TCP retries are performed.
</p> </p>
</dd> </dd>
<dt><span class="term"><code class="option">+[no]keepalive</code></span></dt>
<dd>
<p>
Send [or do not send] an EDNS Keepalive option.
</p>
</dd>
<dt><span class="term"><code class="option">+[no]keepopen</code></span></dt> <dt><span class="term"><code class="option">+[no]keepopen</code></span></dt>
<dd> <dd>
<p> <p>
@@ -740,8 +683,7 @@
attempts to find the authoritative name servers for attempts to find the authoritative name servers for
the zone containing the name being looked up and the zone containing the name being looked up and
display the SOA record that each name server has for display the SOA record that each name server has for
the zone. Addresses of servers that that did not the zone.
respond are also printed.
</p> </p>
</dd> </dd>
<dt><span class="term"><code class="option">+[no]onesoa</code></span></dt> <dt><span class="term"><code class="option">+[no]onesoa</code></span></dt>
@@ -776,26 +718,18 @@
<dt><span class="term"><code class="option">+[no]qr</code></span></dt> <dt><span class="term"><code class="option">+[no]qr</code></span></dt>
<dd> <dd>
<p> <p>
Toggles the display of the query message as it is sent. Print [do not print] the query as it is sent. By
By default, the query is not printed. default, the query is not printed.
</p> </p>
</dd> </dd>
<dt><span class="term"><code class="option">+[no]question</code></span></dt> <dt><span class="term"><code class="option">+[no]question</code></span></dt>
<dd> <dd>
<p> <p>
Toggles the display of the question section of a query Print [do not print] the question section of a query
when an answer is returned. The default is to print when an answer is returned. The default is to print
the question section as a comment. the question section as a comment.
</p> </p>
</dd> </dd>
<dt><span class="term"><code class="option">+[no]raflag</code></span></dt>
<dd>
<p>
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.
</p>
</dd>
<dt><span class="term"><code class="option">+[no]rdflag</code></span></dt> <dt><span class="term"><code class="option">+[no]rdflag</code></span></dt>
<dd> <dd>
<p> <p>
@@ -809,10 +743,8 @@
in the query. This bit is set by default, which means in the query. This bit is set by default, which means
<span class="command"><strong>dig</strong></span> normally sends recursive <span class="command"><strong>dig</strong></span> normally sends recursive
queries. Recursion is automatically disabled when queries. Recursion is automatically disabled when
using the <em class="parameter"><code>+nssearch</code></em> option, and the <em class="parameter"><code>+nssearch</code></em> or
when using <em class="parameter"><code>+trace</code></em> except for <em class="parameter"><code>+trace</code></em> query options are used.
an initial recursive query to get the list of root
servers.
</p> </p>
</dd> </dd>
<dt><span class="term"><code class="option">+retry=T</code></span></dt> <dt><span class="term"><code class="option">+retry=T</code></span></dt>
@@ -853,9 +785,7 @@
<dd> <dd>
<p> <p>
Provide a terse answer. The default is to print the Provide a terse answer. The default is to print the
answer in a verbose form. This option always has global answer in a verbose form.
effect; it cannot be set globally and then overridden on
a per-lookup basis.
</p> </p>
</dd> </dd>
<dt><span class="term"><code class="option">+[no]showsearch</code></span></dt> <dt><span class="term"><code class="option">+[no]showsearch</code></span></dt>
@@ -888,9 +818,10 @@
<dt><span class="term"><code class="option">+[no]stats</code></span></dt> <dt><span class="term"><code class="option">+[no]stats</code></span></dt>
<dd> <dd>
<p> <p>
Toggles the printing of statistics: when the query was made, This query option toggles the printing of statistics:
the size of the reply and so on. The default behavior is to when the query was made, the size of the reply and
print the query statistics as a comment after each lookup. so on. The default behavior is to print the query
statistics.
</p> </p>
</dd> </dd>
<dt><span class="term"><code class="option">+[no]subnet=addr[/prefix-length]</code></span></dt> <dt><span class="term"><code class="option">+[no]subnet=addr[/prefix-length]</code></span></dt>
@@ -909,14 +840,6 @@
this query. this query.
</p> </p>
</dd> </dd>
<dt><span class="term"><code class="option">+[no]tcflag</code></span></dt>
<dd>
<p>
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.
</p>
</dd>
<dt><span class="term"><code class="option">+[no]tcp</code></span></dt> <dt><span class="term"><code class="option">+[no]tcp</code></span></dt>
<dd> <dd>
<p> <p>
@@ -1000,14 +923,6 @@
seconds, minutes, hours, days and weeks. Implies +ttlid. seconds, minutes, hours, days and weeks. Implies +ttlid.
</p> </p>
</dd> </dd>
<dt><span class="term"><code class="option">+[no]unexpected</code></span></dt>
<dd>
<p>
Accept [do not accept] answers from unexpected sources. By
default, <span class="command"><strong>dig</strong></span> won't accept a reply from a
source other than the one to which it sent the query.
</p>
</dd>
<dt><span class="term"><code class="option">+[no]unknownformat</code></span></dt> <dt><span class="term"><code class="option">+[no]unknownformat</code></span></dt>
<dd> <dd>
<p> <p>
@@ -1025,13 +940,6 @@
stands for "virtual circuit". stands for "virtual circuit".
</p> </p>
</dd> </dd>
<dt><span class="term"><code class="option">+[no]yaml</code></span></dt>
<dd>
<p>
Print the responses (and, if <code class="option">+qr</code> is in use,
also the outgoing queries) in a detailed YAML format.
</p>
</dd>
<dt><span class="term"><code class="option">+[no]zflag</code></span></dt> <dt><span class="term"><code class="option">+[no]zflag</code></span></dt>
<dd> <dd>
<p> <p>
@@ -1107,11 +1015,10 @@ dig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr
<span class="command"><strong>dig</strong></span> appropriately converts character encoding of <span class="command"><strong>dig</strong></span> appropriately converts character encoding of
domain name before sending a request to DNS server or displaying a domain name before sending a request to DNS server or displaying a
reply from the server. reply from the server.
If you'd like to turn off the IDN support for some reason, use If you'd like to turn off the IDN support for some reason, defines
parameters <em class="parameter"><code>+noidnin</code></em> and
<em class="parameter"><code>+noidnout</code></em> or define
the <code class="envar">IDN_DISABLE</code> environment variable. the <code class="envar">IDN_DISABLE</code> environment variable.
The IDN support is disabled if the variable is set when
<span class="command"><strong>dig</strong></span> runs.
</p> </p>
</div> </div>
@@ -1139,7 +1046,7 @@ dig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr
<span class="citerefentry"> <span class="citerefentry">
<span class="refentrytitle">dnssec-keygen</span>(8) <span class="refentrytitle">dnssec-keygen</span>(8)
</span>, </span>,
<em class="citetitle">RFC 1035</em>. <em class="citetitle">RFC1035</em>.
</p> </p>
</div> </div>
+745 -955
View File
File diff suppressed because it is too large Load Diff
+8 -3
View File
@@ -1,4 +1,4 @@
.\" Copyright (C) 2000-2002, 2004, 2005, 2007-2009, 2014-2020 Internet Systems Consortium, Inc. ("ISC") .\" Copyright (C) 2000-2002, 2004, 2005, 2007-2009, 2014-2017 Internet Systems Consortium, Inc. ("ISC")
.\" .\"
.\" This Source Code Form is subject to the terms of the Mozilla Public .\" 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 .\" License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -112,6 +112,11 @@ Print debugging traces\&. Equivalent to the
verbose option\&. verbose option\&.
.RE .RE
.PP .PP
\-i
.RS 4
Obsolete\&. Use the IP6\&.INT domain for reverse lookups of IPv6 addresses as defined in RFC1886 and deprecated in RFC4159\&. The default is to use IP6\&.ARPA as specified in RFC3596\&.
.RE
.PP
\-l \-l
.RS 4 .RS 4
List zone: The List zone: The
@@ -252,7 +257,7 @@ If
\fBhost\fR \fBhost\fR
has been built with IDN (internationalized domain name) support, it can accept and display non\-ASCII domain names\&. has been built with IDN (internationalized domain name) support, it can accept and display non\-ASCII domain names\&.
\fBhost\fR \fBhost\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, define the 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, defines the
\fBIDN_DISABLE\fR \fBIDN_DISABLE\fR
environment variable\&. The IDN support is disabled if the variable is set when environment variable\&. The IDN support is disabled if the variable is set when
\fBhost\fR \fBhost\fR
@@ -269,5 +274,5 @@ runs\&.
\fBInternet Systems Consortium, Inc\&.\fR \fBInternet Systems Consortium, Inc\&.\fR
.SH "COPYRIGHT" .SH "COPYRIGHT"
.br .br
Copyright \(co 2000-2002, 2004, 2005, 2007-2009, 2014-2020 Internet Systems Consortium, Inc. ("ISC") Copyright \(co 2000-2002, 2004, 2005, 2007-2009, 2014-2017 Internet Systems Consortium, Inc. ("ISC")
.br .br
+124 -107
View File
@@ -1,18 +1,14 @@
/* /*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2000-2007, 2009-2017 Internet Systems Consortium, Inc. ("ISC")
* *
* This Source Code Form is subject to the terms of the Mozilla Public * 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 * 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/. * 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 */ /*! \file */
#include <inttypes.h> #include <config.h>
#include <stdbool.h>
#include <stdlib.h> #include <stdlib.h>
#include <limits.h> #include <limits.h>
@@ -20,6 +16,13 @@
#include <locale.h> #include <locale.h>
#endif #endif
#ifdef WITH_IDN
#include <idn/result.h>
#include <idn/log.h>
#include <idn/resconf.h>
#include <idn/api.h>
#endif
#include <isc/app.h> #include <isc/app.h>
#include <isc/commandline.h> #include <isc/commandline.h>
#include <isc/netaddr.h> #include <isc/netaddr.h>
@@ -27,6 +30,7 @@
#include <isc/string.h> #include <isc/string.h>
#include <isc/util.h> #include <isc/util.h>
#include <isc/task.h> #include <isc/task.h>
#include <isc/stdlib.h>
#include <dns/byaddr.h> #include <dns/byaddr.h>
#include <dns/fixedname.h> #include <dns/fixedname.h>
@@ -40,14 +44,14 @@
#include <dig/dig.h> #include <dig/dig.h>
static bool short_form = true, listed_server = false; static isc_boolean_t short_form = ISC_TRUE, listed_server = ISC_FALSE;
static bool default_lookups = true; static isc_boolean_t default_lookups = ISC_TRUE;
static int seen_error = -1; static int seen_error = -1;
static bool list_addresses = true; static isc_boolean_t list_addresses = ISC_TRUE;
static bool list_almost_all = false; static isc_boolean_t list_almost_all = ISC_FALSE;
static dns_rdatatype_t list_type = dns_rdatatype_a; static dns_rdatatype_t list_type = dns_rdatatype_a;
static bool printed_server = false; static isc_boolean_t printed_server = ISC_FALSE;
static bool ipv4only = false, ipv6only = false; static isc_boolean_t ipv4only = ISC_FALSE, ipv6only = ISC_FALSE;
static const char *opcodetext[] = { static const char *opcodetext[] = {
"QUERY", "QUERY",
@@ -141,6 +145,7 @@ show_usage(void) {
" -c specifies query class for non-IN data\n" " -c specifies query class for non-IN data\n"
" -C compares SOA records on authoritative nameservers\n" " -C compares SOA records on authoritative nameservers\n"
" -d is equivalent to -v\n" " -d is equivalent to -v\n"
" -i IP6.INT reverse lookups\n"
" -l lists all hosts in a domain, using AXFR\n" " -l lists all hosts in a domain, using AXFR\n"
" -m set memory debugging flag (trace|record|usage)\n" " -m set memory debugging flag (trace|record|usage)\n"
" -N changes the number of dots allowed before root lookup is done\n" " -N changes the number of dots allowed before root lookup is done\n"
@@ -149,7 +154,6 @@ show_usage(void) {
" -s a SERVFAIL response should stop query\n" " -s a SERVFAIL response should stop query\n"
" -t specifies the query type\n" " -t specifies the query type\n"
" -T enables TCP/IP mode\n" " -T enables TCP/IP mode\n"
" -U enables UDP mode\n"
" -v enables verbose output\n" " -v enables verbose output\n"
" -V print version number and exit\n" " -V print version number and exit\n"
" -w specifies to wait forever for a reply\n" " -w specifies to wait forever for a reply\n"
@@ -165,7 +169,7 @@ host_shutdown(void) {
} }
static void static void
received(unsigned int bytes, isc_sockaddr_t *from, dig_query_t *query) { received(int bytes, isc_sockaddr_t *from, dig_query_t *query) {
isc_time_t now; isc_time_t now;
int diff; int diff;
@@ -224,7 +228,7 @@ say_message(dns_name_t *name, const char *msg, dns_rdata_t *rdata,
static isc_result_t static isc_result_t
printsection(dns_message_t *msg, dns_section_t sectionid, printsection(dns_message_t *msg, dns_section_t sectionid,
const char *section_name, bool headers, const char *section_name, isc_boolean_t headers,
dig_query_t *query) dig_query_t *query)
{ {
dns_name_t *name, *print_name; dns_name_t *name, *print_name;
@@ -235,13 +239,13 @@ printsection(dns_message_t *msg, dns_section_t sectionid,
isc_region_t r; isc_region_t r;
dns_name_t empty_name; dns_name_t empty_name;
char tbuf[4096]; char tbuf[4096];
bool first; isc_boolean_t first;
bool no_rdata; isc_boolean_t no_rdata;
if (sectionid == DNS_SECTION_QUESTION) if (sectionid == DNS_SECTION_QUESTION)
no_rdata = true; no_rdata = ISC_TRUE;
else else
no_rdata = false; no_rdata = ISC_FALSE;
if (headers) if (headers)
printf(";; %s SECTION:\n", section_name); printf(";; %s SECTION:\n", section_name);
@@ -259,7 +263,7 @@ printsection(dns_message_t *msg, dns_section_t sectionid,
dns_message_currentname(msg, sectionid, &name); dns_message_currentname(msg, sectionid, &name);
isc_buffer_init(&target, tbuf, sizeof(tbuf)); isc_buffer_init(&target, tbuf, sizeof(tbuf));
first = true; first = ISC_TRUE;
print_name = name; print_name = name;
for (rdataset = ISC_LIST_HEAD(name->list); for (rdataset = ISC_LIST_HEAD(name->list);
@@ -283,7 +287,7 @@ printsection(dns_message_t *msg, dns_section_t sectionid,
if (!short_form) { if (!short_form) {
result = dns_rdataset_totext(rdataset, result = dns_rdataset_totext(rdataset,
print_name, print_name,
false, ISC_FALSE,
no_rdata, no_rdata,
&target); &target);
if (result != ISC_R_SUCCESS) if (result != ISC_R_SUCCESS)
@@ -291,7 +295,7 @@ printsection(dns_message_t *msg, dns_section_t sectionid,
#ifdef USEINITALWS #ifdef USEINITALWS
if (first) { if (first) {
print_name = &empty_name; print_name = &empty_name;
first = false; first = ISC_FALSE;
} }
#else #else
UNUSED(first); /* Shut up compiler. */ UNUSED(first); /* Shut up compiler. */
@@ -350,7 +354,7 @@ printsection(dns_message_t *msg, dns_section_t sectionid,
static isc_result_t static isc_result_t
printrdata(dns_message_t *msg, dns_rdataset_t *rdataset, printrdata(dns_message_t *msg, dns_rdataset_t *rdataset,
const dns_name_t *owner, const char *set_name, const dns_name_t *owner, const char *set_name,
bool headers) isc_boolean_t headers)
{ {
isc_buffer_t target; isc_buffer_t target;
isc_result_t result; isc_result_t result;
@@ -363,7 +367,7 @@ printrdata(dns_message_t *msg, dns_rdataset_t *rdataset,
isc_buffer_init(&target, tbuf, sizeof(tbuf)); isc_buffer_init(&target, tbuf, sizeof(tbuf));
result = dns_rdataset_totext(rdataset, owner, false, false, result = dns_rdataset_totext(rdataset, owner, ISC_FALSE, ISC_FALSE,
&target); &target);
if (result != ISC_R_SUCCESS) if (result != ISC_R_SUCCESS)
return (result); return (result);
@@ -394,22 +398,19 @@ chase_cnamechain(dns_message_t *msg, dns_name_t *qname) {
dns_rdataset_current(rdataset, &rdata); dns_rdataset_current(rdataset, &rdata);
result = dns_rdata_tostruct(&rdata, &cname, NULL); result = dns_rdata_tostruct(&rdata, &cname, NULL);
check_result(result, "dns_rdata_tostruct"); check_result(result, "dns_rdata_tostruct");
dns_name_copynf(&cname.cname, qname); dns_name_copy(&cname.cname, qname, NULL);
dns_rdata_freestruct(&cname); dns_rdata_freestruct(&cname);
} }
} }
static isc_result_t static isc_result_t
printmessage(dig_query_t *query, const isc_buffer_t *msgbuf, printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
dns_message_t *msg, bool headers) isc_boolean_t did_flag = ISC_FALSE;
{
bool did_flag = false;
dns_rdataset_t *opt, *tsig = NULL; dns_rdataset_t *opt, *tsig = NULL;
const dns_name_t *tsigname; const dns_name_t *tsigname;
isc_result_t result = ISC_R_SUCCESS; isc_result_t result = ISC_R_SUCCESS;
int force_error; int force_error;
UNUSED(msgbuf);
UNUSED(headers); UNUSED(headers);
/* /*
@@ -427,7 +428,7 @@ printmessage(dig_query_t *query, const isc_buffer_t *msgbuf,
sizeof(sockstr)); sizeof(sockstr));
printf("Address: %s\n", sockstr); printf("Address: %s\n", sockstr);
printf("Aliases: \n\n"); printf("Aliases: \n\n");
printed_server = true; printed_server = ISC_TRUE;
} }
if (msg->rcode != 0) { if (msg->rcode != 0) {
@@ -455,26 +456,27 @@ printmessage(dig_query_t *query, const isc_buffer_t *msgbuf,
dns_name_t *name; dns_name_t *name;
/* Add AAAA and MX lookups. */ /* Add AAAA and MX lookups. */
name = dns_fixedname_initname(&fixed); dns_fixedname_init(&fixed);
dns_name_copynf(query->lookup->name, name); name = dns_fixedname_name(&fixed);
dns_name_copy(query->lookup->name, name, NULL);
chase_cnamechain(msg, name); chase_cnamechain(msg, name);
dns_name_format(name, namestr, sizeof(namestr)); dns_name_format(name, namestr, sizeof(namestr));
lookup = clone_lookup(query->lookup, false); lookup = clone_lookup(query->lookup, ISC_FALSE);
if (lookup != NULL) { if (lookup != NULL) {
strlcpy(lookup->textname, namestr, strlcpy(lookup->textname, namestr,
sizeof(lookup->textname)); sizeof(lookup->textname));
lookup->rdtype = dns_rdatatype_aaaa; lookup->rdtype = dns_rdatatype_aaaa;
lookup->rdtypeset = true; lookup->rdtypeset = ISC_TRUE;
lookup->origin = NULL; lookup->origin = NULL;
lookup->retries = tries; lookup->retries = tries;
ISC_LIST_APPEND(lookup_list, lookup, link); ISC_LIST_APPEND(lookup_list, lookup, link);
} }
lookup = clone_lookup(query->lookup, false); lookup = clone_lookup(query->lookup, ISC_FALSE);
if (lookup != NULL) { if (lookup != NULL) {
strlcpy(lookup->textname, namestr, strlcpy(lookup->textname, namestr,
sizeof(lookup->textname)); sizeof(lookup->textname));
lookup->rdtype = dns_rdatatype_mx; lookup->rdtype = dns_rdatatype_mx;
lookup->rdtypeset = true; lookup->rdtypeset = ISC_TRUE;
lookup->origin = NULL; lookup->origin = NULL;
lookup->retries = tries; lookup->retries = tries;
ISC_LIST_APPEND(lookup_list, lookup, link); ISC_LIST_APPEND(lookup_list, lookup, link);
@@ -488,31 +490,31 @@ printmessage(dig_query_t *query, const isc_buffer_t *msgbuf,
printf(";; flags: "); printf(";; flags: ");
if ((msg->flags & DNS_MESSAGEFLAG_QR) != 0) { if ((msg->flags & DNS_MESSAGEFLAG_QR) != 0) {
printf("qr"); printf("qr");
did_flag = true; did_flag = ISC_TRUE;
} }
if ((msg->flags & DNS_MESSAGEFLAG_AA) != 0) { if ((msg->flags & DNS_MESSAGEFLAG_AA) != 0) {
printf("%saa", did_flag ? " " : ""); printf("%saa", did_flag ? " " : "");
did_flag = true; did_flag = ISC_TRUE;
} }
if ((msg->flags & DNS_MESSAGEFLAG_TC) != 0) { if ((msg->flags & DNS_MESSAGEFLAG_TC) != 0) {
printf("%stc", did_flag ? " " : ""); printf("%stc", did_flag ? " " : "");
did_flag = true; did_flag = ISC_TRUE;
} }
if ((msg->flags & DNS_MESSAGEFLAG_RD) != 0) { if ((msg->flags & DNS_MESSAGEFLAG_RD) != 0) {
printf("%srd", did_flag ? " " : ""); printf("%srd", did_flag ? " " : "");
did_flag = true; did_flag = ISC_TRUE;
} }
if ((msg->flags & DNS_MESSAGEFLAG_RA) != 0) { if ((msg->flags & DNS_MESSAGEFLAG_RA) != 0) {
printf("%sra", did_flag ? " " : ""); printf("%sra", did_flag ? " " : "");
did_flag = true; did_flag = ISC_TRUE;
} }
if ((msg->flags & DNS_MESSAGEFLAG_AD) != 0) { if ((msg->flags & DNS_MESSAGEFLAG_AD) != 0) {
printf("%sad", did_flag ? " " : ""); printf("%sad", did_flag ? " " : "");
did_flag = true; did_flag = ISC_TRUE;
} }
if ((msg->flags & DNS_MESSAGEFLAG_CD) != 0) { if ((msg->flags & DNS_MESSAGEFLAG_CD) != 0) {
printf("%scd", did_flag ? " " : ""); printf("%scd", did_flag ? " " : "");
did_flag = true; did_flag = ISC_TRUE;
POST(did_flag); POST(did_flag);
} }
printf("; QUERY: %u, ANSWER: %u, " printf("; QUERY: %u, ANSWER: %u, "
@@ -535,7 +537,7 @@ printmessage(dig_query_t *query, const isc_buffer_t *msgbuf,
!short_form) { !short_form) {
printf("\n"); printf("\n");
result = printsection(msg, DNS_SECTION_QUESTION, "QUESTION", result = printsection(msg, DNS_SECTION_QUESTION, "QUESTION",
true, query); ISC_TRUE, query);
if (result != ISC_R_SUCCESS) if (result != ISC_R_SUCCESS)
return (result); return (result);
} }
@@ -543,7 +545,7 @@ printmessage(dig_query_t *query, const isc_buffer_t *msgbuf,
if (!short_form) if (!short_form)
printf("\n"); printf("\n");
result = printsection(msg, DNS_SECTION_ANSWER, "ANSWER", result = printsection(msg, DNS_SECTION_ANSWER, "ANSWER",
!short_form, query); ISC_TF(!short_form), query);
if (result != ISC_R_SUCCESS) if (result != ISC_R_SUCCESS)
return (result); return (result);
} }
@@ -552,7 +554,7 @@ printmessage(dig_query_t *query, const isc_buffer_t *msgbuf,
!short_form) { !short_form) {
printf("\n"); printf("\n");
result = printsection(msg, DNS_SECTION_AUTHORITY, "AUTHORITY", result = printsection(msg, DNS_SECTION_AUTHORITY, "AUTHORITY",
true, query); ISC_TRUE, query);
if (result != ISC_R_SUCCESS) if (result != ISC_R_SUCCESS)
return (result); return (result);
} }
@@ -560,14 +562,14 @@ printmessage(dig_query_t *query, const isc_buffer_t *msgbuf,
!short_form) { !short_form) {
printf("\n"); printf("\n");
result = printsection(msg, DNS_SECTION_ADDITIONAL, result = printsection(msg, DNS_SECTION_ADDITIONAL,
"ADDITIONAL", true, query); "ADDITIONAL", ISC_TRUE, query);
if (result != ISC_R_SUCCESS) if (result != ISC_R_SUCCESS)
return (result); return (result);
} }
if ((tsig != NULL) && !short_form) { if ((tsig != NULL) && !short_form) {
printf("\n"); printf("\n");
result = printrdata(msg, tsig, tsigname, result = printrdata(msg, tsig, tsigname,
"PSEUDOSECTION TSIG", true); "PSEUDOSECTION TSIG", ISC_TRUE);
if (result != ISC_R_SUCCESS) if (result != ISC_R_SUCCESS)
return (result); return (result);
} }
@@ -602,7 +604,7 @@ pre_parse_args(int argc, char **argv) {
while ((c = isc_commandline_parse(argc, argv, optstring)) != -1) { while ((c = isc_commandline_parse(argc, argv, optstring)) != -1) {
switch (c) { switch (c) {
case 'm': case 'm':
memdebugging = true; memdebugging = ISC_TRUE;
if (strcasecmp("trace", isc_commandline_argument) == 0) if (strcasecmp("trace", isc_commandline_argument) == 0)
isc_mem_debugging |= ISC_MEM_DEBUGTRACE; isc_mem_debugging |= ISC_MEM_DEBUGTRACE;
else if (strcasecmp("record", else if (strcasecmp("record",
@@ -616,50 +618,49 @@ pre_parse_args(int argc, char **argv) {
case '4': case '4':
if (ipv6only) if (ipv6only)
fatal("only one of -4 and -6 allowed"); fatal("only one of -4 and -6 allowed");
ipv4only = true; ipv4only = ISC_TRUE;
break; break;
case '6': case '6':
if (ipv4only) if (ipv4only)
fatal("only one of -4 and -6 allowed"); fatal("only one of -4 and -6 allowed");
ipv6only = true; ipv6only = ISC_TRUE;
break; break;
case 'a': break; case 'a': break;
case 'A': break; case 'A': break;
case 'c': break; case 'c': break;
case 'C': break;
case 'd': break; case 'd': break;
case 'D':
if (debugging)
debugtiming = true;
debugging = true;
break;
case 'i': break; case 'i': break;
case 'l': break; case 'l': break;
case 'n': break; case 'n': break;
case 'N': break;
case 'r': break; case 'r': break;
case 'R': break;
case 's': break; case 's': break;
case 't': break; case 't': break;
case 'T': break;
case 'U': break;
case 'v': break; case 'v': break;
case 'V': case 'V':
version(); version();
exit(0); exit(0);
break; break;
case 'w': break; case 'w': break;
case 'C': break;
case 'D':
if (debugging)
debugtiming = ISC_TRUE;
debugging = ISC_TRUE;
break;
case 'N': break;
case 'R': break;
case 'T': break;
case 'W': break; case 'W': break;
default: default:
show_usage(); show_usage();
} }
} }
isc_commandline_reset = true; isc_commandline_reset = ISC_TRUE;
isc_commandline_index = 1; isc_commandline_index = 1;
} }
static void static void
parse_args(bool is_batchfile, int argc, char **argv) { parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
char hostname[MXNAME]; char hostname[MXNAME];
dig_lookup_t *lookup; dig_lookup_t *lookup;
int c; int c;
@@ -668,30 +669,30 @@ parse_args(bool is_batchfile, int argc, char **argv) {
isc_result_t result = ISC_R_SUCCESS; isc_result_t result = ISC_R_SUCCESS;
dns_rdatatype_t rdtype; dns_rdatatype_t rdtype;
dns_rdataclass_t rdclass; dns_rdataclass_t rdclass;
uint32_t serial = 0; isc_uint32_t serial = 0;
UNUSED(is_batchfile); UNUSED(is_batchfile);
lookup = make_empty_lookup(); lookup = make_empty_lookup();
lookup->servfail_stops = false; lookup->servfail_stops = ISC_FALSE;
lookup->comments = false; lookup->comments = ISC_FALSE;
short_form = !verbose; short_form = !verbose;
while ((c = isc_commandline_parse(argc, argv, optstring)) != -1) { while ((c = isc_commandline_parse(argc, argv, optstring)) != -1) {
switch (c) { switch (c) {
case 'l': case 'l':
lookup->tcp_mode = true; lookup->tcp_mode = ISC_TRUE;
lookup->rdtype = dns_rdatatype_axfr; lookup->rdtype = dns_rdatatype_axfr;
lookup->rdtypeset = true; lookup->rdtypeset = ISC_TRUE;
fatalexit = 3; fatalexit = 3;
break; break;
case 'v': case 'v':
case 'd': case 'd':
short_form = false; short_form = ISC_FALSE;
break; break;
case 'r': case 'r':
lookup->recurse = false; lookup->recurse = ISC_FALSE;
break; break;
case 't': case 't':
if (strncasecmp(isc_commandline_argument, if (strncasecmp(isc_commandline_argument,
@@ -716,23 +717,33 @@ parse_args(bool is_batchfile, int argc, char **argv) {
if (!lookup->rdtypeset || if (!lookup->rdtypeset ||
lookup->rdtype != dns_rdatatype_axfr) lookup->rdtype != dns_rdatatype_axfr)
lookup->rdtype = rdtype; lookup->rdtype = rdtype;
lookup->rdtypeset = true; lookup->rdtypeset = ISC_TRUE;
#ifdef WITH_IDN
idnoptions = 0;
#endif
if (rdtype == dns_rdatatype_axfr) { if (rdtype == dns_rdatatype_axfr) {
/* -l -t any -v */ /* -l -t any -v */
list_type = dns_rdatatype_any; list_type = dns_rdatatype_any;
short_form = false; short_form = ISC_FALSE;
lookup->tcp_mode = true; lookup->tcp_mode = ISC_TRUE;
} else if (rdtype == dns_rdatatype_ixfr) { } else if (rdtype == dns_rdatatype_ixfr) {
lookup->ixfr_serial = serial; lookup->ixfr_serial = serial;
lookup->tcp_mode = true; lookup->tcp_mode = ISC_TRUE;
list_type = rdtype; list_type = rdtype;
} else if (rdtype == dns_rdatatype_any) { } else if (rdtype == dns_rdatatype_any) {
if (!lookup->tcp_mode_set) if (!lookup->tcp_mode_set)
lookup->tcp_mode = true; lookup->tcp_mode = ISC_TRUE;
#ifdef WITH_IDN
} else if (rdtype == dns_rdatatype_a ||
rdtype == dns_rdatatype_aaaa ||
rdtype == dns_rdatatype_mx) {
idnoptions = IDN_ASCCHECK;
list_type = rdtype;
#endif
} else } else
list_type = rdtype; list_type = rdtype;
list_addresses = false; list_addresses = ISC_FALSE;
default_lookups = false; default_lookups = ISC_FALSE;
break; break;
case 'c': case 'c':
tr.base = isc_commandline_argument; tr.base = isc_commandline_argument;
@@ -746,25 +757,28 @@ parse_args(bool is_batchfile, int argc, char **argv) {
isc_commandline_argument); isc_commandline_argument);
} else { } else {
lookup->rdclass = rdclass; lookup->rdclass = rdclass;
lookup->rdclassset = true; lookup->rdclassset = ISC_TRUE;
} }
default_lookups = false; default_lookups = ISC_FALSE;
break; break;
case 'A': case 'A':
list_almost_all = true; list_almost_all = ISC_TRUE;
/* FALL THROUGH */ /* FALL THROUGH */
case 'a': case 'a':
if (!lookup->rdtypeset || if (!lookup->rdtypeset ||
lookup->rdtype != dns_rdatatype_axfr) lookup->rdtype != dns_rdatatype_axfr)
lookup->rdtype = dns_rdatatype_any; lookup->rdtype = dns_rdatatype_any;
#ifdef WITH_IDN
idnoptions = 0;
#endif
list_type = dns_rdatatype_any; list_type = dns_rdatatype_any;
list_addresses = false; list_addresses = ISC_FALSE;
lookup->rdtypeset = true; lookup->rdtypeset = ISC_TRUE;
short_form = false; short_form = ISC_FALSE;
default_lookups = false; default_lookups = ISC_FALSE;
break; break;
case 'i': case 'i':
/* deprecated */ lookup->ip6_int = ISC_TRUE;
break; break;
case 'n': case 'n':
/* deprecated */ /* deprecated */
@@ -790,23 +804,23 @@ parse_args(bool is_batchfile, int argc, char **argv) {
tries = 2; tries = 2;
break; break;
case 'T': case 'T':
lookup->tcp_mode = true; lookup->tcp_mode = ISC_TRUE;
lookup->tcp_mode_set = true; lookup->tcp_mode_set = ISC_TRUE;
break; break;
case 'U': case 'U':
lookup->tcp_mode = false; lookup->tcp_mode = ISC_FALSE;
lookup->tcp_mode_set = true; lookup->tcp_mode_set = ISC_TRUE;
break; break;
case 'C': case 'C':
debug("showing all SOAs"); debug("showing all SOAs");
lookup->rdtype = dns_rdatatype_ns; lookup->rdtype = dns_rdatatype_ns;
lookup->rdtypeset = true; lookup->rdtypeset = ISC_TRUE;
lookup->rdclass = dns_rdataclass_in; lookup->rdclass = dns_rdataclass_in;
lookup->rdclassset = true; lookup->rdclassset = ISC_TRUE;
lookup->ns_search_only = true; lookup->ns_search_only = ISC_TRUE;
lookup->trace_root = true; lookup->trace_root = ISC_TRUE;
lookup->identify_previous_line = true; lookup->identify_previous_line = ISC_TRUE;
default_lookups = false; default_lookups = ISC_FALSE;
break; break;
case 'N': case 'N':
debug("setting NDOTS to %s", debug("setting NDOTS to %s",
@@ -823,7 +837,7 @@ parse_args(bool is_batchfile, int argc, char **argv) {
/* Handled by pre_parse_args(). */ /* Handled by pre_parse_args(). */
break; break;
case 's': case 's':
lookup->servfail_stops = true; lookup->servfail_stops = ISC_TRUE;
break; break;
} }
} }
@@ -838,22 +852,22 @@ parse_args(bool is_batchfile, int argc, char **argv) {
if (argc > isc_commandline_index + 1) { if (argc > isc_commandline_index + 1) {
set_nameserver(argv[isc_commandline_index+1]); set_nameserver(argv[isc_commandline_index+1]);
debug("server is %s", argv[isc_commandline_index+1]); debug("server is %s", argv[isc_commandline_index+1]);
listed_server = true; listed_server = ISC_TRUE;
} else } else
check_ra = true; check_ra = ISC_TRUE;
lookup->pending = false; lookup->pending = ISC_FALSE;
if (get_reverse(store, sizeof(store), hostname, true) if (get_reverse(store, sizeof(store), hostname,
== ISC_R_SUCCESS) { lookup->ip6_int, ISC_TRUE) == ISC_R_SUCCESS) {
strlcpy(lookup->textname, store, sizeof(lookup->textname)); strlcpy(lookup->textname, store, sizeof(lookup->textname));
lookup->rdtype = dns_rdatatype_ptr; lookup->rdtype = dns_rdatatype_ptr;
lookup->rdtypeset = true; lookup->rdtypeset = ISC_TRUE;
default_lookups = false; default_lookups = ISC_FALSE;
} else { } else {
strlcpy(lookup->textname, hostname, sizeof(lookup->textname)); strlcpy(lookup->textname, hostname, sizeof(lookup->textname));
usesearch = true; usesearch = ISC_TRUE;
} }
lookup->new_search = true; lookup->new_search = ISC_TRUE;
ISC_LIST_APPEND(lookup_list, lookup, link); ISC_LIST_APPEND(lookup_list, lookup, link);
} }
@@ -868,6 +882,9 @@ main(int argc, char **argv) {
ISC_LIST_INIT(search_list); ISC_LIST_INIT(search_list);
fatalexit = 1; fatalexit = 1;
#ifdef WITH_IDN
idnoptions = IDN_ASCCHECK;
#endif
/* setup dighost callbacks */ /* setup dighost callbacks */
dighost_printmessage = printmessage; dighost_printmessage = printmessage;
@@ -882,7 +899,7 @@ main(int argc, char **argv) {
check_result(result, "isc_app_start"); check_result(result, "isc_app_start");
setup_libs(); setup_libs();
setup_system(ipv4only, ipv6only); setup_system(ipv4only, ipv6only);
parse_args(false, argc, argv); parse_args(ISC_FALSE, argc, argv);
if (keyfile[0] != 0) if (keyfile[0] != 0)
setup_file_key(); setup_file_key();
else if (keysecret[0] != 0) else if (keysecret[0] != 0)
+14 -8
View File
@@ -1,14 +1,11 @@
<!DOCTYPE book [ <!DOCTYPE book [
<!ENTITY mdash "&#8212;">]> <!ENTITY mdash "&#8212;">]>
<!-- <!--
- Copyright (C) Internet Systems Consortium, Inc. ("ISC") - Copyright (C) 2000-2002, 2004, 2005, 2007-2009, 2014-2017 Internet Systems Consortium, Inc. ("ISC")
- -
- This Source Code Form is subject to the terms of the Mozilla Public - 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 - 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/. - 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 --> <!-- Converted by db4-upgrade version 1.0 -->
@@ -46,9 +43,6 @@
<year>2015</year> <year>2015</year>
<year>2016</year> <year>2016</year>
<year>2017</year> <year>2017</year>
<year>2018</year>
<year>2019</year>
<year>2020</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder> <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright> </copyright>
</docinfo> </docinfo>
@@ -181,6 +175,18 @@
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term>-i</term>
<listitem>
<para>
Obsolete.
Use the IP6.INT domain for reverse lookups of IPv6
addresses as defined in RFC1886 and deprecated in RFC4159.
The default is to use IP6.ARPA as specified in RFC3596.
</para>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term>-l</term> <term>-l</term>
<listitem> <listitem>
@@ -379,7 +385,7 @@
<command>host</command> appropriately converts character encoding of <command>host</command> appropriately converts character encoding of
domain name before sending a request to DNS server or displaying a domain name before sending a request to DNS server or displaying a
reply from the server. reply from the server.
If you'd like to turn off the IDN support for some reason, define If you'd like to turn off the IDN support for some reason, defines
the <envar>IDN_DISABLE</envar> environment variable. the <envar>IDN_DISABLE</envar> environment variable.
The IDN support is disabled if the variable is set when The IDN support is disabled if the variable is set when
<command>host</command> runs. <command>host</command> runs.
+11 -2
View File
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!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-2020 Internet Systems Consortium, Inc. ("ISC") - Copyright (C) 2000-2002, 2004, 2005, 2007-2009, 2014-2017 Internet Systems Consortium, Inc. ("ISC")
- -
- This Source Code Form is subject to the terms of the Mozilla Public - 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 - License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -138,6 +138,15 @@
Equivalent to the <code class="option">-v</code> verbose option. Equivalent to the <code class="option">-v</code> verbose option.
</p> </p>
</dd> </dd>
<dt><span class="term">-i</span></dt>
<dd>
<p>
Obsolete.
Use the IP6.INT domain for reverse lookups of IPv6
addresses as defined in RFC1886 and deprecated in RFC4159.
The default is to use IP6.ARPA as specified in RFC3596.
</p>
</dd>
<dt><span class="term">-l</span></dt> <dt><span class="term">-l</span></dt>
<dd> <dd>
<p> <p>
@@ -302,7 +311,7 @@
<span class="command"><strong>host</strong></span> appropriately converts character encoding of <span class="command"><strong>host</strong></span> appropriately converts character encoding of
domain name before sending a request to DNS server or displaying a domain name before sending a request to DNS server or displaying a
reply from the server. reply from the server.
If you'd like to turn off the IDN support for some reason, define If you'd like to turn off the IDN support for some reason, defines
the <code class="envar">IDN_DISABLE</code> environment variable. the <code class="envar">IDN_DISABLE</code> environment variable.
The IDN support is disabled if the variable is set when The IDN support is disabled if the variable is set when
<span class="command"><strong>host</strong></span> runs. <span class="command"><strong>host</strong></span> runs.
+53 -94
View File
@@ -1,12 +1,9 @@
/* /*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2000-2009, 2011-2017 Internet Systems Consortium, Inc. ("ISC")
* *
* This Source Code Form is subject to the terms of the Mozilla Public * 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 * 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/. * 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.
*/ */
#ifndef DIG_H #ifndef DIG_H
@@ -14,28 +11,21 @@
/*! \file */ /*! \file */
#include <inttypes.h>
#include <stdbool.h>
#include <dns/rdatalist.h> #include <dns/rdatalist.h>
#include <dst/dst.h> #include <dst/dst.h>
#include <isc/boolean.h>
#include <isc/buffer.h> #include <isc/buffer.h>
#include <isc/bufferlist.h> #include <isc/bufferlist.h>
#include <isc/formatcheck.h> #include <isc/formatcheck.h>
#include <isc/lang.h> #include <isc/lang.h>
#include <isc/list.h> #include <isc/list.h>
#include <isc/magic.h>
#include <isc/mem.h> #include <isc/mem.h>
#include <isc/print.h> #include <isc/print.h>
#include <isc/sockaddr.h> #include <isc/sockaddr.h>
#include <isc/socket.h> #include <isc/socket.h>
#ifdef __APPLE__
#include <TargetConditionals.h>
#endif
#define MXSERV 20 #define MXSERV 20
#define MXNAME (DNS_NAME_MAXTEXT+1) #define MXNAME (DNS_NAME_MAXTEXT+1)
#define MXRD 32 #define MXRD 32
@@ -82,14 +72,9 @@ typedef struct dig_server dig_server_t;
typedef ISC_LIST(dig_server_t) dig_serverlist_t; typedef ISC_LIST(dig_server_t) dig_serverlist_t;
typedef struct dig_searchlist dig_searchlist_t; typedef struct dig_searchlist dig_searchlist_t;
#define DIG_QUERY_MAGIC ISC_MAGIC('D','i','g','q')
#define DIG_VALID_QUERY(x) ISC_MAGIC_VALID((x), DIG_QUERY_MAGIC)
/*% The dig_lookup structure */ /*% The dig_lookup structure */
struct dig_lookup { struct dig_lookup {
bool isc_boolean_t
pending, /*%< Pending a successful answer */ pending, /*%< Pending a successful answer */
waiting_connect, waiting_connect,
doing_xfr, doing_xfr,
@@ -102,13 +87,12 @@ struct dig_lookup {
aaonly, aaonly,
adflag, adflag,
cdflag, cdflag,
raflag,
tcflag,
zflag, zflag,
trace, /*% dig +trace */ trace, /*% dig +trace */
trace_root, /*% initial query for either +trace or +nssearch */ trace_root, /*% initial query for either +trace or +nssearch */
tcp_mode, tcp_mode,
tcp_mode_set, tcp_mode_set,
ip6_int,
comments, comments,
stats, stats,
section_question, section_question,
@@ -138,19 +122,15 @@ struct dig_lookup {
use_usec, use_usec,
nocrypto, nocrypto,
ttlunits, ttlunits,
idnin,
idnout, idnout,
expandaaaa, qr;
qr,
accept_reply_unexpected_src; /*% print replies from unexpected
sources. */
char textname[MXNAME]; /*% Name we're going to be looking up */ char textname[MXNAME]; /*% Name we're going to be looking up */
char cmdline[MXNAME]; char cmdline[MXNAME];
dns_rdatatype_t rdtype; dns_rdatatype_t rdtype;
dns_rdatatype_t qrdtype; dns_rdatatype_t qrdtype;
dns_rdataclass_t rdclass; dns_rdataclass_t rdclass;
bool rdtypeset; isc_boolean_t rdtypeset;
bool rdclassset; isc_boolean_t rdclassset;
char name_space[BUFSIZE]; char name_space[BUFSIZE];
char oname_space[BUFSIZE]; char oname_space[BUFSIZE];
isc_buffer_t namebuf; isc_buffer_t namebuf;
@@ -168,17 +148,17 @@ struct dig_lookup {
dig_serverlist_t my_server_list; dig_serverlist_t my_server_list;
dig_searchlist_t *origin; dig_searchlist_t *origin;
dig_query_t *xfr_q; dig_query_t *xfr_q;
uint32_t retries; isc_uint32_t retries;
int nsfound; int nsfound;
uint16_t udpsize; isc_uint16_t udpsize;
int16_t edns; isc_int16_t edns;
int16_t padding; isc_int16_t padding;
uint32_t ixfr_serial; isc_uint32_t ixfr_serial;
isc_buffer_t rdatabuf; isc_buffer_t rdatabuf;
char rdatastore[MXNAME]; char rdatastore[MXNAME];
dst_context_t *tsigctx; dst_context_t *tsigctx;
isc_buffer_t *querysig; isc_buffer_t *querysig;
uint32_t msgcounter; isc_uint32_t msgcounter;
dns_fixedname_t fdomain; dns_fixedname_t fdomain;
isc_sockaddr_t *ecs_addr; isc_sockaddr_t *ecs_addr;
char *cookie; char *cookie;
@@ -193,9 +173,8 @@ struct dig_lookup {
/*% The dig_query structure */ /*% The dig_query structure */
struct dig_query { struct dig_query {
unsigned int magic;
dig_lookup_t *lookup; dig_lookup_t *lookup;
bool waiting_connect, isc_boolean_t waiting_connect,
pending_free, pending_free,
waiting_senddone, waiting_senddone,
first_pass, first_pass,
@@ -205,26 +184,30 @@ struct dig_query {
recv_made, recv_made,
warn_id, warn_id,
timedout; timedout;
uint32_t first_rr_serial; isc_uint32_t first_rr_serial;
uint32_t second_rr_serial; isc_uint32_t second_rr_serial;
uint32_t msg_count; isc_uint32_t msg_count;
uint32_t rr_count; isc_uint32_t rr_count;
bool ixfr_axfr; isc_boolean_t ixfr_axfr;
char *servname; char *servname;
char *userarg; char *userarg;
isc_bufferlist_t sendlist,
recvlist,
lengthlist;
isc_buffer_t recvbuf, isc_buffer_t recvbuf,
lengthbuf, lengthbuf,
tmpsendbuf, slbuf;
sendbuf; char *recvspace,
char *recvspace, *tmpsendspace, lengthspace[4],
lengthspace[4]; slspace[4];
isc_socket_t *sock; isc_socket_t *sock;
ISC_LINK(dig_query_t) link; ISC_LINK(dig_query_t) link;
ISC_LINK(dig_query_t) clink; ISC_LINK(dig_query_t) clink;
isc_sockaddr_t sockaddr; isc_sockaddr_t sockaddr;
isc_time_t time_sent; isc_time_t time_sent;
isc_time_t time_recv; isc_time_t time_recv;
uint64_t byte_count; isc_uint64_t byte_count;
isc_buffer_t sendbuf;
isc_timer_t *timer; isc_timer_t *timer;
}; };
@@ -251,8 +234,8 @@ extern dig_serverlist_t server_list;
extern dig_searchlistlist_t search_list; extern dig_searchlistlist_t search_list;
extern unsigned int extrabytes; extern unsigned int extrabytes;
extern bool check_ra, have_ipv4, have_ipv6, specified_source, extern isc_boolean_t check_ra, have_ipv4, have_ipv6, specified_source,
usesearch, showsearch, yaml; usesearch, showsearch;
extern in_port_t port; extern in_port_t port;
extern unsigned int timeout; extern unsigned int timeout;
extern isc_mem_t *mctx; extern isc_mem_t *mctx;
@@ -266,18 +249,21 @@ extern char keyfile[MXNAME];
extern char keysecret[MXNAME]; extern char keysecret[MXNAME];
extern const dns_name_t *hmacname; extern const dns_name_t *hmacname;
extern unsigned int digestbits; extern unsigned int digestbits;
extern dns_tsigkey_t *tsigkey; extern dns_tsigkey_t *key;
extern bool validated; extern isc_boolean_t validated;
extern isc_taskmgr_t *taskmgr; extern isc_taskmgr_t *taskmgr;
extern isc_task_t *global_task; extern isc_task_t *global_task;
extern bool free_now; extern isc_boolean_t free_now;
extern bool debugging, debugtiming, memdebugging; extern isc_boolean_t debugging, debugtiming, memdebugging;
extern bool keep_open; extern isc_boolean_t keep_open;
extern char *progname; extern char *progname;
extern int tries; extern int tries;
extern int fatalexit; extern int fatalexit;
extern bool verbose; extern isc_boolean_t verbose;
#ifdef WITH_IDN
extern int idnoptions;
#endif
/* /*
* Routines in dighost.c. * Routines in dighost.c.
@@ -289,26 +275,20 @@ int
getaddresses(dig_lookup_t *lookup, const char *host, isc_result_t *resultp); getaddresses(dig_lookup_t *lookup, const char *host, isc_result_t *resultp);
isc_result_t isc_result_t
get_reverse(char *reverse, size_t len, char *value, bool strict); get_reverse(char *reverse, size_t len, char *value, isc_boolean_t ip6_int,
isc_boolean_t strict);
ISC_PLATFORM_NORETURN_PRE void ISC_PLATFORM_NORETURN_PRE void
fatal(const char *format, ...) fatal(const char *format, ...)
ISC_FORMAT_PRINTF(1, 2) ISC_PLATFORM_NORETURN_POST; ISC_FORMAT_PRINTF(1, 2) ISC_PLATFORM_NORETURN_POST;
void
warn(const char *format, ...) ISC_FORMAT_PRINTF(1, 2);
ISC_PLATFORM_NORETURN_PRE void
digexit(void)
ISC_PLATFORM_NORETURN_POST;
void void
debug(const char *format, ...) ISC_FORMAT_PRINTF(1, 2); debug(const char *format, ...) ISC_FORMAT_PRINTF(1, 2);
void void
check_result(isc_result_t result, const char *msg); check_result(isc_result_t result, const char *msg);
bool isc_boolean_t
setup_lookup(dig_lookup_t *lookup); setup_lookup(dig_lookup_t *lookup);
void void
@@ -330,14 +310,14 @@ void
setup_libs(void); setup_libs(void);
void void
setup_system(bool ipv4only, bool ipv6only); setup_system(isc_boolean_t ipv4only, isc_boolean_t ipv6only);
isc_result_t isc_result_t
parse_uint(uint32_t *uip, const char *value, uint32_t max, parse_uint(isc_uint32_t *uip, const char *value, isc_uint32_t max,
const char *desc); const char *desc);
isc_result_t isc_result_t
parse_xint(uint32_t *uip, const char *value, uint32_t max, parse_xint(isc_uint32_t *uip, const char *value, isc_uint32_t max,
const char *desc); const char *desc);
isc_result_t isc_result_t
@@ -347,13 +327,13 @@ void
parse_hmac(const char *hmacstr); parse_hmac(const char *hmacstr);
dig_lookup_t * dig_lookup_t *
requeue_lookup(dig_lookup_t *lookold, bool servers); requeue_lookup(dig_lookup_t *lookold, isc_boolean_t servers);
dig_lookup_t * dig_lookup_t *
make_empty_lookup(void); make_empty_lookup(void);
dig_lookup_t * dig_lookup_t *
clone_lookup(dig_lookup_t *lookold, bool servers); clone_lookup(dig_lookup_t *lookold, isc_boolean_t servers);
dig_server_t * dig_server_t *
make_server(const char *servname, const char *userarg); make_server(const char *servname, const char *userarg);
@@ -377,39 +357,21 @@ destroy_libs(void);
void void
set_search_domain(char *domain); set_search_domain(char *domain);
char *
next_token(char **stringp, const char *delim);
/* /*
* Routines to be defined in dig.c, host.c, and nslookup.c. and * Routines to be defined in dig.c, host.c, and nslookup.c. and
* then assigned to the appropriate function pointer * then assigned to the appropriate function pointer
*/ */
extern isc_result_t extern isc_result_t
(*dighost_printmessage)(dig_query_t *query, const isc_buffer_t *msgbuf, (*dighost_printmessage)(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers);
dns_message_t *msg, bool headers);
/*
* Print an error message in the appropriate format.
*/
extern void
(*dighost_error)(const char *format, ...);
/*
* Print a warning message in the appropriate format.
*/
extern void
(*dighost_warning)(const char *format, ...);
/*
* Print a comment in the appropriate format.
*/
extern void
(*dighost_comments)(dig_lookup_t *lookup, const char *format, ...);
/*%< /*%<
* Print the final result of the lookup. * Print the final result of the lookup.
*/ */
extern void extern void
(*dighost_received)(unsigned int bytes, isc_sockaddr_t *from, (*dighost_received)(int bytes, isc_sockaddr_t *from, dig_query_t *query);
dig_query_t *query);
/*%< /*%<
* Print a message about where and when the response * Print a message about where and when the response
* was received from, like the final comment in the * was received from, like the final comment in the
@@ -422,9 +384,6 @@ extern void
extern void extern void
(*dighost_shutdown)(void); (*dighost_shutdown)(void);
extern void
(*dighost_pre_exit_hook)(void);
void save_opt(dig_lookup_t *lookup, char *code, char *value); void save_opt(dig_lookup_t *lookup, char *code, char *value);
void setup_file_key(void); void setup_file_key(void);
@@ -445,7 +404,7 @@ dig_setup(int argc, char **argv);
* Call to supply new parameters for the next lookup * Call to supply new parameters for the next lookup
*/ */
void void
dig_query_setup(bool, bool, int argc, char **argv); dig_query_setup(isc_boolean_t, isc_boolean_t, int argc, char **argv);
/*%< /*%<
* set the main application event cycle running * set the main application event cycle running
+2 -13
View File
@@ -1,4 +1,4 @@
.\" Copyright (C) 2004-2007, 2010, 2013-2020 Internet Systems Consortium, Inc. ("ISC") .\" Copyright (C) 2004-2007, 2010, 2013-2017 Internet Systems Consortium, Inc. ("ISC")
.\" .\"
.\" This Source Code Form is subject to the terms of the Mozilla Public .\" 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 .\" License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -277,17 +277,6 @@ Try the next nameserver if a nameserver responds with SERVFAIL or a referral (no
.PP .PP
\fBnslookup\fR \fBnslookup\fR
returns with an exit status of 1 if any query failed, and 0 otherwise\&. returns with an exit status of 1 if any query failed, and 0 otherwise\&.
.SH "IDN SUPPORT"
.PP
If
\fBnslookup\fR
has been built with IDN (internationalized domain name) support, it can accept and display non\-ASCII domain names\&.
\fBnslookup\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, define the
\fBIDN_DISABLE\fR
environment variable\&. The IDN support is disabled if the variable is set when
\fBnslookup\fR
runs or when the standard output is not a tty\&.
.SH "FILES" .SH "FILES"
.PP .PP
/etc/resolv\&.conf /etc/resolv\&.conf
@@ -301,5 +290,5 @@ runs or when the standard output is not a tty\&.
\fBInternet Systems Consortium, Inc\&.\fR \fBInternet Systems Consortium, Inc\&.\fR
.SH "COPYRIGHT" .SH "COPYRIGHT"
.br .br
Copyright \(co 2004-2007, 2010, 2013-2020 Internet Systems Consortium, Inc. ("ISC") Copyright \(co 2004-2007, 2010, 2013-2017 Internet Systems Consortium, Inc. ("ISC")
.br .br
+120 -139
View File
@@ -1,16 +1,13 @@
/* /*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2000-2017 Internet Systems Consortium, Inc. ("ISC")
* *
* This Source Code Form is subject to the terms of the Mozilla Public * 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 * 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/. * 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.
*/ */
#include <inttypes.h> #include <config.h>
#include <stdbool.h>
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>
@@ -53,18 +50,18 @@
#endif #endif
#endif #endif
static bool short_form = true, static isc_boolean_t short_form = ISC_TRUE,
tcpmode = false, tcpmode_set = false, tcpmode = ISC_FALSE, tcpmode_set = ISC_FALSE,
identify = false, stats = true, identify = ISC_FALSE, stats = ISC_TRUE,
comments = true, section_question = true, comments = ISC_TRUE, section_question = ISC_TRUE,
section_answer = true, section_authority = true, section_answer = ISC_TRUE, section_authority = ISC_TRUE,
section_additional = true, recurse = true, section_additional = ISC_TRUE, recurse = ISC_TRUE,
aaonly = false, nofail = true, aaonly = ISC_FALSE, nofail = ISC_TRUE,
default_lookups = true, a_noanswer = false; default_lookups = ISC_TRUE, a_noanswer = ISC_FALSE;
static bool interactive; static isc_boolean_t interactive;
static bool in_use = false; static isc_boolean_t in_use = ISC_FALSE;
static char defclass[MXRD] = "IN"; static char defclass[MXRD] = "IN";
static char deftype[MXRD] = "A"; static char deftype[MXRD] = "A";
static isc_event_t *global_event = NULL; static isc_event_t *global_event = NULL;
@@ -213,7 +210,7 @@ printrdata(dns_rdata_t *rdata) {
isc_result_t result; isc_result_t result;
isc_buffer_t *b = NULL; isc_buffer_t *b = NULL;
unsigned int size = 1024; unsigned int size = 1024;
bool done = false; isc_boolean_t done = ISC_FALSE;
if (rdata->type < N_KNOWN_RRTYPES) if (rdata->type < N_KNOWN_RRTYPES)
printf("%s", rtypetext[rdata->type]); printf("%s", rtypetext[rdata->type]);
@@ -228,7 +225,7 @@ printrdata(dns_rdata_t *rdata) {
if (result == ISC_R_SUCCESS) { if (result == ISC_R_SUCCESS) {
printf("%.*s\n", (int)isc_buffer_usedlength(b), printf("%.*s\n", (int)isc_buffer_usedlength(b),
(char *)isc_buffer_base(b)); (char *)isc_buffer_base(b));
done = true; done = ISC_TRUE;
} else if (result != ISC_R_NOSPACE) } else if (result != ISC_R_NOSPACE)
check_result(result, "dns_rdata_totext"); check_result(result, "dns_rdata_totext");
isc_buffer_free(&b); isc_buffer_free(&b);
@@ -237,7 +234,7 @@ printrdata(dns_rdata_t *rdata) {
} }
static isc_result_t static isc_result_t
printsection(dig_query_t *query, dns_message_t *msg, bool headers, printsection(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers,
dns_section_t section) { dns_section_t section) {
isc_result_t result, loopresult; isc_result_t result, loopresult;
dns_name_t *name; dns_name_t *name;
@@ -304,7 +301,7 @@ printsection(dig_query_t *query, dns_message_t *msg, bool headers,
} }
static isc_result_t static isc_result_t
detailsection(dig_query_t *query, dns_message_t *msg, bool headers, detailsection(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers,
dns_section_t section) { dns_section_t section) {
isc_result_t result, loopresult; isc_result_t result, loopresult;
dns_name_t *name; dns_name_t *name;
@@ -390,7 +387,7 @@ detailsection(dig_query_t *query, dns_message_t *msg, bool headers,
} }
static void static void
received(unsigned int bytes, isc_sockaddr_t *from, dig_query_t *query) received(int bytes, isc_sockaddr_t *from, dig_query_t *query)
{ {
UNUSED(bytes); UNUSED(bytes);
UNUSED(from); UNUSED(from);
@@ -423,27 +420,22 @@ chase_cnamechain(dns_message_t *msg, dns_name_t *qname) {
dns_rdataset_current(rdataset, &rdata); dns_rdataset_current(rdataset, &rdata);
result = dns_rdata_tostruct(&rdata, &cname, NULL); result = dns_rdata_tostruct(&rdata, &cname, NULL);
check_result(result, "dns_rdata_tostruct"); check_result(result, "dns_rdata_tostruct");
dns_name_copynf(&cname.cname, qname); dns_name_copy(&cname.cname, qname, NULL);
dns_rdata_freestruct(&cname); dns_rdata_freestruct(&cname);
} }
} }
static isc_result_t static isc_result_t
printmessage(dig_query_t *query, const isc_buffer_t *msgbuf, printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
dns_message_t *msg, bool headers)
{
char servtext[ISC_SOCKADDR_FORMATSIZE]; char servtext[ISC_SOCKADDR_FORMATSIZE];
UNUSED(msgbuf);
/* I've we've gotten this far, we've reached a server. */ /* I've we've gotten this far, we've reached a server. */
query_error = 0; query_error = 0;
debug("printmessage()"); debug("printmessage()");
if(!default_lookups || query->lookup->rdtype == dns_rdatatype_a) { if(!default_lookups || query->lookup->rdtype == dns_rdatatype_a) {
isc_sockaddr_format(&query->sockaddr, servtext, isc_sockaddr_format(&query->sockaddr, servtext, sizeof(servtext));
sizeof(servtext));
printf("Server:\t\t%s\n", query->userarg); printf("Server:\t\t%s\n", query->userarg);
printf("Address:\t%s\n", servtext); printf("Address:\t%s\n", servtext);
@@ -453,10 +445,10 @@ printmessage(dig_query_t *query, const isc_buffer_t *msgbuf,
if (!short_form) { if (!short_form) {
puts("------------"); puts("------------");
/* detailheader(query, msg);*/ /* detailheader(query, msg);*/
detailsection(query, msg, true, DNS_SECTION_QUESTION); detailsection(query, msg, ISC_TRUE, DNS_SECTION_QUESTION);
detailsection(query, msg, true, DNS_SECTION_ANSWER); detailsection(query, msg, ISC_TRUE, DNS_SECTION_ANSWER);
detailsection(query, msg, true, DNS_SECTION_AUTHORITY); detailsection(query, msg, ISC_TRUE, DNS_SECTION_AUTHORITY);
detailsection(query, msg, true, DNS_SECTION_ADDITIONAL); detailsection(query, msg, ISC_TRUE, DNS_SECTION_ADDITIONAL);
puts("------------"); puts("------------");
} }
@@ -480,16 +472,17 @@ printmessage(dig_query_t *query, const isc_buffer_t *msgbuf,
dns_name_t *name; dns_name_t *name;
/* Add AAAA lookup. */ /* Add AAAA lookup. */
name = dns_fixedname_initname(&fixed); dns_fixedname_init(&fixed);
dns_name_copynf(query->lookup->name, name); name = dns_fixedname_name(&fixed);
dns_name_copy(query->lookup->name, name, NULL);
chase_cnamechain(msg, name); chase_cnamechain(msg, name);
dns_name_format(name, namestr, sizeof(namestr)); dns_name_format(name, namestr, sizeof(namestr));
lookup = clone_lookup(query->lookup, false); lookup = clone_lookup(query->lookup, ISC_FALSE);
if (lookup != NULL) { if (lookup != NULL) {
strlcpy(lookup->textname, namestr, strlcpy(lookup->textname, namestr,
sizeof(lookup->textname)); sizeof(lookup->textname));
lookup->rdtype = dns_rdatatype_aaaa; lookup->rdtype = dns_rdatatype_aaaa;
lookup->rdtypeset = true; lookup->rdtypeset = ISC_TRUE;
lookup->origin = NULL; lookup->origin = NULL;
lookup->retries = tries; lookup->retries = tries;
ISC_LIST_APPEND(lookup_list, lookup, link); ISC_LIST_APPEND(lookup_list, lookup, link);
@@ -503,7 +496,7 @@ printmessage(dig_query_t *query, const isc_buffer_t *msgbuf,
printsection(query, msg, headers, DNS_SECTION_ANSWER); printsection(query, msg, headers, DNS_SECTION_ANSWER);
else { else {
if (default_lookups && query->lookup->rdtype == dns_rdatatype_a) if (default_lookups && query->lookup->rdtype == dns_rdatatype_a)
a_noanswer = true; a_noanswer = ISC_TRUE;
else if (!default_lookups || else if (!default_lookups ||
(query->lookup->rdtype == dns_rdatatype_aaaa && (query->lookup->rdtype == dns_rdatatype_aaaa &&
@@ -525,7 +518,7 @@ printmessage(dig_query_t *query, const isc_buffer_t *msgbuf,
} }
static void static void
show_settings(bool full, bool serv_only) { show_settings(isc_boolean_t full, isc_boolean_t serv_only) {
dig_server_t *srv; dig_server_t *srv;
isc_sockaddr_t sockaddr; isc_sockaddr_t sockaddr;
dig_searchlist_t *listent; dig_searchlist_t *listent;
@@ -556,7 +549,7 @@ show_settings(bool full, bool serv_only) {
printf(" %s\t\t%s\n", printf(" %s\t\t%s\n",
usesearch ? "search" : "nosearch", usesearch ? "search" : "nosearch",
recurse ? "recurse" : "norecurse"); recurse ? "recurse" : "norecurse");
printf(" timeout = %u\t\tretry = %d\tport = %u\tndots = %d\n", printf(" timeout = %d\t\tretry = %d\tport = %d\tndots = %d\n",
timeout, tries, port, ndots); timeout, tries, port, ndots);
printf(" querytype = %-8s\tclass = %s\n", deftype, defclass); printf(" querytype = %-8s\tclass = %s\n", deftype, defclass);
printf(" srchlist = "); printf(" srchlist = ");
@@ -570,7 +563,7 @@ show_settings(bool full, bool serv_only) {
printf("\n"); printf("\n");
} }
static bool static isc_boolean_t
testtype(char *typetext) { testtype(char *typetext) {
isc_result_t result; isc_result_t result;
isc_textregion_t tr; isc_textregion_t tr;
@@ -580,14 +573,14 @@ testtype(char *typetext) {
tr.length = strlen(typetext); tr.length = strlen(typetext);
result = dns_rdatatype_fromtext(&rdtype, &tr); result = dns_rdatatype_fromtext(&rdtype, &tr);
if (result == ISC_R_SUCCESS) if (result == ISC_R_SUCCESS)
return (true); return (ISC_TRUE);
else { else {
printf("unknown query type: %s\n", typetext); printf("unknown query type: %s\n", typetext);
return (false); return (ISC_FALSE);
} }
} }
static bool static isc_boolean_t
testclass(char *typetext) { testclass(char *typetext) {
isc_result_t result; isc_result_t result;
isc_textregion_t tr; isc_textregion_t tr;
@@ -597,24 +590,24 @@ testclass(char *typetext) {
tr.length = strlen(typetext); tr.length = strlen(typetext);
result = dns_rdataclass_fromtext(&rdclass, &tr); result = dns_rdataclass_fromtext(&rdclass, &tr);
if (result == ISC_R_SUCCESS) if (result == ISC_R_SUCCESS)
return (true); return (ISC_TRUE);
else { else {
printf("unknown query class: %s\n", typetext); printf("unknown query class: %s\n", typetext);
return (false); return (ISC_FALSE);
} }
} }
static void static void
set_port(const char *value) { set_port(const char *value) {
uint32_t n; isc_uint32_t n;
isc_result_t result = parse_uint(&n, value, 65535, "port"); isc_result_t result = parse_uint(&n, value, 65535, "port");
if (result == ISC_R_SUCCESS) if (result == ISC_R_SUCCESS)
port = (uint16_t) n; port = (isc_uint16_t) n;
} }
static void static void
set_timeout(const char *value) { set_timeout(const char *value) {
uint32_t n; isc_uint32_t n;
isc_result_t result = parse_uint(&n, value, UINT_MAX, "timeout"); isc_result_t result = parse_uint(&n, value, UINT_MAX, "timeout");
if (result == ISC_R_SUCCESS) if (result == ISC_R_SUCCESS)
timeout = n; timeout = n;
@@ -622,7 +615,7 @@ set_timeout(const char *value) {
static void static void
set_tries(const char *value) { set_tries(const char *value) {
uint32_t n; isc_uint32_t n;
isc_result_t result = parse_uint(&n, value, INT_MAX, "tries"); isc_result_t result = parse_uint(&n, value, INT_MAX, "tries");
if (result == ISC_R_SUCCESS) if (result == ISC_R_SUCCESS)
tries = n; tries = n;
@@ -630,7 +623,7 @@ set_tries(const char *value) {
static void static void
set_ndots(const char *value) { set_ndots(const char *value) {
uint32_t n; isc_uint32_t n;
isc_result_t result = parse_uint(&n, value, 128, "ndots"); isc_result_t result = parse_uint(&n, value, 128, "ndots");
if (result == ISC_R_SUCCESS) if (result == ISC_R_SUCCESS)
ndots = n; ndots = n;
@@ -649,7 +642,7 @@ setoption(char *opt) {
((l >= N) && (l < sizeof(A)) && (strncasecmp(opt, A, l) == 0)) ((l >= N) && (l < sizeof(A)) && (strncasecmp(opt, A, l) == 0))
if (CHECKOPT("all", 3)) { if (CHECKOPT("all", 3)) {
show_settings(true, false); show_settings(ISC_TRUE, ISC_FALSE);
} else if (strncasecmp(opt, "class=", 6) == 0) { } else if (strncasecmp(opt, "class=", 6) == 0) {
if (testclass(&opt[6])) if (testclass(&opt[6]))
strlcpy(defclass, &opt[6], sizeof(defclass)); strlcpy(defclass, &opt[6], sizeof(defclass));
@@ -659,41 +652,41 @@ setoption(char *opt) {
} else if (strncasecmp(opt, "type=", 5) == 0) { } else if (strncasecmp(opt, "type=", 5) == 0) {
if (testtype(&opt[5])) { if (testtype(&opt[5])) {
strlcpy(deftype, &opt[5], sizeof(deftype)); strlcpy(deftype, &opt[5], sizeof(deftype));
default_lookups = false; default_lookups = ISC_FALSE;
} }
} else if (strncasecmp(opt, "ty=", 3) == 0) { } else if (strncasecmp(opt, "ty=", 3) == 0) {
if (testtype(&opt[3])) { if (testtype(&opt[3])) {
strlcpy(deftype, &opt[3], sizeof(deftype)); strlcpy(deftype, &opt[3], sizeof(deftype));
default_lookups = false; default_lookups = ISC_FALSE;
} }
} else if (strncasecmp(opt, "querytype=", 10) == 0) { } else if (strncasecmp(opt, "querytype=", 10) == 0) {
if (testtype(&opt[10])) { if (testtype(&opt[10])) {
strlcpy(deftype, &opt[10], sizeof(deftype)); strlcpy(deftype, &opt[10], sizeof(deftype));
default_lookups = false; default_lookups = ISC_FALSE;
} }
} else if (strncasecmp(opt, "query=", 6) == 0) { } else if (strncasecmp(opt, "query=", 6) == 0) {
if (testtype(&opt[6])) { if (testtype(&opt[6])) {
strlcpy(deftype, &opt[6], sizeof(deftype)); strlcpy(deftype, &opt[6], sizeof(deftype));
default_lookups = false; default_lookups = ISC_FALSE;
} }
} else if (strncasecmp(opt, "qu=", 3) == 0) { } else if (strncasecmp(opt, "qu=", 3) == 0) {
if (testtype(&opt[3])) { if (testtype(&opt[3])) {
strlcpy(deftype, &opt[3], sizeof(deftype)); strlcpy(deftype, &opt[3], sizeof(deftype));
default_lookups = false; default_lookups = ISC_FALSE;
} }
} else if (strncasecmp(opt, "q=", 2) == 0) { } else if (strncasecmp(opt, "q=", 2) == 0) {
if (testtype(&opt[2])) { if (testtype(&opt[2])) {
strlcpy(deftype, &opt[2], sizeof(deftype)); strlcpy(deftype, &opt[2], sizeof(deftype));
default_lookups = false; default_lookups = ISC_FALSE;
} }
} else if (strncasecmp(opt, "domain=", 7) == 0) { } else if (strncasecmp(opt, "domain=", 7) == 0) {
strlcpy(domainopt, &opt[7], sizeof(domainopt)); strlcpy(domainopt, &opt[7], sizeof(domainopt));
set_search_domain(domainopt); set_search_domain(domainopt);
usesearch = true; usesearch = ISC_TRUE;
} else if (strncasecmp(opt, "do=", 3) == 0) { } else if (strncasecmp(opt, "do=", 3) == 0) {
strlcpy(domainopt, &opt[3], sizeof(domainopt)); strlcpy(domainopt, &opt[3], sizeof(domainopt));
set_search_domain(domainopt); set_search_domain(domainopt);
usesearch = true; usesearch = ISC_TRUE;
} else if (strncasecmp(opt, "port=", 5) == 0) { } else if (strncasecmp(opt, "port=", 5) == 0) {
set_port(&opt[5]); set_port(&opt[5]);
} else if (strncasecmp(opt, "po=", 3) == 0) { } else if (strncasecmp(opt, "po=", 3) == 0) {
@@ -703,43 +696,43 @@ setoption(char *opt) {
} else if (strncasecmp(opt, "t=", 2) == 0) { } else if (strncasecmp(opt, "t=", 2) == 0) {
set_timeout(&opt[2]); set_timeout(&opt[2]);
} else if (CHECKOPT("recurse", 3)) { } else if (CHECKOPT("recurse", 3)) {
recurse = true; recurse = ISC_TRUE;
} else if (CHECKOPT("norecurse", 5)) { } else if (CHECKOPT("norecurse", 5)) {
recurse = false; recurse = ISC_FALSE;
} else if (strncasecmp(opt, "retry=", 6) == 0) { } else if (strncasecmp(opt, "retry=", 6) == 0) {
set_tries(&opt[6]); set_tries(&opt[6]);
} else if (strncasecmp(opt, "ret=", 4) == 0) { } else if (strncasecmp(opt, "ret=", 4) == 0) {
set_tries(&opt[4]); set_tries(&opt[4]);
} else if (CHECKOPT("defname", 3)) { } else if (CHECKOPT("defname", 3)) {
usesearch = true; usesearch = ISC_TRUE;
} else if (CHECKOPT("nodefname", 5)) { } else if (CHECKOPT("nodefname", 5)) {
usesearch = false; usesearch = ISC_FALSE;
} else if (CHECKOPT("vc", 2)) { } else if (CHECKOPT("vc", 2) == 0) {
tcpmode = true; tcpmode = ISC_TRUE;
tcpmode_set = true; tcpmode_set = ISC_TRUE;
} else if (CHECKOPT("novc", 4)) { } else if (CHECKOPT("novc", 4) == 0) {
tcpmode = false; tcpmode = ISC_FALSE;
tcpmode_set = true; tcpmode_set = ISC_TRUE;
} else if (CHECKOPT("debug", 3)) { } else if (CHECKOPT("debug", 3) == 0) {
short_form = false; short_form = ISC_FALSE;
showsearch = true; showsearch = ISC_TRUE;
} else if (CHECKOPT("nodebug", 5)) { } else if (CHECKOPT("nodebug", 5) == 0) {
short_form = true; short_form = ISC_TRUE;
showsearch = false; showsearch = ISC_FALSE;
} else if (CHECKOPT("d2", 2)) { } else if (CHECKOPT("d2", 2) == 0) {
debugging = true; debugging = ISC_TRUE;
} else if (CHECKOPT("nod2", 4)) { } else if (CHECKOPT("nod2", 4) == 0) {
debugging = false; debugging = ISC_FALSE;
} else if (CHECKOPT("search", 3)) { } else if (CHECKOPT("search", 3) == 0) {
usesearch = true; usesearch = ISC_TRUE;
} else if (CHECKOPT("nosearch", 5)) { } else if (CHECKOPT("nosearch", 5) == 0) {
usesearch = false; usesearch = ISC_FALSE;
} else if (CHECKOPT("sil", 3)) { } else if (CHECKOPT("sil", 3) == 0) {
/* deprecation_msg = false; */ /* deprecation_msg = ISC_FALSE; */
} else if (CHECKOPT("fail", 3)) { } else if (CHECKOPT("fail", 3) == 0) {
nofail=false; nofail=ISC_FALSE;
} else if (CHECKOPT("nofail", 5)) { } else if (CHECKOPT("nofail", 5) == 0) {
nofail=true; nofail=ISC_TRUE;
} else if (strncasecmp(opt, "ndots=", 6) == 0) { } else if (strncasecmp(opt, "ndots=", 6) == 0) {
set_ndots(&opt[6]); set_ndots(&opt[6]);
} else { } else {
@@ -758,7 +751,7 @@ addlookup(char *opt) {
debug("addlookup()"); debug("addlookup()");
a_noanswer = false; a_noanswer = ISC_FALSE;
tr.base = deftype; tr.base = deftype;
tr.length = strlen(deftype); tr.length = strlen(deftype);
@@ -775,21 +768,21 @@ addlookup(char *opt) {
rdclass = dns_rdataclass_in; rdclass = dns_rdataclass_in;
} }
lookup = make_empty_lookup(); lookup = make_empty_lookup();
if (get_reverse(store, sizeof(store), opt, true) if (get_reverse(store, sizeof(store), opt, lookup->ip6_int, ISC_TRUE)
== ISC_R_SUCCESS) { == ISC_R_SUCCESS) {
strlcpy(lookup->textname, store, sizeof(lookup->textname)); strlcpy(lookup->textname, store, sizeof(lookup->textname));
lookup->rdtype = dns_rdatatype_ptr; lookup->rdtype = dns_rdatatype_ptr;
lookup->rdtypeset = true; lookup->rdtypeset = ISC_TRUE;
} else { } else {
strlcpy(lookup->textname, opt, sizeof(lookup->textname)); strlcpy(lookup->textname, opt, sizeof(lookup->textname));
lookup->rdtype = rdtype; lookup->rdtype = rdtype;
lookup->rdtypeset = true; lookup->rdtypeset = ISC_TRUE;
} }
lookup->rdclass = rdclass; lookup->rdclass = rdclass;
lookup->rdclassset = true; lookup->rdclassset = ISC_TRUE;
lookup->trace = false; lookup->trace = ISC_FALSE;
lookup->trace_root = lookup->trace; lookup->trace_root = lookup->trace;
lookup->ns_search_only = false; lookup->ns_search_only = ISC_FALSE;
lookup->identify = identify; lookup->identify = identify;
lookup->recurse = recurse; lookup->recurse = recurse;
lookup->aaonly = aaonly; lookup->aaonly = aaonly;
@@ -797,7 +790,7 @@ addlookup(char *opt) {
lookup->udpsize = 0; lookup->udpsize = 0;
lookup->comments = comments; lookup->comments = comments;
if (lookup->rdtype == dns_rdatatype_any && !tcpmode_set) if (lookup->rdtype == dns_rdatatype_any && !tcpmode_set)
lookup->tcp_mode = true; lookup->tcp_mode = ISC_TRUE;
else else
lookup->tcp_mode = tcpmode; lookup->tcp_mode = tcpmode;
lookup->stats = stats; lookup->stats = stats;
@@ -805,9 +798,9 @@ addlookup(char *opt) {
lookup->section_answer = section_answer; lookup->section_answer = section_answer;
lookup->section_authority = section_authority; lookup->section_authority = section_authority;
lookup->section_additional = section_additional; lookup->section_additional = section_additional;
lookup->new_search = true; lookup->new_search = ISC_TRUE;
if (nofail) if (nofail)
lookup->servfail_stops = false; lookup->servfail_stops = ISC_FALSE;
ISC_LIST_INIT(lookup->q); ISC_LIST_INIT(lookup->q);
ISC_LINK_INIT(lookup, link); ISC_LINK_INIT(lookup, link);
ISC_LIST_APPEND(lookup_list, lookup, link); ISC_LIST_APPEND(lookup_list, lookup, link);
@@ -818,12 +811,12 @@ addlookup(char *opt) {
static void static void
do_next_command(char *input) { do_next_command(char *input) {
char *ptr, *arg, *last; char *ptr, *arg;
if ((ptr = strtok_r(input, " \t\r\n", &last)) == NULL) { ptr = next_token(&input, " \t\r\n");
if (ptr == NULL)
return; return;
} arg = next_token(&input, " \t\r\n");
arg = strtok_r(NULL, " \t\r\n", &last);
if ((strcasecmp(ptr, "set") == 0) && if ((strcasecmp(ptr, "set") == 0) &&
(arg != NULL)) (arg != NULL))
setoption(arg); setoption(arg);
@@ -831,11 +824,11 @@ do_next_command(char *input) {
(strcasecmp(ptr, "lserver") == 0)) { (strcasecmp(ptr, "lserver") == 0)) {
isc_app_block(); isc_app_block();
set_nameserver(arg); set_nameserver(arg);
check_ra = false; check_ra = ISC_FALSE;
isc_app_unblock(); isc_app_unblock();
show_settings(true, true); show_settings(ISC_TRUE, ISC_TRUE);
} else if (strcasecmp(ptr, "exit") == 0) { } else if (strcasecmp(ptr, "exit") == 0) {
in_use = false; in_use = ISC_FALSE;
} else if (strcasecmp(ptr, "help") == 0 || } else if (strcasecmp(ptr, "help") == 0 ||
strcasecmp(ptr, "?") == 0) { strcasecmp(ptr, "?") == 0) {
printf("The '%s' command is not yet implemented.\n", ptr); printf("The '%s' command is not yet implemented.\n", ptr);
@@ -855,6 +848,8 @@ get_next_command(void) {
fflush(stdout); fflush(stdout);
buf = isc_mem_allocate(mctx, COMMSIZE); buf = isc_mem_allocate(mctx, COMMSIZE);
if (buf == NULL)
fatal("memory allocation failure");
isc_app_block(); isc_app_block();
if (interactive) { if (interactive) {
#ifdef HAVE_READLINE #ifdef HAVE_READLINE
@@ -870,7 +865,7 @@ get_next_command(void) {
ptr = fgets(buf, COMMSIZE, stdin); ptr = fgets(buf, COMMSIZE, stdin);
isc_app_unblock(); isc_app_unblock();
if (ptr == NULL) { if (ptr == NULL) {
in_use = false; in_use = ISC_FALSE;
} else } else
do_next_command(ptr); do_next_command(ptr);
#ifdef HAVE_READLINE #ifdef HAVE_READLINE
@@ -880,29 +875,12 @@ get_next_command(void) {
isc_mem_free(mctx, buf); isc_mem_free(mctx, buf);
} }
ISC_PLATFORM_NORETURN_PRE static void
usage(void) ISC_PLATFORM_NORETURN_POST;
static void
usage(void) {
fprintf(stderr, "Usage:\n");
fprintf(stderr,
" nslookup [-opt ...] # interactive mode using default server\n");
fprintf(stderr,
" nslookup [-opt ...] - server # interactive mode using 'server'\n");
fprintf(stderr,
" nslookup [-opt ...] host # just look up 'host' using default server\n");
fprintf(stderr,
" nslookup [-opt ...] host server # just look up 'host' using 'server'\n");
exit(1);
}
static void static void
parse_args(int argc, char **argv) { parse_args(int argc, char **argv) {
bool have_lookup = false; isc_boolean_t have_lookup = ISC_FALSE;
usesearch = true; usesearch = ISC_TRUE;
for (argc--, argv++; argc > 0 && argv[0] != NULL; argc--, argv++) { for (argc--, argv++; argc > 0; argc--, argv++) {
debug("main parsing %s", argv[0]); debug("main parsing %s", argv[0]);
if (argv[0][0] == '-') { if (argv[0][0] == '-') {
if (strncasecmp(argv[0], "-ver", 4) == 0) { if (strncasecmp(argv[0], "-ver", 4) == 0) {
@@ -911,18 +889,15 @@ parse_args(int argc, char **argv) {
} else if (argv[0][1] != 0) { } else if (argv[0][1] != 0) {
setoption(&argv[0][1]); setoption(&argv[0][1]);
} else } else
have_lookup = true; have_lookup = ISC_TRUE;
} else { } else {
if (!have_lookup) { if (!have_lookup) {
have_lookup = true; have_lookup = ISC_TRUE;
in_use = true; in_use = ISC_TRUE;
addlookup(argv[0]); addlookup(argv[0]);
} else { } else {
if (argv[1] != NULL) {
usage();
}
set_nameserver(argv[0]); set_nameserver(argv[0]);
check_ra = false; check_ra = ISC_FALSE;
} }
} }
} }
@@ -944,6 +919,12 @@ flush_lookup_list(void) {
ISC_SOCKCANCEL_ALL); ISC_SOCKCANCEL_ALL);
isc_socket_detach(&q->sock); isc_socket_detach(&q->sock);
} }
if (ISC_LINK_LINKED(&q->recvbuf, link))
ISC_LIST_DEQUEUE(q->recvlist, &q->recvbuf,
link);
if (ISC_LINK_LINKED(&q->lengthbuf, link))
ISC_LIST_DEQUEUE(q->lengthlist, &q->lengthbuf,
link);
isc_buffer_invalidate(&q->recvbuf); isc_buffer_invalidate(&q->recvbuf);
isc_buffer_invalidate(&q->lengthbuf); isc_buffer_invalidate(&q->lengthbuf);
qp = q; qp = q;
@@ -987,13 +968,13 @@ int
main(int argc, char **argv) { main(int argc, char **argv) {
isc_result_t result; isc_result_t result;
interactive = isatty(0); interactive = ISC_TF(isatty(0));
ISC_LIST_INIT(lookup_list); ISC_LIST_INIT(lookup_list);
ISC_LIST_INIT(server_list); ISC_LIST_INIT(server_list);
ISC_LIST_INIT(search_list); ISC_LIST_INIT(search_list);
check_ra = true; check_ra = ISC_TRUE;
/* setup dighost callbacks */ /* setup dighost callbacks */
dighost_printmessage = printmessage; dighost_printmessage = printmessage;
@@ -1007,7 +988,7 @@ main(int argc, char **argv) {
setup_libs(); setup_libs();
progname = argv[0]; progname = argv[0];
setup_system(false, false); setup_system(ISC_FALSE, ISC_FALSE);
parse_args(argc, argv); parse_args(argc, argv);
if (keyfile[0] != 0) if (keyfile[0] != 0)
setup_file_key(); setup_file_key();
@@ -1021,7 +1002,7 @@ main(int argc, char **argv) {
else else
result = isc_app_onrun(mctx, global_task, getinput, NULL); result = isc_app_onrun(mctx, global_task, getinput, NULL);
check_result(result, "isc_app_onrun"); check_result(result, "isc_app_onrun");
in_use = !in_use; in_use = ISC_TF(!in_use);
(void)isc_app_run(); (void)isc_app_run();
+2 -30
View File
@@ -1,12 +1,9 @@
<!-- <!--
- Copyright (C) Internet Systems Consortium, Inc. ("ISC") - Copyright (C) 2004-2007, 2010, 2013-2017 Internet Systems Consortium, Inc. ("ISC")
- -
- This Source Code Form is subject to the terms of the Mozilla Public - 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 - 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/. - 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.
--> -->
<!-- <!--
@@ -70,9 +67,6 @@
<year>2015</year> <year>2015</year>
<year>2016</year> <year>2016</year>
<year>2017</year> <year>2017</year>
<year>2018</year>
<year>2019</year>
<year>2020</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder> <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright> </copyright>
</docinfo> </docinfo>
@@ -390,13 +384,7 @@ nslookup -query=hinfo -timeout=10
Change the type of the information query. Change the type of the information query.
</para> </para>
<para> <para>
(Default = A and then AAAA; abbreviations = q, ty) (Default = A; abbreviations = q, ty)
</para>
<para>
<emphasis role="bold">Note:</emphasis> It is
only possible to specify one query type, only
the default behavior looks up both when an
alternative is not specified.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@@ -486,22 +474,6 @@ nslookup -query=hinfo -timeout=10
</para> </para>
</refsection> </refsection>
<refsection><info><title>IDN SUPPORT</title></info>
<para>
If <command>nslookup</command> has been built with IDN (internationalized
domain name) support, it can accept and display non-ASCII domain names.
<command>nslookup</command> appropriately converts character encoding of
domain name before sending a request to DNS server or displaying a
reply from the server.
If you'd like to turn off the IDN support for some reason, define
the <envar>IDN_DISABLE</envar> environment variable.
The IDN support is disabled if the variable is set when
<command>nslookup</command> runs or when the standard output is not
a tty.
</para>
</refsection>
<refsection><info><title>FILES</title></info> <refsection><info><title>FILES</title></info>
<para><filename>/etc/resolv.conf</filename> <para><filename>/etc/resolv.conf</filename>
+3 -20
View File
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- <!--
- Copyright (C) 2004-2007, 2010, 2013-2020 Internet Systems Consortium, Inc. ("ISC") - Copyright (C) 2004-2007, 2010, 2013-2017 Internet Systems Consortium, Inc. ("ISC")
- -
- This Source Code Form is subject to the terms of the Mozilla Public - 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 - License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -362,31 +362,14 @@ nslookup -query=hinfo -timeout=10
</div> </div>
<div class="refsection"> <div class="refsection">
<a name="id-1.11"></a><h2>IDN SUPPORT</h2> <a name="id-1.11"></a><h2>FILES</h2>
<p>
If <span class="command"><strong>nslookup</strong></span> has been built with IDN (internationalized
domain name) support, it can accept and display non-ASCII domain names.
<span class="command"><strong>nslookup</strong></span> appropriately converts character encoding of
domain name before sending a request to DNS server or displaying a
reply from the server.
If you'd like to turn off the IDN support for some reason, define
the <code class="envar">IDN_DISABLE</code> environment variable.
The IDN support is disabled if the variable is set when
<span class="command"><strong>nslookup</strong></span> runs or when the standard output is not
a tty.
</p>
</div>
<div class="refsection">
<a name="id-1.12"></a><h2>FILES</h2>
<p><code class="filename">/etc/resolv.conf</code> <p><code class="filename">/etc/resolv.conf</code>
</p> </p>
</div> </div>
<div class="refsection"> <div class="refsection">
<a name="id-1.13"></a><h2>SEE ALSO</h2> <a name="id-1.12"></a><h2>SEE ALSO</h2>
<p><span class="citerefentry"> <p><span class="citerefentry">
<span class="refentrytitle">dig</span>(1) <span class="refentrytitle">dig</span>(1)
+5 -10
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?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"> <ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@"> <ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
@@ -14,21 +14,18 @@
<ProjectGuid>{F938F9B8-D395-4A40-BEC7-0122D289C692}</ProjectGuid> <ProjectGuid>{F938F9B8-D395-4A40-BEC7-0122D289C692}</ProjectGuid>
<Keyword>Win32Proj</Keyword> <Keyword>Win32Proj</Keyword>
<RootNamespace>dig</RootNamespace> <RootNamespace>dig</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings"> <ImportGroup Label="ExtensionSettings">
@@ -56,14 +53,13 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile> <PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation> <AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
<ObjectFileName>.\$(Configuration)\</ObjectFileName> <ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName> <ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<BrowseInformation>true</BrowseInformation> <BrowseInformation>true</BrowseInformation>
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
<AdditionalIncludeDirectories>.\;..\include;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@@IDN_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\dns\include;..\..\..\lib\bind9\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>.\;..\include;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@@IDN_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\dns\include;..\..\..\lib\bind9\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
</ClCompile> </ClCompile>
@@ -72,7 +68,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile> <OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@dighost.lib;libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;@IDN_LIB@ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>dighost.lib;libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;@IDN_LIB@ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
@@ -83,7 +79,7 @@
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions> <IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization> <WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
@@ -91,7 +87,6 @@
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation> <AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
<ObjectFileName>.\$(Configuration)\</ObjectFileName> <ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName> <ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
<AdditionalIncludeDirectories>.\;..\include;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@@IDN_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\dns\include;..\..\..\lib\bind9\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>.\;..\include;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@@IDN_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\dns\include;..\..\..\lib\bind9\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
</ClCompile> </ClCompile>
@@ -103,7 +98,7 @@
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile> <OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration> <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@dighost.lib;libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;@IDN_LIB@ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>dighost.lib;libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;@IDN_LIB@ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
+3 -8
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?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"> <ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@"> <ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
@@ -14,21 +14,18 @@
<ProjectGuid>{140DE800-E552-43CC-B0C7-A33A92E368CA}</ProjectGuid> <ProjectGuid>{140DE800-E552-43CC-B0C7-A33A92E368CA}</ProjectGuid>
<Keyword>Win32Proj</Keyword> <Keyword>Win32Proj</Keyword>
<RootNamespace>dighost</RootNamespace> <RootNamespace>dighost</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType> <ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType> <ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings"> <ImportGroup Label="ExtensionSettings">
@@ -56,14 +53,13 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile> <PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation> <AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
<ObjectFileName>.\$(Configuration)\</ObjectFileName> <ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName> <ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<BrowseInformation>true</BrowseInformation> <BrowseInformation>true</BrowseInformation>
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@@IDN_INC@..\include;..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\dns\include;..\..\..\lib\irs\include;..\..\..\lib\irs\win32\include;..\..\..\lib\bind9\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@@IDN_INC@..\include;..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\dns\include;..\..\..\lib\irs\include;..\..\..\lib\irs\win32\include;..\..\..\lib\bind9\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
</ClCompile> </ClCompile>
@@ -81,7 +77,7 @@
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions> <IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization> <WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
@@ -89,7 +85,6 @@
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation> <AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
<ObjectFileName>.\$(Configuration)\</ObjectFileName> <ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName> <ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@@IDN_INC@..\include;..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\dns\include;..\..\..\lib\irs\include;..\..\..\lib\irs\win32\include;..\..\..\lib\bind9\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@@IDN_INC@..\include;..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\dns\include;..\..\..\lib\irs\include;..\..\..\lib\irs\win32\include;..\..\..\lib\bind9\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
</ClCompile> </ClCompile>
+5 -10
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?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"> <ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@"> <ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
@@ -14,21 +14,18 @@
<ProjectGuid>{BA1048A8-6961-4A20-BE12-08BE20611C9D}</ProjectGuid> <ProjectGuid>{BA1048A8-6961-4A20-BE12-08BE20611C9D}</ProjectGuid>
<Keyword>Win32Proj</Keyword> <Keyword>Win32Proj</Keyword>
<RootNamespace>host</RootNamespace> <RootNamespace>host</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings"> <ImportGroup Label="ExtensionSettings">
@@ -56,14 +53,13 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile> <PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation> <AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
<ObjectFileName>.\$(Configuration)\</ObjectFileName> <ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName> <ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<BrowseInformation>true</BrowseInformation> <BrowseInformation>true</BrowseInformation>
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
<AdditionalIncludeDirectories>.\;..\include;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@@IDN_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\dns\include;..\..\..\lib\bind9\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>.\;..\include;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@@IDN_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\dns\include;..\..\..\lib\bind9\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
</ClCompile> </ClCompile>
@@ -72,7 +68,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile> <OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@dighost.lib;@IDN_LIB@libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>dighost.lib;@IDN_LIB@libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
@@ -83,7 +79,7 @@
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions> <IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization> <WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
@@ -91,7 +87,6 @@
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation> <AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
<ObjectFileName>.\$(Configuration)\</ObjectFileName> <ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName> <ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
<AdditionalIncludeDirectories>.\;..\include;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@@IDN_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\dns\include;..\..\..\lib\bind9\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>.\;..\include;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@@IDN_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\dns\include;..\..\..\lib\bind9\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
</ClCompile> </ClCompile>
@@ -103,7 +98,7 @@
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile> <OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration> <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@dighost.lib;@IDN_LIB@libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>dighost.lib;@IDN_LIB@libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
+5 -10
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?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"> <ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@"> <ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
@@ -14,21 +14,18 @@
<ProjectGuid>{C15A6E1A-94CE-4686-99F9-6BC5FD623EB5}</ProjectGuid> <ProjectGuid>{C15A6E1A-94CE-4686-99F9-6BC5FD623EB5}</ProjectGuid>
<Keyword>Win32Proj</Keyword> <Keyword>Win32Proj</Keyword>
<RootNamespace>nslookup</RootNamespace> <RootNamespace>nslookup</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings"> <ImportGroup Label="ExtensionSettings">
@@ -56,14 +53,13 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;USE_READLINE_STATIC;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;@CRYPTO@USE_READLINE_STATIC;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile> <PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation> <AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
<ObjectFileName>.\$(Configuration)\</ObjectFileName> <ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName> <ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<BrowseInformation>true</BrowseInformation> <BrowseInformation>true</BrowseInformation>
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
<AdditionalIncludeDirectories>.\;..\include;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@@READLINE_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\irs\include;..\..\..\lib\irs\win32\include;..\..\..\lib\dns\include;..\..\..\lib\bind9\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>.\;..\include;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@@READLINE_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\irs\include;..\..\..\lib\irs\win32\include;..\..\..\lib\dns\include;..\..\..\lib\bind9\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
</ClCompile> </ClCompile>
@@ -72,7 +68,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile> <OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@@READLINE_LIBD@@IDN_LIB@libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>@READLINE_LIBD@@IDN_LIB@libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
@@ -83,7 +79,7 @@
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions> <IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;USE_READLINE_STATIC;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;@CRYPTO@USE_READLINE_STATIC;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization> <WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
@@ -91,7 +87,6 @@
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation> <AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
<ObjectFileName>.\$(Configuration)\</ObjectFileName> <ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName> <ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
<AdditionalIncludeDirectories>.\;..\include;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@@READLINE_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\irs\include;..\..\..\lib\irs\win32\include;..\..\..\lib\dns\include;..\..\..\lib\bind9\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>.\;..\include;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@@READLINE_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\irs\include;..\..\..\lib\irs\win32\include;..\..\..\lib\dns\include;..\..\..\lib\bind9\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
</ClCompile> </ClCompile>
@@ -103,7 +98,7 @@
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile> <OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration> <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<AdditionalLibraryDirectories>..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@@READLINE_LIB@@IDN_LIB@libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>@READLINE_LIB@@IDN_LIB@libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
+14 -19
View File
@@ -1,11 +1,8 @@
# Copyright (C) Internet Systems Consortium, Inc. ("ISC") # Copyright (C) 2000-2002, 2004, 2005, 2007-2009, 2012-2017 Internet Systems Consortium, Inc. ("ISC")
# #
# This Source Code Form is subject to the terms of the Mozilla Public # 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 # 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/. # 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@ srcdir = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
@@ -15,26 +12,24 @@ VERSION=@BIND9_VERSION@
@BIND9_MAKE_INCLUDES@ @BIND9_MAKE_INCLUDES@
CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES} ${ISCCFG_INCLUDES} \ CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES} @DST_OPENSSL_INC@
${OPENSSL_CFLAGS}
CDEFINES = -DVERSION=\"${VERSION}\" -DNAMED_CONFFILE=\"${sysconfdir}/named.conf\" CDEFINES = -DVERSION=\"${VERSION}\" @USE_PKCS11@ @PKCS11_ENGINE@ \
@CRYPTO@ -DPK11_LIB_LOCATION=\"@PKCS11_PROVIDER@\"
CWARNINGS = CWARNINGS =
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@ DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@ ISCLIBS = ../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @ISC_OPENSSL_LIBS@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS}
DNSDEPLIBS = ../../lib/dns/libdns.@A@ DNSDEPLIBS = ../../lib/dns/libdns.@A@
ISCDEPLIBS = ../../lib/isc/libisc.@A@ ISCDEPLIBS = ../../lib/isc/libisc.@A@
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
DEPLIBS = ${DNSDEPLIBS} ${ISCCFGDEPLIBS} ${ISCDEPLIBS} DEPLIBS = ${DNSDEPLIBS} ${ISCDEPLIBS}
LIBS = ${DNSLIBS} ${ISCCFGLIBS} ${ISCLIBS} @LIBS@ LIBS = ${DNSLIBS} ${ISCLIBS} @LIBS@
NOSYMLIBS = ${DNSLIBS} ${ISCCFGLIBS} ${ISCNOSYMLIBS} @LIBS@ NOSYMLIBS = ${DNSLIBS} ${ISCNOSYMLIBS} @LIBS@
# Alphabetically # Alphabetically
TARGETS = dnssec-cds@EXEEXT@ dnssec-dsfromkey@EXEEXT@ \ TARGETS = dnssec-cds@EXEEXT@ dnssec-dsfromkey@EXEEXT@ \
@@ -118,12 +113,12 @@ installdirs:
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man8 $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man8
install:: ${TARGETS} installdirs install:: ${TARGETS} installdirs
for t in ${TARGETS}; do ${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} $$t ${DESTDIR}${sbindir} || exit 1; done for t in ${TARGETS}; do ${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} $$t ${DESTDIR}${sbindir}; done
for m in ${MANPAGES}; do ${INSTALL_DATA} ${srcdir}/$$m ${DESTDIR}${mandir}/man8 || exit 1; done for m in ${MANPAGES}; do ${INSTALL_DATA} ${srcdir}/$$m ${DESTDIR}${mandir}/man8; done
uninstall:: uninstall::
for m in ${MANPAGES}; do rm -f ${DESTDIR}${mandir}/man8/$$m || exit 1; done for m in ${MANPAGES}; do rm -f ${DESTDIR}${mandir}/man8/$$m ; done
for t in ${TARGETS}; do ${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${sbindir}/$$t || exit 1; done for t in ${TARGETS}; do ${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${sbindir}/$$t ; done
clean distclean:: clean distclean::
rm -f ${TARGETS} rm -f ${TARGETS}
+4 -9
View File
@@ -1,4 +1,4 @@
.\" Copyright (C) 2017-2020 Internet Systems Consortium, Inc. ("ISC") .\" Copyright (C) 2017 Internet Systems Consortium, Inc. ("ISC")
.\" .\"
.\" This Source Code Form is subject to the terms of the Mozilla Public .\" 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 .\" License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -44,8 +44,7 @@ dnssec-cds \- change DS records for a child zone based on CDS/CDNSKEY
.PP .PP
The The
\fBdnssec\-cds\fR \fBdnssec\-cds\fR
command changes DS records at a delegation point based on CDS or CDNSKEY records published in the child zone\&. If both CDS and CDNSKEY records are present in the child zone, the CDS is preferred\&. This enables a child zone to inform its parent of upcoming changes to its key\-signing keys; by polling periodically with command changes DS records at a delegation point based on CDS or CDNSKEY records published in the child zone\&. If both CDS and CDNSKEY records are present in the child zone, the CDS is preferred\&.
\fBdnssec\-cds\fR, the parent can keep the DS records up to date and enable automatic rolling of KSKs\&.
.PP .PP
Two input files are required\&. The Two input files are required\&. The
\fB\-f \fR\fB\fIchild\-file\fR\fR \fB\-f \fR\fB\fIchild\-file\fR\fR
@@ -58,10 +57,6 @@ file generated by
\fBdnssec\-dsfromkey\fR, or the output of a previous run of \fBdnssec\-dsfromkey\fR, or the output of a previous run of
\fBdnssec\-cds\fR\&. \fBdnssec\-cds\fR\&.
.PP .PP
The
\fBdnssec\-cds\fR
command uses special DNSSEC validation logic specified by RFC 7344\&. It requires that the CDS and/or CDNSKEY records are validly signed by a key represented in the existing DS records\&. This will typicially be the pre\-existing key\-signing key (KSK)\&.
.PP
For protection against replay attacks, the signatures on the child records must not be older than they were on a previous run of For protection against replay attacks, the signatures on the child records must not be older than they were on a previous run of
\fBdnssec\-cds\fR\&. This time is obtained from the modification time of the \fBdnssec\-cds\fR\&. This time is obtained from the modification time of the
dsset\- dsset\-
@@ -102,7 +97,7 @@ Specify a digest algorithm to use when converting CDNSKEY records to DS records\
.sp .sp
The The
\fIalgorithm\fR \fIalgorithm\fR
must be one of SHA\-1, SHA\-256, or SHA\-384\&. These values are case insensitive, and the hyphen may be omitted\&. If no algorithm is specified, the default is SHA\-256\&. must be one of SHA\-1 (SHA1), SHA\-256 (SHA256), GOST, or SHA\-384 (SHA384)\&. These values are case insensitive\&. If no algorithm is specified, the default is SHA\-256\&.
.RE .RE
.PP .PP
\-c \fIclass\fR \-c \fIclass\fR
@@ -293,5 +288,5 @@ RFC 7344\&.
.RE .RE
.SH "COPYRIGHT" .SH "COPYRIGHT"
.br .br
Copyright \(co 2017-2020 Internet Systems Consortium, Inc. ("ISC") Copyright \(co 2017 Internet Systems Consortium, Inc. ("ISC")
.br .br
+144 -80
View File
@@ -1,12 +1,9 @@
/* /*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2017 Internet Systems Consortium, Inc. ("ISC")
* *
* This Source Code Form is subject to the terms of the Mozilla Public * 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 * 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/. * 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.
*/ */
/* /*
@@ -16,13 +13,14 @@
/*! \file */ /*! \file */
#include <config.h>
#include <errno.h> #include <errno.h>
#include <inttypes.h>
#include <stdbool.h>
#include <stdlib.h> #include <stdlib.h>
#include <isc/buffer.h> #include <isc/buffer.h>
#include <isc/commandline.h> #include <isc/commandline.h>
#include <isc/entropy.h>
#include <isc/file.h> #include <isc/file.h>
#include <isc/hash.h> #include <isc/hash.h>
#include <isc/mem.h> #include <isc/mem.h>
@@ -53,19 +51,25 @@
#include <dst/dst.h> #include <dst/dst.h>
#if USE_PKCS11 #ifdef PKCS11CRYPTO
#include <pk11/result.h> #include <pk11/result.h>
#endif #endif
#include "dnssectool.h" #include "dnssectool.h"
#ifndef PATH_MAX
#define PATH_MAX 1024 /* AIX, WIN32, and others don't define this. */
#endif
const char *program = "dnssec-cds"; const char *program = "dnssec-cds";
int verbose;
/* /*
* Infrastructure * Infrastructure
*/ */
static isc_log_t *lctx = NULL; static isc_log_t *lctx = NULL;
static isc_mem_t *mctx = NULL; static isc_mem_t *mctx = NULL;
static isc_entropy_t *ectx = NULL;
/* /*
* The domain we are working on * The domain we are working on
@@ -75,6 +79,12 @@ static dns_fixedname_t fixed;
static dns_name_t *name = NULL; static dns_name_t *name = NULL;
static dns_rdataclass_t rdclass = dns_rdataclass_in; static dns_rdataclass_t rdclass = dns_rdataclass_in;
/*
* List of digest types used by ds_from_cdnskey(), filled in by add_dtype()
* from -a arguments. The size of the array is an arbitrary limit.
*/
static isc_uint8_t dtype[8];
static const char *startstr = NULL; /* from which we derive notbefore */ static const char *startstr = NULL; /* from which we derive notbefore */
static isc_stdtime_t notbefore = 0; /* restrict sig inception times */ static isc_stdtime_t notbefore = 0; /* restrict sig inception times */
static dns_rdata_rrsig_t oldestsig; /* for recording inception time */ static dns_rdata_rrsig_t oldestsig; /* for recording inception time */
@@ -116,7 +126,7 @@ static int nkey; /* number of child zone DNSKEY records */
typedef struct keyinfo { typedef struct keyinfo {
dns_rdata_t rdata; dns_rdata_t rdata;
dst_key_t *dst; dst_key_t *dst;
dns_secalg_t algo; isc_uint8_t algo;
dns_keytag_t tag; dns_keytag_t tag;
} keyinfo_t; } keyinfo_t;
@@ -150,8 +160,8 @@ verbose_time(int level, const char *msg, isc_stdtime_t time) {
if (verbose < 3) { if (verbose < 3) {
vbprintf(level, "%s %s\n", msg, timestr); vbprintf(level, "%s %s\n", msg, timestr);
} else { } else {
vbprintf(level, "%s %s (%" PRIu32 ")\n", vbprintf(level, "%s %s (%lld)\n",
msg, timestr, time); msg, timestr, (long long)time);
} }
} }
@@ -160,7 +170,8 @@ initname(char *setname) {
isc_result_t result; isc_result_t result;
isc_buffer_t buf; isc_buffer_t buf;
name = dns_fixedname_initname(&fixed); dns_fixedname_init(&fixed);
name = dns_fixedname_name(&fixed);
namestr = setname; namestr = setname;
isc_buffer_init(&buf, setname, strlen(setname)); isc_buffer_init(&buf, setname, strlen(setname));
@@ -240,14 +251,14 @@ load_db(const char *filename, dns_db_t **dbp, dns_dbnode_t **nodep) {
rdclass, 0, NULL, dbp); rdclass, 0, NULL, dbp);
check_result(result, "dns_db_create()"); check_result(result, "dns_db_create()");
result = dns_db_load(*dbp, filename, result = dns_db_load3(*dbp, filename,
dns_masterformat_text, DNS_MASTER_HINT); dns_masterformat_text, DNS_MASTER_HINT);
if (result != ISC_R_SUCCESS && result != DNS_R_SEENINCLUDE) { if (result != ISC_R_SUCCESS && result != DNS_R_SEENINCLUDE) {
fatal("can't load %s: %s", filename, fatal("can't load %s: %s", filename,
isc_result_totext(result)); isc_result_totext(result));
} }
result = dns_db_findnode(*dbp, name, false, nodep); result = dns_db_findnode(*dbp, name, ISC_FALSE, nodep);
if (result != ISC_R_SUCCESS) { if (result != ISC_R_SUCCESS) {
fatal("can't find %s node in %s", namestr, filename); fatal("can't find %s node in %s", namestr, filename);
} }
@@ -301,7 +312,7 @@ get_dsset_name(char *filename, size_t size,
} }
isc_buffer_putstr(&buf, prefix); isc_buffer_putstr(&buf, prefix);
result = dns_name_tofilenametext(name, false, &buf); result = dns_name_tofilenametext(name, ISC_FALSE, &buf);
check_result(result, "dns_name_tofilenametext()"); check_result(result, "dns_name_tofilenametext()");
if (isc_buffer_availablelength(&buf) == 0) { if (isc_buffer_availablelength(&buf) == 0) {
fatal("%s: pathname too long", path); fatal("%s: pathname too long", path);
@@ -365,14 +376,14 @@ formatset(dns_rdataset_t *rdataset) {
* which just separates fields with spaces. The huge tab stop width * which just separates fields with spaces. The huge tab stop width
* eliminates any tab characters. * eliminates any tab characters.
*/ */
result = dns_master_stylecreate(&style, styleflags, result = dns_master_stylecreate2(&style, styleflags,
0, 0, 0, 0, 0, 1000000, 0, 0, 0, 0, 0, 0, 1000000, 0,
mctx); mctx);
check_result(result, "dns_master_stylecreate2 failed"); check_result(result, "dns_master_stylecreate2 failed");
result = isc_buffer_allocate(mctx, &buf, MAX_CDS_RDATA_TEXT_SIZE); result = isc_buffer_allocate(mctx, &buf, MAX_CDS_RDATA_TEXT_SIZE);
check_result(result, "printing DS records"); check_result(result, "printing DS records");
result = dns_master_rdatasettotext(name, rdataset, style, NULL, buf); result = dns_master_rdatasettotext(name, rdataset, style, buf);
if ((result == ISC_R_SUCCESS) && isc_buffer_availablelength(buf) < 1) { if ((result == ISC_R_SUCCESS) && isc_buffer_availablelength(buf) < 1) {
result = ISC_R_NOSPACE; result = ISC_R_NOSPACE;
@@ -389,7 +400,7 @@ formatset(dns_rdataset_t *rdataset) {
static void static void
write_parent_set(const char *path, const char *inplace, write_parent_set(const char *path, const char *inplace,
bool nsupdate, dns_rdataset_t *rdataset) isc_boolean_t nsupdate, dns_rdataset_t *rdataset)
{ {
isc_result_t result; isc_result_t result;
isc_buffer_t *buf = NULL; isc_buffer_t *buf = NULL;
@@ -456,7 +467,7 @@ typedef enum { LOOSE, TIGHT } strictness_t;
/* /*
* Find out if any (C)DS record matches a particular (C)DNSKEY. * Find out if any (C)DS record matches a particular (C)DNSKEY.
*/ */
static bool static isc_boolean_t
match_key_dsset(keyinfo_t *ki, dns_rdataset_t *dsset, strictness_t strictness) match_key_dsset(keyinfo_t *ki, dns_rdataset_t *dsset, strictness_t strictness)
{ {
isc_result_t result; isc_result_t result;
@@ -469,7 +480,8 @@ match_key_dsset(keyinfo_t *ki, dns_rdataset_t *dsset, strictness_t strictness)
dns_rdata_ds_t ds; dns_rdata_ds_t ds;
dns_rdata_t dsrdata = DNS_RDATA_INIT; dns_rdata_t dsrdata = DNS_RDATA_INIT;
dns_rdata_t newdsrdata = DNS_RDATA_INIT; dns_rdata_t newdsrdata = DNS_RDATA_INIT;
bool c; dns_rdatatype_t keytype;
isc_boolean_t c;
dns_rdataset_current(dsset, &dsrdata); dns_rdataset_current(dsset, &dsrdata);
result = dns_rdata_tostruct(&dsrdata, &ds, NULL); result = dns_rdata_tostruct(&dsrdata, &ds, NULL);
@@ -479,8 +491,12 @@ match_key_dsset(keyinfo_t *ki, dns_rdataset_t *dsset, strictness_t strictness)
continue; continue;
} }
/* allow for both DNSKEY and CDNSKEY */
keytype = ki->rdata.type;
ki->rdata.type = dns_rdatatype_dnskey;
result = dns_ds_buildrdata(name, &ki->rdata, ds.digest_type, result = dns_ds_buildrdata(name, &ki->rdata, ds.digest_type,
dsbuf, &newdsrdata); dsbuf, &newdsrdata);
ki->rdata.type = keytype;
if (result != ISC_R_SUCCESS) { if (result != ISC_R_SUCCESS) {
vbprintf(3, "dns_ds_buildrdata(" vbprintf(3, "dns_ds_buildrdata("
"keytag=%d, algo=%d, digest=%d): %s\n", "keytag=%d, algo=%d, digest=%d): %s\n",
@@ -495,24 +511,17 @@ match_key_dsset(keyinfo_t *ki, dns_rdataset_t *dsset, strictness_t strictness)
vbprintf(1, "found matching %s %d %d %d\n", vbprintf(1, "found matching %s %d %d %d\n",
c ? "CDS" : "DS", c ? "CDS" : "DS",
ds.key_tag, ds.algorithm, ds.digest_type); ds.key_tag, ds.algorithm, ds.digest_type);
return (true); return (ISC_TRUE);
} else if (strictness == TIGHT) { } else if (strictness == TIGHT) {
vbprintf(0, "key does not match %s %d %d %d " vbprintf(0, "key does not match %s %d %d %d "
"when it looks like it should\n", "when it looks like it should\n",
c ? "CDS" : "DS", c ? "CDS" : "DS",
ds.key_tag, ds.algorithm, ds.digest_type); ds.key_tag, ds.algorithm, ds.digest_type);
return (false); return (ISC_FALSE);
} }
} }
vbprintf(1, "no matching %s for %s %d %d\n", return (ISC_FALSE);
dsset->type == dns_rdatatype_cds
? "CDS" : "DS",
ki->rdata.type == dns_rdatatype_cdnskey
? "CDNSKEY" : "DNSKEY",
ki->tag, ki->algo);
return (false);
} }
/* /*
@@ -530,6 +539,9 @@ match_keyset_dsset(dns_rdataset_t *keyset, dns_rdataset_t *dsset,
nkey = dns_rdataset_count(keyset); nkey = dns_rdataset_count(keyset);
keytable = isc_mem_get(mctx, sizeof(keyinfo_t) * nkey); keytable = isc_mem_get(mctx, sizeof(keyinfo_t) * nkey);
if (keytable == NULL) {
fatal("out of memory");
}
for (result = dns_rdataset_first(keyset), i = 0; for (result = dns_rdataset_first(keyset), i = 0;
result == ISC_R_SUCCESS; result == ISC_R_SUCCESS;
@@ -552,7 +564,7 @@ match_keyset_dsset(dns_rdataset_t *keyset, dns_rdataset_t *dsset,
ki->algo = dnskey.algorithm; ki->algo = dnskey.algorithm;
dns_rdata_toregion(keyrdata, &r); dns_rdata_toregion(keyrdata, &r);
ki->tag = dst_region_computeid(&r); ki->tag = dst_region_computeid(&r, ki->algo);
ki->dst = NULL; ki->dst = NULL;
if (!match_key_dsset(ki, dsset, strictness)) { if (!match_key_dsset(ki, dsset, strictness)) {
@@ -598,15 +610,19 @@ free_keytable(keyinfo_t **keytable_p) {
* otherwise the key algorithm. This is used by the signature coverage * otherwise the key algorithm. This is used by the signature coverage
* check functions below. * check functions below.
*/ */
static dns_secalg_t * static isc_uint8_t *
matching_sigs(keyinfo_t *keytbl, dns_rdataset_t *rdataset, matching_sigs(keyinfo_t *keytbl, dns_rdataset_t *rdataset,
dns_rdataset_t *sigset) dns_rdataset_t *sigset)
{ {
isc_result_t result; isc_result_t result;
dns_secalg_t *algo; isc_uint8_t *algo;
int i; int i;
algo = isc_mem_get(mctx, nkey); algo = isc_mem_get(mctx, nkey);
if (algo == NULL) {
fatal("allocating RRSIG/DNSKEY match list: %s",
isc_result_totext(ISC_R_NOMEMORY));
}
memset(algo, 0, nkey); memset(algo, 0, nkey);
for (result = dns_rdataset_first(sigset); for (result = dns_rdataset_first(sigset);
@@ -631,28 +647,17 @@ matching_sigs(keyinfo_t *keytbl, dns_rdataset_t *rdataset,
for (i = 0; i < nkey; i++) { for (i = 0; i < nkey; i++) {
keyinfo_t *ki = &keytbl[i]; keyinfo_t *ki = &keytbl[i];
if (sig.keyid != ki->tag || if (ki->dst == NULL ||
sig.keyid != ki->tag ||
sig.algorithm != ki->algo || sig.algorithm != ki->algo ||
!dns_name_equal(&sig.signer, name)) !dns_name_equal(&sig.signer, name))
{ {
continue; continue;
} }
if (ki->dst == NULL) {
vbprintf(1, "skip RRSIG by key %d:"
" no matching (C)DS\n",
sig.keyid);
continue;
}
result = dns_dnssec_verify(name, rdataset, ki->dst, result = dns_dnssec_verify(name, rdataset, ki->dst,
false, 0, mctx, ISC_FALSE, mctx, &sigrdata);
&sigrdata, NULL); if (result != ISC_R_SUCCESS) {
if (result != ISC_R_SUCCESS &&
result != DNS_R_FROMWILDCARD) {
vbprintf(1, "skip RRSIG by key %d:"
" verification failed: %s\n",
sig.keyid, isc_result_totext(result));
continue; continue;
} }
@@ -681,13 +686,13 @@ matching_sigs(keyinfo_t *keytbl, dns_rdataset_t *rdataset,
* Consume the result of matching_sigs(). When checking records * Consume the result of matching_sigs(). When checking records
* fetched from the child zone, any working signature is enough. * fetched from the child zone, any working signature is enough.
*/ */
static bool static isc_boolean_t
signed_loose(dns_secalg_t *algo) { signed_loose(isc_uint8_t *algo) {
bool ok = false; isc_boolean_t ok = ISC_FALSE;
int i; int i;
for (i = 0; i < nkey; i++) { for (i = 0; i < nkey; i++) {
if (algo[i] != 0) { if (algo[i] != 0) {
ok = true; ok = ISC_TRUE;
} }
} }
isc_mem_put(mctx, algo, nkey); isc_mem_put(mctx, algo, nkey);
@@ -700,10 +705,10 @@ signed_loose(dns_secalg_t *algo) {
* key algorithm in the DS RRset must have a signature in the DNSKEY * key algorithm in the DS RRset must have a signature in the DNSKEY
* RRset. * RRset.
*/ */
static bool static isc_boolean_t
signed_strict(dns_rdataset_t *dsset, dns_secalg_t *algo) { signed_strict(dns_rdataset_t *dsset, isc_uint8_t *algo) {
isc_result_t result; isc_result_t result;
bool all_ok = true; isc_boolean_t all_ok = ISC_TRUE;
for (result = dns_rdataset_first(dsset); for (result = dns_rdataset_first(dsset);
result == ISC_R_SUCCESS; result == ISC_R_SUCCESS;
@@ -711,23 +716,23 @@ signed_strict(dns_rdataset_t *dsset, dns_secalg_t *algo) {
{ {
dns_rdata_t dsrdata = DNS_RDATA_INIT; dns_rdata_t dsrdata = DNS_RDATA_INIT;
dns_rdata_ds_t ds; dns_rdata_ds_t ds;
bool ds_ok; isc_boolean_t ds_ok;
int i; int i;
dns_rdataset_current(dsset, &dsrdata); dns_rdataset_current(dsset, &dsrdata);
result = dns_rdata_tostruct(&dsrdata, &ds, NULL); result = dns_rdata_tostruct(&dsrdata, &ds, NULL);
check_result(result, "dns_rdata_tostruct(DS)"); check_result(result, "dns_rdata_tostruct(DS)");
ds_ok = false; ds_ok = ISC_FALSE;
for (i = 0; i < nkey; i++) { for (i = 0; i < nkey; i++) {
if (algo[i] == ds.algorithm) { if (algo[i] == ds.algorithm) {
ds_ok = true; ds_ok = ISC_TRUE;
} }
} }
if (!ds_ok) { if (!ds_ok) {
vbprintf(0, "missing signature for algorithm %d " vbprintf(0, "missing signature for algorithm %d "
"(key %d)\n", ds.algorithm, ds.key_tag); "(key %d)\n", ds.algorithm, ds.key_tag);
all_ok = false; all_ok = ISC_FALSE;
} }
} }
@@ -740,6 +745,10 @@ rdata_get(void) {
dns_rdata_t *rdata; dns_rdata_t *rdata;
rdata = isc_mem_get(mctx, sizeof(*rdata)); rdata = isc_mem_get(mctx, sizeof(*rdata));
if (rdata == NULL) {
fatal("allocating DS rdata: %s",
isc_result_totext(ISC_R_NOMEMORY));
}
dns_rdata_init(rdata); dns_rdata_init(rdata);
return (rdata); return (rdata);
@@ -797,6 +806,7 @@ ds_from_cdnskey(dns_rdatalist_t *dslist, isc_buffer_t *buf,
return (ISC_R_NOSPACE); return (ISC_R_NOSPACE);
} }
cdnskey->type = dns_rdatatype_dnskey;
rdata = rdata_get(); rdata = rdata_get();
result = dns_ds_buildrdata(name, cdnskey, dtype[i], result = dns_ds_buildrdata(name, cdnskey, dtype[i],
r.base, rdata); r.base, rdata);
@@ -814,9 +824,37 @@ ds_from_cdnskey(dns_rdatalist_t *dslist, isc_buffer_t *buf,
return (ISC_R_SUCCESS); return (ISC_R_SUCCESS);
} }
/*
* For sorting the digest types so that DS records generated
* from CDNSKEY records are in canonical order.
*/
static int
cmp_dtype(const void *ap, const void *bp) {
int a = *(const isc_uint8_t *)ap;
int b = *(const isc_uint8_t *)bp;
return (a - b);
}
static void
add_dtype(const char *dn) {
isc_uint8_t dt;
unsigned i, n;
dt = strtodsdigest(dn);
n = sizeof(dtype)/sizeof(dtype[0]);
for (i = 0; i < n; i++) {
if (dtype[i] == 0 || dtype[i] == dt) {
dtype[i] = dt;
qsort(dtype, i+1, 1, cmp_dtype);
return;
}
}
fatal("too many -a digest type arguments");
}
static void static void
make_new_ds_set(ds_maker_func_t *ds_from_rdata, make_new_ds_set(ds_maker_func_t *ds_from_rdata,
uint32_t ttl, dns_rdataset_t *rdset) isc_uint32_t ttl, dns_rdataset_t *rdset)
{ {
unsigned int size = 16; unsigned int size = 16;
for (;;) { for (;;) {
@@ -824,6 +862,10 @@ make_new_ds_set(ds_maker_func_t *ds_from_rdata,
dns_rdatalist_t *dslist; dns_rdatalist_t *dslist;
dslist = isc_mem_get(mctx, sizeof(*dslist)); dslist = isc_mem_get(mctx, sizeof(*dslist));
if (dslist == NULL) {
fatal("allocating new DS list: %s",
isc_result_totext(ISC_R_NOMEMORY));
}
dns_rdatalist_init(dslist); dns_rdatalist_init(dslist);
dslist->rdclass = rdclass; dslist->rdclass = rdclass;
@@ -874,14 +916,14 @@ rdata_cmp(const void *rdata1, const void *rdata2) {
* Ensure that every key identified by the DS RRset has the same set of * Ensure that every key identified by the DS RRset has the same set of
* digest types. * digest types.
*/ */
static bool static isc_boolean_t
consistent_digests(dns_rdataset_t *dsset) { consistent_digests(dns_rdataset_t *dsset) {
isc_result_t result; isc_result_t result;
dns_rdata_t *arrdata; dns_rdata_t *arrdata;
dns_rdata_ds_t *ds; dns_rdata_ds_t *ds;
dns_keytag_t key_tag; dns_keytag_t key_tag;
dns_secalg_t algorithm; isc_uint8_t algorithm;
bool match; isc_boolean_t match;
int i, j, n, d; int i, j, n, d;
/* /*
@@ -892,6 +934,10 @@ consistent_digests(dns_rdataset_t *dsset) {
n = dns_rdataset_count(dsset); n = dns_rdataset_count(dsset);
arrdata = isc_mem_get(mctx, n * sizeof(dns_rdata_t)); arrdata = isc_mem_get(mctx, n * sizeof(dns_rdata_t));
if (arrdata == NULL) {
fatal("allocating DS rdata array: %s",
isc_result_totext(ISC_R_NOMEMORY));
}
for (result = dns_rdataset_first(dsset), i = 0; for (result = dns_rdataset_first(dsset), i = 0;
result == ISC_R_SUCCESS; result == ISC_R_SUCCESS;
@@ -907,6 +953,10 @@ consistent_digests(dns_rdataset_t *dsset) {
* Convert sorted arrdata to more accessible format * Convert sorted arrdata to more accessible format
*/ */
ds = isc_mem_get(mctx, n * sizeof(dns_rdata_ds_t)); ds = isc_mem_get(mctx, n * sizeof(dns_rdata_ds_t));
if (ds == NULL) {
fatal("allocating unpacked DS array: %s",
isc_result_totext(ISC_R_NOMEMORY));
}
for (i = 0; i < n; i++) { for (i = 0; i < n; i++) {
result = dns_rdata_tostruct(&arrdata[i], &ds[i], NULL); result = dns_rdata_tostruct(&arrdata[i], &ds[i], NULL);
@@ -927,7 +977,7 @@ consistent_digests(dns_rdataset_t *dsset) {
/* /*
* Check subsequent keys match the first one * Check subsequent keys match the first one
*/ */
match = true; match = ISC_TRUE;
while (i < n) { while (i < n) {
key_tag = ds[i].key_tag; key_tag = ds[i].key_tag;
algorithm = ds[i].algorithm; algorithm = ds[i].algorithm;
@@ -936,7 +986,7 @@ consistent_digests(dns_rdataset_t *dsset) {
ds[i+j].algorithm != algorithm || ds[i+j].algorithm != algorithm ||
ds[i+j].digest_type != ds[j].digest_type) ds[i+j].digest_type != ds[j].digest_type)
{ {
match = false; match = ISC_FALSE;
} }
} }
i += d; i += d;
@@ -971,7 +1021,7 @@ print_diff(const char *cmd, dns_rdataset_t *rdataset) {
} }
static void static void
update_diff(const char *cmd, uint32_t ttl, update_diff(const char *cmd, isc_uint32_t ttl,
dns_rdataset_t *addset, dns_rdataset_t *delset) dns_rdataset_t *addset, dns_rdataset_t *delset)
{ {
isc_result_t result; isc_result_t result;
@@ -979,7 +1029,7 @@ update_diff(const char *cmd, uint32_t ttl,
dns_dbnode_t *node; dns_dbnode_t *node;
dns_dbversion_t *ver; dns_dbversion_t *ver;
dns_rdataset_t diffset; dns_rdataset_t diffset;
uint32_t save; isc_uint32_t save;
db = NULL; db = NULL;
result = dns_db_create(mctx, "rbt", name, dns_dbtype_zone, result = dns_db_create(mctx, "rbt", name, dns_dbtype_zone,
@@ -991,7 +1041,7 @@ update_diff(const char *cmd, uint32_t ttl,
check_result(result, "dns_db_newversion()"); check_result(result, "dns_db_newversion()");
node = NULL; node = NULL;
result = dns_db_findnode(db, name, true, &node); result = dns_db_findnode(db, name, ISC_TRUE, &node);
check_result(result, "dns_db_findnode()"); check_result(result, "dns_db_findnode()");
dns_rdataset_init(&diffset); dns_rdataset_init(&diffset);
@@ -1015,12 +1065,12 @@ update_diff(const char *cmd, uint32_t ttl,
} }
dns_db_detachnode(db, &node); dns_db_detachnode(db, &node);
dns_db_closeversion(db, &ver, false); dns_db_closeversion(db, &ver, ISC_FALSE);
dns_db_detach(&db); dns_db_detach(&db);
} }
static void static void
nsdiff(uint32_t ttl, dns_rdataset_t *oldset, dns_rdataset_t *newset) { nsdiff(isc_uint32_t ttl, dns_rdataset_t *oldset, dns_rdataset_t *newset) {
if (ttl == 0) { if (ttl == 0) {
vbprintf(1, "warning: no TTL in nsupdate script\n"); vbprintf(1, "warning: no TTL in nsupdate script\n");
} }
@@ -1047,7 +1097,7 @@ usage(void) {
program); program);
fprintf(stderr, "Version: %s\n", VERSION); fprintf(stderr, "Version: %s\n", VERSION);
fprintf(stderr, "Options:\n" fprintf(stderr, "Options:\n"
" -a <algorithm> digest algorithm (SHA-1 / SHA-256 / SHA-384)\n" " -a <algorithm> digest algorithm (SHA-1 / SHA-256 / GOST / SHA-384)\n"
" -c <class> of domain (default IN)\n" " -c <class> of domain (default IN)\n"
" -D prefer CDNSKEY records instead of CDS\n" " -D prefer CDNSKEY records instead of CDS\n"
" -d <file|dir> where to find parent dsset- file\n" " -d <file|dir> where to find parent dsset- file\n"
@@ -1068,32 +1118,35 @@ main(int argc, char *argv[]) {
const char *ds_path = NULL; const char *ds_path = NULL;
const char *inplace = NULL; const char *inplace = NULL;
isc_result_t result; isc_result_t result;
bool prefer_cdnskey = false; isc_boolean_t prefer_cdnskey = ISC_FALSE;
bool nsupdate = false; isc_boolean_t nsupdate = ISC_FALSE;
uint32_t ttl = 0; isc_uint32_t ttl = 0;
int ch; int ch;
char *endp; char *endp;
isc_mem_create(&mctx); result = isc_mem_create(0, 0, &mctx);
if (result != ISC_R_SUCCESS) {
fatal("out of memory");
}
#if USE_PKCS11 #ifdef PKCS11CRYPTO
pk11_result_register(); pk11_result_register();
#endif #endif
dns_result_register(); dns_result_register();
isc_commandline_errprint = false; isc_commandline_errprint = ISC_FALSE;
#define OPTIONS "a:c:Dd:f:i:ms:T:uv:V" #define OPTIONS "a:c:Dd:f:i:ms:T:uv:V"
while ((ch = isc_commandline_parse(argc, argv, OPTIONS)) != -1) { while ((ch = isc_commandline_parse(argc, argv, OPTIONS)) != -1) {
switch (ch) { switch (ch) {
case 'a': case 'a':
add_dtype(strtodsdigest(isc_commandline_argument)); add_dtype(isc_commandline_argument);
break; break;
case 'c': case 'c':
rdclass = strtoclass(isc_commandline_argument); rdclass = strtoclass(isc_commandline_argument);
break; break;
case 'D': case 'D':
prefer_cdnskey = true; prefer_cdnskey = ISC_TRUE;
break; break;
case 'd': case 'd':
ds_path = isc_commandline_argument; ds_path = isc_commandline_argument;
@@ -1126,7 +1179,7 @@ main(int argc, char *argv[]) {
ttl = strtottl(isc_commandline_argument); ttl = strtottl(isc_commandline_argument);
break; break;
case 'u': case 'u':
nsupdate = true; nsupdate = ISC_TRUE;
break; break;
case 'V': case 'V':
/* Does not return. */ /* Does not return. */
@@ -1160,11 +1213,20 @@ main(int argc, char *argv[]) {
setup_logging(mctx, &lctx); setup_logging(mctx, &lctx);
result = dst_lib_init(mctx, NULL); if (ectx == NULL) {
setup_entropy(mctx, NULL, &ectx);
}
result = isc_hash_create(mctx, ectx, DNS_NAME_MAXWIRE);
if (result != ISC_R_SUCCESS) {
fatal("could not initialize hash");
}
result = dst_lib_init(mctx, ectx,
ISC_ENTROPY_BLOCKING | ISC_ENTROPY_GOODONLY);
if (result != ISC_R_SUCCESS) { if (result != ISC_R_SUCCESS) {
fatal("could not initialize dst: %s", fatal("could not initialize dst: %s",
isc_result_totext(result)); isc_result_totext(result));
} }
isc_entropy_stopcallbacksources(ectx);
if (ds_path == NULL) { if (ds_path == NULL) {
fatal("missing -d DS pathname"); fatal("missing -d DS pathname");
@@ -1314,6 +1376,8 @@ main(int argc, char *argv[]) {
free_all_sets(); free_all_sets();
cleanup_logging(&lctx); cleanup_logging(&lctx);
dst_lib_destroy(); dst_lib_destroy();
isc_hash_destroy();
cleanup_entropy(&ectx);
if (verbose > 10) { if (verbose > 10) {
isc_mem_stats(mctx, stdout); isc_mem_stats(mctx, stdout);
} }
+5 -22
View File
@@ -1,12 +1,9 @@
<!-- <!--
- Copyright (C) Internet Systems Consortium, Inc. ("ISC") - Copyright (C) 2017 Internet Systems Consortium, Inc. ("ISC")
- -
- This Source Code Form is subject to the terms of the Mozilla Public - 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 - 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/. - 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.
--> -->
<refentry xmlns:db="http://docbook.org/ns/docbook" version="5.0" xml:id="man.dnssec-cds"> <refentry xmlns:db="http://docbook.org/ns/docbook" version="5.0" xml:id="man.dnssec-cds">
@@ -39,9 +36,6 @@
<docinfo> <docinfo>
<copyright> <copyright>
<year>2017</year> <year>2017</year>
<year>2018</year>
<year>2019</year>
<year>2020</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder> <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright> </copyright>
</docinfo> </docinfo>
@@ -70,11 +64,7 @@
The <command>dnssec-cds</command> command changes DS records at The <command>dnssec-cds</command> command changes DS records at
a delegation point based on CDS or CDNSKEY records published in a delegation point based on CDS or CDNSKEY records published in
the child zone. If both CDS and CDNSKEY records are present in the child zone. If both CDS and CDNSKEY records are present in
the child zone, the CDS is preferred. This enables a child zone the child zone, the CDS is preferred.
to inform its parent of upcoming changes to its key-signing keys;
by polling periodically with <command>dnssec-cds</command>, the
parent can keep the DS records up to date and enable automatic
rolling of KSKs.
</para> </para>
<para> <para>
Two input files are required. The Two input files are required. The
@@ -89,13 +79,6 @@
<command>dnssec-dsfromkey</command>, or the output of a previous <command>dnssec-dsfromkey</command>, or the output of a previous
run of <command>dnssec-cds</command>. run of <command>dnssec-cds</command>.
</para> </para>
<para>
The <command>dnssec-cds</command> command uses special DNSSEC
validation logic specified by RFC 7344. It requires that the CDS
and/or CDNSKEY records are validly signed by a key represented in the
existing DS records. This will typicially be the pre-existing
key-signing key (KSK).
</para>
<para> <para>
For protection against replay attacks, the signatures on the For protection against replay attacks, the signatures on the
child records must not be older than they were on a previous run child records must not be older than they were on a previous run
@@ -145,9 +128,9 @@
record. This option has no effect when using CDS records. record. This option has no effect when using CDS records.
</para> </para>
<para> <para>
The <replaceable>algorithm</replaceable> must be one of The <replaceable>algorithm</replaceable> must be one of SHA-1
SHA-1, SHA-256, or SHA-384. These values are case insensitive, (SHA1), SHA-256 (SHA256), GOST, or SHA-384 (SHA384). These
and the hyphen may be omitted. If no algorithm is specified, values are case insensitive. If no algorithm is specified,
the default is SHA-256. the default is SHA-256.
</para> </para>
</listitem> </listitem>
+5 -16
View File
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- <!--
- Copyright (C) 2017-2020 Internet Systems Consortium, Inc. ("ISC") - Copyright (C) 2017 Internet Systems Consortium, Inc. ("ISC")
- -
- This Source Code Form is subject to the terms of the Mozilla Public - 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 - License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -55,11 +55,7 @@
The <span class="command"><strong>dnssec-cds</strong></span> command changes DS records at The <span class="command"><strong>dnssec-cds</strong></span> command changes DS records at
a delegation point based on CDS or CDNSKEY records published in a delegation point based on CDS or CDNSKEY records published in
the child zone. If both CDS and CDNSKEY records are present in the child zone. If both CDS and CDNSKEY records are present in
the child zone, the CDS is preferred. This enables a child zone the child zone, the CDS is preferred.
to inform its parent of upcoming changes to its key-signing keys;
by polling periodically with <span class="command"><strong>dnssec-cds</strong></span>, the
parent can keep the DS records up to date and enable automatic
rolling of KSKs.
</p> </p>
<p> <p>
Two input files are required. The Two input files are required. The
@@ -74,13 +70,6 @@
<span class="command"><strong>dnssec-dsfromkey</strong></span>, or the output of a previous <span class="command"><strong>dnssec-dsfromkey</strong></span>, or the output of a previous
run of <span class="command"><strong>dnssec-cds</strong></span>. run of <span class="command"><strong>dnssec-cds</strong></span>.
</p> </p>
<p>
The <span class="command"><strong>dnssec-cds</strong></span> command uses special DNSSEC
validation logic specified by RFC 7344. It requires that the CDS
and/or CDNSKEY records are validly signed by a key represented in the
existing DS records. This will typicially be the pre-existing
key-signing key (KSK).
</p>
<p> <p>
For protection against replay attacks, the signatures on the For protection against replay attacks, the signatures on the
child records must not be older than they were on a previous run child records must not be older than they were on a previous run
@@ -129,9 +118,9 @@
record. This option has no effect when using CDS records. record. This option has no effect when using CDS records.
</p> </p>
<p> <p>
The <em class="replaceable"><code>algorithm</code></em> must be one of The <em class="replaceable"><code>algorithm</code></em> must be one of SHA-1
SHA-1, SHA-256, or SHA-384. These values are case insensitive, (SHA1), SHA-256 (SHA256), GOST, or SHA-384 (SHA384). These
and the hyphen may be omitted. If no algorithm is specified, values are case insensitive. If no algorithm is specified,
the default is SHA-256. the default is SHA-256.
</p> </p>
</dd> </dd>
+50 -94
View File
@@ -1,4 +1,4 @@
.\" Copyright (C) 2008-2012, 2014-2016, 2018-2020 Internet Systems Consortium, Inc. ("ISC") .\" Copyright (C) 2008-2012, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
.\" .\"
.\" This Source Code Form is subject to the terms of the Mozilla Public .\" 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 .\" License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -10,12 +10,12 @@
.\" Title: dnssec-dsfromkey .\" Title: dnssec-dsfromkey
.\" Author: .\" Author:
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/> .\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
.\" Date: 2019-05-08 .\" Date: 2012-05-02
.\" Manual: BIND9 .\" Manual: BIND9
.\" Source: ISC .\" Source: ISC
.\" Language: English .\" Language: English
.\" .\"
.TH "DNSSEC\-DSFROMKEY" "8" "2019\-05\-08" "ISC" "BIND9" .TH "DNSSEC\-DSFROMKEY" "8" "2012\-05\-02" "ISC" "BIND9"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * Define some portability stuff .\" * Define some portability stuff
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
@@ -39,99 +39,61 @@
dnssec-dsfromkey \- DNSSEC DS RR generation tool dnssec-dsfromkey \- DNSSEC DS RR generation tool
.SH "SYNOPSIS" .SH "SYNOPSIS"
.HP \w'\fBdnssec\-dsfromkey\fR\ 'u .HP \w'\fBdnssec\-dsfromkey\fR\ 'u
\fBdnssec\-dsfromkey\fR [\fB\-1\fR | \fB\-2\fR | \fB\-a\ \fR\fB\fIalg\fR\fR] [\fB\-C\fR | \fB\-l\ \fR\fB\fIdomain\fR\fR] [\fB\-T\ \fR\fB\fITTL\fR\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] [\fB\-K\ \fR\fB\fIdirectory\fR\fR] {keyfile} \fBdnssec\-dsfromkey\fR [\fB\-v\ \fR\fB\fIlevel\fR\fR] [\fB\-1\fR] [\fB\-2\fR] [\fB\-a\ \fR\fB\fIalg\fR\fR] [\fB\-C\fR] [\fB\-l\ \fR\fB\fIdomain\fR\fR] [\fB\-T\ \fR\fB\fITTL\fR\fR] {keyfile}
.HP \w'\fBdnssec\-dsfromkey\fR\ 'u .HP \w'\fBdnssec\-dsfromkey\fR\ 'u
\fBdnssec\-dsfromkey\fR [\fB\-1\fR | \fB\-2\fR | \fB\-a\ \fR\fB\fIalg\fR\fR] [\fB\-C\fR | \fB\-l\ \fR\fB\fIdomain\fR\fR] [\fB\-T\ \fR\fB\fITTL\fR\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-A\fR] {\fB\-f\ \fR\fB\fIfile\fR\fR} [dnsname] \fBdnssec\-dsfromkey\fR {\-s} [\fB\-1\fR] [\fB\-2\fR] [\fB\-a\ \fR\fB\fIalg\fR\fR] [\fB\-K\ \fR\fB\fIdirectory\fR\fR] [\fB\-l\ \fR\fB\fIdomain\fR\fR] [\fB\-s\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-T\ \fR\fB\fITTL\fR\fR] [\fB\-f\ \fR\fB\fIfile\fR\fR] [\fB\-A\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] {dnsname}
.HP \w'\fBdnssec\-dsfromkey\fR\ 'u .HP \w'\fBdnssec\-dsfromkey\fR\ 'u
\fBdnssec\-dsfromkey\fR [\fB\-1\fR | \fB\-2\fR | \fB\-a\ \fR\fB\fIalg\fR\fR] [\fB\-C\fR | \fB\-l\ \fR\fB\fIdomain\fR\fR] [\fB\-T\ \fR\fB\fITTL\fR\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-K\ \fR\fB\fIdirectory\fR\fR] {\-s} {dnsname} \fBdnssec\-dsfromkey\fR [\fB\-h\fR] [\fB\-V\fR]
.HP \w'\fBdnssec\-dsfromkey\fR\ 'u
\fBdnssec\-dsfromkey\fR [\fB\-h\fR | \fB\-V\fR]
.SH "DESCRIPTION" .SH "DESCRIPTION"
.PP .PP
The
\fBdnssec\-dsfromkey\fR \fBdnssec\-dsfromkey\fR
command outputs DS (Delegation Signer) resource records (RRs), or CDS (Child DS) RRs with the outputs the Delegation Signer (DS) resource record (RR), as defined in RFC 3658 and RFC 4509, for the given key(s)\&.
\fB\-C\fR
option\&.
.PP
The input keys can be specified in a number of ways:
.PP
By default,
\fBdnssec\-dsfromkey\fR
reads a key file named like
Knnnn\&.+aaa+iiiii\&.key, as generated by
\fBdnssec\-keygen\fR\&.
.PP
With the
\fB\-f \fR\fB\fIfile\fR\fR
option,
\fBdnssec\-dsfromkey\fR
reads keys from a zone file or partial zone file (which can contain just the DNSKEY records)\&.
.PP
With the
\fB\-s\fR
option,
\fBdnssec\-dsfromkey\fR
reads a
keyset\-
file, as generated by
\fBdnssec\-keygen\fR\fB\-C\fR\&.
.SH "OPTIONS" .SH "OPTIONS"
.PP .PP
\-1 \-1
.RS 4 .RS 4
An abbreviation for Use SHA\-1 as the digest algorithm (the default is to use both SHA\-1 and SHA\-256)\&.
\fB\-a SHA\-1\fR\&. (Note: The SHA\-1 algorithm is no longer recommended for use when generating new DS and CDS records\&.)
.RE .RE
.PP .PP
\-2 \-2
.RS 4 .RS 4
An abbreviation for Use SHA\-256 as the digest algorithm\&.
\fB\-a SHA\-256\fR\&.
.RE .RE
.PP .PP
\-a \fIalgorithm\fR \-a \fIalgorithm\fR
.RS 4 .RS 4
Specify a digest algorithm to use when converting DNSKEY records to DS records\&. This option can be repeated, so that multiple DS records are created for each DNSKEY record\&. Select the digest algorithm\&. The value of
.sp \fBalgorithm\fR
The must be one of SHA\-1 (SHA1), SHA\-256 (SHA256), GOST or SHA\-384 (SHA384)\&. These values are case insensitive\&.
\fIalgorithm\fR
must be one of SHA\-1, SHA\-256, or SHA\-384\&. These values are case insensitive, and the hyphen may be omitted\&. If no algorithm is specified, the default is SHA\-256\&. (Note: The SHA\-1 algorithm is no longer recommended for use when generating new DS and CDS records\&.)
.RE
.PP
\-A
.RS 4
Include ZSKs when generating DS records\&. Without this option, only keys which have the KSK flag set will be converted to DS records and printed\&. Useful only in
\fB\-f\fR
zone file mode\&.
.RE
.PP
\-c \fIclass\fR
.RS 4
Specifies the DNS class (default is IN)\&. Useful only in
\fB\-s\fR
keyset or
\fB\-f\fR
zone file mode\&.
.RE .RE
.PP .PP
\-C \-C
.RS 4 .RS 4
Generate CDS records rather than DS records\&. Generate CDS records rather than DS records\&. This is mutually exclusive with generating lookaside records\&.
.RE
.PP
\-T \fITTL\fR
.RS 4
Specifies the TTL of the DS records\&.
.RE
.PP
\-K \fIdirectory\fR
.RS 4
Look for key files (or, in keyset mode,
keyset\-
files) in
\fBdirectory\fR\&.
.RE .RE
.PP .PP
\-f \fIfile\fR \-f \fIfile\fR
.RS 4 .RS 4
Zone file mode: Zone file mode: in place of the keyfile name, the argument is the DNS domain name of a zone master file, which can be read from
\fBdnssec\-dsfromkey\fR\*(Aqs final
\fIdnsname\fR
argument is the DNS domain name of a zone whose master file can be read from
\fBfile\fR\&. If the zone name is the same as \fBfile\fR\&. If the zone name is the same as
\fBfile\fR, then it may be omitted\&. \fBfile\fR, then it may be omitted\&.
.sp .sp
If If
\fIfile\fR \fBfile\fR
is is set to
"\-", then the zone data is read from the standard input\&. This makes it possible to use the output of the "\-", then the zone data is read from the standard input\&. This makes it possible to use the output of the
\fBdig\fR \fBdig\fR
command as input, as in: command as input, as in:
@@ -139,32 +101,26 @@ command as input, as in:
\fBdig dnskey example\&.com | dnssec\-dsfromkey \-f \- example\&.com\fR \fBdig dnskey example\&.com | dnssec\-dsfromkey \-f \- example\&.com\fR
.RE .RE
.PP .PP
\-h \-A
.RS 4 .RS 4
Prints usage information\&. Include ZSKs when generating DS records\&. Without this option, only keys which have the KSK flag set will be converted to DS records and printed\&. Useful only in zone file mode\&.
.RE .RE
.PP .PP
\-K \fIdirectory\fR \-l \fIdomain\fR
.RS 4 .RS 4
Look for key files or Generate a DLV set instead of a DS set\&. The specified
keyset\- \fBdomain\fR
files in is appended to the name for each record in the set\&. The DNSSEC Lookaside Validation (DLV) RR is described in RFC 4431\&. This is mutually exclusive with generating CDS records\&.
\fBdirectory\fR\&.
.RE .RE
.PP .PP
\-s \-s
.RS 4 .RS 4
Keyset mode: Keyset mode: in place of the keyfile name, the argument is the DNS domain name of a keyset file\&.
\fBdnssec\-dsfromkey\fR\*(Aqs final
\fIdnsname\fR
argument is the DNS domain name used to locate a
keyset\-
file\&.
.RE .RE
.PP .PP
\-T \fITTL\fR \-c \fIclass\fR
.RS 4 .RS 4
Specifies the TTL of the DS records\&. By default the TTL is omitted\&. Specifies the DNS class (default is IN)\&. Useful only in keyset or zone file mode\&.
.RE .RE
.PP .PP
\-v \fIlevel\fR \-v \fIlevel\fR
@@ -172,6 +128,11 @@ Specifies the TTL of the DS records\&. By default the TTL is omitted\&.
Sets the debugging level\&. Sets the debugging level\&.
.RE .RE
.PP .PP
\-h
.RS 4
Prints usage information\&.
.RE
.PP
\-V \-V
.RS 4 .RS 4
Prints version information\&. Prints version information\&.
@@ -180,16 +141,16 @@ Prints version information\&.
.PP .PP
To build the SHA\-256 DS RR from the To build the SHA\-256 DS RR from the
\fBKexample\&.com\&.+003+26160\fR \fBKexample\&.com\&.+003+26160\fR
keyfile name, you can issue the following command: keyfile name, the following command would be issued:
.PP .PP
\fBdnssec\-dsfromkey \-2 Kexample\&.com\&.+003+26160\fR \fBdnssec\-dsfromkey \-2 Kexample\&.com\&.+003+26160\fR
.PP .PP
The command would print something like: The command would print something like:
.PP .PP
\fBexample\&.com\&. IN DS 26160 5 2 3A1EADA7A74B8D0BA86726B0C227AA85AB8BBD2B2004F41A868A54F0C5EA0B94\fR \fBexample\&.com\&. IN DS 26160 5 2 3A1EADA7A74B8D0BA86726B0C227AA85AB8BBD2B2004F41A868A54F0 C5EA0B94\fR
.SH "FILES" .SH "FILES"
.PP .PP
The keyfile can be designated by the key identification The keyfile can be designed by the key identification
Knnnn\&.+aaa+iiiii Knnnn\&.+aaa+iiiii
or the full file name or the full file name
Knnnn\&.+aaa+iiiii\&.key Knnnn\&.+aaa+iiiii\&.key
@@ -209,18 +170,13 @@ A keyfile error can give a "file not found" even if the file exists\&.
\fBdnssec-keygen\fR(8), \fBdnssec-keygen\fR(8),
\fBdnssec-signzone\fR(8), \fBdnssec-signzone\fR(8),
BIND 9 Administrator Reference Manual, BIND 9 Administrator Reference Manual,
RFC 3658 RFC 3658,
(DS RRs), RFC 4431\&.
RFC 4509 RFC 4509\&.
(SHA\-256 for DS RRs),
RFC 6605
(SHA\-384 for DS RRs),
RFC 7344
(CDS and CDNSKEY RRs)\&.
.SH "AUTHOR" .SH "AUTHOR"
.PP .PP
\fBInternet Systems Consortium, Inc\&.\fR \fBInternet Systems Consortium, Inc\&.\fR
.SH "COPYRIGHT" .SH "COPYRIGHT"
.br .br
Copyright \(co 2008-2012, 2014-2016, 2018-2020 Internet Systems Consortium, Inc. ("ISC") Copyright \(co 2008-2012, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
.br .br
+148 -118
View File
@@ -1,22 +1,20 @@
/* /*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2008-2012, 2014-2017 Internet Systems Consortium, Inc. ("ISC")
* *
* This Source Code Form is subject to the terms of the Mozilla Public * 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 * 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/. * 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 */ /*! \file */
#include <inttypes.h> #include <config.h>
#include <stdbool.h>
#include <stdlib.h> #include <stdlib.h>
#include <isc/buffer.h> #include <isc/buffer.h>
#include <isc/commandline.h> #include <isc/commandline.h>
#include <isc/entropy.h>
#include <isc/hash.h> #include <isc/hash.h>
#include <isc/mem.h> #include <isc/mem.h>
#include <isc/print.h> #include <isc/print.h>
@@ -41,27 +39,33 @@
#include <dst/dst.h> #include <dst/dst.h>
#if USE_PKCS11 #ifdef PKCS11CRYPTO
#include <pk11/result.h> #include <pk11/result.h>
#endif #endif
#include "dnssectool.h" #include "dnssectool.h"
#ifndef PATH_MAX
#define PATH_MAX 1024 /* AIX, WIN32, and others don't define this. */
#endif
const char *program = "dnssec-dsfromkey"; const char *program = "dnssec-dsfromkey";
int verbose;
static dns_rdataclass_t rdclass; static dns_rdataclass_t rdclass;
static dns_fixedname_t fixed; static dns_fixedname_t fixed;
static dns_name_t *name = NULL; static dns_name_t *name = NULL;
static isc_mem_t *mctx = NULL; static isc_mem_t *mctx = NULL;
static uint32_t ttl; static isc_uint32_t ttl;
static bool emitttl = false; static isc_boolean_t emitttl = ISC_FALSE;
static isc_result_t static isc_result_t
initname(char *setname) { initname(char *setname) {
isc_result_t result; isc_result_t result;
isc_buffer_t buf; isc_buffer_t buf;
name = dns_fixedname_initname(&fixed); dns_fixedname_init(&fixed);
name = dns_fixedname_name(&fixed);
isc_buffer_init(&buf, setname, strlen(setname)); isc_buffer_init(&buf, setname, strlen(setname));
isc_buffer_add(&buf, strlen(setname)); isc_buffer_add(&buf, strlen(setname));
@@ -107,13 +111,13 @@ loadset(const char *filename, dns_rdataset_t *rdataset) {
db_load_from_stream(db, stdin); db_load_from_stream(db, stdin);
filename = "input"; filename = "input";
} else { } else {
result = dns_db_load(db, filename, dns_masterformat_text, 0); result = dns_db_load(db, filename);
if (result != ISC_R_SUCCESS && result != DNS_R_SEENINCLUDE) if (result != ISC_R_SUCCESS && result != DNS_R_SEENINCLUDE)
fatal("can't load %s: %s", filename, fatal("can't load %s: %s", filename,
isc_result_totext(result)); isc_result_totext(result));
} }
result = dns_db_findnode(db, name, false, &node); result = dns_db_findnode(db, name, ISC_FALSE, &node);
if (result != ISC_R_SUCCESS) if (result != ISC_R_SUCCESS)
fatal("can't find %s node in %s", setname, filename); fatal("can't find %s node in %s", setname, filename);
@@ -154,7 +158,7 @@ loadkeyset(char *dirname, dns_rdataset_t *rdataset) {
return (ISC_R_NOSPACE); return (ISC_R_NOSPACE);
isc_buffer_putstr(&buf, "keyset-"); isc_buffer_putstr(&buf, "keyset-");
result = dns_name_tofilenametext(name, false, &buf); result = dns_name_tofilenametext(name, ISC_FALSE, &buf);
check_result(result, "dns_name_tofilenametext()"); check_result(result, "dns_name_tofilenametext()");
if (isc_buffer_availablelength(&buf) == 0) if (isc_buffer_availablelength(&buf) == 0)
return (ISC_R_NOSPACE); return (ISC_R_NOSPACE);
@@ -199,14 +203,18 @@ loadkey(char *filename, unsigned char *key_buf, unsigned int key_buf_size,
rdclass = dst_key_class(key); rdclass = dst_key_class(key);
name = dns_fixedname_initname(&fixed); dns_fixedname_init(&fixed);
dns_name_copynf(dst_key_name(key), name); name = dns_fixedname_name(&fixed);
result = dns_name_copy(dst_key_name(key), name, NULL);
if (result != ISC_R_SUCCESS)
fatal("can't copy name");
dst_key_free(&key); dst_key_free(&key);
} }
static void static void
logkey(dns_rdata_t *rdata) { logkey(dns_rdata_t *rdata)
{
isc_result_t result; isc_result_t result;
dst_key_t *key = NULL; dst_key_t *key = NULL;
isc_buffer_t buf; isc_buffer_t buf;
@@ -225,7 +233,9 @@ logkey(dns_rdata_t *rdata) {
} }
static void static void
emit(dns_dsdigest_t dt, bool showall, bool cds, dns_rdata_t *rdata) { emit(unsigned int dtype, isc_boolean_t showall, char *lookaside,
isc_boolean_t cds, dns_rdata_t *rdata)
{
isc_result_t result; isc_result_t result;
unsigned char buf[DNS_DS_BUFFERSIZE]; unsigned char buf[DNS_DS_BUFFERSIZE];
char text_buf[DST_KEY_MAXTEXTSIZE]; char text_buf[DST_KEY_MAXTEXTSIZE];
@@ -249,14 +259,26 @@ emit(dns_dsdigest_t dt, bool showall, bool cds, dns_rdata_t *rdata) {
if ((dnskey.flags & DNS_KEYFLAG_KSK) == 0 && !showall) if ((dnskey.flags & DNS_KEYFLAG_KSK) == 0 && !showall)
return; return;
result = dns_ds_buildrdata(name, rdata, dt, buf, &ds); result = dns_ds_buildrdata(name, rdata, dtype, buf, &ds);
if (result != ISC_R_SUCCESS) if (result != ISC_R_SUCCESS)
fatal("can't build record"); fatal("can't build record");
result = dns_name_totext(name, false, &nameb); result = dns_name_totext(name, ISC_FALSE, &nameb);
if (result != ISC_R_SUCCESS) if (result != ISC_R_SUCCESS)
fatal("can't print name"); fatal("can't print name");
/* Add lookaside origin, if set */
if (lookaside != NULL) {
if (isc_buffer_availablelength(&nameb) < strlen(lookaside))
fatal("DLV origin '%s' is too long", lookaside);
isc_buffer_putstr(&nameb, lookaside);
if (lookaside[strlen(lookaside) - 1] != '.') {
if (isc_buffer_availablelength(&nameb) < 1)
fatal("DLV origin '%s' is too long", lookaside);
isc_buffer_putstr(&nameb, ".");
}
}
result = dns_rdata_tofmttext(&ds, (dns_name_t *) NULL, 0, 0, 0, "", result = dns_rdata_tofmttext(&ds, (dns_name_t *) NULL, 0, 0, 0, "",
&textb); &textb);
@@ -276,54 +298,48 @@ emit(dns_dsdigest_t dt, bool showall, bool cds, dns_rdata_t *rdata) {
isc_buffer_usedregion(&classb, &r); isc_buffer_usedregion(&classb, &r);
printf("%.*s", (int)r.length, r.base); printf("%.*s", (int)r.length, r.base);
if (cds) { if (lookaside == NULL) {
if (cds)
printf(" CDS "); printf(" CDS ");
} else { else
printf(" DS "); printf(" DS ");
} } else
printf(" DLV ");
isc_buffer_usedregion(&textb, &r); isc_buffer_usedregion(&textb, &r);
printf("%.*s\n", (int)r.length, r.base); printf("%.*s\n", (int)r.length, r.base);
} }
static void
emits(bool showall, bool cds, dns_rdata_t *rdata) {
unsigned i, n;
n = sizeof(dtype)/sizeof(dtype[0]);
for (i = 0; i < n; i++) {
if (dtype[i] != 0) {
emit(dtype[i], showall, cds, rdata);
}
}
}
ISC_PLATFORM_NORETURN_PRE static void ISC_PLATFORM_NORETURN_PRE static void
usage(void) ISC_PLATFORM_NORETURN_POST; usage(void) ISC_PLATFORM_NORETURN_POST;
static void static void
usage(void) { usage(void) {
fprintf(stderr, "Usage:\n"); fprintf(stderr, "Usage:\n");
fprintf(stderr, " %s [options] keyfile\n\n", program); fprintf(stderr, " %s options [-K dir] keyfile\n\n", program);
fprintf(stderr, " %s [options] -f zonefile [zonename]\n\n", program); fprintf(stderr, " %s options [-K dir] [-c class] -s dnsname\n\n",
fprintf(stderr, " %s [options] -s dnsname\n\n", program); program);
fprintf(stderr, " %s [-h|-V]\n\n", program); fprintf(stderr, " %s options -f zonefile (as zone name)\n\n", program);
fprintf(stderr, " %s options -f zonefile zonename\n\n", program);
fprintf(stderr, "Version: %s\n", VERSION); fprintf(stderr, "Version: %s\n", VERSION);
fprintf(stderr, "Options:\n" fprintf(stderr, "Options:\n");
" -1: digest algorithm SHA-1\n" fprintf(stderr, " -v <verbose level>\n");
" -2: digest algorithm SHA-256\n" fprintf(stderr, " -V: print version information\n");
" -a algorithm: digest algorithm (SHA-1, SHA-256 or SHA-384)\n" fprintf(stderr, " -K <directory>: directory in which to find "
" -A: include all keys in DS set, not just KSKs (-f only)\n" "key file or keyset file\n");
" -c class: rdata class for DS set (default IN) (-f or -s only)\n" fprintf(stderr, " -a algorithm: digest algorithm "
" -C: print CDS records\n" "(SHA-1, SHA-256, GOST or SHA-384)\n");
" -f zonefile: read keys from a zone file\n" fprintf(stderr, " -1: use SHA-1\n");
" -h: print help information\n" fprintf(stderr, " -2: use SHA-256\n");
" -K directory: where to find key or keyset files\n" fprintf(stderr, " -C: print CDS record\n");
" -s: read keys from keyset-<dnsname> file\n" fprintf(stderr, " -l: add lookaside zone and print DLV records\n");
" -T: TTL of output records (omitted by default)\n" fprintf(stderr, " -s: read keyset from keyset-<dnsname> file\n");
" -v level: verbosity\n" fprintf(stderr, " -c class: rdata class for DS set (default: IN)\n");
" -V: print version information\n"); fprintf(stderr, " -T TTL\n");
fprintf(stderr, "Output: DS or CDS RRs\n"); fprintf(stderr, " -f file: read keyset from zone file\n");
fprintf(stderr, " -A: when used with -f, "
"include all keys in DS set, not just KSKs\n");
fprintf(stderr, "Output: DS or DLV RRs\n");
exit (-1); exit (-1);
} }
@@ -332,48 +348,59 @@ int
main(int argc, char **argv) { main(int argc, char **argv) {
char *classname = NULL; char *classname = NULL;
char *filename = NULL, *dir = NULL, *namestr; char *filename = NULL, *dir = NULL, *namestr;
char *endp, *arg1; char *lookaside = NULL;
char *endp;
int ch; int ch;
bool cds = false; unsigned int dtype = DNS_DSDIGEST_SHA1;
bool usekeyset = false; isc_boolean_t cds = ISC_FALSE;
bool showall = false; isc_boolean_t both = ISC_TRUE;
isc_boolean_t usekeyset = ISC_FALSE;
isc_boolean_t showall = ISC_FALSE;
isc_result_t result; isc_result_t result;
isc_log_t *log = NULL; isc_log_t *log = NULL;
isc_entropy_t *ectx = NULL;
dns_rdataset_t rdataset; dns_rdataset_t rdataset;
dns_rdata_t rdata; dns_rdata_t rdata;
dns_rdata_init(&rdata); dns_rdata_init(&rdata);
if (argc == 1) { if (argc == 1)
usage(); usage();
}
isc_mem_create(&mctx); result = isc_mem_create(0, 0, &mctx);
if (result != ISC_R_SUCCESS)
fatal("out of memory");
#if USE_PKCS11 #ifdef PKCS11CRYPTO
pk11_result_register(); pk11_result_register();
#endif #endif
dns_result_register(); dns_result_register();
isc_commandline_errprint = false; isc_commandline_errprint = ISC_FALSE;
#define OPTIONS "12Aa:Cc:d:Ff:K:l:sT:v:hV" #define OPTIONS "12Aa:Cc:d:Ff:K:l:sT:v:hV"
while ((ch = isc_commandline_parse(argc, argv, OPTIONS)) != -1) { while ((ch = isc_commandline_parse(argc, argv, OPTIONS)) != -1) {
switch (ch) { switch (ch) {
case '1': case '1':
add_dtype(DNS_DSDIGEST_SHA1); dtype = DNS_DSDIGEST_SHA1;
both = ISC_FALSE;
break; break;
case '2': case '2':
add_dtype(DNS_DSDIGEST_SHA256); dtype = DNS_DSDIGEST_SHA256;
both = ISC_FALSE;
break; break;
case 'A': case 'A':
showall = true; showall = ISC_TRUE;
break; break;
case 'a': case 'a':
add_dtype(strtodsdigest(isc_commandline_argument)); dtype = strtodsdigest(isc_commandline_argument);
both = ISC_FALSE;
break; break;
case 'C': case 'C':
cds = true; if (lookaside != NULL)
fatal("lookaside and CDS are mutually"
" exclusive");
cds = ISC_TRUE;
break; break;
case 'c': case 'c':
classname = isc_commandline_argument; classname = isc_commandline_argument;
@@ -391,13 +418,18 @@ main(int argc, char **argv) {
filename = isc_commandline_argument; filename = isc_commandline_argument;
break; break;
case 'l': case 'l':
fatal("-l option (DLV lookaside) is obsolete"); if (cds)
fatal("lookaside and CDS are mutually"
" exclusive");
lookaside = isc_commandline_argument;
if (strlen(lookaside) == 0U)
fatal("lookaside must be a non-empty string");
break; break;
case 's': case 's':
usekeyset = true; usekeyset = ISC_TRUE;
break; break;
case 'T': case 'T':
emitttl = true; emitttl = ISC_TRUE;
ttl = strtottl(isc_commandline_argument); ttl = strtottl(isc_commandline_argument);
break; break;
case 'v': case 'v':
@@ -430,103 +462,101 @@ main(int argc, char **argv) {
rdclass = strtoclass(classname); rdclass = strtoclass(classname);
if (usekeyset && filename != NULL) { if (usekeyset && filename != NULL)
fatal("cannot use both -s and -f"); fatal("cannot use both -s and -f");
}
/* When not using -f, -A is implicit */ /* When not using -f, -A is implicit */
if (filename == NULL) { if (filename == NULL)
showall = true; showall = ISC_TRUE;
}
/* Default digest type if none specified. */ if (argc < isc_commandline_index + 1 && filename == NULL)
if (dtype[0] == 0) {
dtype[0] = DNS_DSDIGEST_SHA256;
}
/*
* Use local variable arg1 so that clang can correctly analyse
* reachable paths rather than 'argc < isc_commandline_index + 1'.
*/
arg1 = argv[isc_commandline_index];
if (arg1 == NULL && filename == NULL) {
fatal("the key file name was not specified"); fatal("the key file name was not specified");
} if (argc > isc_commandline_index + 1)
if (arg1 != NULL && argv[isc_commandline_index + 1] != NULL) {
fatal("extraneous arguments"); fatal("extraneous arguments");
}
result = dst_lib_init(mctx, NULL); if (ectx == NULL)
if (result != ISC_R_SUCCESS) { setup_entropy(mctx, NULL, &ectx);
result = dst_lib_init(mctx, ectx,
ISC_ENTROPY_BLOCKING | ISC_ENTROPY_GOODONLY);
if (result != ISC_R_SUCCESS)
fatal("could not initialize dst: %s", fatal("could not initialize dst: %s",
isc_result_totext(result)); isc_result_totext(result));
} result = isc_hash_create(mctx, ectx, DNS_NAME_MAXWIRE);
if (result != ISC_R_SUCCESS)
fatal("could not initialize hash");
isc_entropy_stopcallbacksources(ectx);
setup_logging(mctx, &log); setup_logging(mctx, &log);
dns_rdataset_init(&rdataset); dns_rdataset_init(&rdataset);
if (usekeyset || filename != NULL) { if (usekeyset || filename != NULL) {
if (arg1 == NULL) { if (argc < isc_commandline_index + 1 && filename != NULL) {
/* using file name as the zone name */ /* using zone name as the zone file name */
namestr = filename; namestr = filename;
} else { } else
namestr = arg1; namestr = argv[isc_commandline_index];
}
result = initname(namestr); result = initname(namestr);
if (result != ISC_R_SUCCESS) { if (result != ISC_R_SUCCESS)
fatal("could not initialize name %s", namestr); fatal("could not initialize name %s", namestr);
}
if (usekeyset) { if (usekeyset)
result = loadkeyset(dir, &rdataset); result = loadkeyset(dir, &rdataset);
} else { else
INSIST(filename != NULL);
result = loadset(filename, &rdataset); result = loadset(filename, &rdataset);
}
if (result != ISC_R_SUCCESS) { if (result != ISC_R_SUCCESS)
fatal("could not load DNSKEY set: %s\n", fatal("could not load DNSKEY set: %s\n",
isc_result_totext(result)); isc_result_totext(result));
}
for (result = dns_rdataset_first(&rdataset); for (result = dns_rdataset_first(&rdataset);
result == ISC_R_SUCCESS; result == ISC_R_SUCCESS;
result = dns_rdataset_next(&rdataset)) result = dns_rdataset_next(&rdataset)) {
{
dns_rdata_init(&rdata); dns_rdata_init(&rdata);
dns_rdataset_current(&rdataset, &rdata); dns_rdataset_current(&rdataset, &rdata);
if (verbose > 2) { if (verbose > 2)
logkey(&rdata); logkey(&rdata);
}
emits(showall, cds, &rdata); if (both) {
emit(DNS_DSDIGEST_SHA1, showall, lookaside,
cds, &rdata);
emit(DNS_DSDIGEST_SHA256, showall, lookaside,
cds, &rdata);
} else
emit(dtype, showall, lookaside, cds, &rdata);
} }
} else { } else {
unsigned char key_buf[DST_KEY_MAXSIZE]; unsigned char key_buf[DST_KEY_MAXSIZE];
loadkey(arg1, key_buf, DST_KEY_MAXSIZE, &rdata); loadkey(argv[isc_commandline_index], key_buf,
DST_KEY_MAXSIZE, &rdata);
emits(showall, cds, &rdata); if (both) {
emit(DNS_DSDIGEST_SHA1, showall, lookaside, cds,
&rdata);
emit(DNS_DSDIGEST_SHA256, showall, lookaside, cds,
&rdata);
} else
emit(dtype, showall, lookaside, cds, &rdata);
} }
if (dns_rdataset_isassociated(&rdataset)) { if (dns_rdataset_isassociated(&rdataset))
dns_rdataset_disassociate(&rdataset); dns_rdataset_disassociate(&rdataset);
}
cleanup_logging(&log); cleanup_logging(&log);
isc_hash_destroy();
dst_lib_destroy(); dst_lib_destroy();
if (verbose > 10) { cleanup_entropy(&ectx);
dns_name_destroy();
if (verbose > 10)
isc_mem_stats(mctx, stdout); isc_mem_stats(mctx, stdout);
}
isc_mem_destroy(&mctx); isc_mem_destroy(&mctx);
fflush(stdout); fflush(stdout);
if (ferror(stdout)) { if (ferror(stdout)) {
fprintf(stderr, "write error\n"); fprintf(stderr, "write error\n");
return (1); return (1);
} else { } else
return (0); return (0);
}
} }
+88 -143
View File
@@ -1,18 +1,15 @@
<!-- <!--
- Copyright (C) Internet Systems Consortium, Inc. ("ISC") - Copyright (C) 2008-2012, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
- -
- This Source Code Form is subject to the terms of the Mozilla Public - 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 - 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/. - 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 --> <!-- Converted by db4-upgrade version 1.0 -->
<refentry xmlns:db="http://docbook.org/ns/docbook" version="5.0" xml:id="man.dnssec-dsfromkey"> <refentry xmlns:db="http://docbook.org/ns/docbook" version="5.0" xml:id="man.dnssec-dsfromkey">
<info> <info>
<date>2019-05-08</date> <date>2012-05-02</date>
</info> </info>
<refentryinfo> <refentryinfo>
<corpname>ISC</corpname> <corpname>ISC</corpname>
@@ -40,9 +37,6 @@
<year>2014</year> <year>2014</year>
<year>2015</year> <year>2015</year>
<year>2016</year> <year>2016</year>
<year>2018</year>
<year>2019</year>
<year>2020</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder> <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright> </copyright>
</docinfo> </docinfo>
@@ -50,108 +44,56 @@
<refsynopsisdiv> <refsynopsisdiv>
<cmdsynopsis sepchar=" "> <cmdsynopsis sepchar=" ">
<command>dnssec-dsfromkey</command> <command>dnssec-dsfromkey</command>
<group choice="opt">
<arg choice="plain"><option>-1</option></arg>
<arg choice="plain"><option>-2</option></arg>
<arg choice="plain"><option>-a <replaceable class="parameter">alg</replaceable></option></arg>
</group>
<group>
<arg choice="plain" rep="norepeat"><option>-C</option></arg>
<arg choice="plain" rep="norepeat"><option>-l <replaceable class="parameter">domain</replaceable></option></arg>
</group>
<arg choice="opt" rep="norepeat"><option>-T <replaceable class="parameter">TTL</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-v <replaceable class="parameter">level</replaceable></option></arg> <arg choice="opt" rep="norepeat"><option>-v <replaceable class="parameter">level</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-K <replaceable class="parameter">directory</replaceable></option></arg> <arg choice="opt" rep="norepeat"><option>-1</option></arg>
<arg choice="opt" rep="norepeat"><option>-2</option></arg>
<arg choice="opt" rep="norepeat"><option>-a <replaceable class="parameter">alg</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-C</option></arg>
<arg choice="opt" rep="norepeat"><option>-l <replaceable class="parameter">domain</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-T <replaceable class="parameter">TTL</replaceable></option></arg>
<arg choice="req" rep="norepeat">keyfile</arg> <arg choice="req" rep="norepeat">keyfile</arg>
</cmdsynopsis> </cmdsynopsis>
<cmdsynopsis sepchar=" "> <cmdsynopsis sepchar=" ">
<command>dnssec-dsfromkey</command> <command>dnssec-dsfromkey</command>
<group choice="opt">
<arg choice="plain"><option>-1</option></arg>
<arg choice="plain"><option>-2</option></arg>
<arg choice="plain"><option>-a <replaceable class="parameter">alg</replaceable></option></arg>
</group>
<group>
<arg choice="plain" rep="norepeat"><option>-C</option></arg>
<arg choice="plain" rep="norepeat"><option>-l <replaceable class="parameter">domain</replaceable></option></arg>
</group>
<arg choice="opt" rep="norepeat"><option>-T <replaceable class="parameter">TTL</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-v <replaceable class="parameter">level</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-c <replaceable class="parameter">class</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-A</option></arg>
<arg choice="req" rep="norepeat"><option>-f <replaceable class="parameter">file</replaceable></option></arg>
<arg choice="opt" rep="norepeat">dnsname</arg>
</cmdsynopsis>
<cmdsynopsis sepchar=" ">
<command>dnssec-dsfromkey</command>
<group choice="opt">
<arg choice="plain"><option>-1</option></arg>
<arg choice="plain"><option>-2</option></arg>
<arg choice="plain"><option>-a <replaceable class="parameter">alg</replaceable></option></arg>
</group>
<group>
<arg choice="plain" rep="norepeat"><option>-C</option></arg>
<arg choice="plain" rep="norepeat"><option>-l <replaceable class="parameter">domain</replaceable></option></arg>
</group>
<arg choice="opt" rep="norepeat"><option>-T <replaceable class="parameter">TTL</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-v <replaceable class="parameter">level</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-c <replaceable class="parameter">class</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-K <replaceable class="parameter">directory</replaceable></option></arg>
<arg choice="req" rep="norepeat">-s</arg> <arg choice="req" rep="norepeat">-s</arg>
<arg choice="opt" rep="norepeat"><option>-1</option></arg>
<arg choice="opt" rep="norepeat"><option>-2</option></arg>
<arg choice="opt" rep="norepeat"><option>-a <replaceable class="parameter">alg</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-K <replaceable class="parameter">directory</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-l <replaceable class="parameter">domain</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-s</option></arg>
<arg choice="opt" rep="norepeat"><option>-c <replaceable class="parameter">class</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-T <replaceable class="parameter">TTL</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-f <replaceable class="parameter">file</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-A</option></arg>
<arg choice="opt" rep="norepeat"><option>-v <replaceable class="parameter">level</replaceable></option></arg>
<arg choice="req" rep="norepeat">dnsname</arg> <arg choice="req" rep="norepeat">dnsname</arg>
</cmdsynopsis> </cmdsynopsis>
<cmdsynopsis sepchar=" "> <cmdsynopsis sepchar=" ">
<command>dnssec-dsfromkey</command> <command>dnssec-dsfromkey</command>
<group choice="opt"> <arg choice="opt" rep="norepeat"><option>-h</option></arg>
<arg choice="plain" rep="norepeat"><option>-h</option></arg> <arg choice="opt" rep="norepeat"><option>-V</option></arg>
<arg choice="plain" rep="norepeat"><option>-V</option></arg>
</group>
</cmdsynopsis> </cmdsynopsis>
</refsynopsisdiv> </refsynopsisdiv>
<refsection><info><title>DESCRIPTION</title></info> <refsection><info><title>DESCRIPTION</title></info>
<para> <para><command>dnssec-dsfromkey</command>
The <command>dnssec-dsfromkey</command> command outputs DS (Delegation outputs the Delegation Signer (DS) resource record (RR), as defined in
Signer) resource records (RRs), or CDS (Child DS) RRs with the RFC 3658 and RFC 4509, for the given key(s).
<option>-C</option> option.
</para> </para>
<para>
The input keys can be specified in a number of ways:
</para>
<para>
By default, <command>dnssec-dsfromkey</command> reads a key file
named like <filename>Knnnn.+aaa+iiiii.key</filename>, as generated
by <command>dnssec-keygen</command>.
</para>
<para>
With the <option>-f <replaceable>file</replaceable></option>
option, <command>dnssec-dsfromkey</command> reads keys from a zone file
or partial zone file (which can contain just the DNSKEY records).
</para>
<para>
With the <option>-s</option>
option, <command>dnssec-dsfromkey</command> reads
a <filename>keyset-</filename> file, as generated
by <command>dnssec-keygen</command> <option>-C</option>.
</para>
</refsection> </refsection>
<refsection><info><title>OPTIONS</title></info> <refsection><info><title>OPTIONS</title></info>
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term>-1</term> <term>-1</term>
<listitem> <listitem>
<para> <para>
An abbreviation for <option>-a SHA-1</option>. Use SHA-1 as the digest algorithm (the default is to use
(Note: The SHA-1 algorithm is no longer recommended for use both SHA-1 and SHA-256).
when generating new DS and CDS records.)
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@@ -160,7 +102,7 @@
<term>-2</term> <term>-2</term>
<listitem> <listitem>
<para> <para>
An abbreviation for <option>-a SHA-256</option>. Use SHA-256 as the digest algorithm.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@@ -169,40 +111,10 @@
<term>-a <replaceable class="parameter">algorithm</replaceable></term> <term>-a <replaceable class="parameter">algorithm</replaceable></term>
<listitem> <listitem>
<para> <para>
Specify a digest algorithm to use when converting DNSKEY Select the digest algorithm. The value of
records to DS records. This option can be repeated, so <option>algorithm</option> must be one of SHA-1 (SHA1),
that multiple DS records are created for each DNSKEY SHA-256 (SHA256), GOST or SHA-384 (SHA384).
record. These values are case insensitive.
</para>
<para>
The <replaceable>algorithm</replaceable> must be one of
SHA-1, SHA-256, or SHA-384. These values are case insensitive,
and the hyphen may be omitted. If no algorithm is specified,
the default is SHA-256.
(Note: The SHA-1 algorithm is no longer recommended for use
when generating new DS and CDS records.)
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-A</term>
<listitem>
<para>
Include ZSKs when generating DS records. Without this option, only
keys which have the KSK flag set will be converted to DS records
and printed. Useful only in <option>-f</option> zone file mode.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-c <replaceable class="parameter">class</replaceable></term>
<listitem>
<para>
Specifies the DNS class (default is IN). Useful only
in <option>-s</option> keyset or <option>-f</option>
zone file mode.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@@ -211,7 +123,28 @@
<term>-C</term> <term>-C</term>
<listitem> <listitem>
<para> <para>
Generate CDS records rather than DS records. Generate CDS records rather than DS records. This is mutually
exclusive with generating lookaside records.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-T <replaceable class="parameter">TTL</replaceable></term>
<listitem>
<para>
Specifies the TTL of the DS records.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-K <replaceable class="parameter">directory</replaceable></term>
<listitem>
<para>
Look for key files (or, in keyset mode,
<filename>keyset-</filename> files) in
<option>directory</option>.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@@ -220,14 +153,13 @@
<term>-f <replaceable class="parameter">file</replaceable></term> <term>-f <replaceable class="parameter">file</replaceable></term>
<listitem> <listitem>
<para> <para>
Zone file mode: <command>dnssec-dsfromkey</command>'s Zone file mode: in place of the keyfile name, the argument is
final <replaceable>dnsname</replaceable> argument is the DNS domain name of a zone master file, which can be read
the DNS domain name of a zone whose master file can be read
from <option>file</option>. If the zone name is the same as from <option>file</option>. If the zone name is the same as
<option>file</option>, then it may be omitted. <option>file</option>, then it may be omitted.
</para> </para>
<para> <para>
If <replaceable>file</replaceable> is <literal>"-"</literal>, then If <option>file</option> is set to <literal>"-"</literal>, then
the zone data is read from the standard input. This makes it the zone data is read from the standard input. This makes it
possible to use the output of the <command>dig</command> possible to use the output of the <command>dig</command>
command as input, as in: command as input, as in:
@@ -239,20 +171,26 @@
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-h</term> <term>-A</term>
<listitem> <listitem>
<para> <para>
Prints usage information. Include ZSKs when generating DS records. Without this option,
only keys which have the KSK flag set will be converted to DS
records and printed. Useful only in zone file mode.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-K <replaceable class="parameter">directory</replaceable></term> <term>-l <replaceable class="parameter">domain</replaceable></term>
<listitem> <listitem>
<para> <para>
Look for key files or <filename>keyset-</filename> files in Generate a DLV set instead of a DS set. The specified
<option>directory</option>. <option>domain</option> is appended to the name for each
record in the set.
The DNSSEC Lookaside Validation (DLV) RR is described
in RFC 4431. This is mutually exclusive with generating
CDS records.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@@ -261,18 +199,18 @@
<term>-s</term> <term>-s</term>
<listitem> <listitem>
<para> <para>
Keyset mode: <command>dnssec-dsfromkey</command>'s Keyset mode: in place of the keyfile name, the argument is
final <replaceable>dnsname</replaceable> argument is the DNS the DNS domain name of a keyset file.
domain name used to locate a <filename>keyset-</filename> file.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-T <replaceable class="parameter">TTL</replaceable></term> <term>-c <replaceable class="parameter">class</replaceable></term>
<listitem> <listitem>
<para> <para>
Specifies the TTL of the DS records. By default the TTL is omitted. Specifies the DNS class (default is IN). Useful only
in keyset or zone file mode.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@@ -286,6 +224,15 @@
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term>-h</term>
<listitem>
<para>
Prints usage information.
</para>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term>-V</term> <term>-V</term>
<listitem> <listitem>
@@ -302,22 +249,21 @@
<para> <para>
To build the SHA-256 DS RR from the To build the SHA-256 DS RR from the
<userinput>Kexample.com.+003+26160</userinput> <userinput>Kexample.com.+003+26160</userinput>
keyfile name, you can issue the following command: keyfile name, the following command would be issued:
</para> </para>
<para><userinput>dnssec-dsfromkey -2 Kexample.com.+003+26160</userinput> <para><userinput>dnssec-dsfromkey -2 Kexample.com.+003+26160</userinput>
</para> </para>
<para> <para>
The command would print something like: The command would print something like:
</para> </para>
<para><userinput>example.com. IN DS 26160 5 2 3A1EADA7A74B8D0BA86726B0C227AA85AB8BBD2B2004F41A868A54F0C5EA0B94</userinput> <para><userinput>example.com. IN DS 26160 5 2 3A1EADA7A74B8D0BA86726B0C227AA85AB8BBD2B2004F41A868A54F0 C5EA0B94</userinput>
</para> </para>
</refsection> </refsection>
<refsection><info><title>FILES</title></info> <refsection><info><title>FILES</title></info>
<para> <para>
The keyfile can be designated by the key identification The keyfile can be designed by the key identification
<filename>Knnnn.+aaa+iiiii</filename> or the full file name <filename>Knnnn.+aaa+iiiii</filename> or the full file name
<filename>Knnnn.+aaa+iiiii.key</filename> as generated by <filename>Knnnn.+aaa+iiiii.key</filename> as generated by
<refentrytitle>dnssec-keygen</refentrytitle><manvolnum>8</manvolnum>. <refentrytitle>dnssec-keygen</refentrytitle><manvolnum>8</manvolnum>.
@@ -345,10 +291,9 @@
<refentrytitle>dnssec-signzone</refentrytitle><manvolnum>8</manvolnum> <refentrytitle>dnssec-signzone</refentrytitle><manvolnum>8</manvolnum>
</citerefentry>, </citerefentry>,
<citetitle>BIND 9 Administrator Reference Manual</citetitle>, <citetitle>BIND 9 Administrator Reference Manual</citetitle>,
<citetitle>RFC 3658</citetitle> (DS RRs), <citetitle>RFC 3658</citetitle>,
<citetitle>RFC 4509</citetitle> (SHA-256 for DS RRs), <citetitle>RFC 4431</citetitle>.
<citetitle>RFC 6605</citetitle> (SHA-384 for DS RRs), <citetitle>RFC 4509</citetitle>.
<citetitle>RFC 7344</citetitle> (CDS and CDNSKEY RRs).
</para> </para>
</refsection> </refsection>
+78 -130
View File
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- <!--
- Copyright (C) 2008-2012, 2014-2016, 2018-2020 Internet Systems Consortium, Inc. ("ISC") - Copyright (C) 2008-2012, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
- -
- This Source Code Form is subject to the terms of the Mozilla Public - 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 - License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -33,167 +33,105 @@
<h2>Synopsis</h2> <h2>Synopsis</h2>
<div class="cmdsynopsis"><p> <div class="cmdsynopsis"><p>
<code class="command">dnssec-dsfromkey</code> <code class="command">dnssec-dsfromkey</code>
[
<code class="option">-1</code>
| <code class="option">-2</code>
| <code class="option">-a <em class="replaceable"><code>alg</code></em></code>
]
[
<code class="option">-C</code>
| <code class="option">-l <em class="replaceable"><code>domain</code></em></code>
]
[<code class="option">-T <em class="replaceable"><code>TTL</code></em></code>]
[<code class="option">-v <em class="replaceable"><code>level</code></em></code>] [<code class="option">-v <em class="replaceable"><code>level</code></em></code>]
[<code class="option">-K <em class="replaceable"><code>directory</code></em></code>] [<code class="option">-1</code>]
[<code class="option">-2</code>]
[<code class="option">-a <em class="replaceable"><code>alg</code></em></code>]
[<code class="option">-C</code>]
[<code class="option">-l <em class="replaceable"><code>domain</code></em></code>]
[<code class="option">-T <em class="replaceable"><code>TTL</code></em></code>]
{keyfile} {keyfile}
</p></div> </p></div>
<div class="cmdsynopsis"><p> <div class="cmdsynopsis"><p>
<code class="command">dnssec-dsfromkey</code> <code class="command">dnssec-dsfromkey</code>
[
<code class="option">-1</code>
| <code class="option">-2</code>
| <code class="option">-a <em class="replaceable"><code>alg</code></em></code>
]
[
<code class="option">-C</code>
| <code class="option">-l <em class="replaceable"><code>domain</code></em></code>
]
[<code class="option">-T <em class="replaceable"><code>TTL</code></em></code>]
[<code class="option">-v <em class="replaceable"><code>level</code></em></code>]
[<code class="option">-c <em class="replaceable"><code>class</code></em></code>]
[<code class="option">-A</code>]
{<code class="option">-f <em class="replaceable"><code>file</code></em></code>}
[dnsname]
</p></div>
<div class="cmdsynopsis"><p>
<code class="command">dnssec-dsfromkey</code>
[
<code class="option">-1</code>
| <code class="option">-2</code>
| <code class="option">-a <em class="replaceable"><code>alg</code></em></code>
]
[
<code class="option">-C</code>
| <code class="option">-l <em class="replaceable"><code>domain</code></em></code>
]
[<code class="option">-T <em class="replaceable"><code>TTL</code></em></code>]
[<code class="option">-v <em class="replaceable"><code>level</code></em></code>]
[<code class="option">-c <em class="replaceable"><code>class</code></em></code>]
[<code class="option">-K <em class="replaceable"><code>directory</code></em></code>]
{-s} {-s}
[<code class="option">-1</code>]
[<code class="option">-2</code>]
[<code class="option">-a <em class="replaceable"><code>alg</code></em></code>]
[<code class="option">-K <em class="replaceable"><code>directory</code></em></code>]
[<code class="option">-l <em class="replaceable"><code>domain</code></em></code>]
[<code class="option">-s</code>]
[<code class="option">-c <em class="replaceable"><code>class</code></em></code>]
[<code class="option">-T <em class="replaceable"><code>TTL</code></em></code>]
[<code class="option">-f <em class="replaceable"><code>file</code></em></code>]
[<code class="option">-A</code>]
[<code class="option">-v <em class="replaceable"><code>level</code></em></code>]
{dnsname} {dnsname}
</p></div> </p></div>
<div class="cmdsynopsis"><p> <div class="cmdsynopsis"><p>
<code class="command">dnssec-dsfromkey</code> <code class="command">dnssec-dsfromkey</code>
[ [<code class="option">-h</code>]
<code class="option">-h</code> [<code class="option">-V</code>]
| <code class="option">-V</code>
]
</p></div> </p></div>
</div> </div>
<div class="refsection"> <div class="refsection">
<a name="id-1.7"></a><h2>DESCRIPTION</h2> <a name="id-1.7"></a><h2>DESCRIPTION</h2>
<p> <p><span class="command"><strong>dnssec-dsfromkey</strong></span>
The <span class="command"><strong>dnssec-dsfromkey</strong></span> command outputs DS (Delegation outputs the Delegation Signer (DS) resource record (RR), as defined in
Signer) resource records (RRs), or CDS (Child DS) RRs with the RFC 3658 and RFC 4509, for the given key(s).
<code class="option">-C</code> option.
</p> </p>
<p>
The input keys can be specified in a number of ways:
</p>
<p>
By default, <span class="command"><strong>dnssec-dsfromkey</strong></span> reads a key file
named like <code class="filename">Knnnn.+aaa+iiiii.key</code>, as generated
by <span class="command"><strong>dnssec-keygen</strong></span>.
</p>
<p>
With the <code class="option">-f <em class="replaceable"><code>file</code></em></code>
option, <span class="command"><strong>dnssec-dsfromkey</strong></span> reads keys from a zone file
or partial zone file (which can contain just the DNSKEY records).
</p>
<p>
With the <code class="option">-s</code>
option, <span class="command"><strong>dnssec-dsfromkey</strong></span> reads
a <code class="filename">keyset-</code> file, as generated
by <span class="command"><strong>dnssec-keygen</strong></span> <code class="option">-C</code>.
</p>
</div> </div>
<div class="refsection"> <div class="refsection">
<a name="id-1.8"></a><h2>OPTIONS</h2> <a name="id-1.8"></a><h2>OPTIONS</h2>
<div class="variablelist"><dl class="variablelist"> <div class="variablelist"><dl class="variablelist">
<dt><span class="term">-1</span></dt> <dt><span class="term">-1</span></dt>
<dd> <dd>
<p> <p>
An abbreviation for <code class="option">-a SHA-1</code>. Use SHA-1 as the digest algorithm (the default is to use
(Note: The SHA-1 algorithm is no longer recommended for use both SHA-1 and SHA-256).
when generating new DS and CDS records.)
</p> </p>
</dd> </dd>
<dt><span class="term">-2</span></dt> <dt><span class="term">-2</span></dt>
<dd> <dd>
<p> <p>
An abbreviation for <code class="option">-a SHA-256</code>. Use SHA-256 as the digest algorithm.
</p> </p>
</dd> </dd>
<dt><span class="term">-a <em class="replaceable"><code>algorithm</code></em></span></dt> <dt><span class="term">-a <em class="replaceable"><code>algorithm</code></em></span></dt>
<dd> <dd>
<p> <p>
Specify a digest algorithm to use when converting DNSKEY Select the digest algorithm. The value of
records to DS records. This option can be repeated, so <code class="option">algorithm</code> must be one of SHA-1 (SHA1),
that multiple DS records are created for each DNSKEY SHA-256 (SHA256), GOST or SHA-384 (SHA384).
record. These values are case insensitive.
</p>
<p>
The <em class="replaceable"><code>algorithm</code></em> must be one of
SHA-1, SHA-256, or SHA-384. These values are case insensitive,
and the hyphen may be omitted. If no algorithm is specified,
the default is SHA-256.
(Note: The SHA-1 algorithm is no longer recommended for use
when generating new DS and CDS records.)
</p>
</dd>
<dt><span class="term">-A</span></dt>
<dd>
<p>
Include ZSKs when generating DS records. Without this option, only
keys which have the KSK flag set will be converted to DS records
and printed. Useful only in <code class="option">-f</code> zone file mode.
</p>
</dd>
<dt><span class="term">-c <em class="replaceable"><code>class</code></em></span></dt>
<dd>
<p>
Specifies the DNS class (default is IN). Useful only
in <code class="option">-s</code> keyset or <code class="option">-f</code>
zone file mode.
</p> </p>
</dd> </dd>
<dt><span class="term">-C</span></dt> <dt><span class="term">-C</span></dt>
<dd> <dd>
<p> <p>
Generate CDS records rather than DS records. Generate CDS records rather than DS records. This is mutually
exclusive with generating lookaside records.
</p>
</dd>
<dt><span class="term">-T <em class="replaceable"><code>TTL</code></em></span></dt>
<dd>
<p>
Specifies the TTL of the DS records.
</p>
</dd>
<dt><span class="term">-K <em class="replaceable"><code>directory</code></em></span></dt>
<dd>
<p>
Look for key files (or, in keyset mode,
<code class="filename">keyset-</code> files) in
<code class="option">directory</code>.
</p> </p>
</dd> </dd>
<dt><span class="term">-f <em class="replaceable"><code>file</code></em></span></dt> <dt><span class="term">-f <em class="replaceable"><code>file</code></em></span></dt>
<dd> <dd>
<p> <p>
Zone file mode: <span class="command"><strong>dnssec-dsfromkey</strong></span>'s Zone file mode: in place of the keyfile name, the argument is
final <em class="replaceable"><code>dnsname</code></em> argument is the DNS domain name of a zone master file, which can be read
the DNS domain name of a zone whose master file can be read
from <code class="option">file</code>. If the zone name is the same as from <code class="option">file</code>. If the zone name is the same as
<code class="option">file</code>, then it may be omitted. <code class="option">file</code>, then it may be omitted.
</p> </p>
<p> <p>
If <em class="replaceable"><code>file</code></em> is <code class="literal">"-"</code>, then If <code class="option">file</code> is set to <code class="literal">"-"</code>, then
the zone data is read from the standard input. This makes it the zone data is read from the standard input. This makes it
possible to use the output of the <span class="command"><strong>dig</strong></span> possible to use the output of the <span class="command"><strong>dig</strong></span>
command as input, as in: command as input, as in:
@@ -202,31 +140,37 @@
<strong class="userinput"><code>dig dnskey example.com | dnssec-dsfromkey -f - example.com</code></strong> <strong class="userinput"><code>dig dnskey example.com | dnssec-dsfromkey -f - example.com</code></strong>
</p> </p>
</dd> </dd>
<dt><span class="term">-h</span></dt> <dt><span class="term">-A</span></dt>
<dd> <dd>
<p> <p>
Prints usage information. Include ZSKs when generating DS records. Without this option,
only keys which have the KSK flag set will be converted to DS
records and printed. Useful only in zone file mode.
</p> </p>
</dd> </dd>
<dt><span class="term">-K <em class="replaceable"><code>directory</code></em></span></dt> <dt><span class="term">-l <em class="replaceable"><code>domain</code></em></span></dt>
<dd> <dd>
<p> <p>
Look for key files or <code class="filename">keyset-</code> files in Generate a DLV set instead of a DS set. The specified
<code class="option">directory</code>. <code class="option">domain</code> is appended to the name for each
record in the set.
The DNSSEC Lookaside Validation (DLV) RR is described
in RFC 4431. This is mutually exclusive with generating
CDS records.
</p> </p>
</dd> </dd>
<dt><span class="term">-s</span></dt> <dt><span class="term">-s</span></dt>
<dd> <dd>
<p> <p>
Keyset mode: <span class="command"><strong>dnssec-dsfromkey</strong></span>'s Keyset mode: in place of the keyfile name, the argument is
final <em class="replaceable"><code>dnsname</code></em> argument is the DNS the DNS domain name of a keyset file.
domain name used to locate a <code class="filename">keyset-</code> file.
</p> </p>
</dd> </dd>
<dt><span class="term">-T <em class="replaceable"><code>TTL</code></em></span></dt> <dt><span class="term">-c <em class="replaceable"><code>class</code></em></span></dt>
<dd> <dd>
<p> <p>
Specifies the TTL of the DS records. By default the TTL is omitted. Specifies the DNS class (default is IN). Useful only
in keyset or zone file mode.
</p> </p>
</dd> </dd>
<dt><span class="term">-v <em class="replaceable"><code>level</code></em></span></dt> <dt><span class="term">-v <em class="replaceable"><code>level</code></em></span></dt>
@@ -235,6 +179,12 @@
Sets the debugging level. Sets the debugging level.
</p> </p>
</dd> </dd>
<dt><span class="term">-h</span></dt>
<dd>
<p>
Prints usage information.
</p>
</dd>
<dt><span class="term">-V</span></dt> <dt><span class="term">-V</span></dt>
<dd> <dd>
<p> <p>
@@ -250,23 +200,22 @@
<p> <p>
To build the SHA-256 DS RR from the To build the SHA-256 DS RR from the
<strong class="userinput"><code>Kexample.com.+003+26160</code></strong> <strong class="userinput"><code>Kexample.com.+003+26160</code></strong>
keyfile name, you can issue the following command: keyfile name, the following command would be issued:
</p> </p>
<p><strong class="userinput"><code>dnssec-dsfromkey -2 Kexample.com.+003+26160</code></strong> <p><strong class="userinput"><code>dnssec-dsfromkey -2 Kexample.com.+003+26160</code></strong>
</p> </p>
<p> <p>
The command would print something like: The command would print something like:
</p> </p>
<p><strong class="userinput"><code>example.com. IN DS 26160 5 2 3A1EADA7A74B8D0BA86726B0C227AA85AB8BBD2B2004F41A868A54F0C5EA0B94</code></strong> <p><strong class="userinput"><code>example.com. IN DS 26160 5 2 3A1EADA7A74B8D0BA86726B0C227AA85AB8BBD2B2004F41A868A54F0 C5EA0B94</code></strong>
</p> </p>
</div> </div>
<div class="refsection"> <div class="refsection">
<a name="id-1.10"></a><h2>FILES</h2> <a name="id-1.10"></a><h2>FILES</h2>
<p> <p>
The keyfile can be designated by the key identification The keyfile can be designed by the key identification
<code class="filename">Knnnn.+aaa+iiiii</code> or the full file name <code class="filename">Knnnn.+aaa+iiiii</code> or the full file name
<code class="filename">Knnnn.+aaa+iiiii.key</code> as generated by <code class="filename">Knnnn.+aaa+iiiii.key</code> as generated by
<span class="refentrytitle">dnssec-keygen</span>(8). <span class="refentrytitle">dnssec-keygen</span>(8).
@@ -296,10 +245,9 @@
<span class="refentrytitle">dnssec-signzone</span>(8) <span class="refentrytitle">dnssec-signzone</span>(8)
</span>, </span>,
<em class="citetitle">BIND 9 Administrator Reference Manual</em>, <em class="citetitle">BIND 9 Administrator Reference Manual</em>,
<em class="citetitle">RFC 3658</em> (DS RRs), <em class="citetitle">RFC 3658</em>,
<em class="citetitle">RFC 4509</em> (SHA-256 for DS RRs), <em class="citetitle">RFC 4431</em>.
<em class="citetitle">RFC 6605</em> (SHA-384 for DS RRs), <em class="citetitle">RFC 4509</em>.
<em class="citetitle">RFC 7344</em> (CDS and CDNSKEY RRs).
</p> </p>
</div> </div>
+2 -2
View File
@@ -1,4 +1,4 @@
.\" Copyright (C) 2013-2016, 2018-2020 Internet Systems Consortium, Inc. ("ISC") .\" Copyright (C) 2013-2016 Internet Systems Consortium, Inc. ("ISC")
.\" .\"
.\" This Source Code Form is subject to the terms of the Mozilla Public .\" 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 .\" License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -134,5 +134,5 @@ RFC 5011\&.
\fBInternet Systems Consortium, Inc\&.\fR \fBInternet Systems Consortium, Inc\&.\fR
.SH "COPYRIGHT" .SH "COPYRIGHT"
.br .br
Copyright \(co 2013-2016, 2018-2020 Internet Systems Consortium, Inc. ("ISC") Copyright \(co 2013-2016 Internet Systems Consortium, Inc. ("ISC")
.br .br
+42 -21
View File
@@ -1,21 +1,20 @@
/* /*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2013-2017 Internet Systems Consortium, Inc. ("ISC")
* *
* This Source Code Form is subject to the terms of the Mozilla Public * 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 * 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/. * 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 */ /*! \file */
#include <stdbool.h> #include <config.h>
#include <stdlib.h> #include <stdlib.h>
#include <isc/buffer.h> #include <isc/buffer.h>
#include <isc/commandline.h> #include <isc/commandline.h>
#include <isc/entropy.h>
#include <isc/hash.h> #include <isc/hash.h>
#include <isc/mem.h> #include <isc/mem.h>
#include <isc/print.h> #include <isc/print.h>
@@ -40,32 +39,38 @@
#include <dst/dst.h> #include <dst/dst.h>
#if USE_PKCS11 #ifdef PKCS11CRYPTO
#include <pk11/result.h> #include <pk11/result.h>
#endif #endif
#include "dnssectool.h" #include "dnssectool.h"
#ifndef PATH_MAX
#define PATH_MAX 1024 /* AIX, WIN32, and others don't define this. */
#endif
const char *program = "dnssec-importkey"; const char *program = "dnssec-importkey";
int verbose;
static dns_rdataclass_t rdclass; static dns_rdataclass_t rdclass;
static dns_fixedname_t fixed; static dns_fixedname_t fixed;
static dns_name_t *name = NULL; static dns_name_t *name = NULL;
static isc_mem_t *mctx = NULL; static isc_mem_t *mctx = NULL;
static bool setpub = false, setdel = false; static isc_boolean_t setpub = ISC_FALSE, setdel = ISC_FALSE;
static bool setttl = false; static isc_boolean_t setttl = ISC_FALSE;
static isc_stdtime_t pub = 0, del = 0; static isc_stdtime_t pub = 0, del = 0;
static dns_ttl_t ttl = 0; static dns_ttl_t ttl = 0;
static isc_stdtime_t syncadd = 0, syncdel = 0; static isc_stdtime_t syncadd = 0, syncdel = 0;
static bool setsyncadd = false; static isc_boolean_t setsyncadd = ISC_FALSE;
static bool setsyncdel = false; static isc_boolean_t setsyncdel = ISC_FALSE;
static isc_result_t static isc_result_t
initname(char *setname) { initname(char *setname) {
isc_result_t result; isc_result_t result;
isc_buffer_t buf; isc_buffer_t buf;
name = dns_fixedname_initname(&fixed); dns_fixedname_init(&fixed);
name = dns_fixedname_name(&fixed);
isc_buffer_init(&buf, setname, strlen(setname)); isc_buffer_init(&buf, setname, strlen(setname));
isc_buffer_add(&buf, strlen(setname)); isc_buffer_add(&buf, strlen(setname));
@@ -111,14 +116,14 @@ loadset(const char *filename, dns_rdataset_t *rdataset) {
db_load_from_stream(db, stdin); db_load_from_stream(db, stdin);
filename = "input"; filename = "input";
} else { } else {
result = dns_db_load(db, filename, dns_masterformat_text, result = dns_db_load3(db, filename, dns_masterformat_text,
DNS_MASTER_NOTTL); DNS_MASTER_NOTTL);
if (result != ISC_R_SUCCESS && result != DNS_R_SEENINCLUDE) if (result != ISC_R_SUCCESS && result != DNS_R_SEENINCLUDE)
fatal("can't load %s: %s", filename, fatal("can't load %s: %s", filename,
isc_result_totext(result)); isc_result_totext(result));
} }
result = dns_db_findnode(db, name, false, &node); result = dns_db_findnode(db, name, ISC_FALSE, &node);
if (result != ISC_R_SUCCESS) if (result != ISC_R_SUCCESS)
fatal("can't find %s node in %s", setname, filename); fatal("can't find %s node in %s", setname, filename);
@@ -173,8 +178,11 @@ loadkey(char *filename, unsigned char *key_buf, unsigned int key_buf_size,
rdclass = dst_key_class(key); rdclass = dst_key_class(key);
name = dns_fixedname_initname(&fixed); dns_fixedname_init(&fixed);
dns_name_copynf(dst_key_name(key), name); name = dns_fixedname_name(&fixed);
result = dns_name_copy(dst_key_name(key), name, NULL);
if (result != ISC_R_SUCCESS)
fatal("can't copy name");
dst_key_free(&key); dst_key_free(&key);
} }
@@ -218,7 +226,7 @@ emit(const char *dir, dns_rdata_t *rdata) {
dst_key_free(&tmp); dst_key_free(&tmp);
} }
dst_key_setexternal(key, true); dst_key_setexternal(key, ISC_TRUE);
if (setpub) if (setpub)
dst_key_settime(key, DST_TIME_PUBLISH, pub); dst_key_settime(key, DST_TIME_PUBLISH, pub);
if (setdel) if (setdel)
@@ -288,6 +296,7 @@ main(int argc, char **argv) {
int ch; int ch;
isc_result_t result; isc_result_t result;
isc_log_t *log = NULL; isc_log_t *log = NULL;
isc_entropy_t *ectx = NULL;
dns_rdataset_t rdataset; dns_rdataset_t rdataset;
dns_rdata_t rdata; dns_rdata_t rdata;
isc_stdtime_t now; isc_stdtime_t now;
@@ -298,14 +307,16 @@ main(int argc, char **argv) {
if (argc == 1) if (argc == 1)
usage(); usage();
isc_mem_create(&mctx); result = isc_mem_create(0, 0, &mctx);
if (result != ISC_R_SUCCESS)
fatal("out of memory");
#if USE_PKCS11 #ifdef PKCS11CRYPTO
pk11_result_register(); pk11_result_register();
#endif #endif
dns_result_register(); dns_result_register();
isc_commandline_errprint = false; isc_commandline_errprint = ISC_FALSE;
#define CMDLINE_FLAGS "D:f:hK:L:P:v:V" #define CMDLINE_FLAGS "D:f:hK:L:P:v:V"
while ((ch = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != -1) { while ((ch = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != -1) {
@@ -336,7 +347,7 @@ main(int argc, char **argv) {
break; break;
case 'L': case 'L':
ttl = strtottl(isc_commandline_argument); ttl = strtottl(isc_commandline_argument);
setttl = true; setttl = ISC_TRUE;
break; break;
case 'P': case 'P':
/* -Psync ? */ /* -Psync ? */
@@ -392,10 +403,17 @@ main(int argc, char **argv) {
if (argc > isc_commandline_index + 1) if (argc > isc_commandline_index + 1)
fatal("extraneous arguments"); fatal("extraneous arguments");
result = dst_lib_init(mctx, NULL); if (ectx == NULL)
setup_entropy(mctx, NULL, &ectx);
result = dst_lib_init(mctx, ectx,
ISC_ENTROPY_BLOCKING | ISC_ENTROPY_GOODONLY);
if (result != ISC_R_SUCCESS) if (result != ISC_R_SUCCESS)
fatal("could not initialize dst: %s", fatal("could not initialize dst: %s",
isc_result_totext(result)); isc_result_totext(result));
result = isc_hash_create(mctx, ectx, DNS_NAME_MAXWIRE);
if (result != ISC_R_SUCCESS)
fatal("could not initialize hash");
isc_entropy_stopcallbacksources(ectx);
setup_logging(mctx, &log); setup_logging(mctx, &log);
@@ -438,7 +456,10 @@ main(int argc, char **argv) {
if (dns_rdataset_isassociated(&rdataset)) if (dns_rdataset_isassociated(&rdataset))
dns_rdataset_disassociate(&rdataset); dns_rdataset_disassociate(&rdataset);
cleanup_logging(&log); cleanup_logging(&log);
isc_hash_destroy();
dst_lib_destroy(); dst_lib_destroy();
cleanup_entropy(&ectx);
dns_name_destroy();
if (verbose > 10) if (verbose > 10)
isc_mem_stats(mctx, stdout); isc_mem_stats(mctx, stdout);
isc_mem_destroy(&mctx); isc_mem_destroy(&mctx);
+1 -7
View File
@@ -1,12 +1,9 @@
<!-- <!--
- Copyright (C) Internet Systems Consortium, Inc. ("ISC") - Copyright (C) 2013-2016 Internet Systems Consortium, Inc. ("ISC")
- -
- This Source Code Form is subject to the terms of the Mozilla Public - 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 - 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/. - 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 --> <!-- Converted by db4-upgrade version 1.0 -->
@@ -37,9 +34,6 @@
<year>2014</year> <year>2014</year>
<year>2015</year> <year>2015</year>
<year>2016</year> <year>2016</year>
<year>2018</year>
<year>2019</year>
<year>2020</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder> <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright> </copyright>
</docinfo> </docinfo>

Some files were not shown because too many files have changed in this diff Show More