Compare commits

..
Author SHA1 Message Date
Vicky Risk c65f307d57 Update release.md 2019-08-29 19:57:45 -04:00
526 changed files with 7927 additions and 8296 deletions
+4 -30
View File
@@ -15,6 +15,9 @@
(expand-file-name (expand-file-name
(concat directory-of-current-dir-locals-file "./")) (concat directory-of-current-dir-locals-file "./"))
;; current directory
(expand-file-name (concat default-directory "./"))
;; libisc ;; libisc
(expand-file-name (expand-file-name
(concat directory-of-current-dir-locals-file "lib/isc/unix/include")) (concat directory-of-current-dir-locals-file "lib/isc/unix/include"))
@@ -22,16 +25,11 @@
(concat directory-of-current-dir-locals-file "lib/isc/pthreads/include")) (concat directory-of-current-dir-locals-file "lib/isc/pthreads/include"))
(expand-file-name (expand-file-name
(concat directory-of-current-dir-locals-file "lib/isc/include")) (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 ;; libdns
(expand-file-name (expand-file-name
(concat directory-of-current-dir-locals-file "lib/dns/include")) (concat directory-of-current-dir-locals-file "lib/dns/include"))
(expand-file-name
(concat directory-of-current-dir-locals-file "lib/dns"))
;; libisccc ;; libisccc
(expand-file-name (expand-file-name
@@ -53,30 +51,6 @@
(expand-file-name (expand-file-name
(concat directory-of-current-dir-locals-file "lib/bind9/include")) (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/openssl@1.1/include")
(expand-file-name "/usr/local/opt/libxml2/include/libxml2") (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/opt/json-c/include/json-c/")
-3
View File
@@ -56,6 +56,3 @@ kyua.log
named.memstats named.memstats
named.run named.run
timestamp timestamp
/compile_commands.json
/cppcheck_html/
/cppcheck.results
+13 -207
View File
@@ -11,12 +11,9 @@ variables:
# VirtualBox driver needs to set build_dir to "/builds" in gitlab-runner.toml # VirtualBox driver needs to set build_dir to "/builds" in gitlab-runner.toml
KYUA_RESULT: "$CI_PROJECT_DIR/kyua.results" KYUA_RESULT: "$CI_PROJECT_DIR/kyua.results"
GIT_DEPTH: 1
BUILD_PARALLEL_JOBS: 6 BUILD_PARALLEL_JOBS: 6
TEST_PARALLEL_JOBS: 6 TEST_PARALLEL_JOBS: 6
MAKE: make
stages: stages:
- precheck - precheck
- build - build
@@ -24,17 +21,9 @@ stages:
- system - system
- docs - docs
- push - push
- postcheck
### Runner Tag Templates ### Runner Tag Templates
# Note: BSD runners extract the operating system version to use from job name
.freebsd-amd64: &freebsd_amd64
tags:
- freebsd
- amd64
.linux-amd64: &linux_amd64 .linux-amd64: &linux_amd64
tags: tags:
- linux - linux
@@ -45,11 +34,6 @@ stages:
- linux - linux
- i386 - i386
.openbsd-amd64: &openbsd_amd64
tags:
- openbsd
- amd64
### Docker Image Templates ### Docker Image Templates
# Alpine Linux # Alpine Linux
@@ -126,32 +110,20 @@ stages:
- tags - tags
- web - web
.release-branch-triggering-rules: &release_branch_triggering_rules
only:
- merge_requests
- tags
- web
- master@isc-projects/bind9
- /^v9_[1-9][0-9]$/@isc-projects/bind9
.precheck: &precheck_job .precheck: &precheck_job
<<: *default_triggering_rules <<: *default_triggering_rules
<<: *debian_sid_amd64_image <<: *debian_sid_amd64_image
stage: precheck stage: precheck
.autoconf: &autoconf_job .autoconf: &autoconf_job
<<: *release_branch_triggering_rules <<: *default_triggering_rules
<<: *debian_sid_amd64_image <<: *debian_sid_amd64_image
stage: precheck stage: precheck
script: script:
- autoreconf -fi - autoreconf -fi
artifacts: artifacts:
paths: untracked: true
- aclocal.m4 expire_in: "1 hour"
- configure
- ltmain.sh
- m4/libtool.m4
expire_in: "1 week"
.configure: &configure | .configure: &configure |
./configure \ ./configure \
@@ -174,7 +146,7 @@ stages:
- test -w "${CCACHE_DIR}" && export PATH="/usr/lib/ccache:${PATH}" - test -w "${CCACHE_DIR}" && export PATH="/usr/lib/ccache:${PATH}"
script: script:
- *configure - *configure
- ${MAKE} -j${BUILD_PARALLEL_JOBS:-1} -k all V=1 - make -j${BUILD_PARALLEL_JOBS:-1} -k all V=1
- test -z "${RUN_MAKE_INSTALL}" || make install - test -z "${RUN_MAKE_INSTALL}" || make install
dependencies: dependencies:
- autoreconf:sid:amd64 - autoreconf:sid:amd64
@@ -182,7 +154,7 @@ stages:
- autoreconf:sid:amd64 - autoreconf:sid:amd64
artifacts: artifacts:
untracked: true untracked: true
expire_in: "1 week" expire_in: "1 hour"
.setup_interfaces: &setup_interfaces | .setup_interfaces: &setup_interfaces |
if [ "$(id -u)" -eq "0" ]; then if [ "$(id -u)" -eq "0" ]; then
@@ -202,7 +174,7 @@ stages:
- *setup_interfaces - *setup_interfaces
- *setup_softhsm - *setup_softhsm
script: script:
- ( cd bin/tests/system && make -j${TEST_PARALLEL_JOBS:-1} -k test V=1 ) - ( cd bin/tests && make -j${TEST_PARALLEL_JOBS:-1} -k test V=1 )
- test -s bin/tests/system/systests.output - test -s bin/tests/system/systests.output
artifacts: artifacts:
untracked: true untracked: true
@@ -210,7 +182,7 @@ stages:
when: on_failure when: on_failure
.kyua_report: &kyua_report_html | .kyua_report: &kyua_report_html |
kyua --logfile /dev/null report-html \ kyua report-html \
--force \ --force \
--results-file "$KYUA_RESULT" \ --results-file "$KYUA_RESULT" \
--results-filter "" \ --results-filter "" \
@@ -233,44 +205,6 @@ stages:
expire_in: "1 week" expire_in: "1 week"
when: on_failure when: on_failure
.cppcheck_args: &run_cppcheck |
cppcheck --enable=warning,performance,portability,information,missingInclude \
--include=config.h \
--quiet \
--std=c11 \
--language=c \
--project=compile_commands.json \
--error-exitcode=2 \
-j ${TEST_PARALLEL_JOBS:-1} \
--xml \
--output-file=cppcheck.results \
--relative-paths="$CI_PROJECT_DIR" \
--inline-suppr \
--suppressions-list=util/suppressions.txt
.cppcheck_report: &cppcheck_report_html |
cppcheck-htmlreport --title="BIND 9 ($CI_COMMIT_SHORT_SHA) Cppcheck Report" \
--file=cppcheck.results \
--report-dir=cppcheck_html/
.cppcheck: &cppcheck_job
<<: *default_triggering_rules
stage: postcheck
before_script:
- export GCC_VERSION=$(gcc --version | sed -n 's/.*\([0-9]\+\)\.[0-9]\+\.[0-9]\+.*/\1/p')
- sed -i "/gcc\",/a\"-DCPPCHECK\", \"-D__STDC__\", \"-D__GNUC__=${GCC_VERSION}\"," compile_commands.json
script:
- *run_cppcheck
after_script:
- *cppcheck_report_html
artifacts:
paths:
- compile_commands.json
- cppcheck.results
- cppcheck_html/
expire_in: "1 week"
when: on_failure
### Job Definitions ### Job Definitions
# Jobs in the precheck stage # Jobs in the precheck stage
@@ -311,7 +245,6 @@ misc:sid:amd64:
# Jobs for doc builds on Debian Sid (amd64) # Jobs for doc builds on Debian Sid (amd64)
docs:sid:amd64: docs:sid:amd64:
<<: *release_branch_triggering_rules
<<: *debian_sid_amd64_image <<: *debian_sid_amd64_image
stage: docs stage: docs
script: script:
@@ -326,6 +259,12 @@ docs:sid:amd64:
paths: paths:
- doc/arm/ - doc/arm/
expire_in: "1 month" expire_in: "1 month"
only:
- merge_requests
- tags
- web
- master@isc-projects/bind9
- /^v9_[1-9][0-9]$/@isc-projects/bind9
push:docs:sid:amd64: push:docs:sid:amd64:
<<: *debian_sid_amd64_image <<: *debian_sid_amd64_image
@@ -487,7 +426,6 @@ gcc:sid:amd64:
CFLAGS: "-Wall -Wextra -O3 -g" CFLAGS: "-Wall -Wextra -O3 -g"
EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2" EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2"
RUN_MAKE_INSTALL: 1 RUN_MAKE_INSTALL: 1
MAKE: bear make
<<: *debian_sid_amd64_image <<: *debian_sid_amd64_image
<<: *build_job <<: *build_job
@@ -505,13 +443,6 @@ unit:gcc:sid:amd64:
- gcc:sid:amd64 - gcc:sid:amd64
needs: ["gcc:sid:amd64"] needs: ["gcc:sid:amd64"]
cppcheck:gcc:sid:amd64:
<<: *debian_sid_amd64_image
<<: *cppcheck_job
dependencies:
- gcc:sid:amd64
needs: ["gcc:sid:amd64"]
# Jobs for regular GCC builds on Debian Sid (i386) # Jobs for regular GCC builds on Debian Sid (i386)
gcc:sid:i386: gcc:sid:i386:
@@ -730,69 +661,6 @@ unit:pkcs11:sid:amd64:
- pkcs11:sid:amd64 - pkcs11:sid:amd64
needs: ["pkcs11:sid:amd64"] needs: ["pkcs11:sid:amd64"]
# Jobs for Clang builds on FreeBSD 11.3 (amd64)
clang:freebsd11.3:amd64:
variables:
CFLAGS: "-Wall -Wextra -O2 -g"
<<: *freebsd_amd64
<<: *build_job
system:clang:freebsd11.3:amd64:
<<: *freebsd_amd64
<<: *system_test_job
dependencies:
- clang:freebsd11.3:amd64
needs: ["clang:freebsd11.3:amd64"]
unit:clang:freebsd11.3:amd64:
<<: *freebsd_amd64
<<: *unit_test_job
dependencies:
- clang:freebsd11.3:amd64
needs: ["clang:freebsd11.3:amd64"]
# Jobs for Clang builds on FreeBSD 12.0 (amd64)
clang:freebsd12.0:amd64:
variables:
CFLAGS: "-Wall -Wextra -O2 -g"
EXTRA_CONFIGURE: "--enable-dnstap"
<<: *freebsd_amd64
<<: *build_job
system:clang:freebsd12.0:amd64:
<<: *freebsd_amd64
<<: *system_test_job
dependencies:
- clang:freebsd12.0:amd64
needs: ["clang:freebsd12.0:amd64"]
unit:clang:freebsd12.0:amd64:
<<: *freebsd_amd64
<<: *unit_test_job
dependencies:
- clang:freebsd12.0:amd64
needs: ["clang:freebsd12.0:amd64"]
# Jobs for Clang builds on OpenBSD 6.5 (amd64)
clang:openbsd6.5:amd64:
variables:
CC: clang
<<: *openbsd_amd64
<<: *build_job
system:clang:openbsd6.5:amd64:
<<: *openbsd_amd64
<<: *system_test_job
dependencies:
- clang:openbsd6.5:amd64
needs: ["clang:openbsd6.5:amd64"]
only:
- tags
- web
# Jobs with libtool disabled # Jobs with libtool disabled
nolibtool:sid:amd64: nolibtool:sid:amd64:
@@ -816,65 +684,3 @@ unit:nolibtool:sid:amd64:
dependencies: dependencies:
- nolibtool:sid:amd64 - nolibtool:sid:amd64
needs: ["nolibtool:sid:amd64"] needs: ["nolibtool:sid:amd64"]
# Jobs for Visual Studio 2017 builds on Windows (amd64)
msvc:windows:amd64:
<<: *default_triggering_rules
stage: build
tags:
- windows
- amd64
variables:
VSCONF: Release
script:
- 'Push-Location "C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Auxiliary/Build"'
- '& cmd.exe /C "vcvarsall.bat x64 & set" | Foreach-Object { if ($_ -match "(.*?)=(.*)") { Set-Item -force -path "Env:\$($matches[1])" -value "$($matches[2])" } }'
- 'Pop-Location'
- 'Set-Location win32utils'
- '& "C:/Strawberry/perl/bin/perl.exe" Configure
"with-tools-version=15.0"
"with-platform-toolset=v141"
"with-platform-version=10.0.17763.0"
"with-vcredist=C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Redist/MSVC/14.16.27012/vcredist_x64.exe"
"with-openssl=C:/OpenSSL"
"with-libxml2=C:/libxml2"
"without-python"
"with-system-tests"
x64'
- 'Set-Item -path "Env:CL" -value "/MP$([Math]::Truncate($BUILD_PARALLEL_JOBS/2))"'
- '& msbuild.exe /maxCpuCount:2 /t:Build /p:Configuration=$VSCONF bind9.sln'
dependencies: []
needs:
- autoreconf:sid:amd64
artifacts:
untracked: true
expire_in: "1 week"
system:msvc:windows:amd64:
stage: system
tags:
- windows
- amd64
variables:
VSCONF: Release
script:
- 'Push-Location bin/tests/system'
- '$ifIndex = Get-NetIPInterface -AddressFamily IPv4 -InterfaceMetric 75 | Select-Object -ExpandProperty ifIndex'
- '& C:/tools/cygwin/bin/sed.exe -i "s/^exit.*/netsh interface ipv4 set dnsservers $ifIndex dhcp/; s/\(name\|interface\)=Loopback/$ifIndex/;" ifconfig.bat'
- '& C:/tools/cygwin/bin/sed.exe -i "s/kill -f/kill -W/;" conf.sh stop.pl'
- '& cmd.exe /C ifconfig.bat up; ""'
- 'Start-Sleep 2'
- '$Env:Path = "C:/tools/cygwin/bin;$Env:Path"'
- '& sh.exe runall.sh $TEST_PARALLEL_JOBS'
- 'If (Test-Path C:/CrashDumps/*) { dir C:/CrashDumps; Throw }'
dependencies:
- msvc:windows:amd64
needs: ["msvc:windows:amd64"]
artifacts:
untracked: true
expire_in: "1 week"
when: on_failure
only:
- tags
- web
+7 -4
View File
@@ -28,9 +28,9 @@
- [ ] (QA) Tell Support to handle notification of release. - [ ] (QA) Tell Support to handle notification of release.
- [ ] (Manager) Inform Marketing of the release - [ ] (Manager) Inform Marketing of the release
- [ ] (Manager) Update the internal [BIND release dates wiki page](https://wiki.isc.org/bin/view/Main/BindReleaseDates) when public announcement has been made. - [ ] (Manager) Update the internal [BIND release dates wiki page](https://wiki.isc.org/bin/view/Main/BindReleaseDates) when public announcement has been made.
- [ ] (SwEng) Push tags for the published releases to the public repository.
- [ ] (SwEng) Update DEB and RPM packages. - [ ] (SwEng) Update DEB and RPM packages
- [ ] (SwEng) Merge the automatically prepared `prep 9.X.Y` commit which updates `version` and documentation on the release branch into the relevant maintenance branch (`v9_X`). - [ ] (SwEng) 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`)
## Support ## Support
- [ ] Make tarballs and signatures available to download. - [ ] Make tarballs and signatures available to download.
@@ -39,6 +39,9 @@
- [ ] Update tickets in case of waiting support customers. - [ ] Update tickets in case of waiting support customers.
## Marketing ## Marketing
- [ ] Post short note to Twitter. - [ ] Update BIND Product page if needed
- [ ] Update BIND Significant Features Matrix in KB if needed
- [ ] Update BIND -S Edition data sheet if S Edition feature change
- [ ] Announce on social media
- [ ] Update [Wikipedia entry for BIND](http://en.wikipedia.org/wiki/BIND). - [ ] Update [Wikipedia entry for BIND](http://en.wikipedia.org/wiki/BIND).
- [ ] Write blog article (if a major release). - [ ] Write blog article (if a major release).
+2 -78
View File
@@ -1,79 +1,3 @@
5302. [bug] Fix checking that "dnstap-output" is defined when
"dnstap" is specified" in a view. [GL #1281]
5301. [bug] Detect partial prefixes / incomplete IPv4 address in
acls. [GL #1143]
5300. [bug] dig/mdig/delv: Add a colon after EDNS option names,
even when the option is empty, to improve
readability and allow correct parsing of YAML
output. [GL #1226]
--- 9.15.5 released ---
5299. [security] A flaw in DNSSEC verification when transferring
mirror zones could allow data to be incorrectly
marked valid. (CVE-2019-6475) [GL #1252]
5298. [security] Named could assert if a forwarder returned a
referral, rather than resolving the query, when QNAME
minimization was enabled. (CVE-2019-6476) [GL #1051]
5297. [bug] Check whether a previous QNAME minimization fetch
is still running before starting a new one; return
SERVFAIL and log an error if so. [GL #1191]
5296. [placeholder]
5295. [cleanup] Split dns_name_copy() calls into dns_name_copy() and
dns_name_copynf() for those calls that can potentially
fail and those that should not fail respectively.
[GL !2265]
5294. [func] Fallback to ACE name on output in locale, which does not
support converting it to unicode. [GL #846]
5293. [bug] On Windows, named crashed upon any attempt to fetch XML
statistics from it. [GL #1245]
5292. [bug] Queue 'rndc nsec3param' requests while signing inline
zone changes. [GL #1205]
--- 9.15.4 released ---
5291. [placeholder]
5290. [placeholder]
5289. [bug] Address NULL pointer dereference in rpz.c:rpz_detach.
[GL #1210]
5288. [bug] dnssec-must-be-secure was not always honored.
[GL #1209]
5287. [placeholder]
5286. [contrib] Address potential NULL pointer dereferences in
dlz_mysqldyn_mod.c. [GL #1207]
5285. [port] win32: implement "-T maxudpXXX". [GL #837]
5284. [func] Added +unexpected command line option to dig.
By default, dig won't accept a reply from a source
other than the one to which it sent the query.
Invoking dig with +unexpected argument will allow it
to process replies from unexpected sources.
5283. [bug] When a response-policy zone expires, ensure that
its policies are removed from the RPZ summary
database. [GL #1146]
5282. [bug] Fixed a bug in searching for possible wildcard matches
for query names in the RPZ summary database. [GL #1146]
5281. [cleanup] Don't escape commas when reporting named's command
line. [GL #1189]
5280. [protocol] Add support for displaying EDNS option LLQ. [GL #1201] 5280. [protocol] Add support for displaying EDNS option LLQ. [GL #1201]
5279. [bug] When loading, reject zones containing CDS or CDNSKEY 5279. [bug] When loading, reject zones containing CDS or CDNSKEY
@@ -125,7 +49,7 @@
5268. [placeholder] 5268. [placeholder]
5267. [func] Allow statistics groups display to be toggle-able. 5267. [func] Allow statistics groups display to be toggleable.
[GL #1030] [GL #1030]
5266. [bug] named-checkconf failed to report dnstap-output 5266. [bug] named-checkconf failed to report dnstap-output
@@ -233,7 +157,7 @@
code in a high-load cold-cache resolver scenario. code in a high-load cold-cache resolver scenario.
[GL #943] [GL #943]
5242. [bug] In relaxed qname minimization mode, fall back to 5242. [bug] In relaxed qname minimizatiom mode, fall back to
normal resolution when encountering a lame normal resolution when encountering a lame
delegation, and use _.domain/A queries rather delegation, and use _.domain/A queries rather
than domain/NS. [GL #1055] than domain/NS. [GL #1055]
+225
View File
@@ -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.
+1 -1
View File
@@ -104,7 +104,7 @@ PLATFORMS: PLATFORMS.md
sed -e '$${/^$$/d;}' > $@ sed -e '$${/^$$/d;}' > $@
CODE_OF_CONDUCT: CODE_OF_CONDUCT.md 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 | \ ${PANDOC} --email-obfuscation=none -s --metadata title="CODE OF CONDUCT" -f markdown-smart -t html $< | \
${W3M} -dump -cols 75 -O ascii -T text/html | \ ${W3M} -dump -cols 75 -O ascii -T text/html | \
sed -e '$${/^$$/d;}' > $@ sed -e '$${/^$$/d;}' > $@
+25 -29
View File
@@ -71,9 +71,6 @@ 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 assertion failure or other crash in named, please do NOT use GitLab to
report it. Instead, please send mail to security-officer@isc.org. report it. Instead, please send mail to security-officer@isc.org.
For a general overview of ISC security policies, read the Knowledge Base
article at https://kb.isc.org/docs/aa-00861.
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.
@@ -94,7 +91,7 @@ General information: CONTRIBUTING.md - Code of Conduct: CODE_OF_CONDUCT.md
- BIND 9 code style: doc/dev/style.md - BIND architecture and developer - BIND 9 code style: doc/dev/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 as Merge Requests in the ISC GitLab
server at at https://gitlab.isc.org/isc-projects/bind9/merge_requests. server at at https://gitlab.isc.org/isc-projects/bind9/merge_requests.
By default, external contributors don't have ability to fork BIND in the By default, external contributors don't have ability to fork BIND in the
@@ -113,16 +110,14 @@ of changes from BIND 9.14 and earlier releases. New features include:
* Support for the new GeoIP2 geolocation API * Support for the new GeoIP2 geolocation API
* Improved DNSSEC key configuration using dnssec-keys * Improved DNSSEC key configuration using dnssec-keys
* YAML output for dig, mdig, and delv.
Building BIND Building BIND
Minimally, BIND requires a UNIX or Linux system with an ANSI C compiler, Minimally, BIND requires a UNIX or Linux system with an ANSI C compiler,
basic POSIX support, and a 64-bit integer type. Successful builds have basic POSIX support, and a 64-bit integer type. Successful builds have
been observed on many versions of Linux and UNIX, including RHEL/CentOS, been observed on many versions of Linux and UNIX, including RedHat,
Fedora, Debian, Ubuntu, SLES, openSUSE, Slackware, Alpine, FreeBSD, Fedora, Debian, Ubuntu, SuSE, Slackware, FreeBSD, NetBSD, OpenBSD, Mac OS
NetBSD, OpenBSD, macOS, Solaris, OpenIndiana, OmniOS CE, HP-UX, and X, Solaris, HP-UX, and OpenWRT.
OpenWRT.
BIND requires a cryptography provider library such as OpenSSL or a BIND requires a cryptography provider library such as OpenSSL or a
hardware service module supporting PKCS#11. On Linux, BIND requires the hardware service module supporting PKCS#11. On Linux, BIND requires the
@@ -131,8 +126,8 @@ overridden by disabling capability support at compile time. See
Compile-time options below for details on other libraries that may be Compile-time options below for details on other libraries that may be
required to support optional features. required to support optional features.
BIND is also available for Windows Server 2008 and higher. See win32utils/ BIND is also available for Windows 2008 and higher. See win32utils/
build.txt for details on building for Windows systems. readme1st.txt for details on building for Windows systems.
To build on a UNIX or Linux system, use: To build on a UNIX or Linux system, use:
@@ -160,23 +155,25 @@ 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 macOS
Building on macOS assumes that the "Command Tools for Xcode" is installed. Building on macOS assumes that the "Command Tools for Xcode" is installed.
This can be downloaded from https://developer.apple.com/download/more/ or This can be downloaded from https://developer.apple.com/download/more/ or
if you have Xcode already installed you can run xcode-select --install. if you have Xcode already installed you can run "xcode-select --install".
This will add /usr/include to the system and install the compiler and
other tools so that they can be easily found.
Dependencies Dependencies
Portions of BIND that are written in Python, including dnssec-keymgr, Portions of BIND that are written in Python, including dnssec-keymgr,
dnssec-coverage, dnssec-checkds, and some of the system tests, require the 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 'argparse' and 'ply' modules to be available. 'argparse' is a standard
of Python 2.7 and Python 3.2. ply is available from https:// module as of Python 2.7 and Python 3.2. 'ply' is available from https://
pypi.python.org/pypi/ply. pypi.python.org/pypi/ply.
Compile-time options Compile-time options
@@ -195,9 +192,8 @@ operations, specify the path to the PKCS#11 provider library using
--with-pkcs11=<PREFIX>, and configure BIND with --enable-native-pkcs11. --with-pkcs11=<PREFIX>, and configure BIND with --enable-native-pkcs11.
To support the HTTP statistics channel, the server must be linked with at 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 least one of the following: libxml2 http://xmlsoft.org or json-c https://
https://github.com/json-c/json-c. If these are installed at a nonstandard github.com/json-c. If these are installed at a nonstandard location, then:
location, then:
* for libxml2, specify the prefix using --with-libxml2=/prefix, * for libxml2, specify the prefix using --with-libxml2=/prefix,
* for json-c, adjust PKG_CONFIG_PATH. * for json-c, adjust PKG_CONFIG_PATH.
@@ -230,8 +226,8 @@ smaller systems.
On Linux, process capabilities are managed in user space using the libcap On Linux, process capabilities are managed in user space using the libcap
library, which can be installed on most Linux systems via the libcap-dev library, which can be installed on most Linux systems via the libcap-dev
or libcap-devel package. Process capability support can also be disabled or libcap-devel module. Process capability support can also be disabled by
by configuring with --disable-linux-caps. configuring with --disable-linux-caps.
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
@@ -265,7 +261,7 @@ 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 the CMocka unit testing framework. To
@@ -276,7 +272,7 @@ 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
@@ -331,16 +327,16 @@ 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 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 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 !NNN], which, respectively, refer to issues or merge requests in the
GitLab database. Most of these are publicly readable, unless they include Gitlab database. Most of these are publicly readable, unless they include
information which is confidential or security sensitive. information which is confidential or security senstive.
To look up a GitLab issue by its number, use the URL https:// 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, 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. 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 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 letter "P". This indicates that the information is in the private ISC
GitLab instance, which is not visible to the public. Gitlab instance, which is not visible to the public.
Acknowledgments Acknowledgments
+38 -40
View File
@@ -82,9 +82,6 @@ assertion failure or other crash in `named`, please do *NOT* use GitLab to
report it. Instead, please send mail 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
article at [https://kb.isc.org/docs/aa-00861](https://kb.isc.org/docs/aa-00861).
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).
@@ -107,7 +104,7 @@ Information for BIND contributors can be found in the following files:
- 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 as
[merge requests](https://gitlab.isc.org/isc-projects/bind9/merge_requests) [Merge Requests](https://gitlab.isc.org/isc-projects/bind9/merge_requests)
in the [ISC GitLab server](https://gitlab.isc.org) at in the [ISC GitLab server](https://gitlab.isc.org) at
at [https://gitlab.isc.org/isc-projects/bind9/merge_requests](https://gitlab.isc.org/isc-projects/bind9/merge_requests). at [https://gitlab.isc.org/isc-projects/bind9/merge_requests](https://gitlab.isc.org/isc-projects/bind9/merge_requests).
@@ -129,15 +126,15 @@ include:
* Support for the new GeoIP2 geolocation API * Support for the new GeoIP2 geolocation API
* Improved DNSSEC key configuration using `dnssec-keys` * Improved DNSSEC key configuration using `dnssec-keys`
* YAML output for `dig`, `mdig`, and `delv`. * YAML output for dig, mdig, and delv.
### <a name="build"/> Building BIND ### <a name="build"/> Building BIND
Minimally, BIND requires a UNIX or Linux system with an ANSI C compiler, Minimally, BIND requires a UNIX or Linux system with an ANSI C compiler,
basic POSIX support, and a 64-bit integer type. Successful builds have been basic POSIX support, and a 64-bit integer type. Successful builds have been
observed on many versions of Linux and UNIX, including RHEL/CentOS, Fedora, observed on many versions of Linux and UNIX, including RedHat, Fedora,
Debian, Ubuntu, SLES, openSUSE, Slackware, Alpine, FreeBSD, NetBSD, Debian, Ubuntu, SuSE, Slackware, FreeBSD, NetBSD, OpenBSD, Mac OS X,
OpenBSD, macOS, Solaris, OpenIndiana, OmniOS CE, HP-UX, and OpenWRT. Solaris, HP-UX, and OpenWRT.
BIND requires a cryptography provider library such as OpenSSL or a BIND requires a cryptography provider library such as OpenSSL or a
hardware service module supporting PKCS#11. On Linux, BIND requires hardware service module supporting PKCS#11. On Linux, BIND requires
@@ -146,8 +143,8 @@ can be overridden by disabling capability support at compile time.
See [Compile-time options](#opts) below for details on other libraries See [Compile-time options](#opts) below for details on other libraries
that may be required to support optional features. that may be required to support optional features.
BIND is also available for Windows Server 2008 and higher. See BIND is also available for Windows 2008 and higher. See
`win32utils/build.txt` for details on building for Windows `win32utils/readme1st.txt` for details on building for Windows
systems. systems.
To build on a UNIX or Linux system, use: To build on a UNIX or Linux system, use:
@@ -169,24 +166,26 @@ 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 #### <a name="macos"> macOS
Building on macOS assumes that the "Command Tools for Xcode" is installed. 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/) This can be downloaded from https://developer.apple.com/download/more/
or if you have Xcode already installed you can run `xcode-select --install`. or if you have Xcode already installed you can run "xcode-select --install".
This will add /usr/include to the system and install the compiler and other
tools so that they can be easily found.
### <a name="dependencies"/> Dependencies ### <a name="dependencies"/> Dependencies
Portions of BIND that are written in Python, including Portions of BIND that are written in Python, including
`dnssec-keymgr`, `dnssec-coverage`, `dnssec-checkds`, and some of the `dnssec-keymgr`, `dnssec-coverage`, `dnssec-checkds`, and some of the
system tests, require the `argparse` and `ply` modules to be available. 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. '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). 'ply' is available from [https://pypi.python.org/pypi/ply](https://pypi.python.org/pypi/ply).
#### <a name="opts"/> Compile-time options #### <a name="opts"/> Compile-time options
@@ -204,16 +203,16 @@ path to the PKCS#11 provider library using `--with-pkcs11=<PREFIX>`, and
configure BIND with `--enable-native-pkcs11`. configure BIND with `--enable-native-pkcs11`.
To support the HTTP statistics channel, the server must be linked with at To support the HTTP statistics channel, the server must be linked with at
least one of the following libraries: `libxml2` least one of the following: libxml2
[http://xmlsoft.org](http://xmlsoft.org) or `json-c` [http://xmlsoft.org](http://xmlsoft.org) or json-c
[https://github.com/json-c/json-c](https://github.com/json-c/json-c). [https://github.com/json-c](https://github.com/json-c). If these are
If these are installed at a nonstandard location, then: installed at a nonstandard location, then:
* for `libxml2`, specify the prefix using `--with-libxml2=/prefix`, * for libxml2, specify the prefix using `--with-libxml2=/prefix`,
* for `json-c`, adjust `PKG_CONFIG_PATH`. * for json-c, adjust `PKG_CONFIG_PATH`.
To support compression on the HTTP statistics channel, the server must be To support compression on the HTTP statistics channel, the server must be
linked against `libzlib`. If this is installed in a nonstandard location, linked against libzlib. If this is installed in a nonstandard location,
specify the prefix using `--with-zlib=/prefix`. specify the prefix using `--with-zlib=/prefix`.
To support storing configuration data for runtime-added zones in an LMDB To support storing configuration data for runtime-added zones in an LMDB
@@ -226,9 +225,9 @@ found; if the library is installed in a nonstandard location,
specify the prefix using `--with-maxminddb=/prefix`. GeoIP2 support specify the prefix using `--with-maxminddb=/prefix`. GeoIP2 support
can be switched off with `--disable-geoip`. can be switched off with `--disable-geoip`.
For DNSTAP packet logging, you must have installed `libfstrm` For DNSTAP packet logging, you must have installed libfstrm
[https://github.com/farsightsec/fstrm](https://github.com/farsightsec/fstrm) [https://github.com/farsightsec/fstrm](https://github.com/farsightsec/fstrm)
and `libprotobuf-c` and libprotobuf-c
[https://developers.google.com/protocol-buffers](https://developers.google.com/protocol-buffers), [https://developers.google.com/protocol-buffers](https://developers.google.com/protocol-buffers),
and BIND must be configured with `--enable-dnstap`. and BIND must be configured with `--enable-dnstap`.
@@ -241,7 +240,7 @@ performance on smaller systems.
On Linux, process capabilities are managed in user space using On Linux, process capabilities are managed in user space using
the `libcap` library, which can be installed on most Linux systems via the `libcap` library, which can be installed on most Linux systems via
the `libcap-dev` or `libcap-devel` package. Process capability support can the `libcap-dev` or `libcap-devel` module. Process capability support can
also be disabled by configuring with `--disable-linux-caps`. also be disabled by configuring with `--disable-linux-caps`.
On some platforms it is necessary to explicitly request large file support On some platforms it is necessary to explicitly request large file support
@@ -274,21 +273,20 @@ 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 the CMocka unit testing framework.
To build them, use `configure --with-cmocka`. Execution of tests is done To build them, use `configure --with-cmocka`. Execution of tests is done
by the [Kyua test execution engine](https://github.com/jmmv/kyua); if the by the Kyua test execution engine; if the `kyua` command is available,
`kyua` command is available, then unit tests can be run via `make test` then unit tests can be run via `make test` or `make unit`.
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
@@ -338,17 +336,17 @@ 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 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, 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 `[GL !NNN]`, which, respectively, refer to issues or merge requests in the
GitLab database. Most of these are publicly readable, unless they include Gitlab database. Most of these are publicly readable, unless they include
information which is confidential or security sensitive. information which is confidential or security senstive.
To look up a GitLab issue by its number, use the URL 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). [https://gitlab.isc.org/isc-projects/bind9/issues/NNN](https://gitlab.isc.org/isc-projects/bind9/issues).
To look up a merge request, use 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). [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 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 letter "P". This indicates that the information is in the private ISC
GitLab instance, which is not visible to the public. Gitlab instance, which is not visible to the public.
### <a name="ack"/> Acknowledgments ### <a name="ack"/> Acknowledgments
+3 -1
View File
@@ -127,7 +127,9 @@ 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) {
+1 -1
View File
@@ -585,7 +585,7 @@ main(int argc, char **argv) {
} }
isc_commandline_reset = true; isc_commandline_reset = 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) {
+1 -1
View File
@@ -517,7 +517,7 @@ 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);
+1 -4
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">
+1 -4
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">
+7 -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>{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">
@@ -66,15 +63,15 @@
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName> <ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<BrowseInformation>true</BrowseInformation> <BrowseInformation>true</BrowseInformation>
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles> <ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;..\..\..\lib\bind9\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs> <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>@OPENSSL_LIB@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)
@@ -100,7 +97,7 @@ copy /Y named-checkzone.ilk named-compilezone.ilk
<ObjectFileName>.\$(Configuration)\</ObjectFileName> <ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName> <ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles> <ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;..\..\..\lib\bind9\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
</ClCompile> </ClCompile>
<Link> <Link>
@@ -109,8 +106,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>@OPENSSL_LIB@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>
+1 -1
View File
@@ -207,7 +207,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;
+1 -1
View File
@@ -209,7 +209,7 @@ main(int argc, char **argv) {
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, alg, keysize, &key_txtbuffer);
+1 -4
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">
+1 -4
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">
+1 -4
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">
-5
View File
@@ -409,11 +409,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
+9 -5
View File
@@ -529,7 +529,7 @@ setup_style(dns_master_style_t **stylep) {
isc_result_t result; isc_result_t result;
dns_master_style_t *style = NULL; dns_master_style_t *style = NULL;
REQUIRE(stylep != NULL && *stylep == NULL); REQUIRE(stylep != NULL || *stylep == NULL);
styleflags |= DNS_STYLEFLAG_REL_OWNER; styleflags |= DNS_STYLEFLAG_REL_OWNER;
if (yaml) { if (yaml) {
@@ -635,12 +635,14 @@ key_fromconfig(const cfg_obj_t *key, dns_client_t *client) {
if (!match_root) { if (!match_root) {
return (ISC_R_SUCCESS); return (ISC_R_SUCCESS);
} }
if (!root_validation && match_root) {
if (!root_validation) {
return (ISC_R_SUCCESS); return (ISC_R_SUCCESS);
} }
delv_log(ISC_LOG_DEBUG(3), "adding trust anchor %s", trust_anchor); if (match_root) {
delv_log(ISC_LOG_DEBUG(3), "adding trust anchor %s",
trust_anchor);
}
flags = cfg_obj_asuint32(cfg_tuple_get(key, "flags")); flags = cfg_obj_asuint32(cfg_tuple_get(key, "flags"));
proto = cfg_obj_asuint32(cfg_tuple_get(key, "protocol")); proto = cfg_obj_asuint32(cfg_tuple_get(key, "protocol"));
@@ -1640,7 +1642,9 @@ main(int argc, char *argv[]) {
if (result != ISC_R_SUCCESS) if (result != ISC_R_SUCCESS)
fatal("dns_lib_init failed: %d", result); fatal("dns_lib_init failed: %d", result);
isc_mem_create(&mctx); result = isc_mem_create(0, 0, &mctx);
if (result != ISC_R_SUCCESS)
fatal("failed to create mctx");
CHECK(isc_appctx_create(mctx, &actx)); CHECK(isc_appctx_create(mctx, &actx));
CHECK(isc_taskmgr_createinctx(mctx, 1, 0, &taskmgr)); CHECK(isc_taskmgr_createinctx(mctx, 1, 0, &taskmgr));
-6
View File
@@ -548,12 +548,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>
+1 -4
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">
-14
View File
@@ -744,13 +744,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 +756,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\&.
+2 -52
View File
@@ -64,7 +64,8 @@ static char hexcookie[81];
static bool short_form = false, printcmd = true, static bool short_form = false, printcmd = true,
plusquest = false, pluscomm = false, plusquest = false, pluscomm = false,
ipv4only = false, ipv6only = false, digrc = true; ipv4only = false, ipv6only = false, digrc = true,
yaml = false;
static uint32_t splitwidth = 0xffffffff; static uint32_t splitwidth = 0xffffffff;
/*% opcode text */ /*% opcode text */
@@ -234,8 +235,6 @@ help(void) {
" +tries=### (Set number of UDP attempts) [3]\n" " +tries=### (Set number of UDP attempts) [3]\n"
" +[no]ttlid (Control display of ttls in records)\n" " +[no]ttlid (Control display of ttls in records)\n"
" +[no]ttlunits (Display TTLs in human-readable units)\n" " +[no]ttlunits (Display TTLs in human-readable units)\n"
" +[no]unexpected (Print replies from unexpected sources\n"
" default=off)\n"
" +[no]unknownformat (Print RDATA in RFC 3597 \"unknown\" " " +[no]unknownformat (Print RDATA in RFC 3597 \"unknown\" "
"format)\n" "format)\n"
" +[no]vc (TCP mode (+[no]tcp))\n" " +[no]vc (TCP mode (+[no]tcp))\n"
@@ -1668,25 +1667,8 @@ plus_option(char *option, bool is_batchfile,
} }
break; break;
case 'u': case 'u':
switch (cmd[1]) {
case 'n':
switch (cmd[2]) {
case 'e':
FULLCHECK("unexpected");
lookup->accept_reply_unexpected_src = state;
break;
case 'k':
FULLCHECK("unknownformat"); FULLCHECK("unknownformat");
lookup->print_unknown_format = state; lookup->print_unknown_format = state;
break;
default:
goto invalid_option;
}
break;
default:
goto invalid_option;
}
break; break;
case 'v': case 'v':
FULLCHECK("vc"); FULLCHECK("vc");
@@ -2445,36 +2427,6 @@ dig_error(const char *format, ...) {
} }
} }
static void
dig_warning(const char *format, ...) {
va_list args;
if (!yaml) {
printf(";; ");
va_start(args, format);
vprintf(format, args);
va_end(args);
printf("\n");
}
}
static void
dig_comments(dig_lookup_t *lookup, const char *format, ...) {
va_list args;
if (lookup->comments && !yaml) {
printf(";; ");
va_start(args, format);
vprintf(format, args);
va_end(args);
printf("\n");
}
}
void void
dig_setup(int argc, char **argv) { dig_setup(int argc, char **argv) {
isc_result_t result; isc_result_t result;
@@ -2491,8 +2443,6 @@ dig_setup(int argc, char **argv) {
dighost_trying = trying; dighost_trying = trying;
dighost_shutdown = query_finished; dighost_shutdown = query_finished;
dighost_error = dig_error; dighost_error = dig_error;
dighost_warning = dig_warning;
dighost_comments = dig_comments;
progname = argv[0]; progname = argv[0];
preparse_args(argc, argv); preparse_args(argc, argv);
-11
View File
@@ -1269,17 +1269,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>
-15
View File
@@ -1000,14 +1000,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 +1017,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>
+76 -139
View File
@@ -112,8 +112,7 @@ bool
showsearch = false, showsearch = false,
is_dst_up = false, is_dst_up = false,
keep_open = false, keep_open = false,
verbose = false, verbose = false;
yaml = false;
in_port_t port = 53; in_port_t port = 53;
unsigned int timeout = 0; unsigned int timeout = 0;
unsigned int extrabytes; unsigned int extrabytes;
@@ -191,30 +190,6 @@ dig_lookup_t *current_lookup = NULL;
"isc_mutex_unlock");\ "isc_mutex_unlock");\
} }
static void
default_warnerr(const char *format, ...) {
va_list args;
printf(";; ");
va_start(args, format);
vprintf(format, args);
va_end(args);
printf("\n");
};
static void
default_comments(dig_lookup_t *lookup, const char *format, ...) {
va_list args;
if (lookup->comments) {
printf(";; ");
va_start(args, format);
vprintf(format, args);
va_end(args);
printf("\n");
}
};
/* dynamic callbacks */ /* dynamic callbacks */
isc_result_t isc_result_t
@@ -222,13 +197,7 @@ isc_result_t
dns_message_t *msg, bool headers); dns_message_t *msg, bool headers);
void void
(*dighost_error)(const char *format, ...) = default_warnerr; (*dighost_error)(const char *format, ...);
void
(*dighost_warning)(const char *format, ...) = default_warnerr;
void
(*dighost_comments)(dig_lookup_t *lookup, const char *format, ...) = default_comments;
void void
(*dighost_received)(unsigned int bytes, isc_sockaddr_t *from, (*dighost_received)(unsigned int bytes, isc_sockaddr_t *from,
@@ -649,9 +618,9 @@ make_empty_lookup(void) {
looknew->use_usec = false; looknew->use_usec = false;
looknew->nocrypto = false; looknew->nocrypto = false;
looknew->ttlunits = false; looknew->ttlunits = false;
looknew->ttlunits = false;
looknew->expandaaaa = false; looknew->expandaaaa = false;
looknew->qr = false; looknew->qr = false;
looknew->accept_reply_unexpected_src = false;
#ifdef HAVE_LIBIDN2 #ifdef HAVE_LIBIDN2
looknew->idnin = isatty(1)?(getenv("IDN_DISABLE") == NULL):false; looknew->idnin = isatty(1)?(getenv("IDN_DISABLE") == NULL):false;
looknew->idnout = looknew->idnin; looknew->idnout = looknew->idnin;
@@ -797,8 +766,6 @@ clone_lookup(dig_lookup_t *lookold, bool servers) {
looknew->ttlunits = lookold->ttlunits; looknew->ttlunits = lookold->ttlunits;
looknew->expandaaaa = lookold->expandaaaa; looknew->expandaaaa = lookold->expandaaaa;
looknew->qr = lookold->qr; looknew->qr = lookold->qr;
looknew->accept_reply_unexpected_src =
lookold->accept_reply_unexpected_src;
looknew->idnin = lookold->idnin; looknew->idnin = lookold->idnin;
looknew->idnout = lookold->idnout; looknew->idnout = lookold->idnout;
looknew->udpsize = lookold->udpsize; looknew->udpsize = lookold->udpsize;
@@ -835,8 +802,8 @@ clone_lookup(dig_lookup_t *lookold, bool servers) {
memmove(looknew->ecs_addr, lookold->ecs_addr, len); memmove(looknew->ecs_addr, lookold->ecs_addr, len);
} }
dns_name_copynf(dns_fixedname_name(&lookold->fdomain), dns_name_copy(dns_fixedname_name(&lookold->fdomain),
dns_fixedname_name(&looknew->fdomain)); dns_fixedname_name(&looknew->fdomain), NULL);
if (servers) if (servers)
clone_server_list(lookold->my_server_list, clone_server_list(lookold->my_server_list,
@@ -1364,7 +1331,8 @@ setup_libs(void) {
if (!have_ipv6 && !have_ipv4) if (!have_ipv6 && !have_ipv4)
fatal("can't find either v4 or v6 networking"); fatal("can't find either v4 or v6 networking");
isc_mem_create(&mctx); result = isc_mem_create(0, 0, &mctx);
check_result(result, "isc_mem_create");
isc_mem_setname(mctx, "dig", NULL); isc_mem_setname(mctx, "dig", NULL);
result = isc_log_create(mctx, &lctx, &logconfig); result = isc_log_create(mctx, &lctx, &logconfig);
@@ -1789,15 +1757,12 @@ followup_lookup(dns_message_t *msg, dig_query_t *query, dns_section_t section)
namereln = dns_name_fullcompare(name, domain, namereln = dns_name_fullcompare(name, domain,
&order, &nlabels); &order, &nlabels);
if (namereln == dns_namereln_equal) { if (namereln == dns_namereln_equal) {
if (!horizontal) { if (!horizontal)
dighost_warning("BAD (HORIZONTAL) " printf(";; BAD (HORIZONTAL) REFERRAL\n");
"REFERRAL");
}
horizontal = true; horizontal = true;
} else if (namereln != dns_namereln_subdomain) { } else if (namereln != dns_namereln_subdomain) {
if (!bad) { if (!bad)
dighost_warning( "BAD REFERRAL"); printf(";; BAD REFERRAL\n");
}
bad = true; bad = true;
continue; continue;
} }
@@ -1841,7 +1806,7 @@ followup_lookup(dns_message_t *msg, dig_query_t *query, dns_section_t section)
if (lookup->ns_search_only) if (lookup->ns_search_only)
lookup->recurse = false; lookup->recurse = false;
domain = dns_fixedname_name(&lookup->fdomain); domain = dns_fixedname_name(&lookup->fdomain);
dns_name_copynf(name, domain); dns_name_copy(name, domain, NULL);
} }
debug("adding server %s", namestr); debug("adding server %s", namestr);
num = getaddresses(lookup, namestr, &lresult); num = getaddresses(lookup, namestr, &lresult);
@@ -2045,9 +2010,6 @@ setup_lookup(dig_lookup_t *lookup) {
char cookiebuf[256]; char cookiebuf[256];
char *origin = NULL; char *origin = NULL;
char *textname = NULL; char *textname = NULL;
REQUIRE(lookup != NULL);
#ifdef HAVE_LIBIDN2 #ifdef HAVE_LIBIDN2
char idn_origin[MXNAME], idn_textname[MXNAME]; char idn_origin[MXNAME], idn_textname[MXNAME];
@@ -2056,6 +2018,7 @@ setup_lookup(dig_lookup_t *lookup) {
check_result(result, "dns_name_settotextfilter"); check_result(result, "dns_name_settotextfilter");
#endif /* HAVE_LIBIDN2 */ #endif /* HAVE_LIBIDN2 */
REQUIRE(lookup != NULL);
INSIST(!free_now); INSIST(!free_now);
debug("setup_lookup(%p)", lookup); debug("setup_lookup(%p)", lookup);
@@ -2156,26 +2119,22 @@ setup_lookup(dig_lookup_t *lookup) {
isc_buffer_init(&b, textname, len); isc_buffer_init(&b, textname, len);
isc_buffer_add(&b, len); isc_buffer_add(&b, len);
result = dns_name_fromtext(name, &b, NULL, 0, NULL); result = dns_name_fromtext(name, &b, NULL, 0, NULL);
if (result == ISC_R_SUCCESS) { if (result == ISC_R_SUCCESS &&
if (!dns_name_isabsolute(name)) { !dns_name_isabsolute(name))
result = dns_name_concatenate(name, result = dns_name_concatenate(name,
lookup->oname, lookup->oname,
lookup->name, lookup->name,
&lookup->namebuf); &lookup->namebuf);
} else { else if (result == ISC_R_SUCCESS)
result = dns_name_copy(name, result = dns_name_copy(name, lookup->name,
lookup->name,
&lookup->namebuf); &lookup->namebuf);
}
}
if (result != ISC_R_SUCCESS) { if (result != ISC_R_SUCCESS) {
dns_message_puttempname(lookup->sendmsg, dns_message_puttempname(lookup->sendmsg,
&lookup->name); &lookup->name);
dns_message_puttempname(lookup->sendmsg, dns_message_puttempname(lookup->sendmsg,
&lookup->oname); &lookup->oname);
if (result == DNS_R_NAMETOOLONG) { if (result == DNS_R_NAMETOOLONG)
return (false); return (false);
}
fatal("'%s' is not in legal name syntax (%s)", fatal("'%s' is not in legal name syntax (%s)",
lookup->textname, lookup->textname,
isc_result_totext(result)); isc_result_totext(result));
@@ -2674,6 +2633,10 @@ force_timeout(dig_query_t *query) {
event = isc_event_allocate(mctx, query, ISC_TIMEREVENT_IDLE, event = isc_event_allocate(mctx, query, ISC_TIMEREVENT_IDLE,
connect_timeout, query, connect_timeout, query,
sizeof(isc_event_t)); sizeof(isc_event_t));
if (event == NULL) {
fatal("isc_event_allocate: %s",
isc_result_totext(ISC_R_NOMEMORY));
}
isc_task_send(global_task, &event); isc_task_send(global_task, &event);
/* /*
@@ -2725,7 +2688,7 @@ send_tcp_connect(dig_query_t *query) {
isc_netaddr_fromsockaddr(&netaddr, &query->sockaddr); isc_netaddr_fromsockaddr(&netaddr, &query->sockaddr);
isc_netaddr_format(&netaddr, buf, sizeof(buf)); isc_netaddr_format(&netaddr, buf, sizeof(buf));
dighost_warning("Skipping mapped address '%s'", buf); printf(";; Skipping mapped address '%s'\n", buf);
query->waiting_connect = false; query->waiting_connect = false;
if (ISC_LINK_LINKED(query, link)) if (ISC_LINK_LINKED(query, link))
@@ -2735,7 +2698,7 @@ send_tcp_connect(dig_query_t *query) {
l = query->lookup; l = query->lookup;
clear_query(query); clear_query(query);
if (next == NULL) { if (next == NULL) {
dighost_warning("No acceptable nameservers"); printf(";; No acceptable nameservers\n");
check_next_lookup(l); check_next_lookup(l);
return; return;
} }
@@ -2796,14 +2759,6 @@ send_tcp_connect(dig_query_t *query) {
} }
} }
static void
print_query_size(dig_query_t *query) {
if (!yaml) {
printf(";; QUERY SIZE: %u\n\n",
isc_buffer_usedlength(&query->lookup->renderbuf));
}
}
/*% /*%
* Send a UDP packet to the remote nameserver, possible starting the * Send a UDP packet to the remote nameserver, possible starting the
* recv action as well. Also make sure that the timer is running and * recv action as well. Also make sure that the timer is running and
@@ -2842,12 +2797,13 @@ send_udp(dig_query_t *query) {
isc_netaddr_fromsockaddr(&netaddr, &query->sockaddr); isc_netaddr_fromsockaddr(&netaddr, &query->sockaddr);
isc_netaddr_format(&netaddr, buf, sizeof(buf)); isc_netaddr_format(&netaddr, buf, sizeof(buf));
dighost_warning("Skipping mapped address '%s'", buf); printf(";; Skipping mapped address '%s'\n", buf);
next = ISC_LIST_NEXT(query, link); next = ISC_LIST_NEXT(query, link);
l = query->lookup; l = query->lookup;
clear_query(query); clear_query(query);
if (next == NULL) { if (next == NULL) {
dighost_warning("No acceptable nameservers"); printf(";; No acceptable nameservers\n");
check_next_lookup(l); check_next_lookup(l);
} else { } else {
send_udp(next); send_udp(next);
@@ -2906,7 +2862,8 @@ send_udp(dig_query_t *query) {
&query->lookup->renderbuf, &query->lookup->renderbuf,
query->lookup->sendmsg, true); query->lookup->sendmsg, true);
if (query->lookup->stats) { if (query->lookup->stats) {
print_query_size(query); printf(";; QUERY SIZE: %u\n\n",
isc_buffer_usedlength(&query->lookup->renderbuf));
} }
} }
} }
@@ -3192,7 +3149,9 @@ launch_next_query(dig_query_t *query, bool include_question) {
&query->lookup->renderbuf, &query->lookup->renderbuf,
query->lookup->sendmsg, true); query->lookup->sendmsg, true);
if (query->lookup->stats) { if (query->lookup->stats) {
print_query_size(query); printf(";; QUERY SIZE: %u\n\n",
isc_buffer_usedlength(
&query->lookup->renderbuf));
} }
} }
} }
@@ -3234,12 +3193,11 @@ connect_done(isc_task_t *task, isc_event_t *event) {
if (sevent->result == ISC_R_CANCELED) { if (sevent->result == ISC_R_CANCELED) {
debug("in cancel handler"); debug("in cancel handler");
isc_sockaddr_format(&query->sockaddr, sockstr, sizeof(sockstr)); isc_sockaddr_format(&query->sockaddr, sockstr, sizeof(sockstr));
if (query->timedout) { if (query->timedout)
dighost_warning("Connection to %s(%s) for %s failed: " printf(";; Connection to %s(%s) for %s failed: %s.\n",
"%s.", sockstr, query->servname, sockstr, query->servname,
query->lookup->textname, query->lookup->textname,
isc_result_totext(ISC_R_TIMEDOUT)); isc_result_totext(ISC_R_TIMEDOUT));
}
isc_socket_detach(&query->sock); isc_socket_detach(&query->sock);
INSIST(sockcount > 0); INSIST(sockcount > 0);
sockcount--; sockcount--;
@@ -3257,12 +3215,11 @@ connect_done(isc_task_t *task, isc_event_t *event) {
debug("unsuccessful connection: %s", debug("unsuccessful connection: %s",
isc_result_totext(sevent->result)); isc_result_totext(sevent->result));
isc_sockaddr_format(&query->sockaddr, sockstr, sizeof(sockstr)); isc_sockaddr_format(&query->sockaddr, sockstr, sizeof(sockstr));
if (sevent->result != ISC_R_CANCELED) { if (sevent->result != ISC_R_CANCELED)
dighost_warning("Connection to %s(%s) for %s failed: " printf(";; Connection to %s(%s) for %s failed: "
"%s.", sockstr, query->servname, "%s.\n", sockstr,
query->lookup->textname, query->servname, query->lookup->textname,
isc_result_totext(sevent->result)); isc_result_totext(sevent->result));
}
isc_socket_detach(&query->sock); isc_socket_detach(&query->sock);
INSIST(sockcount > 0); INSIST(sockcount > 0);
sockcount--; sockcount--;
@@ -3470,12 +3427,12 @@ process_cookie(dig_lookup_t *l, dns_message_t *msg,
if (isc_safe_memequal(isc_buffer_current(optbuf), sent, 8)) { if (isc_safe_memequal(isc_buffer_current(optbuf), sent, 8)) {
msg->cc_ok = 1; msg->cc_ok = 1;
} else { } else {
dighost_warning("Warning: Client COOKIE mismatch"); printf(";; Warning: Client COOKIE mismatch\n");
msg->cc_bad = 1; msg->cc_bad = 1;
copy = false; copy = false;
} }
} else { } else {
dighost_warning("Warning: COOKIE bad token (too short)"); printf(";; Warning: COOKIE bad token (too short)\n");
msg->cc_bad = 1; msg->cc_bad = 1;
copy = false; copy = false;
} }
@@ -3647,13 +3604,11 @@ recv_done(isc_task_t *task, isc_event_t *event) {
sizeof(buf1)); sizeof(buf1));
isc_sockaddr_format(&query->sockaddr, buf2, isc_sockaddr_format(&query->sockaddr, buf2,
sizeof(buf2)); sizeof(buf2));
dighost_warning("reply from unexpected source: %s," printf(";; reply from unexpected source: %s,"
" expected %s\n", buf1, buf2); " expected %s\n", buf1, buf2);
if (!l->accept_reply_unexpected_src) {
match = false; match = false;
} }
} }
}
result = dns_message_peekheader(&b, &id, &msgflags); result = dns_message_peekheader(&b, &id, &msgflags);
if (result != ISC_R_SUCCESS || l->sendmsg->id != id) { if (result != ISC_R_SUCCESS || l->sendmsg->id != id) {
@@ -3661,22 +3616,19 @@ recv_done(isc_task_t *task, isc_event_t *event) {
if (l->tcp_mode) { if (l->tcp_mode) {
bool fail = true; bool fail = true;
if (result == ISC_R_SUCCESS) { if (result == ISC_R_SUCCESS) {
if ((!query->first_soa_rcvd || query->warn_id)) if (!query->first_soa_rcvd ||
{ query->warn_id)
dighost_warning("%s: ID mismatch: " printf(";; %s: ID mismatch: "
"expected ID %u, got " "expected ID %u, got %u\n",
"%u",
query->first_soa_rcvd ? query->first_soa_rcvd ?
"WARNING" : "ERROR", "WARNING" : "ERROR",
l->sendmsg->id, id); l->sendmsg->id, id);
}
if (query->first_soa_rcvd) if (query->first_soa_rcvd)
fail = false; fail = false;
query->warn_id = false; query->warn_id = false;
} else { } else
dighost_warning("ERROR: short (< header size) " printf(";; ERROR: short "
"message"); "(< header size) message\n");
}
if (fail) { if (fail) {
isc_event_free(&event); isc_event_free(&event);
clear_query(query); clear_query(query);
@@ -3686,18 +3638,16 @@ recv_done(isc_task_t *task, isc_event_t *event) {
return; return;
} }
match = true; match = true;
} else if (result == ISC_R_SUCCESS) { } else if (result == ISC_R_SUCCESS)
dighost_warning("Warning: ID mismatch: expected ID %u," printf(";; Warning: ID mismatch: "
" got %u", l->sendmsg->id, id); "expected ID %u, got %u\n", l->sendmsg->id, id);
} else { else
dighost_warning("Warning: short (< header size) " printf(";; Warning: short "
"message received"); "(< header size) message received\n");
}
} }
if (result == ISC_R_SUCCESS && (msgflags & DNS_MESSAGEFLAG_QR) == 0) { if (result == ISC_R_SUCCESS && (msgflags & DNS_MESSAGEFLAG_QR) == 0)
dighost_warning("Warning: query response not set"); printf(";; Warning: query response not set\n");
}
if (!match) if (!match)
goto udp_mismatch; goto udp_mismatch;
@@ -3731,16 +3681,13 @@ recv_done(isc_task_t *task, isc_event_t *event) {
} }
result = dns_message_parse(msg, &b, parseflags); result = dns_message_parse(msg, &b, parseflags);
if (result == DNS_R_RECOVERABLE) { if (result == DNS_R_RECOVERABLE) {
dighost_warning("Warning: Message parser reports malformed " printf(";; Warning: Message parser reports malformed "
"message packet."); "message packet.\n");
result = ISC_R_SUCCESS; result = ISC_R_SUCCESS;
} }
if (result != ISC_R_SUCCESS) { if (result != ISC_R_SUCCESS) {
if (!yaml) { printf(";; Got bad packet: %s\n", isc_result_totext(result));
printf(";; Got bad packet: %s\n",
isc_result_totext(result));
hex_dump(&b); hex_dump(&b);
}
query->waiting_connect = false; query->waiting_connect = false;
dns_message_destroy(&msg); dns_message_destroy(&msg);
isc_event_free(&event); isc_event_free(&event);
@@ -3777,10 +3724,9 @@ recv_done(isc_task_t *task, isc_event_t *event) {
dns_rdataclass_format(rdataset->rdclass, dns_rdataclass_format(rdataset->rdclass,
classbuf, classbuf,
sizeof(classbuf)); sizeof(classbuf));
dighost_warning(";; Question section " printf(";; Question section mismatch: "
"mismatch: got " "got %s/%s/%s\n",
"%s/%s/%s", namestr, namestr, typebuf, classbuf);
typebuf, classbuf);
match = false; match = false;
} }
} }
@@ -3803,7 +3749,8 @@ recv_done(isc_task_t *task, isc_event_t *event) {
/* /*
* Add minimum EDNS version required checks here if needed. * Add minimum EDNS version required checks here if needed.
*/ */
dighost_comments(l, "BADVERS, retrying with EDNS version %u.", if (l->comments)
printf(";; BADVERS, retrying with EDNS version %u.\n",
(unsigned int)newedns); (unsigned int)newedns);
l->edns = newedns; l->edns = newedns;
n = requeue_lookup(l, true); n = requeue_lookup(l, true);
@@ -3821,7 +3768,8 @@ recv_done(isc_task_t *task, isc_event_t *event) {
!l->ignore && !l->tcp_mode) { !l->ignore && !l->tcp_mode) {
if (l->cookie == NULL && l->sendcookie && msg->opt != NULL) if (l->cookie == NULL && l->sendcookie && msg->opt != NULL)
process_opt(l, msg); process_opt(l, msg);
dighost_comments(l, "Truncated, retrying in TCP mode."); if (l->comments)
printf(";; Truncated, retrying in TCP mode.\n");
n = requeue_lookup(l, true); n = requeue_lookup(l, true);
n->tcp_mode = true; n->tcp_mode = true;
if (l->trace && l->trace_root) if (l->trace && l->trace_root)
@@ -3838,9 +3786,9 @@ recv_done(isc_task_t *task, isc_event_t *event) {
l->sendcookie && l->badcookie) { l->sendcookie && l->badcookie) {
process_opt(l, msg); process_opt(l, msg);
if (msg->cc_ok) { if (msg->cc_ok) {
dighost_comments(l, "BADCOOKIE, retrying%s.", if (l->comments)
l->seenbadcookie ? printf(";; BADCOOKIE, retrying%s.\n",
" in TCP mode" : ""); l->seenbadcookie ? " in TCP mode" : "");
n = requeue_lookup(l, true); n = requeue_lookup(l, true);
if (l->seenbadcookie) if (l->seenbadcookie)
n->tcp_mode = true; n->tcp_mode = true;
@@ -3877,8 +3825,9 @@ recv_done(isc_task_t *task, isc_event_t *event) {
*/ */
if ((ISC_LIST_HEAD(l->q) != query) || if ((ISC_LIST_HEAD(l->q) != query) ||
(ISC_LIST_NEXT(query, link) != NULL)) { (ISC_LIST_NEXT(query, link) != NULL)) {
dighost_comments(l, "Got %s from %s, trying next " if (l->comments)
"server", printf(";; Got %s from %s, "
"trying next server\n",
msg->rcode == dns_rcode_servfail ? msg->rcode == dns_rcode_servfail ?
"SERVFAIL reply" : "SERVFAIL reply" :
"recursion not available", "recursion not available",
@@ -3895,7 +3844,7 @@ recv_done(isc_task_t *task, isc_event_t *event) {
if (tsigkey != NULL) { if (tsigkey != NULL) {
result = dns_tsig_verify(&b, msg, NULL, NULL); result = dns_tsig_verify(&b, msg, NULL, NULL);
if (result != ISC_R_SUCCESS) { if (result != ISC_R_SUCCESS) {
dighost_warning("Couldn't verify signature: %s", printf(";; Couldn't verify signature: %s\n",
isc_result_totext(result)); isc_result_totext(result));
validated = false; validated = false;
} }
@@ -3947,8 +3896,7 @@ recv_done(isc_task_t *task, isc_event_t *event) {
if (!done_process_opt) { if (!done_process_opt) {
if (l->cookie != NULL) { if (l->cookie != NULL) {
if (msg->opt == NULL) { if (msg->opt == NULL) {
dighost_warning("expected opt record in " printf(";; expected opt record in response\n");
"response");
} else { } else {
process_opt(l, msg); process_opt(l, msg);
} }
@@ -4426,20 +4374,9 @@ idn_ace_to_locale(const char *src, char **dst) {
*/ */
res = idn2_to_unicode_8zlz(utf8_src, &local_src, 0); res = idn2_to_unicode_8zlz(utf8_src, &local_src, 0);
if (res != IDN2_OK) { if (res != IDN2_OK) {
static bool warned = false; fatal("Cannot represent '%s' in the current locale (%s), "
res = idn2_to_ascii_8z(utf8_src, &local_src, 0);
if (res != IDN2_OK) {
fatal("Cannot represent '%s' "
"in the current locale nor ascii (%s), "
"use +noidnout or a different locale", "use +noidnout or a different locale",
src, idn2_strerror(res)); src, idn2_strerror(res));
} else if (!warned) {
fprintf(stderr, ";; Warning: cannot represent '%s' "
"in the current locale",
local_src);
warned = true;
}
} }
/* /*
+14 -2
View File
@@ -394,7 +394,7 @@ 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);
} }
} }
@@ -456,7 +456,7 @@ printmessage(dig_query_t *query, const isc_buffer_t *msgbuf,
/* Add AAAA and MX lookups. */ /* Add AAAA and MX lookups. */
name = dns_fixedname_initname(&fixed); name = dns_fixedname_initname(&fixed);
dns_name_copynf(query->lookup->name, name); 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, false);
@@ -857,6 +857,17 @@ parse_args(bool is_batchfile, int argc, char **argv) {
ISC_LIST_APPEND(lookup_list, lookup, link); ISC_LIST_APPEND(lookup_list, lookup, link);
} }
static void
host_error(const char *format, ...) {
va_list args;
printf(";; ");
va_start(args, format);
vfprintf(stdout, format, args);
va_end(args);
printf("\n");
}
int int
main(int argc, char **argv) { main(int argc, char **argv) {
isc_result_t result; isc_result_t result;
@@ -874,6 +885,7 @@ main(int argc, char **argv) {
dighost_received = received; dighost_received = received;
dighost_trying = trying; dighost_trying = trying;
dighost_shutdown = host_shutdown; dighost_shutdown = host_shutdown;
dighost_error = host_error;
debug("main()"); debug("main()");
progname = argv[0]; progname = argv[0];
+2 -16
View File
@@ -141,9 +141,7 @@ struct dig_lookup {
idnin, idnin,
idnout, idnout,
expandaaaa, 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;
@@ -252,7 +250,7 @@ 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 bool 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;
@@ -391,18 +389,6 @@ extern isc_result_t
extern void extern void
(*dighost_error)(const char *format, ...); (*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.
*/ */
+14 -2
View File
@@ -423,7 +423,7 @@ 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);
} }
} }
@@ -481,7 +481,7 @@ printmessage(dig_query_t *query, const isc_buffer_t *msgbuf,
/* Add AAAA lookup. */ /* Add AAAA lookup. */
name = dns_fixedname_initname(&fixed); name = dns_fixedname_initname(&fixed);
dns_name_copynf(query->lookup->name, name); 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, false);
@@ -983,6 +983,17 @@ getinput(isc_task_t *task, isc_event_t *event) {
isc_app_shutdown(); isc_app_shutdown();
} }
static void
nsl_error(const char *format, ...) {
va_list args;
printf(";; ");
va_start(args, format);
vfprintf(stdout, format, args);
va_end(args);
printf("\n");
}
int int
main(int argc, char **argv) { main(int argc, char **argv) {
isc_result_t result; isc_result_t result;
@@ -1000,6 +1011,7 @@ main(int argc, char **argv) {
dighost_received = received; dighost_received = received;
dighost_trying = trying; dighost_trying = trying;
dighost_shutdown = query_finished; dighost_shutdown = query_finished;
dighost_error = nsl_error;
result = isc_app_start(); result = isc_app_start();
check_result(result, "isc_app_start"); check_result(result, "isc_app_start");
+1 -4
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">
+1 -4
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">
+1 -4
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">
+1 -4
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">
+4 -1
View File
@@ -1074,7 +1074,10 @@ main(int argc, char *argv[]) {
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 #if USE_PKCS11
pk11_result_register(); pk11_result_register();
+15 -15
View File
@@ -200,7 +200,9 @@ 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); name = dns_fixedname_initname(&fixed);
dns_name_copynf(dst_key_name(key), name); 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);
} }
@@ -332,7 +334,7 @@ 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 *endp;
int ch; int ch;
bool cds = false; bool cds = false;
bool usekeyset = false; bool usekeyset = false;
@@ -348,7 +350,10 @@ main(int argc, char **argv) {
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 #if USE_PKCS11
pk11_result_register(); pk11_result_register();
@@ -444,15 +449,10 @@ main(int argc, char **argv) {
dtype[0] = DNS_DSDIGEST_SHA256; dtype[0] = DNS_DSDIGEST_SHA256;
} }
/* if (argc < isc_commandline_index + 1 && filename == NULL) {
* 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 (arg1 != NULL && argv[isc_commandline_index + 1] != NULL) { if (argc > isc_commandline_index + 1) {
fatal("extraneous arguments"); fatal("extraneous arguments");
} }
@@ -467,11 +467,11 @@ main(int argc, char **argv) {
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);
@@ -482,7 +482,6 @@ main(int argc, char **argv) {
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);
} }
@@ -507,7 +506,8 @@ main(int argc, char **argv) {
} 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); emits(showall, cds, &rdata);
} }
+6 -2
View File
@@ -174,7 +174,9 @@ 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); name = dns_fixedname_initname(&fixed);
dns_name_copynf(dst_key_name(key), name); 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);
} }
@@ -298,7 +300,9 @@ 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 #if USE_PKCS11
pk11_result_register(); pk11_result_register();
+1 -1
View File
@@ -163,7 +163,7 @@ main(int argc, char **argv) {
if (argc == 1) if (argc == 1)
usage(); usage();
isc_mem_create(&mctx); RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
#if USE_PKCS11 #if USE_PKCS11
pk11_result_register(); pk11_result_register();
+1 -1
View File
@@ -259,7 +259,7 @@ main(int argc, char **argv) {
} }
isc_commandline_reset = true; isc_commandline_reset = true;
isc_mem_create(&mctx); RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
isc_stdtime_get(&now); isc_stdtime_get(&now);
+3 -1
View File
@@ -88,7 +88,9 @@ 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 HAVE_PKCS11 #if HAVE_PKCS11
pk11_result_register(); pk11_result_register();
+3 -1
View File
@@ -167,7 +167,9 @@ 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");
setup_logging(mctx, &log); setup_logging(mctx, &log);
+12 -4
View File
@@ -197,7 +197,7 @@ savezonecut(dns_fixedname_t *fzonecut, dns_name_t *name) {
dns_name_t *result; dns_name_t *result;
result = dns_fixedname_initname(fzonecut); result = dns_fixedname_initname(fzonecut);
dns_name_copynf(name, result); dns_name_copy(name, result, NULL);
return (result); return (result);
} }
@@ -1570,6 +1570,8 @@ assignwork(isc_task_t *task, isc_task_t *worker) {
sevent = (sevent_t *) sevent = (sevent_t *)
isc_event_allocate(mctx, task, SIGNER_EVENT_WORK, isc_event_allocate(mctx, task, SIGNER_EVENT_WORK,
sign, NULL, sizeof(sevent_t)); sign, NULL, sizeof(sevent_t));
if (sevent == NULL)
fatal("failed to allocate event\n");
sevent->node = node; sevent->node = node;
sevent->fname = fname; sevent->fname = fname;
@@ -1625,6 +1627,8 @@ sign(isc_task_t *task, isc_event_t *event) {
wevent = (sevent_t *) wevent = (sevent_t *)
isc_event_allocate(mctx, task, SIGNER_EVENT_WRITE, isc_event_allocate(mctx, task, SIGNER_EVENT_WRITE,
writenode, NULL, sizeof(sevent_t)); writenode, NULL, sizeof(sevent_t));
if (wevent == NULL)
fatal("failed to allocate event\n");
wevent->node = node; wevent->node = node;
wevent->fname = fname; wevent->fname = fname;
isc_task_send(master, ISC_EVENT_PTR(&wevent)); isc_task_send(master, ISC_EVENT_PTR(&wevent));
@@ -1706,6 +1710,7 @@ remove_records(dns_dbnode_t *node, dns_rdatatype_t which,
result = dns_db_deleterdataset(gdb, node, gversion, result = dns_db_deleterdataset(gdb, node, gversion,
type, covers); type, covers);
check_result(result, "dns_db_deleterdataset()"); check_result(result, "dns_db_deleterdataset()");
continue;
} }
} }
dns_rdatasetiter_destroy(&rdsiter); dns_rdatasetiter_destroy(&rdsiter);
@@ -2324,7 +2329,7 @@ nsec3ify(unsigned int hashalg, dns_iterations_t iterations,
break; break;
} }
if (result == ISC_R_NOMORE) { if (result == ISC_R_NOMORE) {
dns_name_copynf(gorigin, nextname); dns_name_copy(gorigin, nextname, NULL);
done = true; done = true;
} else if (result != ISC_R_SUCCESS) } else if (result != ISC_R_SUCCESS)
fatal("iterating through the database failed: %s", fatal("iterating through the database failed: %s",
@@ -2458,7 +2463,7 @@ nsec3ify(unsigned int hashalg, dns_iterations_t iterations,
break; break;
} }
if (result == ISC_R_NOMORE) { if (result == ISC_R_NOMORE) {
dns_name_copynf(gorigin, nextname); dns_name_copy(gorigin, nextname, NULL);
done = true; done = true;
} else if (result != ISC_R_SUCCESS) } else if (result != ISC_R_SUCCESS)
fatal("iterating through the database failed: %s", fatal("iterating through the database failed: %s",
@@ -3229,7 +3234,9 @@ main(int argc, char *argv[]) {
check_result(isc_app_start(), "isc_app_start"); check_result(isc_app_start(), "isc_app_start");
isc_mem_create(&mctx); result = isc_mem_create(0, 0, &mctx);
if (result != ISC_R_SUCCESS)
fatal("out of memory");
#if USE_PKCS11 #if USE_PKCS11
pk11_result_register(); pk11_result_register();
@@ -3582,6 +3589,7 @@ main(int argc, char *argv[]) {
outputformat = dns_masterformat_raw; outputformat = dns_masterformat_raw;
} else if (strncasecmp(outputformatstr, "raw=", 4) == 0) { } else if (strncasecmp(outputformatstr, "raw=", 4) == 0) {
char *end; char *end;
outputformat = dns_masterformat_raw;
outputformat = dns_masterformat_raw; outputformat = dns_masterformat_raw;
rawversion = strtol(outputformatstr + 4, &end, 10); rawversion = strtol(outputformatstr + 4, &end, 10);
+3 -1
View File
@@ -209,7 +209,9 @@ main(int argc, char *argv[]) {
isc_commandline_reset = true; isc_commandline_reset = true;
check_result(isc_app_start(), "isc_app_start"); check_result(isc_app_start(), "isc_app_start");
isc_mem_create(&mctx); result = isc_mem_create(0, 0, &mctx);
if (result != ISC_R_SUCCESS)
fatal("out of memory");
#if USE_PKCS11 #if USE_PKCS11
pk11_result_register(); pk11_result_register();
+19 -14
View File
@@ -314,30 +314,35 @@ dns_rdataclass_t
strtoclass(const char *str) { strtoclass(const char *str) {
isc_textregion_t r; isc_textregion_t r;
dns_rdataclass_t rdclass; dns_rdataclass_t rdclass;
isc_result_t result; isc_result_t ret;
if (str == NULL) if (str == NULL)
return dns_rdataclass_in; return dns_rdataclass_in;
DE_CONST(str, r.base); DE_CONST(str, r.base);
r.length = strlen(str); r.length = strlen(str);
result = dns_rdataclass_fromtext(&rdclass, &r); ret = dns_rdataclass_fromtext(&rdclass, &r);
if (result != ISC_R_SUCCESS) if (ret != ISC_R_SUCCESS)
fatal("unknown class %s", str); fatal("unknown class %s", str);
return (rdclass); return (rdclass);
} }
unsigned int unsigned int
strtodsdigest(const char *str) { strtodsdigest(const char *algname) {
isc_textregion_t r; if (strcasecmp(algname, "SHA1") == 0 ||
dns_dsdigest_t alg; strcasecmp(algname, "SHA-1") == 0)
isc_result_t result; {
return (DNS_DSDIGEST_SHA1);
DE_CONST(str, r.base); } else if (strcasecmp(algname, "SHA256") == 0 ||
r.length = strlen(str); strcasecmp(algname, "SHA-256") == 0)
result = dns_dsdigest_fromtext(&alg, &r); {
if (result != ISC_R_SUCCESS) return (DNS_DSDIGEST_SHA256);
fatal("unknown DS algorithm %s", str); } else if (strcasecmp(algname, "SHA384") == 0 ||
return (alg); strcasecmp(algname, "SHA-384") == 0)
{
return (DNS_DSDIGEST_SHA384);
} else {
fatal("unknown algorithm %s", algname);
}
} }
static int static int
+1 -4
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>{0EB1727E-2BBD-47A6-AD12-418F9DEB0531}</ProjectGuid> <ProjectGuid>{0EB1727E-2BBD-47A6-AD12-418F9DEB0531}</ProjectGuid>
<Keyword>Win32Proj</Keyword> <Keyword>Win32Proj</Keyword>
<RootNamespace>cds</RootNamespace> <RootNamespace>cds</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">
+1 -4
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>
@@ -20,21 +20,18 @@
<ProjectGuid>{2CB7DC75-023B-4AA3-AF3A-AE5046A4EE70}</ProjectGuid> <ProjectGuid>{2CB7DC75-023B-4AA3-AF3A-AE5046A4EE70}</ProjectGuid>
<Keyword>Win32Proj</Keyword> <Keyword>Win32Proj</Keyword>
<RootNamespace>dnssectool</RootNamespace> <RootNamespace>dnssectool</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">
+1 -4
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>{6E6297F4-69D7-4533-85E1-BD17C30017C8}</ProjectGuid> <ProjectGuid>{6E6297F4-69D7-4533-85E1-BD17C30017C8}</ProjectGuid>
<Keyword>Win32Proj</Keyword> <Keyword>Win32Proj</Keyword>
<RootNamespace>dsfromkey</RootNamespace> <RootNamespace>dsfromkey</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">
+1 -4
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>{AB6690A0-055E-458f-BAC5-BF38BCC5834F}</ProjectGuid> <ProjectGuid>{AB6690A0-055E-458f-BAC5-BF38BCC5834F}</ProjectGuid>
<Keyword>Win32Proj</Keyword> <Keyword>Win32Proj</Keyword>
<RootNamespace>importkey</RootNamespace> <RootNamespace>importkey</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">
+1 -4
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>{17455DC6-5FBB-47C3-8F44-7DB574A188D3}</ProjectGuid> <ProjectGuid>{17455DC6-5FBB-47C3-8F44-7DB574A188D3}</ProjectGuid>
<Keyword>Win32Proj</Keyword> <Keyword>Win32Proj</Keyword>
<RootNamespace>keyfromlabel</RootNamespace> <RootNamespace>keyfromlabel</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">
+1 -4
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>{0BF11E21-168C-4CAA-B784-429D126BBAE5}</ProjectGuid> <ProjectGuid>{0BF11E21-168C-4CAA-B784-429D126BBAE5}</ProjectGuid>
<Keyword>Win32Proj</Keyword> <Keyword>Win32Proj</Keyword>
<RootNamespace>keygen</RootNamespace> <RootNamespace>keygen</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">
+1 -4
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>{D171F185-D3C2-4463-9CF3-ED1D0B1D6832}</ProjectGuid> <ProjectGuid>{D171F185-D3C2-4463-9CF3-ED1D0B1D6832}</ProjectGuid>
<Keyword>Win32Proj</Keyword> <Keyword>Win32Proj</Keyword>
<RootNamespace>revoke</RootNamespace> <RootNamespace>revoke</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">
+1 -4
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>{03FB7588-C5A7-4572-968F-14F1206BC69C}</ProjectGuid> <ProjectGuid>{03FB7588-C5A7-4572-968F-14F1206BC69C}</ProjectGuid>
<Keyword>Win32Proj</Keyword> <Keyword>Win32Proj</Keyword>
<RootNamespace>settime</RootNamespace> <RootNamespace>settime</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">
+1 -4
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>{205ED8A9-2E4C-41CC-9385-F3613402AA90}</ProjectGuid> <ProjectGuid>{205ED8A9-2E4C-41CC-9385-F3613402AA90}</ProjectGuid>
<Keyword>Win32Proj</Keyword> <Keyword>Win32Proj</Keyword>
<RootNamespace>signzone</RootNamespace> <RootNamespace>signzone</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">
+1 -4
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>{FD653434-F1A8-44A9-85B2-A7468491DA6D}</ProjectGuid> <ProjectGuid>{FD653434-F1A8-44A9-85B2-A7468491DA6D}</ProjectGuid>
<Keyword>Win32Proj</Keyword> <Keyword>Win32Proj</Keyword>
<RootNamespace>verify</RootNamespace> <RootNamespace>verify</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">
-2
View File
@@ -854,9 +854,7 @@ named_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
if (stack != NULL) if (stack != NULL)
isc_mem_put(mctx, stack, stackcount * sizeof(*stack)); isc_mem_put(mctx, stack, stackcount * sizeof(*stack));
INSIST(dscpcount == addrcount);
INSIST(keycount == addrcount); INSIST(keycount == addrcount);
INSIST(keycount == dscpcount);
ipkl->addrs = addrs; ipkl->addrs = addrs;
ipkl->dscps = dscps; ipkl->dscps = dscps;
+3 -4
View File
@@ -142,7 +142,7 @@ fuzz_thread_client(void *arg) {
* Read the reply message from named to unclog it. Don't * Read the reply message from named to unclog it. Don't
* bother if there isn't a reply. * bother if there isn't a reply.
*/ */
(void)recvfrom(sockfd, buf, 65536, MSG_DONTWAIT, NULL, NULL); recvfrom(sockfd, buf, 65536, MSG_DONTWAIT, NULL, NULL);
while (!ready) while (!ready)
pthread_cond_wait(&cond, &mutex); pthread_cond_wait(&cond, &mutex);
@@ -412,7 +412,7 @@ fuzz_thread_resolver(void *arg) {
* Flush any pending data on the authoritative server. * Flush any pending data on the authoritative server.
*/ */
socklen = sizeof(recvaddr); socklen = sizeof(recvaddr);
(void)recvfrom(listenfd, rbuf, 65536, MSG_DONTWAIT, sent = recvfrom(listenfd, rbuf, 65536, MSG_DONTWAIT,
(struct sockaddr *) &recvaddr, &socklen); (struct sockaddr *) &recvaddr, &socklen);
/* /*
@@ -511,8 +511,7 @@ fuzz_thread_resolver(void *arg) {
* to the client(query driver), so we're * to the client(query driver), so we're
* done. * done.
*/ */
(void)recvfrom(sockfd, buf, 65536, 0, NULL, recvfrom(sockfd, buf, 65536, 0, NULL, NULL);
NULL);
break; break;
} }
+5 -16
View File
@@ -352,7 +352,7 @@ save_command_line(int argc, char *argv[]) {
*dst++ = ' '; *dst++ = ' ';
while (*src != '\0' && dst < eob) { while (*src != '\0' && dst < eob) {
if (isalnum(*src) || *src == ',' || if (isalnum(*src) ||
*src == '-' || *src == '_' || *src == '-' || *src == '_' ||
*src == '.' || *src == '/') *src == '.' || *src == '/')
{ {
@@ -646,9 +646,6 @@ parse_T_opt(char *option) {
maxudp = 1460; maxudp = 1460;
} else if (!strncmp(option, "maxudp=", 7)) { } else if (!strncmp(option, "maxudp=", 7)) {
maxudp = atoi(option + 7); maxudp = atoi(option + 7);
if (maxudp <= 0) {
named_main_earlyfatal("bad maxudp");
}
} else if (!strncmp(option, "mkeytimers=", 11)) { } else if (!strncmp(option, "mkeytimers=", 11)) {
p = strtok_r(option + 11, "/", &last); p = strtok_r(option + 11, "/", &last);
if (p == NULL) { if (p == NULL) {
@@ -1398,17 +1395,6 @@ main(int argc, char *argv[]) {
(void) ProfilerStart(NULL); (void) ProfilerStart(NULL);
#endif #endif
#ifdef WIN32
/*
* Prevent unbuffered I/O from crippling named performance on Windows
* when it is logging to stderr (e.g. in system tests). Use full
* buffering (_IOFBF) as line buffering (_IOLBF) is unavailable on
* Windows and fflush() is called anyway after each log message gets
* written to the default stderr logging channels created by libisc.
*/
setvbuf(stderr, NULL, _IOFBF, BUFSIZ);
#endif
/* /*
* Record version in core image. * Record version in core image.
* strings named.core | grep "named version:" * strings named.core | grep "named version:"
@@ -1473,7 +1459,10 @@ main(int argc, char *argv[]) {
named_g_chrootdir); named_g_chrootdir);
} }
isc_mem_create(&named_g_mctx); result = isc_mem_create(0, 0, &named_g_mctx);
if (result != ISC_R_SUCCESS)
named_main_earlyfatal("isc_mem_create() failed: %s",
isc_result_totext(result));
isc_mem_setname(named_g_mctx, "main", NULL); isc_mem_setname(named_g_mctx, "main", NULL);
setup(); setup();
+54 -71
View File
@@ -2485,17 +2485,15 @@ configure_rpz(dns_view_t *view, const cfg_obj_t **maps,
} else { } else {
old = NULL; old = NULL;
} }
if (old == NULL) { if (old == NULL)
*old_rpz_okp = false; *old_rpz_okp = false;
} else { else
*old_rpz_okp = true; *old_rpz_okp = true;
}
for (i = 0; for (i = 0;
zone_element != NULL; zone_element != NULL;
++i, zone_element = cfg_list_next(zone_element)) ++i, zone_element = cfg_list_next(zone_element)) {
{ INSIST(old != NULL || !*old_rpz_okp);
INSIST(!*old_rpz_okp || old != NULL);
if (*old_rpz_okp && i < old->p.num_zones) { if (*old_rpz_okp && i < old->p.num_zones) {
old_zone = old->zones[i]; old_zone = old->zones[i];
} else { } else {
@@ -2520,21 +2518,24 @@ configure_rpz(dns_view_t *view, const cfg_obj_t **maps,
* zones are unchanged, then use the same policy data. * zones are unchanged, then use the same policy data.
* Data for individual zones that must be reloaded will be merged. * Data for individual zones that must be reloaded will be merged.
*/ */
if (*old_rpz_okp) { if (*old_rpz_okp &&
if (old != NULL && old != NULL && memcmp(&old->p, &zones->p, sizeof(zones->p)) != 0)
memcmp(&old->p, &zones->p, sizeof(zones->p)) != 0)
{
*old_rpz_okp = false;
} else if ((old == NULL || old->rps_cstr == NULL) !=
(zones->rps_cstr == NULL))
{
*old_rpz_okp = false;
} else if (old != NULL &&
zones->rps_cstr != NULL &&
strcmp(old->rps_cstr, zones->rps_cstr) != 0)
{ {
*old_rpz_okp = false; *old_rpz_okp = false;
} }
if (*old_rpz_okp &&
(old == NULL ||
old->rps_cstr == NULL) != (zones->rps_cstr == NULL))
{
*old_rpz_okp = false;
}
if (*old_rpz_okp &&
(zones->rps_cstr != NULL &&
strcmp(old->rps_cstr, zones->rps_cstr) != 0))
{
*old_rpz_okp = false;
} }
if (*old_rpz_okp) { if (*old_rpz_okp) {
@@ -2548,9 +2549,8 @@ configure_rpz(dns_view_t *view, const cfg_obj_t **maps,
view->rpzs->rpz_ver); view->rpzs->rpz_ver);
} }
if (pview != NULL) { if (pview != NULL)
dns_view_detach(&pview); dns_view_detach(&pview);
}
return (ISC_R_SUCCESS); return (ISC_R_SUCCESS);
} }
@@ -2827,6 +2827,8 @@ catz_create_chg_task(dns_catz_entry_t *entry, dns_catz_zone_t *origin,
event = (catz_chgzone_event_t *) isc_event_allocate(view->mctx, origin, event = (catz_chgzone_event_t *) isc_event_allocate(view->mctx, origin,
type, action, NULL, type, action, NULL,
sizeof(*event)); sizeof(*event));
if (event == NULL)
return (ISC_R_NOMEMORY);
event->cbd = (catz_cb_data_t *) udata; event->cbd = (catz_cb_data_t *) udata;
event->entry = NULL; event->entry = NULL;
@@ -4349,9 +4351,9 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
* cache, for the main cache memory and the heap * cache, for the main cache memory and the heap
* memory. * memory.
*/ */
isc_mem_create(&cmctx); CHECK(isc_mem_create(0, 0, &cmctx));
isc_mem_setname(cmctx, "cache", NULL); isc_mem_setname(cmctx, "cache", NULL);
isc_mem_create(&hmctx); CHECK(isc_mem_create(0, 0, &hmctx));
isc_mem_setname(hmctx, "cache_heap", NULL); isc_mem_setname(hmctx, "cache_heap", NULL);
CHECK(dns_cache_create(cmctx, hmctx, named_g_taskmgr, CHECK(dns_cache_create(cmctx, hmctx, named_g_taskmgr,
named_g_timermgr, view->rdclass, named_g_timermgr, view->rdclass,
@@ -6769,7 +6771,7 @@ dotat(dns_keytable_t *keytable, dns_keynode_t *keynode, void *arg) {
REQUIRE(keytable != NULL); REQUIRE(keytable != NULL);
REQUIRE(keynode != NULL); REQUIRE(keynode != NULL);
REQUIRE(dotat_arg != NULL); REQUIRE(arg != NULL);
view = dotat_arg->view; view = dotat_arg->view;
task = dotat_arg->task; task = dotat_arg->task;
@@ -9558,7 +9560,7 @@ get_matching_view(isc_netaddr_t *srcaddr, isc_netaddr_t *destaddr,
if (message->rdclass == view->rdclass || if (message->rdclass == view->rdclass ||
message->rdclass == dns_rdataclass_any) message->rdclass == dns_rdataclass_any)
{ {
const dns_name_t *tsig = NULL; dns_name_t *tsig = NULL;
*sigresult = dns_message_rechecksig(message, view); *sigresult = dns_message_rechecksig(message, view);
if (*sigresult == ISC_R_SUCCESS) { if (*sigresult == ISC_R_SUCCESS) {
@@ -10610,21 +10612,17 @@ dumpdone(void *arg, isc_result_t result) {
char buf[1024+32]; char buf[1024+32];
const dns_master_style_t *style; const dns_master_style_t *style;
if (result != ISC_R_SUCCESS) { if (result != ISC_R_SUCCESS)
goto cleanup; goto cleanup;
} if (dctx->mdctx != NULL)
if (dctx->mdctx != NULL) {
dns_dumpctx_detach(&dctx->mdctx); dns_dumpctx_detach(&dctx->mdctx);
}
if (dctx->view == NULL) { if (dctx->view == NULL) {
dctx->view = ISC_LIST_HEAD(dctx->viewlist); dctx->view = ISC_LIST_HEAD(dctx->viewlist);
if (dctx->view == NULL) { if (dctx->view == NULL)
goto done; goto done;
}
INSIST(dctx->zone == NULL); INSIST(dctx->zone == NULL);
} else { } else
goto resume; goto resume;
}
nextview: nextview:
fprintf(dctx->fp, ";\n; Start view %s\n;\n", dctx->view->view->name); fprintf(dctx->fp, ";\n; Start view %s\n;\n", dctx->view->view->name);
resume: resume:
@@ -10638,9 +10636,8 @@ dumpdone(void *arg, isc_result_t result) {
{ {
style = &dns_master_style_cache; style = &dns_master_style_cache;
/* start cache dump */ /* start cache dump */
if (dctx->view->view->cachedb != NULL) { if (dctx->view->view->cachedb != NULL)
dns_db_attach(dctx->view->view->cachedb, &dctx->cache); dns_db_attach(dctx->view->view->cachedb, &dctx->cache);
}
if (dctx->cache != NULL) { if (dctx->cache != NULL) {
fprintf(dctx->fp, fprintf(dctx->fp,
";\n; Cache dump of view '%s' (cache %s)\n;\n", ";\n; Cache dump of view '%s' (cache %s)\n;\n",
@@ -10652,52 +10649,43 @@ dumpdone(void *arg, isc_result_t result) {
dctx->task, dctx->task,
dumpdone, dctx, dumpdone, dctx,
&dctx->mdctx); &dctx->mdctx);
if (result == DNS_R_CONTINUE) { if (result == DNS_R_CONTINUE)
return; return;
} if (result == ISC_R_NOTIMPLEMENTED)
if (result == ISC_R_NOTIMPLEMENTED) {
fprintf(dctx->fp, "; %s\n", fprintf(dctx->fp, "; %s\n",
dns_result_totext(result)); dns_result_totext(result));
} else if (result != ISC_R_SUCCESS) { else if (result != ISC_R_SUCCESS)
goto cleanup; goto cleanup;
} }
} }
}
if ((dctx->dumpadb || dctx->dumpbad || dctx->dumpfail) && if ((dctx->dumpadb || dctx->dumpbad || dctx->dumpfail) &&
dctx->cache == NULL && dctx->view->view->cachedb != NULL) { dctx->cache == NULL && dctx->view->view->cachedb != NULL)
dns_db_attach(dctx->view->view->cachedb, &dctx->cache); dns_db_attach(dctx->view->view->cachedb, &dctx->cache);
}
if (dctx->cache != NULL) { if (dctx->cache != NULL) {
if (dctx->dumpadb) { if (dctx->dumpadb)
dns_adb_dump(dctx->view->view->adb, dctx->fp); dns_adb_dump(dctx->view->view->adb, dctx->fp);
} if (dctx->dumpbad)
if (dctx->dumpbad) {
dns_resolver_printbadcache(dctx->view->view->resolver, dns_resolver_printbadcache(dctx->view->view->resolver,
dctx->fp); dctx->fp);
} if (dctx->dumpfail)
if (dctx->dumpfail) {
dns_badcache_print(dctx->view->view->failcache, dns_badcache_print(dctx->view->view->failcache,
"SERVFAIL cache", dctx->fp); "SERVFAIL cache", dctx->fp);
}
dns_db_detach(&dctx->cache); dns_db_detach(&dctx->cache);
} }
if (dctx->dumpzones) { if (dctx->dumpzones) {
style = &dns_master_style_full; style = &dns_master_style_full;
nextzone: nextzone:
if (dctx->version != NULL) { if (dctx->version != NULL)
dns_db_closeversion(dctx->db, &dctx->version, dns_db_closeversion(dctx->db, &dctx->version,
false); false);
} if (dctx->db != NULL)
if (dctx->db != NULL) {
dns_db_detach(&dctx->db); dns_db_detach(&dctx->db);
} if (dctx->zone == NULL)
if (dctx->zone == NULL) {
dctx->zone = ISC_LIST_HEAD(dctx->view->zonelist); dctx->zone = ISC_LIST_HEAD(dctx->view->zonelist);
} else { else
dctx->zone = ISC_LIST_NEXT(dctx->zone, link); dctx->zone = ISC_LIST_NEXT(dctx->zone, link);
}
if (dctx->zone != NULL) { if (dctx->zone != NULL) {
/* start zone dump */ /* start zone dump */
dns_zone_name(dctx->zone->zone, buf, sizeof(buf)); dns_zone_name(dctx->zone->zone, buf, sizeof(buf));
@@ -10716,9 +10704,8 @@ dumpdone(void *arg, isc_result_t result) {
dctx->task, dctx->task,
dumpdone, dctx, dumpdone, dctx,
&dctx->mdctx); &dctx->mdctx);
if (result == DNS_R_CONTINUE) { if (result == DNS_R_CONTINUE)
return; return;
}
if (result == ISC_R_NOTIMPLEMENTED) { if (result == ISC_R_NOTIMPLEMENTED) {
fprintf(dctx->fp, "; %s\n", fprintf(dctx->fp, "; %s\n",
dns_result_totext(result)); dns_result_totext(result));
@@ -10726,31 +10713,26 @@ dumpdone(void *arg, isc_result_t result) {
POST(result); POST(result);
goto nextzone; goto nextzone;
} }
if (result != ISC_R_SUCCESS) { if (result != ISC_R_SUCCESS)
goto cleanup; goto cleanup;
} }
} }
} if (dctx->view != NULL)
if (dctx->view != NULL) {
dctx->view = ISC_LIST_NEXT(dctx->view, link); dctx->view = ISC_LIST_NEXT(dctx->view, link);
if (dctx->view != NULL) { if (dctx->view != NULL)
goto nextview; goto nextview;
}
}
done: done:
fprintf(dctx->fp, "; Dump complete\n"); fprintf(dctx->fp, "; Dump complete\n");
result = isc_stdio_flush(dctx->fp); result = isc_stdio_flush(dctx->fp);
if (result == ISC_R_SUCCESS) { if (result == ISC_R_SUCCESS)
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL, isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER, ISC_LOG_INFO, NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
"dumpdb complete"); "dumpdb complete");
}
cleanup: cleanup:
if (result != ISC_R_SUCCESS) { if (result != ISC_R_SUCCESS)
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL, isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR, NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
"dumpdb failed: %s", dns_result_totext(result)); "dumpdb failed: %s", dns_result_totext(result));
}
dumpcontext_destroy(dctx); dumpcontext_destroy(dctx);
} }
@@ -13583,6 +13565,8 @@ named_server_delzone(named_server_t *server, isc_lex_t *lex,
dns_zone_attach(zone, &dz->zone); dns_zone_attach(zone, &dz->zone);
dzevent = isc_event_allocate(named_g_mctx, server, NAMED_EVENT_DELZONE, dzevent = isc_event_allocate(named_g_mctx, server, NAMED_EVENT_DELZONE,
rmzone, dz, sizeof(isc_event_t)); rmzone, dz, sizeof(isc_event_t));
if (dzevent == NULL)
CHECK(ISC_R_NOMEMORY);
dns_zone_gettask(zone, &task); dns_zone_gettask(zone, &task);
isc_task_send(task, &dzevent); isc_task_send(task, &dzevent);
@@ -15278,14 +15262,13 @@ named_server_servestale(named_server_t *server, isc_lex_t *lex,
/* Look for the optional class name. */ /* Look for the optional class name. */
classtxt = next_token(lex, text); classtxt = next_token(lex, text);
if (classtxt != NULL) { if (classtxt != NULL) {
isc_textregion_t r;
/* Look for the optional view name. */ /* Look for the optional view name. */
viewtxt = next_token(lex, text); viewtxt = next_token(lex, text);
}
if (classtxt != NULL) {
isc_textregion_t r;
/*
* If 'classtext' is not a valid class then it us a view name.
*/
r.base = classtxt; r.base = classtxt;
r.length = strlen(classtxt); r.length = strlen(classtxt);
result = dns_rdataclass_fromtext(&rdclass, &r); result = dns_rdataclass_fromtext(&rdclass, &r);
-8
View File
@@ -3587,10 +3587,6 @@ named_statschannels_configure(named_server_t *server, const cfg_obj_t *config,
ISC_LIST_INIT(new_listeners); ISC_LIST_INIT(new_listeners);
#ifdef HAVE_LIBXML2
xmlInitThreads();
#endif /* HAVE_LIBXML2 */
/* /*
* Get the list of named.conf 'statistics-channels' statements. * Get the list of named.conf 'statistics-channels' statements.
*/ */
@@ -3723,10 +3719,6 @@ named_statschannels_shutdown(named_server_t *server) {
ISC_LIST_UNLINK(server->statschannels, listener, link); ISC_LIST_UNLINK(server->statschannels, listener, link);
shutdown_listener(listener); shutdown_listener(listener);
} }
#ifdef HAVE_LIBXML2
xmlCleanupThreads();
#endif /* HAVE_LIBXML2 */
} }
isc_result_t isc_result_t
+3 -1
View File
@@ -225,7 +225,9 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[],
return (ISC_R_FAILURE); return (ISC_R_FAILURE);
} }
isc_mem_create(&mctx); result = isc_mem_create(0, 0, &mctx);
if (result != ISC_R_SUCCESS)
return (result);
cd = isc_mem_get(mctx, sizeof(*cd)); cd = isc_mem_get(mctx, sizeof(*cd));
memset(cd, 0, sizeof(*cd)); memset(cd, 0, sizeof(*cd));
+1 -1
View File
@@ -224,7 +224,7 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[],
return (ISC_R_FAILURE); return (ISC_R_FAILURE);
} }
isc_mem_create(&mctx); isc_mem_create(0, 0, &mctx);
cd = isc_mem_get(mctx, sizeof(*cd)); cd = isc_mem_get(mctx, sizeof(*cd));
memset(cd, 0, sizeof(*cd)); memset(cd, 0, sizeof(*cd));
+1 -4
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>{723C65DA-A96C-4BA3-A34E-44F11CA346F9}</ProjectGuid> <ProjectGuid>{723C65DA-A96C-4BA3-A34E-44F11CA346F9}</ProjectGuid>
<Keyword>Win32Proj</Keyword> <Keyword>Win32Proj</Keyword>
<RootNamespace>named</RootNamespace> <RootNamespace>named</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">
-10
View File
@@ -109,16 +109,6 @@ named_os_init(const char *progname) {
* ntservice_init(); * ntservice_init();
*/ */
version_check(progname); version_check(progname);
/*
* If running in a Cygwin environment, clear the SEM_NOGPFAULTERRORBOX
* bit in the process error mode to prevent Cygwin from concealing
* non-abort() crashes, giving Windows Error Reporting a chance to
* handle such crashes. This is done to ensure all crashes triggered
* by system tests can be detected.
*/
if (getenv("CYGWIN") != NULL) {
SetErrorMode(GetErrorMode() & ~SEM_NOGPFAULTERRORBOX);
}
} }
void void
+44 -33
View File
@@ -258,8 +258,16 @@ configure_zone_ssutable(const cfg_obj_t *zconfig, dns_zone_t *zone,
dns_fixedname_init(&fname); dns_fixedname_init(&fname);
if (usezone) { if (usezone) {
dns_name_copynf(dns_zone_getorigin(zone), result = dns_name_copy(dns_zone_getorigin(zone),
dns_fixedname_name(&fname)); dns_fixedname_name(&fname),
NULL);
if (result != ISC_R_SUCCESS) {
cfg_obj_log(identity, named_g_lctx,
ISC_LOG_ERROR,
"error copying origin: %s",
isc_result_totext(result));
goto cleanup;
}
} else { } else {
str = cfg_obj_asstring(dname); str = cfg_obj_asstring(dname);
isc_buffer_constinit(&b, str, strlen(str)); isc_buffer_constinit(&b, str, strlen(str));
@@ -541,8 +549,7 @@ configure_staticstub(const cfg_obj_t *zconfig, dns_zone_t *zone,
RETERR(dns_db_create(mctx, dbtype, dns_zone_getorigin(zone), RETERR(dns_db_create(mctx, dbtype, dns_zone_getorigin(zone),
dns_dbtype_stub, dns_zone_getclass(zone), dns_dbtype_stub, dns_zone_getclass(zone),
0, NULL, &db)); 0, NULL, &db));
dns_zone_setdb(zone, db);
dns_rdataset_init(&rdataset);
dns_rdatalist_init(&rdatalist_ns); dns_rdatalist_init(&rdatalist_ns);
rdatalist_ns.rdclass = dns_zone_getclass(zone); rdatalist_ns.rdclass = dns_zone_getclass(zone);
@@ -564,19 +571,23 @@ configure_staticstub(const cfg_obj_t *zconfig, dns_zone_t *zone,
result = cfg_map_get(zconfig, "server-addresses", &obj); result = cfg_map_get(zconfig, "server-addresses", &obj);
if (result == ISC_R_SUCCESS) { if (result == ISC_R_SUCCESS) {
INSIST(obj != NULL); INSIST(obj != NULL);
CHECK(configure_staticstub_serveraddrs(obj, zone, result = configure_staticstub_serveraddrs(obj, zone,
&rdatalist_ns, &rdatalist_ns,
&rdatalist_a, &rdatalist_a,
&rdatalist_aaaa)); &rdatalist_aaaa);
if (result != ISC_R_SUCCESS)
goto cleanup;
} }
obj = NULL; obj = NULL;
result = cfg_map_get(zconfig, "server-names", &obj); result = cfg_map_get(zconfig, "server-names", &obj);
if (result == ISC_R_SUCCESS) { if (result == ISC_R_SUCCESS) {
INSIST(obj != NULL); INSIST(obj != NULL);
CHECK(configure_staticstub_servernames(obj, zone, result = configure_staticstub_servernames(obj, zone,
&rdatalist_ns, &rdatalist_ns,
zname)); zname);
if (result != ISC_R_SUCCESS)
goto cleanup;
} }
/* /*
@@ -597,26 +608,34 @@ configure_staticstub(const cfg_obj_t *zconfig, dns_zone_t *zone,
* First open a new version for the add operation and get a pointer * First open a new version for the add operation and get a pointer
* to the apex node (all RRs are of the apex name). * to the apex node (all RRs are of the apex name).
*/ */
CHECK(dns_db_newversion(db, &dbversion)); result = dns_db_newversion(db, &dbversion);
if (result != ISC_R_SUCCESS)
goto cleanup;
dns_name_init(&apexname, NULL); dns_name_init(&apexname, NULL);
dns_name_clone(dns_zone_getorigin(zone), &apexname); dns_name_clone(dns_zone_getorigin(zone), &apexname);
CHECK(dns_db_findnode(db, &apexname, false, &apexnode)); result = dns_db_findnode(db, &apexname, false, &apexnode);
if (result != ISC_R_SUCCESS)
goto cleanup;
/* Add NS RRset */ /* Add NS RRset */
dns_rdataset_init(&rdataset);
RUNTIME_CHECK(dns_rdatalist_tordataset(&rdatalist_ns, &rdataset) RUNTIME_CHECK(dns_rdatalist_tordataset(&rdatalist_ns, &rdataset)
== ISC_R_SUCCESS); == ISC_R_SUCCESS);
CHECK(dns_db_addrdataset(db, apexnode, dbversion, 0, &rdataset, result = dns_db_addrdataset(db, apexnode, dbversion, 0, &rdataset,
0, NULL)); 0, NULL);
dns_rdataset_disassociate(&rdataset); dns_rdataset_disassociate(&rdataset);
if (result != ISC_R_SUCCESS)
goto cleanup;
/* Add glue A RRset, if any */ /* Add glue A RRset, if any */
if (!ISC_LIST_EMPTY(rdatalist_a.rdata)) { if (!ISC_LIST_EMPTY(rdatalist_a.rdata)) {
RUNTIME_CHECK(dns_rdatalist_tordataset(&rdatalist_a, &rdataset) RUNTIME_CHECK(dns_rdatalist_tordataset(&rdatalist_a, &rdataset)
== ISC_R_SUCCESS); == ISC_R_SUCCESS);
CHECK(dns_db_addrdataset(db, apexnode, dbversion, 0, result = dns_db_addrdataset(db, apexnode, dbversion, 0,
&rdataset, 0, NULL)); &rdataset, 0, NULL);
dns_rdataset_disassociate(&rdataset); dns_rdataset_disassociate(&rdataset);
if (result != ISC_R_SUCCESS)
goto cleanup;
} }
/* Add glue AAAA RRset, if any */ /* Add glue AAAA RRset, if any */
@@ -624,29 +643,22 @@ configure_staticstub(const cfg_obj_t *zconfig, dns_zone_t *zone,
RUNTIME_CHECK(dns_rdatalist_tordataset(&rdatalist_aaaa, RUNTIME_CHECK(dns_rdatalist_tordataset(&rdatalist_aaaa,
&rdataset) &rdataset)
== ISC_R_SUCCESS); == ISC_R_SUCCESS);
CHECK(dns_db_addrdataset(db, apexnode, dbversion, 0, result = dns_db_addrdataset(db, apexnode, dbversion, 0,
&rdataset, 0, NULL)); &rdataset, 0, NULL);
dns_rdataset_disassociate(&rdataset); dns_rdataset_disassociate(&rdataset);
if (result != ISC_R_SUCCESS)
goto cleanup;
} }
dns_db_closeversion(db, &dbversion, true);
dns_zone_setdb(zone, db);
result = ISC_R_SUCCESS; result = ISC_R_SUCCESS;
cleanup: cleanup:
if (dns_rdataset_isassociated(&rdataset)) { if (apexnode != NULL)
dns_rdataset_disassociate(&rdataset);
}
if (apexnode != NULL) {
dns_db_detachnode(db, &apexnode); dns_db_detachnode(db, &apexnode);
} if (dbversion != NULL)
if (dbversion != NULL) { dns_db_closeversion(db, &dbversion, true);
dns_db_closeversion(db, &dbversion, false); if (db != NULL)
}
if (db != NULL) {
dns_db_detach(&db); dns_db_detach(&db);
}
for (i = 0; rdatalists[i] != NULL; i++) { for (i = 0; rdatalists[i] != NULL; i++) {
while ((rdata = ISC_LIST_HEAD(rdatalists[i]->rdata)) != NULL) { while ((rdata = ISC_LIST_HEAD(rdatalists[i]->rdata)) != NULL) {
ISC_LIST_UNLINK(rdatalists[i]->rdata, rdata, link); ISC_LIST_UNLINK(rdatalists[i]->rdata, rdata, link);
@@ -758,6 +770,7 @@ isself(dns_view_t *myview, dns_tsigkey_t *mykey,
dns_aclenv_t *env = ns_interfacemgr_getaclenv(interfacemgr); dns_aclenv_t *env = ns_interfacemgr_getaclenv(interfacemgr);
dns_view_t *view; dns_view_t *view;
dns_tsigkey_t *key = NULL; dns_tsigkey_t *key = NULL;
dns_name_t *tsig = NULL;
isc_netaddr_t netsrc; isc_netaddr_t netsrc;
isc_netaddr_t netdst; isc_netaddr_t netdst;
@@ -772,9 +785,7 @@ isself(dns_view_t *myview, dns_tsigkey_t *mykey,
for (view = ISC_LIST_HEAD(named_g_server->viewlist); for (view = ISC_LIST_HEAD(named_g_server->viewlist);
view != NULL; view != NULL;
view = ISC_LIST_NEXT(view, link)) view = ISC_LIST_NEXT(view, link)) {
{
const dns_name_t *tsig = NULL;
if (view->matchrecursiveonly) if (view->matchrecursiveonly)
continue; continue;
+3 -2
View File
@@ -2618,7 +2618,7 @@ recvsoa(isc_task_t *task, isc_event_t *event) {
* address. * address.
*/ */
zname = dns_fixedname_initname(&fzname); zname = dns_fixedname_initname(&fzname);
dns_name_copynf(name, zname); dns_name_copy(name, zname, NULL);
} }
if (debugging) { if (debugging) {
@@ -3269,7 +3269,8 @@ main(int argc, char **argv) {
pre_parse_args(argc, argv); pre_parse_args(argc, argv);
isc_mem_create(&gmctx); result = isc_mem_create(0, 0, &gmctx);
check_result(result, "isc_mem_create");
parse_args(argc, argv); parse_args(argc, argv);
+1 -4
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>{C41266C7-E27E-4D60-9815-82D3B32BF82F}</ProjectGuid> <ProjectGuid>{C41266C7-E27E-4D60-9815-82D3B32BF82F}</ProjectGuid>
<Keyword>Win32Proj</Keyword> <Keyword>Win32Proj</Keyword>
<RootNamespace>nsupdate</RootNamespace> <RootNamespace>nsupdate</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">
+4 -1
View File
@@ -65,7 +65,10 @@ main(int argc, char *argv[]) {
exit(1); exit(1);
} }
isc_mem_create(&mctx); if (isc_mem_create(0, 0, &mctx) != ISC_R_SUCCESS) {
fprintf(stderr, "isc_mem_create() failed\n");
exit(1);
}
pk11_result_register(); pk11_result_register();
+1 -4
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>{5B3137E5-7E1F-49AA-8810-A09AA417D326}</ProjectGuid> <ProjectGuid>{5B3137E5-7E1F-49AA-8810-A09AA417D326}</ProjectGuid>
<Keyword>Win32Proj</Keyword> <Keyword>Win32Proj</Keyword>
<RootNamespace>pk11destroy</RootNamespace> <RootNamespace>pk11destroy</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">
+1 -4
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>{5042D371-0402-4FA3-A52A-769708694422}</ProjectGuid> <ProjectGuid>{5042D371-0402-4FA3-A52A-769708694422}</ProjectGuid>
<Keyword>Win32Proj</Keyword> <Keyword>Win32Proj</Keyword>
<RootNamespace>pk11keygen</RootNamespace> <RootNamespace>pk11keygen</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">
+1 -4
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>{C663B088-F7BC-4C8C-8D06-A76636EED651}</ProjectGuid> <ProjectGuid>{C663B088-F7BC-4C8C-8D06-A76636EED651}</ProjectGuid>
<Keyword>Win32Proj</Keyword> <Keyword>Win32Proj</Keyword>
<RootNamespace>pk11list</RootNamespace> <RootNamespace>pk11list</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">
+1 -4
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>{403FD4B1-A4F9-4159-9013-5860E3A4417D}</ProjectGuid> <ProjectGuid>{403FD4B1-A4F9-4159-9013-5860E3A4417D}</ProjectGuid>
<Keyword>Win32Proj</Keyword> <Keyword>Win32Proj</Keyword>
<RootNamespace>pk11tokens</RootNamespace> <RootNamespace>pk11tokens</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">
+15 -24
View File
@@ -16,7 +16,6 @@
#include <stdlib.h> #include <stdlib.h>
#include <isc/app.h> #include <isc/app.h>
#include <isc/atomic.h>
#include <isc/buffer.h> #include <isc/buffer.h>
#include <isc/commandline.h> #include <isc/commandline.h>
#include <isc/file.h> #include <isc/file.h>
@@ -25,7 +24,6 @@
#include <isc/mem.h> #include <isc/mem.h>
#include <isc/print.h> #include <isc/print.h>
#include <isc/random.h> #include <isc/random.h>
#include <isc/refcount.h>
#include <isc/socket.h> #include <isc/socket.h>
#include <isc/stdtime.h> #include <isc/stdtime.h>
#include <isc/string.h> #include <isc/string.h>
@@ -75,7 +73,7 @@ static isccc_region_t secret;
static bool failed = false; static bool failed = false;
static bool c_flag = false; static bool c_flag = false;
static isc_mem_t *rndc_mctx; static isc_mem_t *rndc_mctx;
static isc_refcount_t sends, recvs, connects; static int sends, recvs, connects;
static char *command; static char *command;
static char *args; static char *args;
static char program[256]; static char program[256];
@@ -273,13 +271,11 @@ rndc_senddone(isc_task_t *task, isc_event_t *event) {
UNUSED(task); UNUSED(task);
if (sevent->result != ISC_R_SUCCESS) { sends--;
if (sevent->result != ISC_R_SUCCESS)
fatal("send failed: %s", isc_result_totext(sevent->result)); fatal("send failed: %s", isc_result_totext(sevent->result));
}
isc_event_free(&event); isc_event_free(&event);
if (isc_refcount_decrement(&sends) == 1 && if (sends == 0 && recvs == 0) {
isc_refcount_current(&recvs) == 0)
{
isc_socket_detach(&sock); isc_socket_detach(&sock);
isc_task_shutdown(task); isc_task_shutdown(task);
isc_app_shutdown(); isc_app_shutdown();
@@ -295,7 +291,7 @@ rndc_recvdone(isc_task_t *task, isc_event_t *event) {
char *textmsg = NULL; char *textmsg = NULL;
isc_result_t result; isc_result_t result;
isc_refcount_decrement(&recvs); recvs--;
if (ccmsg.result == ISC_R_EOF) if (ccmsg.result == ISC_R_EOF)
fatal("connection to remote host closed\n" fatal("connection to remote host closed\n"
@@ -348,8 +344,7 @@ rndc_recvdone(isc_task_t *task, isc_event_t *event) {
isc_event_free(&event); isc_event_free(&event);
isccc_sexpr_free(&response); isccc_sexpr_free(&response);
if (isc_refcount_current(&sends) == 0 if (sends == 0 && recvs == 0) {
&& isc_refcount_current(&recvs) == 0) {
isc_socket_detach(&sock); isc_socket_detach(&sock);
isc_task_shutdown(task); isc_task_shutdown(task);
isc_app_shutdown(); isc_app_shutdown();
@@ -369,7 +364,7 @@ rndc_recvnonce(isc_task_t *task, isc_event_t *event) {
isccc_sexpr_t *data; isccc_sexpr_t *data;
isc_buffer_t b; isc_buffer_t b;
isc_refcount_decrement(&recvs); recvs--;
if (ccmsg.result == ISC_R_EOF) if (ccmsg.result == ISC_R_EOF)
fatal("connection to remote host closed\n" fatal("connection to remote host closed\n"
@@ -430,10 +425,10 @@ rndc_recvnonce(isc_task_t *task, isc_event_t *event) {
isccc_ccmsg_cancelread(&ccmsg); isccc_ccmsg_cancelread(&ccmsg);
DO("schedule recv", isccc_ccmsg_readmessage(&ccmsg, task, DO("schedule recv", isccc_ccmsg_readmessage(&ccmsg, task,
rndc_recvdone, NULL)); rndc_recvdone, NULL));
isc_refcount_increment(&recvs); recvs++;
DO("send message", isc_socket_send(sock, &r, task, rndc_senddone, DO("send message", isc_socket_send(sock, &r, task, rndc_senddone,
NULL)); NULL));
isc_refcount_increment(&sends); sends++;
isc_event_free(&event); isc_event_free(&event);
isccc_sexpr_free(&response); isccc_sexpr_free(&response);
@@ -452,7 +447,7 @@ rndc_connected(isc_task_t *task, isc_event_t *event) {
isc_buffer_t b; isc_buffer_t b;
isc_result_t result; isc_result_t result;
isc_refcount_decrement(&connects); connects--;
if (sevent->result != ISC_R_SUCCESS) { if (sevent->result != ISC_R_SUCCESS) {
isc_sockaddr_format(&serveraddrs[currentaddr], socktext, isc_sockaddr_format(&serveraddrs[currentaddr], socktext,
@@ -498,10 +493,10 @@ rndc_connected(isc_task_t *task, isc_event_t *event) {
DO("schedule recv", isccc_ccmsg_readmessage(&ccmsg, task, DO("schedule recv", isccc_ccmsg_readmessage(&ccmsg, task,
rndc_recvnonce, NULL)); rndc_recvnonce, NULL));
isc_refcount_increment(&recvs); recvs++;
DO("send message", isc_socket_send(sock, &r, task, rndc_senddone, DO("send message", isc_socket_send(sock, &r, task, rndc_senddone,
NULL)); NULL));
isc_refcount_increment(&sends); sends++;
isc_event_free(&event); isc_event_free(&event);
isccc_sexpr_free(&request); isccc_sexpr_free(&request);
} }
@@ -536,7 +531,7 @@ rndc_startconnect(isc_sockaddr_t *addr, isc_task_t *task) {
} }
DO("connect", isc_socket_connect(sock, addr, task, rndc_connected, DO("connect", isc_socket_connect(sock, addr, task, rndc_connected,
NULL)); NULL));
isc_refcount_increment(&connects); connects++;
} }
static void static void
@@ -935,7 +930,7 @@ main(int argc, char **argv) {
serial = isc_random32(); serial = isc_random32();
isc_mem_create(&rndc_mctx); DO("create memory context", isc_mem_create(0, 0, &rndc_mctx));
DO("create socket manager", isc_socketmgr_create(rndc_mctx, &socketmgr)); DO("create socket manager", isc_socketmgr_create(rndc_mctx, &socketmgr));
DO("create task manager", isc_taskmgr_create(rndc_mctx, 1, 0, &taskmgr)); DO("create task manager", isc_taskmgr_create(rndc_mctx, 1, 0, &taskmgr));
DO("create task", isc_task_create(taskmgr, 0, &task)); DO("create task", isc_task_create(taskmgr, 0, &task));
@@ -1000,12 +995,8 @@ main(int argc, char **argv) {
if (result != ISC_R_SUCCESS) if (result != ISC_R_SUCCESS)
fatal("isc_app_run() failed: %s", isc_result_totext(result)); fatal("isc_app_run() failed: %s", isc_result_totext(result));
if (isc_refcount_current(&connects) > 0 || if (connects > 0 || sends > 0 || recvs > 0)
isc_refcount_current(&sends) > 0 ||
isc_refcount_current(&recvs) > 0)
{
isc_socket_cancel(sock, task, ISC_SOCKCANCEL_ALL); isc_socket_cancel(sock, task, ISC_SOCKCANCEL_ALL);
}
isc_task_detach(&task); isc_task_detach(&task);
isc_taskmgr_destroy(&taskmgr); isc_taskmgr_destroy(&taskmgr);
+1 -4
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>{39721F26-8B80-4AA9-9826-2AEF7322C3D5}</ProjectGuid> <ProjectGuid>{39721F26-8B80-4AA9-9826-2AEF7322C3D5}</ProjectGuid>
<Keyword>Win32Proj</Keyword> <Keyword>Win32Proj</Keyword>
<RootNamespace>rndc</RootNamespace> <RootNamespace>rndc</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">
+1 -4
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>{7C8681A1-E3A8-470E-9EEF-16054D111A19}</ProjectGuid> <ProjectGuid>{7C8681A1-E3A8-470E-9EEF-16054D111A19}</ProjectGuid>
<Keyword>Win32Proj</Keyword> <Keyword>Win32Proj</Keyword>
<RootNamespace>rndcutil</RootNamespace> <RootNamespace>rndcutil</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">
+1 -1
View File
@@ -70,7 +70,7 @@ main(int argc, char **argv) {
unsigned int zonetype = 0; unsigned int zonetype = 0;
unsigned int pflags = 0; unsigned int pflags = 0;
isc_mem_create(&mctx); RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
result = isc_log_create(mctx, &lctx, &lcfg); result = isc_log_create(mctx, &lctx, &lcfg);
check_result(result, "isc_log_create()"); check_result(result, "isc_log_create()");
+1 -1
View File
@@ -96,7 +96,7 @@ main(int argc, char **argv) {
journal = argv[4]; journal = argv[4];
isc_mem_debugging |= ISC_MEM_DEBUGRECORD; isc_mem_debugging |= ISC_MEM_DEBUGRECORD;
isc_mem_create(&mctx); CHECK(isc_mem_create(0, 0, &mctx));
CHECK(dst_lib_init(mctx, NULL)); CHECK(dst_lib_init(mctx, NULL));
dst_active = true; dst_active = true;
+1 -1
View File
@@ -295,7 +295,7 @@ main(int argc, char **argv) {
/* /*
* EVERYTHING needs a memory context. * EVERYTHING needs a memory context.
*/ */
isc_mem_create(&mctx); RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
cmp = NULL; cmp = NULL;
RUNTIME_CHECK(isc_mempool_create(mctx, sizeof(client_t), &cmp) RUNTIME_CHECK(isc_mempool_create(mctx, sizeof(client_t), &cmp)
+1 -1
View File
@@ -87,7 +87,7 @@ main(int argc, char *argv[]) {
dns_result_register(); dns_result_register();
mctx = NULL; mctx = NULL;
isc_mem_create(&mctx); RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
while ((ch = isc_commandline_parse(argc, argv, "nvw:")) != -1) { while ((ch = isc_commandline_parse(argc, argv, "nvw:")) != -1) {
switch (ch) { switch (ch) {
+1 -1
View File
@@ -201,7 +201,7 @@ main(int argc, char *argv[]) {
dns_result_register(); dns_result_register();
mctx = NULL; mctx = NULL;
isc_mem_create(&mctx); RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
while ((ch = isc_commandline_parse(argc, argv, "d:vw:")) != -1) { while ((ch = isc_commandline_parse(argc, argv, "d:vw:")) != -1) {
switch (ch) { switch (ch) {
+1 -1
View File
@@ -362,7 +362,7 @@ main(int argc, char *argv[]) {
dns_result_register(); dns_result_register();
isc_mem_create(&mctx); RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
RUNTIME_CHECK(dns_dbtable_create(mctx, dns_rdataclass_in, &dbtable) == RUNTIME_CHECK(dns_dbtable_create(mctx, dns_rdataclass_in, &dbtable) ==
ISC_R_SUCCESS); ISC_R_SUCCESS);
+1 -1
View File
@@ -445,7 +445,7 @@ main(int argc, char *argv[]) {
dns_result_register(); dns_result_register();
mctx = NULL; mctx = NULL;
isc_mem_create(&mctx); RUNCHECK(isc_mem_create(0, 0, &mctx));
RUNCHECK(isc_log_create(mctx, &lctx, &lcfg)); RUNCHECK(isc_log_create(mctx, &lctx, &lcfg));
isc_log_setcontext(lctx); isc_log_setcontext(lctx);
+1 -1
View File
@@ -30,7 +30,7 @@ main(int argc, char **argv) {
UNUSED(argc); UNUSED(argc);
UNUSED(argv); UNUSED(argv);
isc_mem_create(&mctx); RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
result = isc_interfaceiter_create(mctx, &iter); result = isc_interfaceiter_create(mctx, &iter);
if (result != ISC_R_SUCCESS) if (result != ISC_R_SUCCESS)
goto cleanup; goto cleanup;
+1 -1
View File
@@ -90,7 +90,7 @@ main(int argc, char *argv[]) {
} }
} }
isc_mem_create(&mctx); RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
RUNTIME_CHECK(isc_lex_create(mctx, 256, &lex) == ISC_R_SUCCESS); RUNTIME_CHECK(isc_lex_create(mctx, 256, &lex) == ISC_R_SUCCESS);
if (masterfile) { if (masterfile) {
+1 -1
View File
@@ -106,7 +106,7 @@ main(int argc, char **argv) {
lctx = NULL; lctx = NULL;
lcfg = NULL; lcfg = NULL;
isc_mem_create(&mctx); CHECK(isc_mem_create(0, 0, &mctx));
CHECK(isc_log_create(mctx, &lctx, &lcfg)); CHECK(isc_log_create(mctx, &lctx, &lcfg));
CHECK(isc_log_settag(lcfg, progname)); CHECK(isc_log_settag(lcfg, progname));
+1 -1
View File
@@ -57,7 +57,7 @@ main(int argc, char *argv[]) {
UNUSED(argc); UNUSED(argc);
isc_mem_create(&mctx); RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
if (argv[1]) { if (argv[1]) {
isc_buffer_init(&source, argv[1], strlen(argv[1])); isc_buffer_init(&source, argv[1], strlen(argv[1]));
+1 -1
View File
@@ -31,7 +31,7 @@ main(int argc, char *argv[]) {
isc_mutex_init(&lock); isc_mutex_init(&lock);
mctx = NULL; mctx = NULL;
isc_mem_create(&mctx); RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
mp1 = NULL; mp1 = NULL;
RUNTIME_CHECK(isc_mempool_create(mctx, 24, &mp1) == ISC_R_SUCCESS); RUNTIME_CHECK(isc_mempool_create(mctx, 24, &mp1) == ISC_R_SUCCESS);
+3 -4
View File
@@ -26,9 +26,6 @@
static isc_mem_t *mctx = NULL; static isc_mem_t *mctx = NULL;
ISC_PLATFORM_NORETURN_PRE static inline void
fatal(const char *message) ISC_PLATFORM_NORETURN_POST;
static inline void static inline void
fatal(const char *message) { fatal(const char *message) {
fprintf(stderr, "%s\n", message); fprintf(stderr, "%s\n", message);
@@ -189,10 +186,12 @@ nsecify(char *filename) {
int int
main(int argc, char *argv[]) { main(int argc, char *argv[]) {
int i; int i;
isc_result_t result;
dns_result_register(); dns_result_register();
isc_mem_create(&mctx); result = isc_mem_create(0, 0, &mctx);
check_result(result, "isc_mem_create()");
argc--; argc--;
argv++; argv++;
+1 -1
View File
@@ -101,7 +101,7 @@ main(int argc, char *argv[]) {
isc_app_start(); isc_app_start();
isc_interval_set(&linterval, 1, 0); isc_interval_set(&linterval, 1, 0);
isc_mem_create(&mctx); RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
RUNTIME_CHECK(isc_taskmgr_create(mctx, 3, 0, &taskmgr) == RUNTIME_CHECK(isc_taskmgr_create(mctx, 3, 0, &taskmgr) ==
ISC_R_SUCCESS); ISC_R_SUCCESS);
RUNTIME_CHECK(isc_timermgr_create(mctx, &timermgr) == RUNTIME_CHECK(isc_timermgr_create(mctx, &timermgr) ==
+6 -1
View File
@@ -277,7 +277,12 @@ main(int argc, char **argv) {
*/ */
isc_mem_debugging = ISC_MEM_DEBUGRECORD; isc_mem_debugging = ISC_MEM_DEBUGRECORD;
isc_mem_create(&mctx); result = isc_mem_create(0, 0, &mctx);
if (result != ISC_R_SUCCESS) {
printf("isc_mem_create: %s: exiting\n",
dns_result_totext(result));
exit(1);
}
result = dns_rbt_create(mctx, delete_name, NULL, &rbt); result = dns_rbt_create(mctx, delete_name, NULL, &rbt);
if (result != ISC_R_SUCCESS) { if (result != ISC_R_SUCCESS) {
+2 -2
View File
@@ -178,9 +178,9 @@ main(int argc, char *argv[]) {
printf("%u workers\n", workers); printf("%u workers\n", workers);
mctx = NULL; mctx = NULL;
isc_mem_create(&mctx); RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
mctx2 = NULL; mctx2 = NULL;
isc_mem_create(&mctx2); RUNTIME_CHECK(isc_mem_create(0, 0, &mctx2) == ISC_R_SUCCESS);
RUNTIME_CHECK(isc_taskmgr_create(mctx, workers, 0, &task_manager) == RUNTIME_CHECK(isc_taskmgr_create(mctx, workers, 0, &task_manager) ==
ISC_R_SUCCESS); ISC_R_SUCCESS);
RUNTIME_CHECK(isc_timermgr_create(mctx, &timer_manager) == RUNTIME_CHECK(isc_timermgr_create(mctx, &timer_manager) ==
+1 -1
View File
@@ -207,7 +207,7 @@ main(int argc, char *argv[]) {
isc_mutex_init(&lock); isc_mutex_init(&lock);
mctx = NULL; mctx = NULL;
isc_mem_create(&mctx); RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
while ((ch = isc_commandline_parse(argc, argv, "vp:")) != -1) { while ((ch = isc_commandline_parse(argc, argv, "vp:")) != -1) {
switch (ch) { switch (ch) {
+1 -1
View File
@@ -286,7 +286,7 @@ main(int argc, char *argv[]) {
* EVERYTHING needs a memory context. * EVERYTHING needs a memory context.
*/ */
mctx = NULL; mctx = NULL;
isc_mem_create(&mctx); RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
/* /*
* The task manager is independent (other than memory context) * The task manager is independent (other than memory context)
+1 -1
View File
@@ -59,7 +59,7 @@ main(int argc, char *argv[]) {
} }
} }
isc_mem_create(&mctx); RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
RUNTIME_CHECK(isc_symtab_create(mctx, 691, undefine_action, NULL, RUNTIME_CHECK(isc_symtab_create(mctx, 691, undefine_action, NULL,
case_sensitive, &st) == ISC_R_SUCCESS); case_sensitive, &st) == ISC_R_SUCCESS);
+1 -1
View File
@@ -77,7 +77,7 @@ main(int argc, char *argv[]) {
workers = 2; workers = 2;
printf("%u workers\n", workers); printf("%u workers\n", workers);
isc_mem_create(&mctx); RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
RUNTIME_CHECK(isc_taskmgr_create(mctx, workers, 0, &manager) == RUNTIME_CHECK(isc_taskmgr_create(mctx, workers, 0, &manager) ==
ISC_R_SUCCESS); ISC_R_SUCCESS);
+1 -1
View File
@@ -107,7 +107,7 @@ main(int argc, char *argv[]) {
workers = 2; workers = 2;
printf("%u workers\n", workers); printf("%u workers\n", workers);
isc_mem_create(&mctx1); RUNTIME_CHECK(isc_mem_create(0, 0, &mctx1) == ISC_R_SUCCESS);
RUNTIME_CHECK(isc_taskmgr_create(mctx1, workers, 0, &manager) == RUNTIME_CHECK(isc_taskmgr_create(mctx1, workers, 0, &manager) ==
ISC_R_SUCCESS); ISC_R_SUCCESS);
RUNTIME_CHECK(isc_timermgr_create(mctx1, &timgr) == ISC_R_SUCCESS); RUNTIME_CHECK(isc_timermgr_create(mctx1, &timgr) == ISC_R_SUCCESS);
+1 -1
View File
@@ -280,7 +280,7 @@ main(int argc, char **argv) {
usage(); usage();
RUNTIME_CHECK(isc_app_start() == ISC_R_SUCCESS); RUNTIME_CHECK(isc_app_start() == ISC_R_SUCCESS);
isc_mem_create(&mctx); RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
RUNTIME_CHECK(isc_taskmgr_create(mctx, 2, 0, &taskmgr) == RUNTIME_CHECK(isc_taskmgr_create(mctx, 2, 0, &taskmgr) ==
ISC_R_SUCCESS); ISC_R_SUCCESS);
RUNTIME_CHECK(isc_timermgr_create(mctx, &timermgr) == ISC_R_SUCCESS); RUNTIME_CHECK(isc_timermgr_create(mctx, &timermgr) == ISC_R_SUCCESS);
+2 -2
View File
@@ -73,10 +73,10 @@ clock_gettime(int32_t id, struct timespec *tp)
UNUSED(id); UNUSED(id);
result = gettimeofday(&tv, NULL); result = gettimeofday(&tv, NULL);
if (result == 0) { if (result)
return (result);
tp->tv_sec = tv.tv_sec; tp->tv_sec = tv.tv_sec;
tp->tv_nsec = (long) tv.tv_usec * 1000; tp->tv_nsec = (long) tv.tv_usec * 1000;
}
return (result); return (result);
} }
#endif #endif
+2 -2
View File
@@ -72,10 +72,10 @@ clock_gettime(int32_t id, struct timespec *tp)
UNUSED(id); UNUSED(id);
result = gettimeofday(&tv, NULL); result = gettimeofday(&tv, NULL);
if (result == 0) { if (result)
return (result);
tp->tv_sec = tv.tv_sec; tp->tv_sec = tv.tv_sec;
tp->tv_nsec = (long) tv.tv_usec * 1000; tp->tv_nsec = (long) tv.tv_usec * 1000;
}
return (result); return (result);
} }
#endif #endif

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