Compare commits

..
Author SHA1 Message Date
Vicky Risk c65d26855e Initial release checklist 2018-08-30 11:09:00 -04:00
435 changed files with 14643 additions and 4954 deletions
@@ -1,4 +1,4 @@
## Release Checklist
##Release Checklist
- [ ] Check for the presence of a milestone for the release
- If there is a milestone, are all the issues for the milestone resolved? (other than this checklist)
@@ -18,12 +18,12 @@
- [ ] Edit the release https://gitlab.isc.org/isc-projects/bind9/tags and the NEWS snippet + links to the tarballs
- [ ] Update DEB and RPM packages
## Communication
##Communication
- [ ] Inform support to upload to the web site (nice to give them a heads-up in advance)
- Write release e-mail to bind9-announce, bind-users in case of a major release
- Update tickets in case of waiting support customers
Write release e-mail to bind9-announce, bind-users in case of a major release
- [ ] Inform marketing to announce the release
- Post short note to Twitter
- Update http://en.wikipedia.org/wiki/BIND (mktg)
- Blog post if a major release
Post short note to Twitter
Update http://en.wikipedia.org/wiki/BIND (mktg)
Blog post if a major release
-59
View File
@@ -1,62 +1,3 @@
5039. [bug] Named could fail to preserve owner name case of new
RRset. [GL #420]
5038. [bug] Chaosnet addresses were compared incorrectly.
[GL #562]
5037. [func] "allow-recursion-on" and "allow-query-cache-on"
each now default to the other if only one of them
is set, in order to be more consistent with the way
"allow-recursion" and "allow-query-cache" work.
Also we now ensure that both query-cache ACLs are
checked when determining cache access. [GL #319]
5036. [cleanup] Fixed a spacing/formatting error in some RPZ-related
error messages in the log. [GL !805]
5035. [test] Fixed errors that prevented the DNSRPS subtests
from running in the rpz and rpzrecurse system
tests. [GL #503]
5034. [bug] A race between threads could prevent zone maintenance
scheduled immediately after zone load from being
performed. [GL #542]
5033. [bug] When adding NTAs to multiple views using "rndc nta",
the text returned via rndc was incorrectly terminated
after the first line, making it look as if only one
NTA had been added. Also, it was not possible to
differentiate between views with the same name but
different classes; this has been corrected with the
addition of a "-class" option. [GL #105]
5032. [func] Add krb5-selfsub and ms-selfsub update policy rules.
[GL #511]
5031. [cleanup] Various defines in platform.h has been either dropped
if always or never triggered on supported platforms
or replaced with config.h equivalents if the defines
didn't have any impact on public headers. Workarounds
for LinuxThreads have been removed because NPTL is
available since Linux kernel 2.6.0. [GL #525]
5030. [bug] Align CMSG buffers to a 64-bit boundary, fixes crash
on architectures with strict alignment. [GL #521]
--- 9.13.3 released ---
5029. [func] Workarounds for servers that misbehave when queried
with EDNS have been removed, because these broken
servers and the workarounds for their noncompliance
cause unnecessary delays, increase code complexity,
and prevent deployment of new DNS features. See
https://dnsflagday.net for further details. [GL #150]
5028. [bug] Spread the initial RRSIG expiration times over the
entire working sig-validity-interval when signing a
zone in named to even out re-signing and transfer
loads. [GL #418]
5027. [func] Set SO_SNDBUF size on sockets. [GL #74]
5026. [bug] rndc reconfig should not touch already loaded zones.
+4 -9
View File
@@ -1,11 +1,9 @@
Supported platforms
In general, this version of BIND will build and run on any POSIX-compliant
system with a C99-compliant C compiler, BSD-style sockets with
RFC-compliant IPv6 support, POSIX-compliant threads, and the OpenSSL
cryptography library. Atomic operations support from the compiler is
needed, either in the form of builtin operations, C11 atomics or the
Interlocked family of functions on Windows.
system with a C99-compliant C compiler, BSD-style sockets, and the OpenSSL
cryptography library. To build with multiprocessing support, a
C11-compliant C compiler will be needed for standard atomics.
ISC regularly tests BIND on many operating systems and architectures, but
lacks the resources to test all of them. Consequently, ISC is only able to
@@ -55,7 +53,4 @@ These are platforms on which BIND is known not to build or run:
* Platforms without at least OpenSSL 1.0.2
* Windows 10 / x86
* Windows Server 2012 and older
* Platforms that don't support IPv6 Advanced Socket API (RFC 3542)
* Platforms that don't support atomic operations (via compiler or
library)
* Windows Server 2012
+4 -9
View File
@@ -11,11 +11,9 @@
## Supported platforms
In general, this version of BIND will build and run on any POSIX-compliant
system with a C99-compliant C compiler, BSD-style sockets with RFC-compliant
IPv6 support, POSIX-compliant threads, and the OpenSSL cryptography library.
Atomic operations support from the compiler is needed, either in the form of
builtin operations, C11 atomics or the Interlocked family of functions on
Windows.
system with a C99-compliant C compiler, BSD-style sockets, and the OpenSSL
cryptography library. To build with multiprocessing support, a
C11-compliant C compiler will be needed for standard atomics.
ISC regularly tests BIND on many operating systems and architectures, but
lacks the resources to test all of them. Consequently, ISC is only able to
@@ -63,7 +61,4 @@ These are platforms on which BIND is known *not* to build or run:
* Platforms without at least OpenSSL 1.0.2
* Windows 10 / x86
* Windows Server 2012 and older
* Platforms that don't support IPv6 Advanced Socket API (RFC 3542)
* Platforms that don't support atomic operations (via compiler or library)
* Linux without NPTL (Native POSIX Thread Library)
* Windows Server 2012
+13 -17
View File
@@ -104,7 +104,8 @@ BIND 9.13 features
BIND 9.13 is the newest development branch of BIND 9. It includes a number
of changes from BIND 9.12 and earlier releases. New features include:
* QNAME minimization, as described in RFC 7816, is now supported.
* The default value of "dnssec-validation" is now "auto".
* Support for IDNA2008 when linking with libidn2.
* "Root key sentinel" support, enabling validating resolvers to indicate
via a special query which trust anchors are configured for the root
zone.
@@ -113,24 +114,15 @@ of changes from BIND 9.12 and earlier releases. New features include:
subject to DNSSEC validation and are not treated as authoritative data
when answering. This makes it easier to configure a local copy of the
root zone as described in RFC 7706.
* QNAME minimization is now supported
* The "validate-except" option allows configuration of domains below
which DNSSEC validation should not be performed.
* The default value of "dnssec-validation" is now "auto".
* IDNA2008 is now supported when linking with libidn2.
In addition, workarounds that were formerly in place to enable resolution
of domains whose authoritative servers did not respond to EDNS queries
have been removed. See https://dnsflagday.net for more details.
Cryptographic support has been modernized. BIND now uses the best
available pseudo-random number generator for the platform on which it's
built. Very old versions of OpenSSL are no longer supported. Cryptography
is now mandatory: building BIND without DNSSEC is now longer supported.
Special code to support certain legacy operating systems has also been
removed; see the file PLATFORMS.md for details of supported platforms. In
addition to OpenSSL, BIND now requires support for IPv6, threads, and
standard atomic operations provided by the C compiler.
In addition, cryptographic support has been modernized. BIND now uses the
best available pseudo-random number generator for the platform on which
it's built. Very old versions of OpenSSL are no longer supported.
Cryptography is now mandatory; building BIND without DNSSEC is now longer
supported.
Building BIND
@@ -138,7 +130,7 @@ 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 observed on many versions of Linux and UNIX, including RedHat,
Fedora, Debian, Ubuntu, SuSE, Slackware, FreeBSD, NetBSD, OpenBSD, Mac OS
X, Solaris, HP-UX, and OpenWRT.
X, Solaris, HP-UX, AIX, SCO OpenServer, and OpenWRT.
BIND requires a cryptography provider library such as OpenSSL or a
hardware service module supporting PKCS#11. On Linux, BIND requires the
@@ -264,6 +256,10 @@ specifying --enable-fixed-rrset or --disable-fixed-rrset on the configure
command line. By default, fixed rrset-order is disabled to reduce memory
footprint.
If your operating system has integrated support for IPv6, it will be used
automatically. If you have installed KAME IPv6 separately, use --with-kame
[=PATH] to specify its location.
make install will install named and the various BIND 9 libraries. By
default, installation is into /usr/local, but this can be changed with the
--prefix option when running configure.
+5 -16
View File
@@ -122,7 +122,8 @@ BIND 9.13 is the newest development branch of BIND 9. It includes a
number of changes from BIND 9.12 and earlier releases. New features
include:
* QNAME minimization, as described in RFC 7816, is now supported.
* The default value of "dnssec-validation" is now "auto".
* Support for IDNA2008 when linking with `libidn2`.
* "Root key sentinel" support, enabling validating resolvers to indicate
via a special query which trust anchors are configured for the root zone.
* Secondary zones can now be configured as "mirror" zones; their contents
@@ -130,28 +131,16 @@ include:
DNSSEC validation and are not treated as authoritative data when
answering. This makes it easier to configure a local copy of the root
zone as described in RFC 7706.
* QNAME minimization is now supported
* The "validate-except" option allows configuration of domains below which
DNSSEC validation should not be performed.
* The default value of "dnssec-validation" is now "auto".
* IDNA2008 is now supported when linking with `libidn2`.
In addition, workarounds that were formerly in place to enable resolution
of domains whose authoritative servers did not respond to EDNS queries
have been removed. See [https://dnsflagday.net](https://dnsflagday.net)
for more details.
Cryptographic support has been modernized. BIND now uses the
In addition, cryptographic support has been modernized. BIND now uses the
best available pseudo-random number generator for the platform on which
it's built. Very old versions of OpenSSL are no longer supported.
Cryptography is now mandatory: building BIND without DNSSEC is now
Cryptography is now mandatory; building BIND without DNSSEC is now
longer supported.
Special code to support certain legacy operating systems has also
been removed; see the file [PLATFORMS.md](PLATFORMS.md) for details
of supported platforms. In addition to OpenSSL, BIND now requires
support for IPv6, threads, and standard atomic operations provided
by the C compiler.
### <a name="build"/> Building BIND
Minimally, BIND requires a UNIX or Linux system with an ANSI C compiler,
+81
View File
@@ -0,0 +1,81 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
/*! \file */
/***
*** This file is not to be included by any public header files, because
*** it does not get installed.
***/
@TOP@
/** define if your system needs pthread_init() before using pthreads */
#undef NEED_PTHREAD_INIT
/** define if your system has sigwait() */
#undef HAVE_SIGWAIT
/** define if sigwait() is the UnixWare flavor */
#undef HAVE_UNIXWARE_SIGWAIT
/** define if LinuxThreads is in use */
#undef HAVE_LINUXTHREADS
/** define if sysconf() is available */
#undef HAVE_SYSCONF
/** define if sysctlbyname() is available */
#undef HAVE_SYSCTLBYNAME
/** define if catgets() is available */
#undef HAVE_CATGETS
/** define if getifaddrs() exists */
#undef HAVE_GETIFADDRS
/** define if you have the NET_RT_IFLIST sysctl variable and sys/sysctl.h */
#undef HAVE_IFLIST_SYSCTL
/** define if tzset() is available */
#undef HAVE_TZSET
/**
* define if pthread_setconcurrency() should be called to tell the
* OS how many threads we might want to run.
*/
#undef CALL_PTHREAD_SETCONCURRENCY
/** define if flockfile() is available */
#undef HAVE_FLOCKFILE
/** define if getc_unlocked() is available */
#undef HAVE_GETCUNLOCKED
/** define if the system has a random number generating device */
#undef PATH_RANDOMDEV
/** define if pthread_attr_getstacksize() is available */
#undef HAVE_PTHREAD_ATTR_GETSTACKSIZE
/** define if pthread_attr_setstacksize() is available */
#undef HAVE_PTHREAD_ATTR_SETSTACKSIZE
/** define if you have strerror in the C library. */
#undef HAVE_STRERROR
/* Define to the length type used by the socket API (socklen_t, size_t, int). */
#undef ISC_SOCKADDR_LEN_T
/* Define if threads need PTHREAD_SCOPE_SYSTEM */
#undef NEED_PTHREAD_SCOPE_SYSTEM
/* Define to 1 if you have the uname library function. */
#undef HAVE_UNAME
+2 -2
View File
@@ -88,12 +88,12 @@ install:: named-checkconf@EXEEXT@ named-checkzone@EXEEXT@ installdirs
${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} named-checkconf@EXEEXT@ ${DESTDIR}${sbindir}
${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} named-checkzone@EXEEXT@ ${DESTDIR}${sbindir}
(cd ${DESTDIR}${sbindir}; rm -f named-compilezone@EXEEXT@; ${LINK_PROGRAM} named-checkzone@EXEEXT@ named-compilezone@EXEEXT@)
for m in ${MANPAGES}; do ${INSTALL_DATA} ${srcdir}/$$m ${DESTDIR}${mandir}/man8 || exit 1; done
for m in ${MANPAGES}; do ${INSTALL_DATA} ${srcdir}/$$m ${DESTDIR}${mandir}/man8; done
(cd ${DESTDIR}${mandir}/man8; rm -f named-compilezone.8; ${LINK_PROGRAM} named-checkzone.8 named-compilezone.8)
uninstall::
rm -f ${DESTDIR}${mandir}/man8/named-compilezone.8
for m in ${MANPAGES}; do rm -f ${DESTDIR}${mandir}/man8/$$m || exit 1; done
for m in ${MANPAGES}; do rm -f ${DESTDIR}${mandir}/man8/$$m ; done
rm -f ${DESTDIR}${sbindir}/named-compilezone@EXEEXT@
${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${sbindir}/named-checkconf@EXEEXT@
${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${sbindir}/named-checkzone@EXEEXT@
+3 -1
View File
@@ -129,7 +129,9 @@ add(char *key, int value) {
isc_symvalue_t symvalue;
if (sym_mctx == NULL) {
isc_mem_create(0, 0, &sym_mctx);
result = isc_mem_create(0, 0, &sym_mctx);
if (result != ISC_R_SUCCESS)
return;
}
if (symtab == NULL) {
+1 -1
View File
@@ -569,7 +569,7 @@ main(int argc, char **argv) {
}
isc_commandline_reset = true;
isc_mem_create(0, 0, &mctx);
RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
while ((c = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != EOF) {
switch (c) {
+1 -1
View File
@@ -517,7 +517,7 @@ main(int argc, char **argv) {
InitSockets();
#endif
isc_mem_create(0, 0, &mctx);
RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
if (!quiet)
RUNTIME_CHECK(setup_logging(mctx, errout, &lctx)
== ISC_R_SUCCESS);
+1 -1
View File
@@ -207,7 +207,7 @@ main(int argc, char **argv) {
/* Use canonical algorithm name */
algname = alg_totext(alg);
isc_mem_create(0, 0, &mctx);
DO("create memory context", isc_mem_create(0, 0, &mctx));
if (keyname == NULL) {
const char *suffix = NULL;
+1 -1
View File
@@ -211,7 +211,7 @@ main(int argc, char **argv) {
keysize = alg_bits(alg);
algname = alg_totext(alg);
isc_mem_create(0, 0, &mctx);
DO("create memory context", isc_mem_create(0, 0, &mctx));
isc_buffer_init(&key_txtbuffer, &key_txtsecret, sizeof(key_txtsecret));
generate_key(mctx, alg, keysize, &key_txtbuffer);
+4 -2
View File
@@ -1585,12 +1585,14 @@ main(int argc, char *argv[]) {
if (result != ISC_R_SUCCESS)
fatal("dns_lib_init failed: %d", result);
isc_mem_create(0, 0, &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_taskmgr_createinctx(mctx, actx, 1, 0, &taskmgr));
CHECK(isc_socketmgr_createinctx(mctx, actx, &socketmgr));
isc_timermgr_createinctx(mctx, actx, &timermgr);
CHECK(isc_timermgr_createinctx(mctx, actx, &timermgr));
parse_args(argc, argv);
+3 -3
View File
@@ -101,12 +101,12 @@ install:: dig@EXEEXT@ host@EXEEXT@ nslookup@EXEEXT@ installdirs
${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} \
nslookup@EXEEXT@ ${DESTDIR}${bindir}
for m in ${MANPAGES}; do \
${INSTALL_DATA} ${srcdir}/$$m ${DESTDIR}${mandir}/man1 || exit 1; \
done
${INSTALL_DATA} ${srcdir}/$$m ${DESTDIR}${mandir}/man1; \
done
uninstall::
for m in ${MANPAGES}; do \
rm -f ${DESTDIR}${mandir}/man1/$$m || exit 1; \
rm -f ${DESTDIR}${mandir}/man1/$$m ; \
done
${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${bindir}/nslookup@EXEEXT@
${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${bindir}/host@EXEEXT@
+7 -3
View File
@@ -520,7 +520,8 @@ printmessage(dig_query_t *query, dns_message_t *msg, bool headers) {
if (!query->lookup->comments)
flags |= DNS_MESSAGETEXTFLAG_NOCOMMENTS;
isc_buffer_allocate(mctx, &buf, len);
result = isc_buffer_allocate(mctx, &buf, len);
check_result(result, "isc_buffer_allocate");
if (query->lookup->comments && !short_form) {
if (query->lookup->cmdline[0] != 0)
@@ -596,8 +597,11 @@ repopulate_buffer:
buftoosmall:
len += OUTPUTBUF;
isc_buffer_free(&buf);
isc_buffer_allocate(mctx, &buf, len);
goto repopulate_buffer;
result = isc_buffer_allocate(mctx, &buf, len);
if (result == ISC_R_SUCCESS)
goto repopulate_buffer;
else
goto cleanup;
}
check_result(result,
"dns_message_pseudosectiontotext");
+16 -8
View File
@@ -862,7 +862,8 @@ setup_text_key(void) {
unsigned char *secretstore;
debug("setup_text_key()");
isc_buffer_allocate(mctx, &namebuf, MXNAME);
result = isc_buffer_allocate(mctx, &namebuf, MXNAME);
check_result(result, "isc_buffer_allocate");
dns_name_init(&keyname, NULL);
check_result(result, "dns_name_init");
isc_buffer_putstr(namebuf, keynametext);
@@ -1327,7 +1328,8 @@ setup_libs(void) {
if (!have_ipv6 && !have_ipv4)
fatal("can't find either v4 or v6 networking");
isc_mem_create(0, 0, &mctx);
result = isc_mem_create(0, 0, &mctx);
check_result(result, "isc_mem_create");
isc_mem_setname(mctx, "dig", NULL);
result = isc_log_create(mctx, &lctx, &logconfig);
@@ -1349,7 +1351,8 @@ setup_libs(void) {
check_result(result, "isc_task_create");
isc_task_setname(global_task, "dig", NULL);
isc_timermgr_create(mctx, &timermgr);
result = isc_timermgr_create(mctx, &timermgr);
check_result(result, "isc_timermgr_create");
result = isc_socketmgr_create(mctx, &socketmgr);
check_result(result, "isc_socketmgr_create");
@@ -1358,7 +1361,8 @@ setup_libs(void) {
check_result(result, "dst_lib_init");
is_dst_up = true;
isc_mempool_create(mctx, COMMSIZE, &commctx);
result = isc_mempool_create(mctx, COMMSIZE, &commctx);
check_result(result, "isc_mempool_create");
isc_mempool_setname(commctx, "COMMPOOL");
/*
* 6 and 2 set as reasonable parameters for 3 or 4 nameserver
@@ -1367,7 +1371,8 @@ setup_libs(void) {
isc_mempool_setfreemax(commctx, 6);
isc_mempool_setfillcount(commctx, 2);
isc_mutex_init(&lookup_lock);
result = isc_mutex_init(&lookup_lock);
check_result(result, "isc_mutex_init");
}
typedef struct dig_ednsoptname {
@@ -2013,8 +2018,9 @@ setup_lookup(dig_lookup_t *lookup) {
debug("setup_lookup(%p)", lookup);
dns_message_create(mctx, DNS_MESSAGE_INTENTRENDER,
result = dns_message_create(mctx, DNS_MESSAGE_INTENTRENDER,
&lookup->sendmsg);
check_result(result, "dns_message_create");
if (lookup->new_search) {
debug("resetting lookup counter.");
@@ -2250,7 +2256,8 @@ setup_lookup(dig_lookup_t *lookup) {
if (lookup->sendspace == NULL)
fatal("memory allocation failure");
dns_compress_init(&cctx, -1, mctx);
result = dns_compress_init(&cctx, -1, mctx);
check_result(result, "dns_compress_init");
debug("starting to render the message");
isc_buffer_init(&lookup->renderbuf, lookup->sendspace, COMMSIZE);
@@ -3604,7 +3611,8 @@ recv_done(isc_task_t *task, isc_event_t *event) {
if (!match)
goto udp_mismatch;
dns_message_create(mctx, DNS_MESSAGE_INTENTPARSE, &msg);
result = dns_message_create(mctx, DNS_MESSAGE_INTENTPARSE, &msg);
check_result(result, "dns_message_create");
if (tsigkey != NULL) {
if (l->querysig == NULL) {
+2 -1
View File
@@ -201,7 +201,8 @@ say_message(dns_name_t *name, const char *msg, dns_rdata_t *rdata,
dns_name_format(name, namestr, sizeof(namestr));
retry:
isc_buffer_allocate(mctx, &b, bufsize);
result = isc_buffer_allocate(mctx, &b, bufsize);
check_result(result, "isc_buffer_allocate");
result = dns_rdata_totext(rdata, NULL, b);
if (result == ISC_R_NOSPACE) {
isc_buffer_free(&b);
+3 -1
View File
@@ -223,7 +223,9 @@ printrdata(dns_rdata_t *rdata) {
printf("rdata_%d = ", rdata->type);
while (!done) {
isc_buffer_allocate(mctx, &b, size);
result = isc_buffer_allocate(mctx, &b, size);
if (result != ISC_R_SUCCESS)
check_result(result, "isc_buffer_allocate");
result = dns_rdata_totext(rdata, NULL, b);
if (result == ISC_R_SUCCESS) {
printf("%.*s\n", (int)isc_buffer_usedlength(b),
+4 -4
View File
@@ -115,12 +115,12 @@ installdirs:
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man8
install:: ${TARGETS} installdirs
for t in ${TARGETS}; do ${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} $$t ${DESTDIR}${sbindir} || exit 1; done
for m in ${MANPAGES}; do ${INSTALL_DATA} ${srcdir}/$$m ${DESTDIR}${mandir}/man8 || exit 1; done
for t in ${TARGETS}; do ${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} $$t ${DESTDIR}${sbindir}; done
for m in ${MANPAGES}; do ${INSTALL_DATA} ${srcdir}/$$m ${DESTDIR}${mandir}/man8; done
uninstall::
for m in ${MANPAGES}; do rm -f ${DESTDIR}${mandir}/man8/$$m || exit 1; done
for t in ${TARGETS}; do ${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${sbindir}/$$t || exit 1; done
for m in ${MANPAGES}; do rm -f ${DESTDIR}${mandir}/man8/$$m ; done
for t in ${TARGETS}; do ${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${sbindir}/$$t ; done
clean distclean::
rm -f ${TARGETS}
+8 -3
View File
@@ -383,7 +383,8 @@ formatset(dns_rdataset_t *rdataset) {
mctx);
check_result(result, "dns_master_stylecreate2 failed");
isc_buffer_allocate(mctx, &buf, MAX_CDS_RDATA_TEXT_SIZE);
result = isc_buffer_allocate(mctx, &buf, MAX_CDS_RDATA_TEXT_SIZE);
check_result(result, "printing DS records");
result = dns_master_rdatasettotext(name, rdataset, style, buf);
if ((result == ISC_R_SUCCESS) && isc_buffer_availablelength(buf) < 1) {
@@ -895,7 +896,8 @@ make_new_ds_set(ds_maker_func_t *ds_from_rdata,
result = dns_rdatalist_tordataset(dslist, &new_ds_set);
check_result(result, "dns_rdatalist_tordataset(dslist)");
isc_buffer_allocate(mctx, &new_ds_buf, size);
result = isc_buffer_allocate(mctx, &new_ds_buf, size);
check_result(result, "building new DS records");
for (result = dns_rdataset_first(rdset);
result == ISC_R_SUCCESS;
@@ -1142,7 +1144,10 @@ main(int argc, char *argv[]) {
int ch;
char *endp;
isc_mem_create(0, 0, &mctx);
result = isc_mem_create(0, 0, &mctx);
if (result != ISC_R_SUCCESS) {
fatal("out of memory");
}
#if USE_PKCS11
pk11_result_register();
+1 -1
View File
@@ -368,7 +368,7 @@ main(int argc, char **argv) {
if (argc == 1)
usage();
isc_mem_create(0, 0, &mctx);
result = isc_mem_create(0, 0, &mctx);
if (result != ISC_R_SUCCESS)
fatal("out of memory");
+3 -1
View File
@@ -307,7 +307,9 @@ main(int argc, char **argv) {
if (argc == 1)
usage();
isc_mem_create(0, 0, &mctx);
result = isc_mem_create(0, 0, &mctx);
if (result != ISC_R_SUCCESS)
fatal("out of memory");
#if USE_PKCS11
pk11_result_register();
+1 -1
View File
@@ -166,7 +166,7 @@ main(int argc, char **argv) {
if (argc == 1)
usage();
isc_mem_create(0, 0, &mctx);
RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
#if USE_PKCS11
pk11_result_register();
+2 -2
View File
@@ -274,7 +274,7 @@ main(int argc, char **argv) {
}
isc_commandline_reset = true;
isc_mem_create(0, 0, &mctx);
RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
isc_stdtime_get(&now);
@@ -308,7 +308,7 @@ main(int argc, char **argv) {
case 'e':
fprintf(stderr,
"phased-out option -e "
"(was 'use (RSA) large exponent')\n");
"(was 'use (RSA) large exponent)\n");
break;
case 'f':
c = (unsigned char)(isc_commandline_argument[0]);
+3 -1
View File
@@ -91,7 +91,9 @@ main(int argc, char **argv) {
if (argc == 1)
usage();
isc_mem_create(0, 0, &mctx);
result = isc_mem_create(0, 0, &mctx);
if (result != ISC_R_SUCCESS)
fatal("Out of memory");
#if HAVE_PKCS11
pk11_result_register();
+3 -1
View File
@@ -170,7 +170,9 @@ main(int argc, char **argv) {
if (argc == 1)
usage();
isc_mem_create(0, 0, &mctx);
result = isc_mem_create(0, 0, &mctx);
if (result != ISC_R_SUCCESS)
fatal("Out of memory");
setup_logging(mctx, &log);
+13 -6
View File
@@ -232,7 +232,8 @@ dumpnode(dns_name_t *name, dns_dbnode_t *node) {
dns_rdataset_init(&rds);
isc_buffer_allocate(mctx, &buffer, bufsize);
result = isc_buffer_allocate(mctx, &buffer, bufsize);
check_result(result, "isc_buffer_allocate");
for (result = dns_rdatasetiter_first(iter);
result == ISC_R_SUCCESS;
@@ -257,7 +258,8 @@ dumpnode(dns_name_t *name, dns_dbnode_t *node) {
bufsize <<= 1;
isc_buffer_free(&buffer);
isc_buffer_allocate(mctx, &buffer, bufsize);
result = isc_buffer_allocate(mctx, &buffer, bufsize);
check_result(result, "isc_buffer_allocate");
}
check_result(result, "dns_master_rdatasettotext");
@@ -3275,7 +3277,9 @@ main(int argc, char *argv[]) {
check_result(isc_app_start(), "isc_app_start");
isc_mem_create(0, 0, &mctx);
result = isc_mem_create(0, 0, &mctx);
if (result != ISC_R_SUCCESS)
fatal("out of memory");
#if USE_PKCS11
pk11_result_register();
@@ -3706,7 +3710,10 @@ main(int argc, char *argv[]) {
* of keys rather early.
*/
ISC_LIST_INIT(keylist);
isc_rwlock_init(&keylist_lock, 0, 0);
result = isc_rwlock_init(&keylist_lock, 0, 0);
if (result != ISC_R_SUCCESS)
fatal("could not initialize keylist_lock: %s",
isc_result_totext(result));
/*
* Fill keylist with:
@@ -3868,9 +3875,9 @@ main(int argc, char *argv[]) {
isc_result_totext(result));
}
isc_mutex_init(&namelock);
RUNTIME_CHECK(isc_mutex_init(&namelock) == ISC_R_SUCCESS);
if (printstats)
isc_mutex_init(&statslock);
RUNTIME_CHECK(isc_mutex_init(&statslock) == ISC_R_SUCCESS);
presign();
TIME_NOW(&sign_start);
+3 -1
View File
@@ -201,7 +201,9 @@ main(int argc, char *argv[]) {
isc_commandline_reset = true;
check_result(isc_app_start(), "isc_app_start");
isc_mem_create(0, 0, &mctx);
result = isc_mem_create(0, 0, &mctx);
if (result != ISC_R_SUCCESS)
fatal("out of memory");
#if USE_PKCS11
pk11_result_register();
+3 -1
View File
@@ -802,8 +802,10 @@ named_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
dns_rootname, 0, NULL);
if (result != ISC_R_SUCCESS)
goto cleanup;
dns_name_dup(dns_fixedname_name(&fname), mctx,
result = dns_name_dup(dns_fixedname_name(&fname), mctx,
keys[i - 1]);
if (result != ISC_R_SUCCESS)
goto cleanup;
}
if (pushed != 0) {
pushed--;
+6 -2
View File
@@ -100,11 +100,15 @@ named_control_docommand(isccc_sexpr_t *message, bool readonly,
return (result);
}
isc_lex_create(named_g_mctx, strlen(cmdline), &lex);
result = isc_lex_create(named_g_mctx, strlen(cmdline), &lex);
if (result != ISC_R_SUCCESS)
return (result);
isc_buffer_init(&src, cmdline, strlen(cmdline));
isc_buffer_add(&src, strlen(cmdline));
isc_lex_openbuffer(lex, &src);
result = isc_lex_openbuffer(lex, &src);
if (result != ISC_R_SUCCESS)
goto cleanup;
result = getcommand(lex, &command);
if (result != ISC_R_SUCCESS)
+8 -6
View File
@@ -448,7 +448,9 @@ control_recvmessage(isc_task_t *task, isc_event_t *event) {
goto cleanup_request;
}
isc_buffer_allocate(listener->mctx, &text, 2 * 2048);
result = isc_buffer_allocate(listener->mctx, &text, 2 * 2048);
if (result != ISC_R_SUCCESS)
goto cleanup_request;
/*
* Establish nonce.
@@ -494,8 +496,10 @@ control_recvmessage(isc_task_t *task, isc_event_t *event) {
goto cleanup_response;
if (conn->buffer == NULL) {
isc_buffer_allocate(listener->mctx,
result = isc_buffer_allocate(listener->mctx,
&conn->buffer, 2 * 2048);
if (result != ISC_R_SUCCESS)
goto cleanup_response;
}
isc_buffer_clear(conn->buffer);
@@ -1057,8 +1061,7 @@ update_listener(named_controls_t *cp, controllistener_t **listenerp,
aclconfctx, listener->mctx, 0,
&new_acl);
} else {
dns_acl_any(listener->mctx, &new_acl);
result = ISC_R_SUCCESS;
result = dns_acl_any(listener->mctx, &new_acl);
}
if (control != NULL) {
@@ -1155,8 +1158,7 @@ add_listener(named_controls_t *cp, controllistener_t **listenerp,
aclconfctx, mctx, 0,
&new_acl);
} else {
dns_acl_any(mctx, &new_acl);
result = ISC_R_SUCCESS;
result = dns_acl_any(mctx, &new_acl);
}
}
+43 -38
View File
@@ -122,17 +122,14 @@ static int maxudp = 0;
*/
static bool clienttest = false;
static bool dropedns = false;
static bool ednsformerr = false;
static bool ednsnotimp = false;
static bool ednsrefused = false;
static bool fixedlocal = false;
static bool noaa = false;
static bool noedns = false;
static bool nonearest = false;
static bool nosoa = false;
static bool notcp = false;
static bool sigvalinsecs = false;
static bool noaa = false;
static unsigned int delay = 0;
static bool nonearest = false;
static bool notcp = false;
static bool fixedlocal = false;
static bool sigvalinsecs = false;
/*
* -4 and -6
@@ -491,12 +488,6 @@ parse_T_opt(char *option) {
dropedns = true;
} else if (!strncmp(option, "dscp=", 5)) {
isc_dscp_check_value = atoi(option + 5);
} else if (!strcmp(option, "ednsformerr")) {
ednsformerr = true;
} else if (!strcmp(option, "ednsnotimp")) {
ednsnotimp = true;
} else if (!strcmp(option, "ednsrefused")) {
ednsrefused = true;
} else if (!strcmp(option, "fixedlocal")) {
fixedlocal = true;
} else if (!strcmp(option, "keepstderr")) {
@@ -556,7 +547,7 @@ parse_T_opt(char *option) {
} else if (!strncmp(option, "tat=", 4)) {
named_g_tat_interval = atoi(option + 4);
} else {
fprintf(stderr, "unknown -T flag '%s'\n", option);
fprintf(stderr, "unknown -T flag '%s\n", option);
}
}
@@ -815,7 +806,14 @@ create_managers(void) {
return (ISC_R_UNEXPECTED);
}
isc_timermgr_create(named_g_mctx, &named_g_timermgr);
result = isc_timermgr_create(named_g_mctx, &named_g_timermgr);
if (result != ISC_R_SUCCESS) {
UNEXPECTED_ERROR(__FILE__, __LINE__,
"isc_timermgr_create() failed: %s",
isc_result_totext(result));
return (ISC_R_UNEXPECTED);
}
result = isc_socketmgr_create2(named_g_mctx, &named_g_socketmgr,
maxsocks);
if (result != ISC_R_SUCCESS) {
@@ -824,7 +822,7 @@ create_managers(void) {
isc_result_totext(result));
return (ISC_R_UNEXPECTED);
}
isc_socketmgr_maxudp(named_g_socketmgr, maxudp);
isc__socketmgr_maxudp(named_g_socketmgr, maxudp);
result = isc_socketmgr_getmaxsockets(named_g_socketmgr, &socks);
if (result == ISC_R_SUCCESS) {
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
@@ -1037,6 +1035,16 @@ setup(void) {
NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
"linked to zlib version: %s", zlibVersion());
#endif
#ifdef ISC_PLATFORM_USETHREADS
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
"threads support is enabled");
#else
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
"threads support is disabled");
#endif
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
"----------------------------------------------------");
@@ -1151,30 +1159,24 @@ setup(void) {
*/
if (clienttest)
ns_server_setoption(sctx, NS_SERVER_CLIENTTEST, true);
if (dropedns)
ns_server_setoption(sctx, NS_SERVER_DROPEDNS, true);
if (noedns)
ns_server_setoption(sctx, NS_SERVER_NOEDNS, true);
if (nosoa)
ns_server_setoption(sctx, NS_SERVER_NOSOA, true);
if (noaa)
ns_server_setoption(sctx, NS_SERVER_NOAA, true);
if (nonearest)
ns_server_setoption(sctx, NS_SERVER_NONEAREST, true);
if (notcp)
ns_server_setoption(sctx, NS_SERVER_NOTCP, true);
if (fixedlocal)
ns_server_setoption(sctx, NS_SERVER_FIXEDLOCAL, true);
if (disable4)
ns_server_setoption(sctx, NS_SERVER_DISABLE4, true);
if (disable6)
ns_server_setoption(sctx, NS_SERVER_DISABLE6, true);
if (dropedns)
ns_server_setoption(sctx, NS_SERVER_DROPEDNS, true);
if (ednsformerr) /* STD13 server */
ns_server_setoption(sctx, NS_SERVER_EDNSFORMERR, true);
if (ednsnotimp)
ns_server_setoption(sctx, NS_SERVER_EDNSNOTIMP, true);
if (ednsrefused)
ns_server_setoption(sctx, NS_SERVER_EDNSREFUSED, true);
if (fixedlocal)
ns_server_setoption(sctx, NS_SERVER_FIXEDLOCAL, true);
if (noaa)
ns_server_setoption(sctx, NS_SERVER_NOAA, true);
if (noedns)
ns_server_setoption(sctx, NS_SERVER_NOEDNS, true);
if (nonearest)
ns_server_setoption(sctx, NS_SERVER_NONEAREST, true);
if (nosoa)
ns_server_setoption(sctx, NS_SERVER_NOSOA, true);
if (notcp)
ns_server_setoption(sctx, NS_SERVER_NOTCP, true);
if (sigvalinsecs)
ns_server_setoption(sctx, NS_SERVER_SIGVALINSECS, true);
@@ -1380,7 +1382,10 @@ main(int argc, char *argv[]) {
named_g_chrootdir);
}
isc_mem_create(0, 0, &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);
setup();
+24 -24
View File
@@ -10,12 +10,12 @@
.\" Title: named.conf
.\" Author:
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
.\" Date: 2018-06-21
.\" Date: 2018-05-29
.\" Manual: BIND9
.\" Source: ISC
.\" Language: English
.\"
.TH "NAMED\&.CONF" "5" "2018\-06\-21" "ISC" "BIND9"
.TH "NAMED\&.CONF" "5" "2018\-05\-29" "ISC" "BIND9"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -231,9 +231,9 @@ options {
coresize ( default | unlimited | \fIsizeval\fR );
datasize ( default | unlimited | \fIsizeval\fR );
deny\-answer\-addresses { \fIaddress_match_element\fR; \&.\&.\&. } [
except\-from { \fIstring\fR; \&.\&.\&. } ];
deny\-answer\-aliases { \fIstring\fR; \&.\&.\&. } [ except\-from { \fIstring\fR; \&.\&.\&.
} ];
except\-from { \fIquoted_string\fR; \&.\&.\&. } ];
deny\-answer\-aliases { \fIquoted_string\fR; \&.\&.\&. } [ except\-from {
\fIquoted_string\fR; \&.\&.\&. } ];
dialup ( notify | notify\-passive | passive | refresh | \fIboolean\fR );
directory \fIquoted_string\fR;
disable\-algorithms \fIstring\fR { \fIstring\fR;
@@ -264,12 +264,14 @@ options {
dnssec\-secure\-to\-insecure \fIboolean\fR;
dnssec\-update\-mode ( maintain | no\-resign );
dnssec\-validation ( yes | no | auto );
dnstap { ( all | auth | client | forwarder | resolver ) [ ( query |
response ) ]; \&.\&.\&. };
dnstap\-identity ( \fIquoted_string\fR | none | hostname );
dnstap\-output ( file | unix ) \fIquoted_string\fR [ size ( unlimited |
\fIsize\fR ) ] [ versions ( unlimited | \fIinteger\fR ) ] [ suffix (
increment | timestamp ) ];
dnstap { ( all | auth | client | forwarder |
resolver ) [ ( query | response ) ]; \&.\&.\&. };
dnstap\-identity ( \fIquoted_string\fR | none |
hostname );
dnstap\-output ( file | unix ) \fIquoted_string\fR [
size ( unlimited | \fIsize\fR ) ] [ versions (
unlimited | \fIinteger\fR ) ] [ suffix ( increment
| timestamp ) ];
dnstap\-version ( \fIquoted_string\fR | none );
dscp \fIinteger\fR;
dual\-stack\-servers [ port \fIinteger\fR ] { ( \fIquoted_string\fR [ port
@@ -367,7 +369,7 @@ options {
preferred\-glue \fIstring\fR;
prefetch \fIinteger\fR [ \fIinteger\fR ];
provide\-ixfr \fIboolean\fR;
qname\-minimization ( strict | relaxed | disabled | off );
qname\-minimization ( strict | relaxed | disabled );
query\-source ( ( [ address ] ( \fIipv4_address\fR | * ) [ port (
\fIinteger\fR | * ) ] ) | ( [ [ address ] ( \fIipv4_address\fR | * ) ]
port ( \fIinteger\fR | * ) ) ) [ dscp \fIinteger\fR ];
@@ -418,7 +420,7 @@ options {
nsip\-enable \fIboolean\fR ] [ nsdname\-enable \fIboolean\fR ] [
dnsrps\-enable \fIboolean\fR ] [ dnsrps\-options { \fIunspecified\-text\fR
} ];
root\-delegation\-only [ exclude { \fIstring\fR; \&.\&.\&. } ];
root\-delegation\-only [ exclude { \fIquoted_string\fR; \&.\&.\&. } ];
root\-key\-sentinel \fIboolean\fR;
rrset\-order { [ class \fIstring\fR ] [ type \fIstring\fR ] [ name
\fIquoted_string\fR ] \fIstring\fR \fIstring\fR; \&.\&.\&. };
@@ -468,7 +470,6 @@ options {
use\-v4\-udp\-ports { \fIportrange\fR; \&.\&.\&. };
use\-v6\-udp\-ports { \fIportrange\fR; \&.\&.\&. };
v6\-bias \fIinteger\fR;
validate\-except { \fIstring\fR; \&.\&.\&. };
version ( \fIquoted_string\fR | none );
zero\-no\-soa\-ttl \fIboolean\fR;
zero\-no\-soa\-ttl\-cache \fIboolean\fR;
@@ -596,9 +597,9 @@ view \fIstring\fR [ \fIclass\fR ] {
cleaning\-interval \fIinteger\fR;
clients\-per\-query \fIinteger\fR;
deny\-answer\-addresses { \fIaddress_match_element\fR; \&.\&.\&. } [
except\-from { \fIstring\fR; \&.\&.\&. } ];
deny\-answer\-aliases { \fIstring\fR; \&.\&.\&. } [ except\-from { \fIstring\fR; \&.\&.\&.
} ];
except\-from { \fIquoted_string\fR; \&.\&.\&. } ];
deny\-answer\-aliases { \fIquoted_string\fR; \&.\&.\&. } [ except\-from {
\fIquoted_string\fR; \&.\&.\&. } ];
dialup ( notify | notify\-passive | passive | refresh | \fIboolean\fR );
disable\-algorithms \fIstring\fR { \fIstring\fR;
\&.\&.\&. };
@@ -632,8 +633,8 @@ view \fIstring\fR [ \fIclass\fR ] {
dnssec\-secure\-to\-insecure \fIboolean\fR;
dnssec\-update\-mode ( maintain | no\-resign );
dnssec\-validation ( yes | no | auto );
dnstap { ( all | auth | client | forwarder | resolver ) [ ( query |
response ) ]; \&.\&.\&. };
dnstap { ( all | auth | client | forwarder |
resolver ) [ ( query | response ) ]; \&.\&.\&. };
dual\-stack\-servers [ port \fIinteger\fR ] { ( \fIquoted_string\fR [ port
\fIinteger\fR ] [ dscp \fIinteger\fR ] | \fIipv4_address\fR [ port
\fIinteger\fR ] [ dscp \fIinteger\fR ] | \fIipv6_address\fR [ port
@@ -711,7 +712,7 @@ view \fIstring\fR [ \fIclass\fR ] {
preferred\-glue \fIstring\fR;
prefetch \fIinteger\fR [ \fIinteger\fR ];
provide\-ixfr \fIboolean\fR;
qname\-minimization ( strict | relaxed | disabled | off );
qname\-minimization ( strict | relaxed | disabled );
query\-source ( ( [ address ] ( \fIipv4_address\fR | * ) [ port (
\fIinteger\fR | * ) ] ) | ( [ [ address ] ( \fIipv4_address\fR | * ) ]
port ( \fIinteger\fR | * ) ) ) [ dscp \fIinteger\fR ];
@@ -757,7 +758,7 @@ view \fIstring\fR [ \fIclass\fR ] {
nsip\-enable \fIboolean\fR ] [ nsdname\-enable \fIboolean\fR ] [
dnsrps\-enable \fIboolean\fR ] [ dnsrps\-options { \fIunspecified\-text\fR
} ];
root\-delegation\-only [ exclude { \fIstring\fR; \&.\&.\&. } ];
root\-delegation\-only [ exclude { \fIquoted_string\fR; \&.\&.\&. } ];
root\-key\-sentinel \fIboolean\fR;
rrset\-order { [ class \fIstring\fR ] [ type \fIstring\fR ] [ name
\fIquoted_string\fR ] \fIstring\fR \fIstring\fR; \&.\&.\&. };
@@ -819,7 +820,6 @@ view \fIstring\fR [ \fIclass\fR ] {
update\-check\-ksk \fIboolean\fR;
use\-alt\-transfer\-source \fIboolean\fR;
v6\-bias \fIinteger\fR;
validate\-except { \fIstring\fR; \&.\&.\&. };
zero\-no\-soa\-ttl \fIboolean\fR;
zero\-no\-soa\-ttl\-cache \fIboolean\fR;
zone \fIstring\fR [ \fIclass\fR ] {
@@ -901,7 +901,7 @@ view \fIstring\fR [ \fIclass\fR ] {
serial\-update\-method ( date | increment | unixtime );
server\-addresses { ( \fIipv4_address\fR | \fIipv6_address\fR ) [
port \fIinteger\fR ]; \&.\&.\&. };
server\-names { \fIstring\fR; \&.\&.\&. };
server\-names { \fIquoted_string\fR; \&.\&.\&. };
sig\-signing\-nodes \fIinteger\fR;
sig\-signing\-signatures \fIinteger\fR;
sig\-signing\-type \fIinteger\fR;
@@ -1009,7 +1009,7 @@ zone \fIstring\fR [ \fIclass\fR ] {
serial\-update\-method ( date | increment | unixtime );
server\-addresses { ( \fIipv4_address\fR | \fIipv6_address\fR ) [ port
\fIinteger\fR ]; \&.\&.\&. };
server\-names { \fIstring\fR; \&.\&.\&. };
server\-names { \fIquoted_string\fR; \&.\&.\&. };
sig\-signing\-nodes \fIinteger\fR;
sig\-signing\-signatures \fIinteger\fR;
sig\-signing\-type \fIinteger\fR;
+22 -22
View File
@@ -212,9 +212,9 @@ options
coresize ( default | unlimited | <em class="replaceable"><code>sizeval</code></em> );<br>
datasize ( default | unlimited | <em class="replaceable"><code>sizeval</code></em> );<br>
deny-answer-addresses { <em class="replaceable"><code>address_match_element</code></em>; ... } [<br>
    except-from { <em class="replaceable"><code>string</code></em>; ... } ];<br>
deny-answer-aliases { <em class="replaceable"><code>string</code></em>; ... } [ except-from { <em class="replaceable"><code>string</code></em>; ...<br>
    } ];<br>
    except-from { <em class="replaceable"><code>quoted_string</code></em>; ... } ];<br>
deny-answer-aliases { <em class="replaceable"><code>quoted_string</code></em>; ... } [ except-from {<br>
    <em class="replaceable"><code>quoted_string</code></em>; ... } ];<br>
dialup ( notify | notify-passive | passive | refresh | <em class="replaceable"><code>boolean</code></em> );<br>
directory <em class="replaceable"><code>quoted_string</code></em>;<br>
disable-algorithms <em class="replaceable"><code>string</code></em> { <em class="replaceable"><code>string</code></em>;<br>
@@ -245,12 +245,14 @@ options
dnssec-secure-to-insecure <em class="replaceable"><code>boolean</code></em>;<br>
dnssec-update-mode ( maintain | no-resign );<br>
dnssec-validation ( yes | no | auto );<br>
dnstap { ( all | auth | client | forwarder | resolver ) [ ( query |<br>
    response ) ]; ... };<br>
dnstap-identity ( <em class="replaceable"><code>quoted_string</code></em> | none | hostname );<br>
dnstap-output ( file | unix ) <em class="replaceable"><code>quoted_string</code></em> [ size ( unlimited |<br>
    <em class="replaceable"><code>size</code></em> ) ] [ versions ( unlimited | <em class="replaceable"><code>integer</code></em> ) ] [ suffix (<br>
    increment | timestamp ) ];<br>
dnstap { ( all | auth | client | forwarder |<br>
    resolver ) [ ( query | response ) ]; ... };<br>
dnstap-identity ( <em class="replaceable"><code>quoted_string</code></em> | none |<br>
    hostname );<br>
dnstap-output ( file | unix ) <em class="replaceable"><code>quoted_string</code></em> [<br>
    size ( unlimited | <em class="replaceable"><code>size</code></em> ) ] [ versions (<br>
    unlimited | <em class="replaceable"><code>integer</code></em> ) ] [ suffix ( increment<br>
    | timestamp ) ];<br>
dnstap-version ( <em class="replaceable"><code>quoted_string</code></em> | none );<br>
dscp <em class="replaceable"><code>integer</code></em>;<br>
dual-stack-servers [ port <em class="replaceable"><code>integer</code></em> ] { ( <em class="replaceable"><code>quoted_string</code></em> [ port<br>
@@ -348,7 +350,7 @@ options
preferred-glue <em class="replaceable"><code>string</code></em>;<br>
prefetch <em class="replaceable"><code>integer</code></em> [ <em class="replaceable"><code>integer</code></em> ];<br>
provide-ixfr <em class="replaceable"><code>boolean</code></em>;<br>
qname-minimization ( strict | relaxed | disabled | off );<br>
qname-minimization ( strict | relaxed | disabled );<br>
query-source ( ( [ address ] ( <em class="replaceable"><code>ipv4_address</code></em> | * ) [ port (<br>
    <em class="replaceable"><code>integer</code></em> | * ) ] ) | ( [ [ address ] ( <em class="replaceable"><code>ipv4_address</code></em> | * ) ]<br>
    port ( <em class="replaceable"><code>integer</code></em> | * ) ) ) [ dscp <em class="replaceable"><code>integer</code></em> ];<br>
@@ -399,7 +401,7 @@ options
    nsip-enable <em class="replaceable"><code>boolean</code></em> ] [ nsdname-enable <em class="replaceable"><code>boolean</code></em> ] [<br>
    dnsrps-enable <em class="replaceable"><code>boolean</code></em> ] [ dnsrps-options { <em class="replaceable"><code>unspecified-text</code></em><br>
    } ];<br>
root-delegation-only [ exclude { <em class="replaceable"><code>string</code></em>; ... } ];<br>
root-delegation-only [ exclude { <em class="replaceable"><code>quoted_string</code></em>; ... } ];<br>
root-key-sentinel <em class="replaceable"><code>boolean</code></em>;<br>
rrset-order { [ class <em class="replaceable"><code>string</code></em> ] [ type <em class="replaceable"><code>string</code></em> ] [ name<br>
    <em class="replaceable"><code>quoted_string</code></em> ] <em class="replaceable"><code>string</code></em> <em class="replaceable"><code>string</code></em>; ... };<br>
@@ -449,7 +451,6 @@ options
use-v4-udp-ports { <em class="replaceable"><code>portrange</code></em>; ... };<br>
use-v6-udp-ports { <em class="replaceable"><code>portrange</code></em>; ... };<br>
v6-bias <em class="replaceable"><code>integer</code></em>;<br>
validate-except { <em class="replaceable"><code>string</code></em>; ... };<br>
version ( <em class="replaceable"><code>quoted_string</code></em> | none );<br>
zero-no-soa-ttl <em class="replaceable"><code>boolean</code></em>;<br>
zero-no-soa-ttl-cache <em class="replaceable"><code>boolean</code></em>;<br>
@@ -565,9 +566,9 @@ view
cleaning-interval <em class="replaceable"><code>integer</code></em>;<br>
clients-per-query <em class="replaceable"><code>integer</code></em>;<br>
deny-answer-addresses { <em class="replaceable"><code>address_match_element</code></em>; ... } [<br>
    except-from { <em class="replaceable"><code>string</code></em>; ... } ];<br>
deny-answer-aliases { <em class="replaceable"><code>string</code></em>; ... } [ except-from { <em class="replaceable"><code>string</code></em>; ...<br>
    } ];<br>
    except-from { <em class="replaceable"><code>quoted_string</code></em>; ... } ];<br>
deny-answer-aliases { <em class="replaceable"><code>quoted_string</code></em>; ... } [ except-from {<br>
    <em class="replaceable"><code>quoted_string</code></em>; ... } ];<br>
dialup ( notify | notify-passive | passive | refresh | <em class="replaceable"><code>boolean</code></em> );<br>
disable-algorithms <em class="replaceable"><code>string</code></em> { <em class="replaceable"><code>string</code></em>;<br>
    ... };<br>
@@ -601,8 +602,8 @@ view
dnssec-secure-to-insecure <em class="replaceable"><code>boolean</code></em>;<br>
dnssec-update-mode ( maintain | no-resign );<br>
dnssec-validation ( yes | no | auto );<br>
dnstap { ( all | auth | client | forwarder | resolver ) [ ( query |<br>
    response ) ]; ... };<br>
dnstap { ( all | auth | client | forwarder |<br>
    resolver ) [ ( query | response ) ]; ... };<br>
dual-stack-servers [ port <em class="replaceable"><code>integer</code></em> ] { ( <em class="replaceable"><code>quoted_string</code></em> [ port<br>
    <em class="replaceable"><code>integer</code></em> ] [ dscp <em class="replaceable"><code>integer</code></em> ] | <em class="replaceable"><code>ipv4_address</code></em> [ port<br>
    <em class="replaceable"><code>integer</code></em> ] [ dscp <em class="replaceable"><code>integer</code></em> ] | <em class="replaceable"><code>ipv6_address</code></em> [ port<br>
@@ -680,7 +681,7 @@ view
preferred-glue <em class="replaceable"><code>string</code></em>;<br>
prefetch <em class="replaceable"><code>integer</code></em> [ <em class="replaceable"><code>integer</code></em> ];<br>
provide-ixfr <em class="replaceable"><code>boolean</code></em>;<br>
qname-minimization ( strict | relaxed | disabled | off );<br>
qname-minimization ( strict | relaxed | disabled );<br>
query-source ( ( [ address ] ( <em class="replaceable"><code>ipv4_address</code></em> | * ) [ port (<br>
    <em class="replaceable"><code>integer</code></em> | * ) ] ) | ( [ [ address ] ( <em class="replaceable"><code>ipv4_address</code></em> | * ) ]<br>
    port ( <em class="replaceable"><code>integer</code></em> | * ) ) ) [ dscp <em class="replaceable"><code>integer</code></em> ];<br>
@@ -726,7 +727,7 @@ view
    nsip-enable <em class="replaceable"><code>boolean</code></em> ] [ nsdname-enable <em class="replaceable"><code>boolean</code></em> ] [<br>
    dnsrps-enable <em class="replaceable"><code>boolean</code></em> ] [ dnsrps-options { <em class="replaceable"><code>unspecified-text</code></em><br>
    } ];<br>
root-delegation-only [ exclude { <em class="replaceable"><code>string</code></em>; ... } ];<br>
root-delegation-only [ exclude { <em class="replaceable"><code>quoted_string</code></em>; ... } ];<br>
root-key-sentinel <em class="replaceable"><code>boolean</code></em>;<br>
rrset-order { [ class <em class="replaceable"><code>string</code></em> ] [ type <em class="replaceable"><code>string</code></em> ] [ name<br>
    <em class="replaceable"><code>quoted_string</code></em> ] <em class="replaceable"><code>string</code></em> <em class="replaceable"><code>string</code></em>; ... };<br>
@@ -788,7 +789,6 @@ view
update-check-ksk <em class="replaceable"><code>boolean</code></em>;<br>
use-alt-transfer-source <em class="replaceable"><code>boolean</code></em>;<br>
v6-bias <em class="replaceable"><code>integer</code></em>;<br>
validate-except { <em class="replaceable"><code>string</code></em>; ... };<br>
zero-no-soa-ttl <em class="replaceable"><code>boolean</code></em>;<br>
zero-no-soa-ttl-cache <em class="replaceable"><code>boolean</code></em>;<br>
zone <em class="replaceable"><code>string</code></em> [ <em class="replaceable"><code>class</code></em> ] {<br>
@@ -870,7 +870,7 @@ view
serial-update-method ( date | increment | unixtime );<br>
server-addresses { ( <em class="replaceable"><code>ipv4_address</code></em> | <em class="replaceable"><code>ipv6_address</code></em> ) [<br>
    port <em class="replaceable"><code>integer</code></em> ]; ... };<br>
server-names { <em class="replaceable"><code>string</code></em>; ... };<br>
server-names { <em class="replaceable"><code>quoted_string</code></em>; ... };<br>
sig-signing-nodes <em class="replaceable"><code>integer</code></em>;<br>
sig-signing-signatures <em class="replaceable"><code>integer</code></em>;<br>
sig-signing-type <em class="replaceable"><code>integer</code></em>;<br>
@@ -975,7 +975,7 @@ zone
serial-update-method ( date | increment | unixtime );<br>
server-addresses { ( <em class="replaceable"><code>ipv4_address</code></em> | <em class="replaceable"><code>ipv6_address</code></em> ) [ port<br>
    <em class="replaceable"><code>integer</code></em> ]; ... };<br>
server-names { <em class="replaceable"><code>string</code></em>; ... };<br>
server-names { <em class="replaceable"><code>quoted_string</code></em>; ... };<br>
sig-signing-nodes <em class="replaceable"><code>integer</code></em>;<br>
sig-signing-signatures <em class="replaceable"><code>integer</code></em>;<br>
sig-signing-type <em class="replaceable"><code>integer</code></em>;<br>
+112 -161
View File
@@ -656,7 +656,9 @@ configure_view_nametable(const cfg_obj_t *vconfig, const cfg_obj_t *config,
return (ISC_R_SUCCESS);
}
dns_rbt_create(mctx, NULL, NULL, rbtp);
result = dns_rbt_create(mctx, NULL, NULL, rbtp);
if (result != ISC_R_SUCCESS)
return (result);
name = dns_fixedname_initname(&fixed);
for (element = cfg_list_first(obj);
@@ -936,8 +938,7 @@ configure_view_dnsseckeys(dns_view_t *view, const cfg_obj_t *vconfig,
/* We don't need trust anchors for the _bind view */
if (strcmp(view->name, "_bind") == 0 &&
view->rdclass == dns_rdataclass_chaos)
{
view->rdclass == dns_rdataclass_chaos) {
return (ISC_R_SUCCESS);
}
@@ -964,7 +965,13 @@ configure_view_dnsseckeys(dns_view_t *view, const cfg_obj_t *vconfig,
maps[i++] = named_g_defaults;
maps[i] = NULL;
dns_view_initsecroots(view, mctx);
result = dns_view_initsecroots(view, mctx);
if (result != ISC_R_SUCCESS) {
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
"couldn't create keytable");
return (ISC_R_UNEXPECTED);
}
result = dns_view_initntatable(view, named_g_taskmgr, named_g_timermgr);
if (result != ISC_R_SUCCESS) {
@@ -1669,8 +1676,10 @@ setquerystats(dns_zone_t *zone, isc_mem_t *mctx, dns_zonestat_level_t level) {
zoneqrystats = NULL;
if (level == dns_zonestat_full) {
isc_stats_create(mctx, &zoneqrystats,
result = isc_stats_create(mctx, &zoneqrystats,
ns_statscounter_max);
if (result != ISC_R_SUCCESS)
return (result);
}
dns_zone_setrequeststats(zone, zoneqrystats);
if (zoneqrystats != NULL)
@@ -2826,7 +2835,13 @@ configure_catz_zone(dns_view_t *view, const cfg_obj_t *config,
* We have to walk through all the member zones and attach
* them to current view
*/
dns_catz_get_iterator(zone, &it);
result = dns_catz_get_iterator(zone, &it);
if (result != ISC_R_SUCCESS) {
cfg_obj_log(catz_obj, named_g_lctx,
DNS_CATZ_ERROR_LEVEL,
"catz: unable to create iterator");
goto cleanup;
}
for (result = isc_ht_iter_first(it);
result == ISC_R_SUCCESS;
@@ -2922,9 +2937,9 @@ configure_catz(dns_view_t *view, const cfg_obj_t *config,
if (zone_element == NULL)
return (ISC_R_SUCCESS);
dns_catz_new_zones(&view->catzs, &ns_catz_zonemodmethods,
CHECK(dns_catz_new_zones(&view->catzs, &ns_catz_zonemodmethods,
view->mctx, named_g_taskmgr,
named_g_timermgr);
named_g_timermgr));
result = dns_viewlist_find(&named_g_server->viewlist, view->name,
view->rdclass, &pview);
@@ -3001,7 +3016,9 @@ configure_rrl(dns_view_t *view, const cfg_obj_t *config, const cfg_obj_t *map) {
if (min_entries < 1)
min_entries = 1;
}
dns_rrl_init(&rrl, view, min_entries);
result = dns_rrl_init(&rrl, view, min_entries);
if (result != ISC_R_SUCCESS)
return (result);
i = ISC_MAX(20000, min_entries);
obj = NULL;
@@ -3585,18 +3602,24 @@ configure_dnstap(const cfg_obj_t **maps, dns_view_t *view) {
}
#endif /* HAVE_DNSTAP */
static void
static isc_result_t
create_mapped_acl(void) {
isc_result_t result;
dns_acl_t *acl = NULL;
struct in6_addr in6 = IN6ADDR_V4MAPPED_INIT;
isc_netaddr_t addr;
isc_netaddr_fromin6(&addr, &in6);
dns_acl_create(named_g_mctx, 1, &acl);
result = dns_acl_create(named_g_mctx, 1, &acl);
if (result != ISC_R_SUCCESS)
return (result);
dns_iptable_addprefix(acl->iptable, &addr, 96, true);
result = dns_iptable_addprefix(acl->iptable, &addr, 96, true);
if (result == ISC_R_SUCCESS)
dns_acl_attach(acl, &named_g_mapped);
dns_acl_detach(&acl);
return (result);
}
/*
@@ -3997,7 +4020,9 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
goto cleanup;
} else {
if (named_g_mapped == NULL) {
create_mapped_acl();
result = create_mapped_acl();
if (result != ISC_R_SUCCESS)
goto cleanup;
}
dns_acl_attach(named_g_mapped, &excluded);
}
@@ -4176,9 +4201,9 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
* cache, for the main cache memory and the heap
* memory.
*/
isc_mem_create(0, 0, &cmctx);
CHECK(isc_mem_create(0, 0, &cmctx));
isc_mem_setname(cmctx, "cache", NULL);
isc_mem_create(0, 0, &hmctx);
CHECK(isc_mem_create(0, 0, &hmctx));
isc_mem_setname(hmctx, "cache_heap", NULL);
CHECK(dns_cache_create(cmctx, hmctx, named_g_taskmgr,
named_g_timermgr, view->rdclass,
@@ -4244,20 +4269,20 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
}
if (resstats == NULL) {
isc_stats_create(mctx, &resstats,
dns_resstatscounter_max);
CHECK(isc_stats_create(mctx, &resstats,
dns_resstatscounter_max));
}
dns_view_setresstats(view, resstats);
if (resquerystats == NULL)
dns_rdatatypestats_create(mctx, &resquerystats);
CHECK(dns_rdatatypestats_create(mctx, &resquerystats));
dns_view_setresquerystats(view, resquerystats);
ndisp = 4 * ISC_MIN(named_g_udpdisp, MAX_UDP_DISPATCH);
dns_view_createresolver(view, named_g_taskmgr, RESOLVER_NTASKS,
CHECK(dns_view_createresolver(view, named_g_taskmgr, RESOLVER_NTASKS,
ndisp, named_g_socketmgr,
named_g_timermgr, resopts,
named_g_dispatchmgr,
dispatch4, dispatch6);
dispatch4, dispatch6));
if (dscp4 == -1)
dscp4 = named_g_dscp;
@@ -4682,12 +4707,14 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
INSIST(result == ISC_R_SUCCESS);
view->root_key_sentinel = cfg_obj_asboolean(obj);
CHECK(configure_view_acl(vconfig, config, named_g_config,
"allow-query-cache-on", NULL, actx,
named_g_mctx, &view->cacheonacl));
/*
* Set the "allow-query", "allow-query-cache", "allow-recursion",
* "allow-recursion-on" and "allow-query-cache-on" ACLs if
* configured in named.conf, but NOT from the global defaults.
* This is done by leaving the third argument to configure_view_acl()
* NULL.
* and "allow-recursion-on" ACLs if configured in named.conf, but
* NOT from the global defaults. This is done by leaving the third
* argument to configure_view_acl() NULL.
*
* We ignore the global defaults here because these ACLs
* can inherit from each other. If any are still unset after
@@ -4704,10 +4731,6 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
CHECK(configure_view_acl(vconfig, config, NULL,
"allow-query-cache", NULL, actx,
named_g_mctx, &view->cacheacl));
/* named.conf only */
CHECK(configure_view_acl(vconfig, config, NULL,
"allow-query-cache-on", NULL, actx,
named_g_mctx, &view->cacheonacl));
if (strcmp(view->name, "_bind") != 0 &&
view->rdclass != dns_rdataclass_chaos)
@@ -4726,6 +4749,8 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
/*
* "allow-query-cache" inherits from "allow-recursion" if set,
* otherwise from "allow-query" if set.
* "allow-recursion" inherits from "allow-query-cache" if set,
* otherwise from "allow-query" if set.
*/
if (view->cacheacl == NULL) {
if (view->recursionacl != NULL) {
@@ -4736,11 +4761,6 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
&view->cacheacl);
}
}
/*
* "allow-recursion" inherits from "allow-query-cache" if set,
* otherwise from "allow-query" if set.
*/
if (view->recursionacl == NULL) {
if (view->cacheacl != NULL) {
dns_acl_attach(view->cacheacl,
@@ -4752,32 +4772,10 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
}
/*
* "allow-query-cache-on" inherits from "allow-recursion-on"
* if set.
* If any are still unset, we now get default "allow-recursion",
* "allow-recursion-on" and "allow-query-cache" ACLs from
* the global config.
*/
if (view->cacheonacl == NULL) {
if (view->recursiononacl != NULL) {
dns_acl_attach(view->recursiononacl,
&view->cacheonacl);
}
}
/*
* "allow-recursion-on" inherits from "allow-query-cache-on"
* if set.
*/
if (view->recursiononacl == NULL) {
if (view->cacheonacl != NULL) {
dns_acl_attach(view->cacheonacl,
&view->recursiononacl);
}
}
/*
* If any are still unset at this point, we now get default
* values for from the global config.
*/
if (view->recursionacl == NULL) {
/* global default only */
CHECK(configure_view_acl(NULL, NULL, named_g_config,
@@ -4799,30 +4797,14 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
actx, named_g_mctx,
&view->cacheacl));
}
if (view->cacheonacl == NULL) {
/* global default only */
CHECK(configure_view_acl(NULL, NULL, named_g_config,
"allow-query-cache-on", NULL,
actx, named_g_mctx,
&view->cacheonacl));
}
} else {
} else if (view->cacheacl == NULL) {
/*
* We're not recursive; if the query-cache ACLs haven't
* been set at the options/view level, set them to none.
* We're not recursive; if "allow-query-cache" hasn't been
* set at the options/view level, set it to none.
*/
if (view->cacheacl == NULL) {
dns_acl_none(mctx, &view->cacheacl);
}
if (view->cacheonacl == NULL) {
dns_acl_none(mctx, &view->cacheonacl);
}
CHECK(dns_acl_none(mctx, &view->cacheacl));
}
/*
* Finished setting recursion and query-cache ACLs, so now we
* can get the allow-query default if it wasn't set in named.conf
*/
if (view->queryacl == NULL) {
/* global default only */
CHECK(configure_view_acl(NULL, NULL, named_g_config,
@@ -5170,7 +5152,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
CHECK(dns_name_fromstring(name,
cfg_obj_asstring(exclude),
0, NULL));
dns_view_excludedelegationonly(view, name);
CHECK(dns_view_excludedelegationonly(view, name));
}
} else
dns_view_setrootdelonly(view, false);
@@ -5932,7 +5914,7 @@ configure_zone(const cfg_obj_t *config, const cfg_obj_t *zconfig,
tresult = cfg_map_get(zoptions, "delegation-only",
&only);
if (tresult == ISC_R_SUCCESS && cfg_obj_asboolean(only))
dns_view_adddelegationonly(view, origin);
CHECK(dns_view_adddelegationonly(view, origin));
} else {
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,
@@ -5963,7 +5945,7 @@ configure_zone(const cfg_obj_t *config, const cfg_obj_t *zconfig,
only = NULL;
tresult = cfg_map_get(zoptions, "delegation-only", &only);
if (tresult == ISC_R_SUCCESS && cfg_obj_asboolean(only))
dns_view_adddelegationonly(view, origin);
CHECK(dns_view_adddelegationonly(view, origin));
goto cleanup;
}
@@ -5971,8 +5953,7 @@ configure_zone(const cfg_obj_t *config, const cfg_obj_t *zconfig,
* "delegation-only zones" aren't zones either.
*/
if (strcasecmp(ztypestr, "delegation-only") == 0) {
dns_view_adddelegationonly(view, origin);
result = ISC_R_SUCCESS;
result = dns_view_adddelegationonly(view, origin);
goto cleanup;
}
@@ -6127,7 +6108,7 @@ configure_zone(const cfg_obj_t *config, const cfg_obj_t *zconfig,
if (cfg_map_get(zoptions, "delegation-only", &only) == ISC_R_SUCCESS)
{
if (cfg_obj_asboolean(only))
dns_view_adddelegationonly(view, origin);
CHECK(dns_view_adddelegationonly(view, origin));
}
/*
@@ -6258,7 +6239,7 @@ add_keydata_zone(dns_view_t *view, const char *directory, isc_mem_t *mctx) {
CHECK(dns_zonemgr_managezone(named_g_server->zonemgr, zone));
dns_acl_none(mctx, &none);
CHECK(dns_acl_none(mctx, &none));
dns_zone_setqueryacl(zone, none);
dns_zone_setqueryonacl(zone, none);
dns_acl_detach(&none);
@@ -6367,10 +6348,14 @@ add_listenelt(isc_mem_t *mctx, ns_listenlist_t *list, isc_sockaddr_t *addr,
(wcardport_ok || isc_sockaddr_getport(addr) != 0)) {
isc_netaddr_fromin6(&netaddr, &addr->type.sin6.sin6_addr);
dns_acl_create(mctx, 0, &src_acl);
result = dns_acl_create(mctx, 0, &src_acl);
if (result != ISC_R_SUCCESS)
return (result);
dns_iptable_addprefix(src_acl->iptable, &netaddr,
result = dns_iptable_addprefix(src_acl->iptable, &netaddr,
128, true);
if (result != ISC_R_SUCCESS)
goto clean;
result = ns_listenelt_create(mctx, isc_sockaddr_getport(addr),
dscp, src_acl, &lelt);
@@ -7144,7 +7129,7 @@ configure_session_key(const cfg_obj_t **maps, named_server_t *server,
if (server->session_keyname == NULL)
goto cleanup;
dns_name_init(server->session_keyname, NULL);
dns_name_dup(keyname, mctx, server->session_keyname);
CHECK(dns_name_dup(keyname, mctx, server->session_keyname));
server->session_keyfile = isc_mem_strdup(mctx, keyfile);
if (server->session_keyfile == NULL)
@@ -8069,7 +8054,7 @@ load_configuration(const char *filename, named_server_t *server,
"less than 128 UDP sockets available after "
"applying 'reserved-sockets' and 'maxsockets'");
}
isc_socketmgr_setreserved(named_g_socketmgr, reserved);
isc__socketmgr_setreserved(named_g_socketmgr, reserved);
#ifdef HAVE_GEOIP
/*
@@ -8212,8 +8197,10 @@ load_configuration(const char *filename, named_server_t *server,
/*
* Configure sets of UDP query source ports.
*/
isc_portset_create(named_g_mctx, &v4portset);
isc_portset_create(named_g_mctx, &v6portset);
CHECKM(isc_portset_create(named_g_mctx, &v4portset),
"creating UDP port set");
CHECKM(isc_portset_create(named_g_mctx, &v6portset),
"creating UDP port set");
usev4ports = NULL;
usev6ports = NULL;
@@ -9274,7 +9261,8 @@ run_server(isc_task_t *task, isc_event_t *event) {
isc_event_free(&event);
dns_dispatchmgr_create(named_g_mctx, &named_g_dispatchmgr);
CHECKFATAL(dns_dispatchmgr_create(named_g_mctx, &named_g_dispatchmgr),
"creating dispatch manager");
dns_dispatchmgr_setstats(named_g_dispatchmgr, server->resolverstats);
@@ -9505,7 +9493,8 @@ named_server_create(isc_mem_t *mctx, named_server_t **serverp) {
&server->in_roothints),
"setting up root hints");
isc_mutex_init(&server->reload_event_lock);
CHECKFATAL(isc_mutex_init(&server->reload_event_lock),
"initializing reload event lock");
server->reload_event =
isc_event_allocate(named_g_mctx, server,
NAMED_EVENT_RELOAD,
@@ -9596,15 +9585,18 @@ named_server_create(isc_mem_t *mctx, named_server_t **serverp) {
server->zonestats = NULL;
server->resolverstats = NULL;
server->sockstats = NULL;
isc_stats_create(server->mctx, &server->sockstats,
isc_sockstatscounter_max);
CHECKFATAL(isc_stats_create(server->mctx, &server->sockstats,
isc_sockstatscounter_max),
"isc_stats_create");
isc_socketmgr_setstats(named_g_socketmgr, server->sockstats);
isc_stats_create(named_g_mctx, &server->zonestats,
dns_zonestatscounter_max);
CHECKFATAL(isc_stats_create(named_g_mctx, &server->zonestats,
dns_zonestatscounter_max),
"dns_stats_create (zone)");
isc_stats_create(named_g_mctx, &server->resolverstats,
dns_resstatscounter_max);
CHECKFATAL(isc_stats_create(named_g_mctx, &server->resolverstats,
dns_resstatscounter_max),
"dns_stats_create (resolver)");
server->flushonshutdown = false;
@@ -14239,7 +14231,6 @@ named_server_nta(named_server_t *server, isc_lex_t *lex,
dns_name_t *fname;
dns_ttl_t ntattl;
bool ttlset = false, excl = false;
dns_rdataclass_t rdclass = dns_rdataclass_in;
UNUSED(force);
@@ -14247,20 +14238,18 @@ named_server_nta(named_server_t *server, isc_lex_t *lex,
/* Skip the command name. */
ptr = next_token(lex, text);
if (ptr == NULL) {
if (ptr == NULL)
return (ISC_R_UNEXPECTEDEND);
}
for (;;) {
/* Check for options */
ptr = next_token(lex, text);
if (ptr == NULL) {
if (ptr == NULL)
return (ISC_R_UNEXPECTEDEND);
}
if (argcheck(ptr, "dump")) {
if (argcheck(ptr, "dump"))
dump = true;
} else if (argcheck(ptr, "remove")) {
else if (argcheck(ptr, "remove")) {
ntattl = 0;
ttlset = true;
} else if (argcheck(ptr, "force")) {
@@ -14290,22 +14279,8 @@ named_server_nta(named_server_t *server, isc_lex_t *lex,
ttlset = true;
continue;
} else if (argcheck(ptr, "class")) {
isc_textregion_t tr;
ptr = next_token(lex, text);
if (ptr == NULL) {
msg = "No class specified";
CHECK(ISC_R_UNEXPECTEDEND);
}
tr.base = ptr;
tr.length = strlen(ptr);
CHECK(dns_rdataclass_fromtext(&rdclass, &tr));
continue;
} else {
} else
nametext = ptr;
}
break;
}
@@ -14318,13 +14293,11 @@ named_server_nta(named_server_t *server, isc_lex_t *lex,
view != NULL;
view = ISC_LIST_NEXT(view, link))
{
if (ntatable != NULL) {
if (ntatable != NULL)
dns_ntatable_detach(&ntatable);
}
result = dns_view_getntatable(view, &ntatable);
if (result == ISC_R_NOTFOUND) {
if (result == ISC_R_NOTFOUND)
continue;
}
CHECK(dns_ntatable_totext(ntatable, text));
}
CHECK(putnull(text));
@@ -14341,19 +14314,17 @@ named_server_nta(named_server_t *server, isc_lex_t *lex,
}
/* Get the NTA name. */
if (nametext == NULL) {
if (nametext == NULL)
nametext = next_token(lex, text);
}
if (nametext == NULL) {
if (nametext == NULL)
return (ISC_R_UNEXPECTEDEND);
}
/* Copy nametext as it'll be overwritten by next_token() */
strlcpy(namebuf, nametext, DNS_NAME_FORMATSIZE);
if (strcmp(namebuf, ".") == 0) {
if (strcmp(namebuf, ".") == 0)
ntaname = dns_rootname;
} else {
else {
isc_buffer_t b;
isc_buffer_init(&b, namebuf, strlen(namebuf));
isc_buffer_add(&b, strlen(namebuf));
@@ -14373,27 +14344,18 @@ named_server_nta(named_server_t *server, isc_lex_t *lex,
view != NULL;
view = ISC_LIST_NEXT(view, link))
{
static bool first = true;
if (viewname != NULL && strcmp(view->name, viewname) != 0) {
if (viewname != NULL &&
strcmp(view->name, viewname) != 0)
continue;
}
if (view->rdclass != rdclass && rdclass != dns_rdataclass_any) {
if (view->nta_lifetime == 0)
continue;
}
if (view->nta_lifetime == 0) {
continue;
}
if (!ttlset) {
if (!ttlset)
ntattl = view->nta_lifetime;
}
if (ntatable != NULL) {
if (ntatable != NULL)
dns_ntatable_detach(&ntatable);
}
result = dns_view_getntatable(view, &ntatable);
if (result == ISC_R_NOTFOUND) {
@@ -14416,11 +14378,6 @@ named_server_nta(named_server_t *server, isc_lex_t *lex,
isc_time_set(&t, when, 0);
isc_time_formattimestamp(&t, tbuf, sizeof(tbuf));
if (!first) {
CHECK(putstr(text, "\n"));
}
first = false;
CHECK(putstr(text, "Negative trust anchor added: "));
CHECK(putstr(text, namebuf));
CHECK(putstr(text, "/"));
@@ -14435,11 +14392,6 @@ named_server_nta(named_server_t *server, isc_lex_t *lex,
} else {
CHECK(dns_ntatable_delete(ntatable, ntaname));
if (!first) {
CHECK(putstr(text, "\n"));
}
first = false;
CHECK(putstr(text, "Negative trust anchor removed: "));
CHECK(putstr(text, namebuf));
CHECK(putstr(text, "/"));
@@ -14459,21 +14411,20 @@ named_server_nta(named_server_t *server, isc_lex_t *lex,
"for view '%s': %s",
view->name, isc_result_totext(result));
}
}
CHECK(putnull(text));
CHECK(putnull(text));
}
cleanup:
if (msg != NULL) {
(void) putstr(text, msg);
(void) putnull(text);
}
if (excl) {
if (excl)
isc_task_endexclusive(server->task);
}
if (ntatable != NULL) {
if (ntatable != NULL)
dns_ntatable_detach(&ntatable);
}
return (result);
}
+10 -4
View File
@@ -3235,7 +3235,7 @@ add_listener(named_server_t *server, named_statschannel_t **listenerp,
isc_sockaddr_t *addr, cfg_aclconfctx_t *aclconfctx,
const char *socktext)
{
isc_result_t result = ISC_R_SUCCESS;
isc_result_t result;
named_statschannel_t *listener;
isc_task_t *task = NULL;
isc_socket_t *sock = NULL;
@@ -3243,6 +3243,8 @@ add_listener(named_server_t *server, named_statschannel_t **listenerp,
dns_acl_t *new_acl = NULL;
listener = isc_mem_get(server->mctx, sizeof(*listener));
if (listener == NULL)
return (ISC_R_NOMEMORY);
listener->httpdmgr = NULL;
listener->address = *addr;
@@ -3250,7 +3252,11 @@ add_listener(named_server_t *server, named_statschannel_t **listenerp,
listener->mctx = NULL;
ISC_LINK_INIT(listener, link);
isc_mutex_init(&listener->lock);
result = isc_mutex_init(&listener->lock);
if (result != ISC_R_SUCCESS) {
isc_mem_put(server->mctx, listener, sizeof(*listener));
return (ISC_R_FAILURE);
}
isc_mem_attach(server->mctx, &listener->mctx);
@@ -3260,7 +3266,7 @@ add_listener(named_server_t *server, named_statschannel_t **listenerp,
aclconfctx, listener->mctx, 0,
&new_acl);
} else
dns_acl_any(listener->mctx, &new_acl);
result = dns_acl_any(listener->mctx, &new_acl);
if (result != ISC_R_SUCCESS)
goto cleanup;
dns_acl_attach(new_acl, &listener->acl);
@@ -3388,7 +3394,7 @@ update_listener(named_server_t *server, named_statschannel_t **listenerp,
aclconfctx, listener->mctx, 0,
&new_acl);
} else
dns_acl_any(listener->mctx, &new_acl);
result = dns_acl_any(listener->mctx, &new_acl);
if (result == ISC_R_SUCCESS) {
LOCK(&listener->lock);
+1 -1
View File
@@ -91,7 +91,7 @@ named_tkeyctx_fromconfig(const cfg_obj_t *options, isc_mem_t *mctx,
goto failure;
}
dns_name_init(tctx->domain, NULL);
dns_name_dup(name, mctx, tctx->domain);
RETERR(dns_name_dup(name, mctx, tctx->domain));
}
obj = NULL;
+3 -1
View File
@@ -155,7 +155,9 @@ named_tsigkeyring_fromconfig(const cfg_obj_t *config, const cfg_obj_t *vconfig,
maps[i++] = cfg_tuple_get(vconfig, "options");
maps[i] = NULL;
dns_tsigkeyring_create(mctx, &ring);
result = dns_tsigkeyring_create(mctx, &ring);
if (result != ISC_R_SUCCESS)
return (result);
for (i = 0; ; i++) {
if (maps[i] == NULL)
+18 -3
View File
@@ -226,20 +226,35 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[],
return (ISC_R_FAILURE);
}
isc_mem_create(0, 0, &mctx);
result = isc_mem_create(0, 0, &mctx);
if (result != ISC_R_SUCCESS)
return (result);
cd = isc_mem_get(mctx, sizeof(*cd));
if (cd == NULL) {
isc_mem_destroy(&mctx);
return (ISC_R_NOMEMORY);
}
memset(cd, 0, sizeof(*cd));
cd->mctx = mctx;
cd->dl_path = isc_mem_strdup(cd->mctx, argv[1]);
if (cd->dl_path == NULL) {
result = ISC_R_NOMEMORY;
goto failed;
}
cd->dlzname = isc_mem_strdup(cd->mctx, dlzname);
if (cd->dlzname == NULL) {
result = ISC_R_NOMEMORY;
goto failed;
}
/* Initialize the lock */
isc_mutex_init(&cd->lock);
result = isc_mutex_init(&cd->lock);
if (result != ISC_R_SUCCESS)
goto failed;
/* Open the library */
dlopen_flags = RTLD_NOW|RTLD_GLOBAL;
+114 -8
View File
@@ -59,6 +59,54 @@ static int singletonfd = -1;
#define ISC_FACILITY LOG_DAEMON
#endif
/*
* If there's no <sys/capability.h>, we don't care about <sys/prctl.h>
*/
#ifndef HAVE_SYS_CAPABILITY_H
#undef HAVE_SYS_PRCTL_H
#endif
/*
* Linux defines:
* (T) HAVE_LINUXTHREADS
* (C) HAVE_SYS_CAPABILITY_H
* (P) HAVE_SYS_PRCTL_H
* The possible cases are:
* none: setuid() normally
* T: no setuid()
* C: setuid() normally, drop caps (keep CAP_SETUID)
* T+C: no setuid(), drop caps (don't keep CAP_SETUID)
* T+C+P: setuid() early, drop caps (keep CAP_SETUID)
* C+P: setuid() normally, drop caps (keep CAP_SETUID)
* P: not possible
* T+P: not possible
*
* if (C)
* caps = BIND_SERVICE + CHROOT + SETGID
* if ((T && C && P) || !T)
* caps += SETUID
* endif
* capset(caps)
* endif
* if (T && C && P && -u)
* setuid()
* else if (T && -u)
* fail
* --> start threads
* if (!T && -u)
* setuid()
* if (C && (P || !-u))
* caps = BIND_SERVICE
* capset(caps)
* endif
*
* It will be nice when Linux threads work properly with setuid().
*/
#ifdef HAVE_LINUXTHREADS
static pid_t mainpid = 0;
#endif
static struct passwd *runas_pw = NULL;
static bool done_setuid = false;
static int dfd[2] = { -1, -1 };
@@ -69,7 +117,10 @@ static bool non_root = false;
static bool non_root_caps = false;
#include <sys/capability.h>
#include <sys/prctl.h>
#ifdef HAVE_SYS_PRCTL_H
#include <sys/prctl.h> /* Required for prctl(). */
#endif /* HAVE_SYS_PRCTL_H */
static void
linux_setcaps(cap_t caps) {
@@ -150,11 +201,15 @@ linux_initialprivs(void) {
*/
SET_CAP(CAP_SYS_CHROOT);
#if defined(HAVE_SYS_PRCTL_H) || !defined(HAVE_LINUXTHREADS)
/*
* We need setuid() as the kernel supports keeping capabilities after
* setuid().
* We can setuid() only if either the kernel supports keeping
* capabilities after setuid() (which we don't know until we've
* tried) or we're not using threads. If either of these is
* true, we want the setuid capability.
*/
SET_CAP(CAP_SETUID);
#endif
/*
* Since we call initgroups, we need this.
@@ -220,6 +275,7 @@ linux_minprivs(void) {
FREE_CAP;
}
#ifdef HAVE_SYS_PRCTL_H
static void
linux_keepcaps(void) {
char strbuf[ISC_STRERRORSIZE];
@@ -239,9 +295,11 @@ linux_keepcaps(void) {
non_root = true;
}
}
#endif
#endif /* HAVE_SYS_CAPABILITY_H */
static void
setup_syslog(const char *progname) {
int options;
@@ -259,6 +317,9 @@ named_os_init(const char *progname) {
#ifdef HAVE_SYS_CAPABILITY_H
linux_initialprivs();
#endif
#ifdef HAVE_LINUXTHREADS
mainpid = getpid();
#endif
#ifdef SIGXFSZ
signal(SIGXFSZ, SIG_IGN);
#endif
@@ -301,6 +362,10 @@ named_os_daemonize(void) {
* We're the child.
*/
#ifdef HAVE_LINUXTHREADS
mainpid = getpid();
#endif
if (setsid() == -1) {
strerror_r(errno, strbuf, sizeof(strbuf));
named_main_earlyfatal("setsid(): %s", strbuf);
@@ -434,6 +499,20 @@ named_os_changeuser(void) {
done_setuid = true;
#ifdef HAVE_LINUXTHREADS
#ifdef HAVE_SYS_CAPABILITY_H
if (!non_root_caps) {
named_main_earlyfatal("-u with Linux threads not supported: "
"requires kernel support for "
"prctl(PR_SET_KEEPCAPS)");
}
#else
named_main_earlyfatal("-u with Linux threads not supported: "
"no capabilities support or capabilities "
"disabled at build time");
#endif
#endif
if (setgid(runas_pw->pw_gid) < 0) {
strerror_r(errno, strbuf, sizeof(strbuf));
named_main_earlyfatal("setgid(): %s", strbuf);
@@ -444,7 +523,7 @@ named_os_changeuser(void) {
named_main_earlyfatal("setuid(): %s", strbuf);
}
#if defined(HAVE_SYS_CAPABILITY_H)
#if defined(HAVE_SYS_PRCTL_H) && defined(PR_SET_DUMPABLE)
/*
* Restore the ability of named to drop core after the setuid()
* call has disabled it.
@@ -454,7 +533,8 @@ named_os_changeuser(void) {
named_main_earlywarning("prctl(PR_SET_DUMPABLE) failed: %s",
strbuf);
}
#endif
#if defined(HAVE_SYS_CAPABILITY_H) && !defined(HAVE_LINUXTHREADS)
linux_minprivs();
#endif
}
@@ -468,7 +548,7 @@ ns_os_uid(void) {
void
named_os_adjustnofile(void) {
#if defined(__linux__)
#ifdef HAVE_LINUXTHREADS
isc_result_t result;
isc_resourcevalue_t newvalue;
@@ -486,9 +566,15 @@ named_os_adjustnofile(void) {
void
named_os_minprivs(void) {
#if defined(HAVE_SYS_CAPABILITY_H)
#ifdef HAVE_SYS_PRCTL_H
linux_keepcaps();
named_os_changeuser();
#endif
#ifdef HAVE_LINUXTHREADS
named_os_changeuser(); /* Call setuid() before threads are started */
#endif
#if defined(HAVE_SYS_CAPABILITY_H) && defined(HAVE_LINUXTHREADS)
linux_minprivs();
#endif
}
@@ -673,16 +759,21 @@ named_os_openfile(const char *filename, mode_t mode, bool switch_user) {
free(f);
if (switch_user && runas_pw != NULL) {
#ifndef HAVE_LINUXTHREADS
gid_t oldgid = getgid();
#endif
/* Set UID/GID to the one we'll be running with eventually */
setperms(runas_pw->pw_uid, runas_pw->pw_gid);
fd = safe_open(filename, mode, false);
#ifndef HAVE_LINUXTHREADS
/* Restore UID/GID to root */
setperms(0, oldgid);
#endif /* HAVE_LINUXTHREADS */
if (fd == -1) {
#ifndef HAVE_LINUXTHREADS
fd = safe_open(filename, mode, false);
if (fd != -1) {
named_main_earlywarning("Required root "
@@ -695,6 +786,13 @@ named_os_openfile(const char *filename, mode_t mode, bool switch_user) {
named_main_earlywarning("Please check file and "
"directory permissions "
"or reconfigure the filename.");
#else /* HAVE_LINUXTHREADS */
named_main_earlywarning("Could not open "
"'%s'.", filename);
named_main_earlywarning("Please check file and "
"directory permissions "
"or reconfigure the filename.");
#endif /* HAVE_LINUXTHREADS */
}
} else {
fd = safe_open(filename, mode, false);
@@ -748,7 +846,11 @@ named_os_writepidfile(const char *filename, bool first_time) {
cleanup_pidfile();
return;
}
#ifdef HAVE_LINUXTHREADS
pid = mainpid;
#else
pid = getpid();
#endif
if (fprintf(fh, "%ld\n", (long)pid) < 0) {
(*report)("fprintf() to pid file '%s' failed", filename);
(void)fclose(fh);
@@ -854,7 +956,11 @@ named_os_shutdownmsg(char *command, isc_buffer_t *text) {
return;
}
#ifdef HAVE_LINUXTHREADS
pid = mainpid;
#else
pid = getpid();
#endif
(void)isc_buffer_printf(text, "pid: %ld", (long)pid);
}
+20 -10
View File
@@ -207,7 +207,9 @@ configure_zone_ssutable(const cfg_obj_t *zconfig, dns_zone_t *zone,
updatepolicy = NULL;
}
dns_ssutable_create(mctx, &table);
result = dns_ssutable_create(mctx, &table);
if (result != ISC_R_SUCCESS)
return (result);
for (element = cfg_list_first(updatepolicy);
element != NULL;
@@ -222,7 +224,7 @@ configure_zone_ssutable(const cfg_obj_t *zconfig, dns_zone_t *zone,
const char *str;
bool grant = false;
bool usezone = false;
dns_ssumatchtype_t mtype = dns_ssumatchtype_name;
unsigned int mtype = dns_ssumatchtype_name;
dns_fixedname_t fname, fident;
isc_buffer_t b;
dns_rdatatype_t *types;
@@ -318,13 +320,16 @@ configure_zone_ssutable(const cfg_obj_t *zconfig, dns_zone_t *zone,
}
INSIST(i == n);
dns_ssutable_addrule(table, grant,
result = dns_ssutable_addrule(table, grant,
dns_fixedname_name(&fident),
mtype,
dns_fixedname_name(&fname),
n, types);
if (types != NULL)
isc_mem_put(mctx, types, n * sizeof(dns_rdatatype_t));
if (result != ISC_R_SUCCESS) {
goto cleanup;
}
}
/*
@@ -345,11 +350,14 @@ configure_zone_ssutable(const cfg_obj_t *zconfig, dns_zone_t *zone,
goto cleanup;
}
dns_ssutable_addrule(table, true,
result = dns_ssutable_addrule(table, true,
named_g_server->session_keyname,
dns_ssumatchtype_local,
dns_zone_getorigin(zone),
1, &any);
if (result != ISC_R_SUCCESS)
goto cleanup;
}
result = ISC_R_SUCCESS;
@@ -1136,10 +1144,10 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
zoneqrystats = NULL;
rcvquerystats = NULL;
if (statlevel == dns_zonestat_full) {
isc_stats_create(mctx, &zoneqrystats,
ns_statscounter_max);
dns_rdatatypestats_create(mctx,
&rcvquerystats);
RETERR(isc_stats_create(mctx, &zoneqrystats,
ns_statscounter_max));
RETERR(dns_rdatatypestats_create(mctx,
&rcvquerystats));
}
dns_zone_setrequeststats(zone, zoneqrystats);
dns_zone_setrcvquerystats(zone, rcvquerystats);
@@ -1736,7 +1744,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
&obj);
if (obj == NULL) {
dns_acl_t *none;
dns_acl_none(mctx, &none);
RETERR(dns_acl_none(mctx, &none));
dns_zone_setxfracl(zone, none);
dns_acl_detach(&none);
}
@@ -1872,7 +1880,9 @@ named_zone_configure_writeable_dlz(dns_dlzdb_t *dlzdatabase,
TIME_NOW(&now);
dns_zone_settype(zone, dns_zone_dlz);
dns_sdlz_setdb(dlzdatabase, rdclass, name, &db);
result = dns_sdlz_setdb(dlzdatabase, rdclass, name, &db);
if (result != ISC_R_SUCCESS)
return (result);
result = dns_zone_dlzpostload(zone, db);
dns_db_detach(&db);
return (result);
+39 -17
View File
@@ -354,8 +354,9 @@ reset_system(void) {
if (updatemsg != NULL)
dns_message_reset(updatemsg, DNS_MESSAGE_INTENTRENDER);
else {
dns_message_create(gmctx, DNS_MESSAGE_INTENTRENDER,
result = dns_message_create(gmctx, DNS_MESSAGE_INTENTRENDER,
&updatemsg);
check_result(result, "dns_message_create");
}
updatemsg->opcode = dns_opcode_update;
if (usegsstsig) {
@@ -875,12 +876,14 @@ setup_system(void) {
irs_resconf_destroy(&resconf);
dns_dispatchmgr_create(gmctx, &dispatchmgr);
result = dns_dispatchmgr_create(gmctx, &dispatchmgr);
check_result(result, "dns_dispatchmgr_create");
result = isc_socketmgr_create(gmctx, &socketmgr);
check_result(result, "dns_socketmgr_create");
isc_timermgr_create(gmctx, &timermgr);
result = isc_timermgr_create(gmctx, &timermgr);
check_result(result, "dns_timermgr_create");
result = isc_taskmgr_create(gmctx, 1, 0, &taskmgr);
check_result(result, "isc_taskmgr_create");
@@ -922,9 +925,10 @@ setup_system(void) {
check_result(result, "dns_dispatch_getudp (v4)");
}
dns_requestmgr_create(gmctx, timermgr,
result = dns_requestmgr_create(gmctx, timermgr,
socketmgr, taskmgr, dispatchmgr,
dispatchv4, dispatchv6, &requestmgr);
check_result(result, "dns_requestmgr_create");
if (keystr != NULL)
setup_keystr();
@@ -1211,7 +1215,8 @@ parse_name(char **cmdlinep, dns_message_t *msg, dns_name_t **namep) {
result = dns_message_gettempname(msg, namep);
check_result(result, "dns_message_gettempname");
isc_buffer_allocate(gmctx, &namebuf, DNS_NAME_MAXWIRE);
result = isc_buffer_allocate(gmctx, &namebuf, DNS_NAME_MAXWIRE);
check_result(result, "isc_buffer_allocate");
dns_name_init(*namep, NULL);
dns_name_setbuffer(*namep, namebuf);
dns_message_takebuffer(msg, &namebuf);
@@ -1250,18 +1255,22 @@ parse_rdata(char **cmdlinep, dns_rdataclass_t rdataclass,
if (*cmdline != 0) {
dns_rdatacallbacks_init(&callbacks);
isc_lex_create(gmctx, strlen(cmdline), &lex);
result = isc_lex_create(gmctx, strlen(cmdline), &lex);
check_result(result, "isc_lex_create");
isc_buffer_init(&source, cmdline, strlen(cmdline));
isc_buffer_add(&source, strlen(cmdline));
isc_lex_openbuffer(lex, &source);
isc_buffer_allocate(gmctx, &buf, MAXWIRE);
result = isc_lex_openbuffer(lex, &source);
check_result(result, "isc_lex_openbuffer");
result = isc_buffer_allocate(gmctx, &buf, MAXWIRE);
check_result(result, "isc_buffer_allocate");
result = dns_rdata_fromtext(NULL, rdataclass, rdatatype, lex,
dns_rootname, 0, gmctx, buf,
&callbacks);
isc_lex_destroy(&lex);
if (result == ISC_R_SUCCESS) {
isc_buffer_usedregion(buf, &r);
isc_buffer_allocate(gmctx, &newbuf, r.length);
result = isc_buffer_allocate(gmctx, &newbuf, r.length);
check_result(result, "isc_buffer_allocate");
isc_buffer_putmem(newbuf, r.base, r.length);
isc_buffer_usedregion(newbuf, &r);
dns_rdata_fromregion(rdata, rdataclass, rdatatype, &r);
@@ -2017,7 +2026,8 @@ show_message(FILE *stream, dns_message_t *msg, const char *description) {
}
if (buf != NULL)
isc_buffer_free(&buf);
isc_buffer_allocate(gmctx, &buf, bufsz);
result = isc_buffer_allocate(gmctx, &buf, bufsz);
check_result(result, "isc_buffer_allocate");
result = dns_message_totext(msg, style, 0, buf);
bufsz *= 2;
} while (result == ISC_R_NOSPACE);
@@ -2288,7 +2298,8 @@ update_completed(isc_task_t *task, isc_event_t *event) {
return;
}
dns_message_create(gmctx, DNS_MESSAGE_INTENTPARSE, &answer);
result = dns_message_create(gmctx, DNS_MESSAGE_INTENTPARSE, &answer);
check_result(result, "dns_message_create");
result = dns_request_getresponse(request, answer,
DNS_MESSAGEPARSE_PRESERVEORDER);
switch (result) {
@@ -2469,7 +2480,8 @@ recvsoa(isc_task_t *task, isc_event_t *event) {
reqev = NULL;
ddebug("About to create rcvmsg");
dns_message_create(gmctx, DNS_MESSAGE_INTENTPARSE, &rcvmsg);
result = dns_message_create(gmctx, DNS_MESSAGE_INTENTPARSE, &rcvmsg);
check_result(result, "dns_message_create");
result = dns_request_getresponse(request, rcvmsg,
DNS_MESSAGEPARSE_PRESERVEORDER);
if (result == DNS_R_TSIGERRORSET && servers != NULL) {
@@ -2781,7 +2793,11 @@ start_gssrequest(dns_name_t *master) {
if (gssring != NULL)
dns_tsigkeyring_detach(&gssring);
gssring = NULL;
dns_tsigkeyring_create(gmctx, &gssring);
result = dns_tsigkeyring_create(gmctx, &gssring);
if (result != ISC_R_SUCCESS)
fatal("dns_tsigkeyring_create failed: %s",
isc_result_totext(result));
dns_name_format(master, namestr, sizeof(namestr));
if (kserver == NULL) {
@@ -2830,7 +2846,10 @@ start_gssrequest(dns_name_t *master) {
keyname->attributes |= DNS_NAMEATTR_NOCOMPRESS;
rmsg = NULL;
dns_message_create(gmctx, DNS_MESSAGE_INTENTRENDER, &rmsg);
result = dns_message_create(gmctx, DNS_MESSAGE_INTENTRENDER, &rmsg);
if (result != ISC_R_SUCCESS)
fatal("dns_message_create failed: %s",
isc_result_totext(result));
/* Build first request. */
context = GSS_C_NO_CONTEXT;
@@ -2952,7 +2971,8 @@ recvgss(isc_task_t *task, isc_event_t *event) {
reqev = NULL;
ddebug("recvgss creating rcvmsg");
dns_message_create(gmctx, DNS_MESSAGE_INTENTPARSE, &rcvmsg);
result = dns_message_create(gmctx, DNS_MESSAGE_INTENTPARSE, &rcvmsg);
check_result(result, "dns_message_create");
result = dns_request_getresponse(request, rcvmsg,
DNS_MESSAGEPARSE_PRESERVEORDER);
@@ -3074,8 +3094,9 @@ start_update(void) {
return;
}
dns_message_create(gmctx, DNS_MESSAGE_INTENTRENDER,
result = dns_message_create(gmctx, DNS_MESSAGE_INTENTRENDER,
&soaquery);
check_result(result, "dns_message_create");
if (default_servers)
soaquery->flags |= DNS_MESSAGEFLAG_RD;
@@ -3233,7 +3254,8 @@ main(int argc, char **argv) {
pre_parse_args(argc, argv);
isc_mem_create(0, 0, &gmctx);
result = isc_mem_create(0, 0, &gmctx);
check_result(result, "isc_mem_create");
parse_args(argc, argv);
+3 -2
View File
@@ -932,7 +932,7 @@ main(int argc, char **argv) {
serial = isc_random32();
isc_mem_create(0, 0, &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 task manager", isc_taskmgr_create(rndc_mctx, 1, 0, &taskmgr));
DO("create task", isc_task_create(taskmgr, 0, &task));
@@ -957,7 +957,8 @@ main(int argc, char **argv) {
command = *argv;
isc_buffer_allocate(rndc_mctx, &databuf, 2048);
DO("allocate data buffer",
isc_buffer_allocate(rndc_mctx, &databuf, 2048));
/*
* Convert argc/argv into a space-delimited command string
+3 -8
View File
@@ -575,7 +575,7 @@
<varlistentry>
<term><userinput>nta
<optional>( -class <replaceable>class</replaceable> | -dump | -force | -remove | -lifetime <replaceable>duration</replaceable>)</optional>
<optional>( -d | -f | -r | -l <replaceable>duration</replaceable>)</optional>
<replaceable>domain</replaceable>
<optional><replaceable>view</replaceable></optional>
</userinput></term>
@@ -623,7 +623,7 @@
is equivalent to <option>-remove</option>.
</para>
<para>
If the <option>-dump</option> is used, any other arguments
If <option>-dump</option> is used, any other arguments
are ignored, and a list of existing NTAs is printed
(note that this may include NTAs that are expired but
have not yet been cleaned up).
@@ -640,15 +640,10 @@
lifetime, regardless of whether data could be
validated if the NTA were not present.
</para>
<para>
The view class can be specified with <option>-class</option>.
The default is class <userinput>IN</userinput>, which is
the only class for which DNSSEC is currently supported.
</para>
<para>
All of these options can be shortened, i.e., to
<option>-l</option>, <option>-r</option>, <option>-d</option>,
<option>-f</option>, and <option>-c</option>.
and <option>-f</option>.
</para>
</listitem>
</varlistentry>
+1 -1
View File
@@ -70,7 +70,7 @@ main(int argc, char **argv) {
char *filename = NULL;
unsigned int zonetype = 0;
isc_mem_create(0, 0, &mctx);
RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
result = isc_log_create(mctx, &lctx, &lcfg);
check_result(result, "isc_log_create()");
+1 -1
View File
@@ -97,7 +97,7 @@ main(int argc, char **argv) {
journal = argv[4];
isc_mem_debugging |= ISC_MEM_DEBUGRECORD;
isc_mem_create(0, 0, &mctx);
CHECK(isc_mem_create(0, 0, &mctx));
CHECK(dst_lib_init(mctx, NULL));
dst_active = true;
+4 -1
View File
@@ -12,7 +12,6 @@
#include <config.h>
#include <sys/param.h>
#include <sys/select.h>
#include <sys/types.h>
#include <sys/time.h>
@@ -36,6 +35,10 @@
#include <dns/result.h>
#include <dns/zone.h>
#ifdef ISC_PLATFORM_NEEDSYSSELECTH
#include <sys/select.h>
#endif
static int debug = 0;
static int quiet = 0;
static int stats = 0;
@@ -22,10 +22,3 @@ ns2 A 10.53.0.2
a A 10.0.7.1
mail A 10.0.7.2
b A 10.0.7.3
c A 10.0.7.4
d A 10.0.7.5
e A 10.0.7.6
f A 10.0.7.7
g A 10.0.7.8
h A 10.0.7.9
@@ -18,15 +18,6 @@ options {
dnssec-validation no;
};
key rndc_key {
secret "1234abcd8765";
algorithm hmac-sha256;
};
controls {
inet 10.53.0.3 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
};
zone "." {
type hint;
file "../../common/root.hint";
@@ -1,36 +0,0 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
options {
port @PORT@;
pid-file "named.pid";
listen-on { 10.53.0.3; };
listen-on-v6 { none; };
recursion yes;
allow-recursion { any; };
allow-recursion-on { none; };
allow-query-cache-on { 10.53.0.3; };
dnssec-validation no;
};
key rndc_key {
secret "1234abcd8765";
algorithm hmac-sha256;
};
controls {
inet 10.53.0.3 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
};
zone "." {
type hint;
file "../../common/root.hint";
};
@@ -1,36 +0,0 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
options {
port @PORT@;
pid-file "named.pid";
listen-on { 10.53.0.3; 10.53.1.2; };
listen-on-v6 { none; };
recursion yes;
allow-recursion { any; };
allow-query-cache { any; };
allow-query-cache-on { 10.53.0.3; }; # allow-recursion-on inherits
dnssec-validation no;
};
key rndc_key {
secret "1234abcd8765";
algorithm hmac-sha256;
};
controls {
inet 10.53.0.3 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
};
zone "." {
type hint;
file "../../common/root.hint";
};
@@ -1,36 +0,0 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
options {
port @PORT@;
pid-file "named.pid";
listen-on { 10.53.0.3; 10.53.1.2; };
listen-on-v6 { none; };
recursion yes;
allow-recursion { any; };
allow-query-cache { any; };
allow-recursion-on { 10.53.0.3; }; # allow-query-cache-on inherits
dnssec-validation no;
};
key rndc_key {
secret "1234abcd8765";
algorithm hmac-sha256;
};
controls {
inet 10.53.0.3 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
};
zone "." {
type hint;
file "../../common/root.hint";
};
+1 -3
View File
@@ -12,9 +12,7 @@
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
$SHELL clean.sh
copy_setports ../common/controls.conf.in ns2/controls.conf
copy_setports ns1/named.conf.in ns1/named.conf
copy_setports ns2/named01.conf.in ns2/named.conf
copy_setports ns3/named1.conf.in ns3/named.conf
copy_setports ns3/named.conf.in ns3/named.conf
+35 -112
View File
@@ -56,9 +56,9 @@ SYSTEMTESTTOP=..
DIGOPTS="+tcp +nosea +nostat +nocmd +norec +noques +noauth +noadd +nostats +dnssec -p ${PORT}"
rndc_reload() {
echo_i "`$RNDC -c ../common/rndc.conf -s $2 -p ${CONTROLPORT} reload 2>&1 | sed 's/^/'$1' /'`"
echo_i "`$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p ${CONTROLPORT} reload 2>&1 | sed 's/^/ns2 /'`"
for try in 0 1 2 3 4 5 6 7 8 9; do
nextpart $1/named.run | grep "reloading configuration succeeded" > /dev/null && break
nextpart ns2/named.run | grep "reloading configuration succeeded" > /dev/null && break
sleep 1
done
}
@@ -81,7 +81,7 @@ status=`expr $status + $ret`
# Test 2 - explicit any, query allowed
n=`expr $n + 1`
copy_setports ns2/named02.conf.in ns2/named.conf
rndc_reload ns2 10.53.0.2
rndc_reload
echo_i "test $n: explicit any - query allowed"
ret=0
@@ -94,7 +94,7 @@ status=`expr $status + $ret`
# Test 3 - none, query refused
n=`expr $n + 1`
copy_setports ns2/named03.conf.in ns2/named.conf
rndc_reload ns2 10.53.0.2
rndc_reload
echo_i "test $n: none - query refused"
ret=0
@@ -107,7 +107,7 @@ status=`expr $status + $ret`
# Test 4 - address allowed, query allowed
n=`expr $n + 1`
copy_setports ns2/named04.conf.in ns2/named.conf
rndc_reload ns2 10.53.0.2
rndc_reload
echo_i "test $n: address allowed - query allowed"
ret=0
@@ -120,7 +120,7 @@ status=`expr $status + $ret`
# Test 5 - address not allowed, query refused
n=`expr $n + 1`
copy_setports ns2/named05.conf.in ns2/named.conf
rndc_reload ns2 10.53.0.2
rndc_reload
echo_i "test $n: address not allowed - query refused"
ret=0
@@ -133,7 +133,7 @@ status=`expr $status + $ret`
# Test 6 - address disallowed, query refused
n=`expr $n + 1`
copy_setports ns2/named06.conf.in ns2/named.conf
rndc_reload ns2 10.53.0.2
rndc_reload
echo_i "test $n: address disallowed - query refused"
ret=0
@@ -146,7 +146,7 @@ status=`expr $status + $ret`
# Test 7 - acl allowed, query allowed
n=`expr $n + 1`
copy_setports ns2/named07.conf.in ns2/named.conf
rndc_reload ns2 10.53.0.2
rndc_reload
echo_i "test $n: acl allowed - query allowed"
ret=0
@@ -159,7 +159,7 @@ status=`expr $status + $ret`
# Test 8 - acl not allowed, query refused
n=`expr $n + 1`
copy_setports ns2/named08.conf.in ns2/named.conf
rndc_reload ns2 10.53.0.2
rndc_reload
echo_i "test $n: acl not allowed - query refused"
ret=0
@@ -173,7 +173,7 @@ status=`expr $status + $ret`
# Test 9 - acl disallowed, query refused
n=`expr $n + 1`
copy_setports ns2/named09.conf.in ns2/named.conf
rndc_reload ns2 10.53.0.2
rndc_reload
echo_i "test $n: acl disallowed - query refused"
ret=0
@@ -186,7 +186,7 @@ status=`expr $status + $ret`
# Test 10 - key allowed, query allowed
n=`expr $n + 1`
copy_setports ns2/named10.conf.in ns2/named.conf
rndc_reload ns2 10.53.0.2
rndc_reload
echo_i "test $n: key allowed - query allowed"
ret=0
@@ -199,7 +199,7 @@ status=`expr $status + $ret`
# Test 11 - key not allowed, query refused
n=`expr $n + 1`
copy_setports ns2/named11.conf.in ns2/named.conf
rndc_reload ns2 10.53.0.2
rndc_reload
echo_i "test $n: key not allowed - query refused"
ret=0
@@ -212,7 +212,7 @@ status=`expr $status + $ret`
# Test 12 - key disallowed, query refused
n=`expr $n + 1`
copy_setports ns2/named12.conf.in ns2/named.conf
rndc_reload ns2 10.53.0.2
rndc_reload
echo_i "test $n: key disallowed - query refused"
ret=0
@@ -228,7 +228,7 @@ n=20
# Test 21 - views default, query allowed
n=`expr $n + 1`
copy_setports ns2/named21.conf.in ns2/named.conf
rndc_reload ns2 10.53.0.2
rndc_reload
echo_i "test $n: views default - query allowed"
ret=0
@@ -241,7 +241,7 @@ status=`expr $status + $ret`
# Test 22 - views explicit any, query allowed
n=`expr $n + 1`
copy_setports ns2/named22.conf.in ns2/named.conf
rndc_reload ns2 10.53.0.2
rndc_reload
echo_i "test $n: views explicit any - query allowed"
ret=0
@@ -254,7 +254,7 @@ status=`expr $status + $ret`
# Test 23 - views none, query refused
n=`expr $n + 1`
copy_setports ns2/named23.conf.in ns2/named.conf
rndc_reload ns2 10.53.0.2
rndc_reload
echo_i "test $n: views none - query refused"
ret=0
@@ -267,7 +267,7 @@ status=`expr $status + $ret`
# Test 24 - views address allowed, query allowed
n=`expr $n + 1`
copy_setports ns2/named24.conf.in ns2/named.conf
rndc_reload ns2 10.53.0.2
rndc_reload
echo_i "test $n: views address allowed - query allowed"
ret=0
@@ -280,7 +280,7 @@ status=`expr $status + $ret`
# Test 25 - views address not allowed, query refused
n=`expr $n + 1`
copy_setports ns2/named25.conf.in ns2/named.conf
rndc_reload ns2 10.53.0.2
rndc_reload
echo_i "test $n: views address not allowed - query refused"
ret=0
@@ -293,7 +293,7 @@ status=`expr $status + $ret`
# Test 26 - views address disallowed, query refused
n=`expr $n + 1`
copy_setports ns2/named26.conf.in ns2/named.conf
rndc_reload ns2 10.53.0.2
rndc_reload
echo_i "test $n: views address disallowed - query refused"
ret=0
@@ -306,7 +306,7 @@ status=`expr $status + $ret`
# Test 27 - views acl allowed, query allowed
n=`expr $n + 1`
copy_setports ns2/named27.conf.in ns2/named.conf
rndc_reload ns2 10.53.0.2
rndc_reload
echo_i "test $n: views acl allowed - query allowed"
ret=0
@@ -319,7 +319,7 @@ status=`expr $status + $ret`
# Test 28 - views acl not allowed, query refused
n=`expr $n + 1`
copy_setports ns2/named28.conf.in ns2/named.conf
rndc_reload ns2 10.53.0.2
rndc_reload
echo_i "test $n: views acl not allowed - query refused"
ret=0
@@ -332,7 +332,7 @@ status=`expr $status + $ret`
# Test 29 - views acl disallowed, query refused
n=`expr $n + 1`
copy_setports ns2/named29.conf.in ns2/named.conf
rndc_reload ns2 10.53.0.2
rndc_reload
echo_i "test $n: views acl disallowed - query refused"
ret=0
@@ -345,7 +345,7 @@ status=`expr $status + $ret`
# Test 30 - views key allowed, query allowed
n=`expr $n + 1`
copy_setports ns2/named30.conf.in ns2/named.conf
rndc_reload ns2 10.53.0.2
rndc_reload
echo_i "test $n: views key allowed - query allowed"
ret=0
@@ -358,7 +358,7 @@ status=`expr $status + $ret`
# Test 31 - views key not allowed, query refused
n=`expr $n + 1`
copy_setports ns2/named31.conf.in ns2/named.conf
rndc_reload ns2 10.53.0.2
rndc_reload
echo_i "test $n: views key not allowed - query refused"
ret=0
@@ -371,7 +371,7 @@ status=`expr $status + $ret`
# Test 32 - views key disallowed, query refused
n=`expr $n + 1`
copy_setports ns2/named32.conf.in ns2/named.conf
rndc_reload ns2 10.53.0.2
rndc_reload
echo_i "test $n: views key disallowed - query refused"
ret=0
@@ -384,7 +384,7 @@ status=`expr $status + $ret`
# Test 33 - views over options, views allow, query allowed
n=`expr $n + 1`
copy_setports ns2/named33.conf.in ns2/named.conf
rndc_reload ns2 10.53.0.2
rndc_reload
echo_i "test $n: views over options, views allow - query allowed"
ret=0
@@ -397,7 +397,7 @@ status=`expr $status + $ret`
# Test 34 - views over options, views disallow, query refused
n=`expr $n + 1`
copy_setports ns2/named34.conf.in ns2/named.conf
rndc_reload ns2 10.53.0.2
rndc_reload
echo_i "test $n: views over options, views disallow - query refused"
ret=0
@@ -414,7 +414,7 @@ n=40
# Test 41 - zone default, query allowed
n=`expr $n + 1`
copy_setports ns2/named40.conf.in ns2/named.conf
rndc_reload ns2 10.53.0.2
rndc_reload
echo_i "test $n: zone default - query allowed"
ret=0
@@ -537,7 +537,7 @@ status=`expr $status + $ret`
# Test 53 - zones over options, zones allow, query allowed
n=`expr $n + 1`
copy_setports ns2/named53.conf.in ns2/named.conf
rndc_reload ns2 10.53.0.2
rndc_reload
echo_i "test $n: views over options, views allow - query allowed"
ret=0
@@ -550,7 +550,7 @@ status=`expr $status + $ret`
# Test 54 - zones over options, zones disallow, query refused
n=`expr $n + 1`
copy_setports ns2/named54.conf.in ns2/named.conf
rndc_reload ns2 10.53.0.2
rndc_reload
echo_i "test $n: views over options, views disallow - query refused"
ret=0
@@ -563,7 +563,7 @@ status=`expr $status + $ret`
# Test 55 - zones over views, zones allow, query allowed
n=`expr $n + 1`
copy_setports ns2/named55.conf.in ns2/named.conf
rndc_reload ns2 10.53.0.2
rndc_reload
echo_i "test $n: zones over views, views allow - query allowed"
ret=0
@@ -576,7 +576,7 @@ status=`expr $status + $ret`
# Test 56 - zones over views, zones disallow, query refused
n=`expr $n + 1`
copy_setports ns2/named56.conf.in ns2/named.conf
rndc_reload ns2 10.53.0.2
rndc_reload
echo_i "test $n: zones over views, views disallow - query refused"
ret=0
@@ -589,7 +589,7 @@ status=`expr $status + $ret`
# Test 57 - zones over views, zones disallow, query refused (allow-query-on)
n=`expr $n + 1`
copy_setports ns2/named57.conf.in ns2/named.conf
rndc_reload ns2 10.53.0.2
rndc_reload
echo_i "test $n: zones over views, allow-query-on"
ret=0
@@ -602,9 +602,9 @@ grep '^a.aclnotallow.example' dig.out.ns2.2.$n > /dev/null && ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
# Test 58 - allow-recursion default
# Test 58 - allow-recursion inheritance
n=`expr $n + 1`
echo_i "test $n: default allow-recursion configuration"
echo_i "test $n: default recursion configuration"
ret=0
$DIG -p ${PORT} @10.53.0.3 -b 127.0.0.1 a.normal.example a > dig.out.ns3.1.$n
grep 'status: NOERROR' dig.out.ns3.1.$n > /dev/null || ret=1
@@ -613,82 +613,5 @@ grep 'status: REFUSED' dig.out.ns3.2.$n > /dev/null || ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
# Test 59 - allow-query-cache default
n=`expr $n + 1`
echo_i "test $n: default allow-query-cache configuration"
ret=0
$DIG -p ${PORT} @10.53.0.3 -b 127.0.0.1 ns . > dig.out.ns3.1.$n
grep 'status: NOERROR' dig.out.ns3.1.$n > /dev/null || ret=1
$DIG -p ${PORT} @10.53.0.3 -b 10.53.0.1 ns . > dig.out.ns3.2.$n
grep 'status: REFUSED' dig.out.ns3.2.$n > /dev/null || ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
# Test 60 - block recursion-on, allow query-cache-on
n=`expr $n + 1`
copy_setports ns3/named2.conf.in ns3/named.conf
rndc_reload ns3 10.53.0.3
echo_i "test $n: block recursion-on, allow query-cache-on"
ret=0
# this should query the cache, and an answer should already be there
$DIG -p ${PORT} @10.53.0.3 a.normal.example a > dig.out.ns3.1.$n
grep 'recursion requested but not available' dig.out.ns3.1.$n > /dev/null || ret=1
grep 'ANSWER: 1' dig.out.ns3.1.$n > /dev/null || ret=1
# this should require recursion and therefore can't get an answer
$DIG -p ${PORT} @10.53.0.3 b.normal.example a > dig.out.ns3.2.$n
grep 'recursion requested but not available' dig.out.ns3.2.$n > /dev/null || ret=1
grep 'ANSWER: 0' dig.out.ns3.2.$n > /dev/null || ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
# Test 61 - inheritance of allow-query-cache-on from allow-recursion-on
n=`expr $n + 1`
copy_setports ns3/named3.conf.in ns3/named.conf
rndc_reload ns3 10.53.0.3
echo_i "test $n: inheritance of allow-query-cache-on"
ret=0
# this should query the cache, an answer should already be there
$DIG -p ${PORT} @10.53.0.3 a.normal.example a > dig.out.ns3.1.$n
grep 'ANSWER: 1' dig.out.ns3.1.$n > /dev/null || ret=1
# this should be refused due to allow-recursion-on/allow-query-cache-on
$DIG -p ${PORT} @10.53.1.2 a.normal.example a > dig.out.ns3.2.$n
grep 'recursion requested but not available' dig.out.ns3.2.$n > /dev/null || ret=1
grep 'status: REFUSED' dig.out.ns3.2.$n > /dev/null || ret=1
# this should require recursion and should be allowed
$DIG -p ${PORT} @10.53.0.3 c.normal.example a > dig.out.ns3.3.$n
grep 'ANSWER: 1' dig.out.ns3.3.$n > /dev/null || ret=1
# this should require recursion and be refused
$DIG -p ${PORT} @10.53.1.2 d.normal.example a > dig.out.ns3.4.$n
grep 'recursion requested but not available' dig.out.ns3.4.$n > /dev/null || ret=1
grep 'status: REFUSED' dig.out.ns3.4.$n > /dev/null || ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
# Test 62 - inheritance of allow-recursion-on from allow-query-cache-on
n=`expr $n + 1`
copy_setports ns3/named4.conf.in ns3/named.conf
rndc_reload ns3 10.53.0.3
echo_i "test $n: inheritance of allow-recursion-on"
ret=0
# this should query the cache, an answer should already be there
$DIG -p ${PORT} @10.53.0.3 a.normal.example a > dig.out.ns3.1.$n
grep 'ANSWER: 1' dig.out.ns3.1.$n > /dev/null || ret=1
# this should be refused due to allow-recursion-on/allow-query-cache-on
$DIG -p ${PORT} @10.53.1.2 a.normal.example a > dig.out.ns3.2.$n
grep 'recursion requested but not available' dig.out.ns3.2.$n > /dev/null || ret=1
grep 'status: REFUSED' dig.out.ns3.2.$n > /dev/null || ret=1
# this should require recursion and should be allowed
$DIG -p ${PORT} @10.53.0.3 e.normal.example a > dig.out.ns3.3.$n
grep 'ANSWER: 1' dig.out.ns3.3.$n > /dev/null || ret=1
# this should require recursion and be refused
$DIG -p ${PORT} @10.53.1.2 f.normal.example a > dig.out.ns3.4.$n
grep 'recursion requested but not available' dig.out.ns3.4.$n > /dev/null || ret=1
grep 'status: REFUSED' dig.out.ns3.4.$n > /dev/null || ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
echo_i "exit status: $status"
[ $status -eq 0 ] || exit 1
+1 -1
View File
@@ -13,4 +13,4 @@ rm -f */named.conf
rm -f dig.out.test*
rm -f ns2/example.com.bk
rm -f ns2/example.net.bk
rm -f ns*/managed-keys.bind* ns*/*mkeys*
rm -f ns*/managed-keys.bind*
-21
View File
@@ -1,21 +0,0 @@
; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
;
; This Source Code Form is subject to the terms of the Mozilla Public
; License, v. 2.0. If a copy of the MPL was not distributed with this
; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;
; See the COPYRIGHT file distributed with this work for additional
; information regarding copyright ownership.
$TTL 300 ; 5 minutes
@ CH SOA ns root (
2018010100 ; serial
1800 ; refresh (30 minutes)
1800 ; retry (30 minutes)
1814400 ; expire (3 weeks)
3600 ; minimum (1 hour)
)
NS ns
ns A ch-addr.example. 1001
test A ch-addr.example. 1002
A ch-addr.example. 1003
+6 -15
View File
@@ -21,21 +21,12 @@ options {
notify yes;
};
view main in {
zone example.net {
type master;
file "example.net.db";
};
zone example.com {
type master;
file "example.com.db";
};
zone example.net {
type master;
file "example.net.db";
};
view alt chaos {
zone example.chaos chaos {
type master;
file "chaos.db";
};
zone example.com {
type master;
file "example.com.db";
};
-9
View File
@@ -128,14 +128,5 @@ grep "a.example.com.*A.*10.53.0.1" dig.out.test$n > /dev/null || ret=1
[ $ret -eq 0 ] || echo_i "failed"
status=`expr $status + $ret`
n=`expr $n + 1`
echo_i "check that CHAOS addresses are compared correctly ($n)"
ret=0
$DIG $DIGOPTS @10.53.0.1 +noall +answer ch test.example.chaos > dig.out.test$n
lines=`wc -l < dig.out.test$n`
[ ${lines:-0} -eq 2 ] || ret=1
[ $ret -eq 0 ] || echo_i "failed"
status=`expr $status + $ret`
echo_i "exit status: $status"
[ $status -eq 0 ] || exit 1
+2 -19
View File
@@ -78,7 +78,7 @@ do
done
for z in bar. example. inacksk2.example. inacksk3.example \
inaczsk2.example. inaczsk3.example
do
do
$DIG $DIGOPTS $z @10.53.0.3 nsec > dig.out.ns3.test$n || ret=1
grep "NS SOA" dig.out.ns3.test$n > /dev/null || ret=1
done
@@ -91,23 +91,6 @@ n=`expr $n + 1`
if [ $ret != 0 ]; then echo_i "done"; fi
status=`expr $status + $ret`
echo_i "Initial counts of RRSIG expiry fields values for auto signed zones"
for z in .
do
echo_i zone $z
$DIG $DIGOPTS $z @10.53.0.1 axfr | awk '$4 == "RRSIG" {print $9}' | sort | uniq -c | cat_i
done
for z in bar. example. private.secure.example.
do
echo_i zone $z
$DIG $DIGOPTS $z @10.53.0.2 axfr | awk '$4 == "RRSIG" {print $9}' | sort | uniq -c | cat_i
done
for z in inacksk2.example. inacksk3.example inaczsk2.example. inaczsk3.example
do
echo_i zone $z
$DIG $DIGOPTS $z @10.53.0.3 axfr | awk '$4 == "RRSIG" {print $9}' | sort | uniq -c | cat_i
done
#
# Check that DNSKEY is initially signed with a KSK and not a ZSK.
#
@@ -1164,7 +1147,7 @@ if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
# this confirms that key events are never scheduled more than
# 'dnssec-loadkeys-interval' minutes in the future, and that the
# 'dnssec-loadkeys-interval' minutes in the future, and that the
# event scheduled is within 10 seconds of expected interval.
check_interval () {
awk '/next key event/ {print $2 ":" $9}' $1/named.run |
+1 -1
View File
@@ -1,6 +1,6 @@
DyNaMiC. 300 IN SOA mname1. . 2000042407 20 20 1814400 3600
DyNaMiC. 300 IN NS ns1.DYNAMIC.
DynamiC. 300 IN MX 0 mail.eXaMpLe.
DyNaMiC. 300 IN MX 0 mail.eXaMpLe.
mAiL.DynamiC. 300 IN A 10.53.0.1
ns1.DYNAMIC. 300 IN A 10.53.0.1
DyNaMiC. 300 IN SOA mname1. . 2000042407 20 20 1814400 3600
+11 -3
View File
@@ -1,6 +1,14 @@
dYNAMIc. 300 IN SOA mname1. . 2000042409 20 20 1814400 3600
; <<>> DiG 9.11.0pre-alpha <<>> axfr dynamic @10.53.0.1 -p 5300
;; global options: +cmd
dYNAMIc. 0 IN SOA mname1. . 2000042409 20 20 1814400 3600
DyNaMiC. 300 IN NS ns1.DYNAMIC.
DynamiC. 300 IN MX 0 mail.eXaMpLe.
DyNaMiC. 300 IN MX 0 mail.eXaMpLe.
mAiL.DynamiC. 300 IN A 10.53.0.1
Ns1.DyNaMIC. 300 IN A 10.53.0.1
dYNAMIc. 300 IN SOA mname1. . 2000042409 20 20 1814400 3600
dYNAMIc. 0 IN SOA mname1. . 2000042409 20 20 1814400 3600
;; Query time: 0 msec
;; SERVER: 10.53.0.1#5300(10.53.0.1)
;; WHEN: Mon Jan 19 14:50:54 EST 2015
;; XFR size: 6 records (messages 1, bytes 234)
+1 -1
View File
@@ -1,6 +1,6 @@
dYNAMIc. 300 IN SOA mname1. . 2000042408 20 20 1814400 3600
DyNaMiC. 300 IN NS ns1.DYNAMIC.
DynamiC. 300 IN MX 0 mail.eXaMpLe.
DyNaMiC. 300 IN MX 0 mail.eXaMpLe.
mAiL.DynamiC. 300 IN A 10.53.0.1
ns1.DYNAMIC. 300 IN A 10.53.0.1
dYNAMIc. 300 IN SOA mname1. . 2000042408 20 20 1814400 3600
+8 -9
View File
@@ -20,13 +20,13 @@ touch empty
Z=cds.test
keyz=`$KEYGEN -q -a RSASHA256 $Z`
key1=`$KEYGEN -q -a RSASHA256 -f KSK $Z`
key2=`$KEYGEN -q -a RSASHA256 -f KSK $Z`
keyz=$($KEYGEN -q -a RSASHA256 $Z)
key1=$($KEYGEN -q -a RSASHA256 -f KSK $Z)
key2=$($KEYGEN -q -a RSASHA256 -f KSK $Z)
idz=`echo $keyz | sed 's/.*+0*//'`
id1=`echo $key1 | sed 's/.*+0*//'`
id2=`echo $key2 | sed 's/.*+0*//'`
idz=$(echo $keyz | sed 's/.*+0*//')
id1=$(echo $key1 | sed 's/.*+0*//')
id2=$(echo $key2 | sed 's/.*+0*//')
cat <<EOF >vars.sh
Z=$Z
@@ -120,11 +120,10 @@ $mangle '\s+IN\s+RRSIG\s+CDS .* '$id1' '$Z'\. ' \
$mangle " IN CDS $id1 8 1 " <db.cds.1 |
sign cds-mangled
bad=`$PERL -le "print ($id1 ^ 255);"`
sed 's/IN CDS '$id1' 8 1 /IN CDS '$bad' 8 1 /' <db.cds.1 |
sed 's/IN CDS '$id1' 8 1 /IN CDS '$((id1 ^ 255))' 8 1 /' <db.cds.1 |
sign bad-digests
sed '/IN CDS '$id1' 8 /p;s//IN CDS '$bad' 13 /' <db.cds.1 |
sed '/IN CDS '$id1' 8 /p;s//IN CDS '$((id1 ^ 255))' 13 /' <db.cds.1 |
sign bad-algos
rm -f dsset-*
@@ -1,18 +0,0 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
zone "example.com" {
type master;
file "example.com.db";
update-policy {
grant * krb5-selfsub TXT;
};
};
@@ -1,18 +0,0 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
zone "example.com" {
type master;
file "example.com.db";
update-policy {
grant * ms-selfsub TXT;
};
};
@@ -1,18 +0,0 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
zone "example.com" {
type master;
file "example.com.db";
update-policy {
grant * external TXT;
};
};
@@ -1,18 +0,0 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
zone "example.com" {
type master;
file "example.com.db";
update-policy {
grant a-key-name name TXT;
};
};
@@ -1,18 +0,0 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
zone "example.com" {
type master;
file "example.com.db";
update-policy {
grant a-key-name subdomain TXT;
};
};
@@ -1,18 +0,0 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
zone "example.com" {
type master;
file "example.com.db";
update-policy {
grant a-key-name wildcard TXT;
};
};
+1 -5
View File
@@ -54,14 +54,10 @@ do
pat="identity and name fields are not the same"
grep "$pat" checkconf.out > /dev/null || ret=1
;;
bad-update-policy[4589].conf|bad-update-policy1[01].conf)
bad-update-policy*.conf)
pat="name field not set to placeholder value"
grep "$pat" checkconf.out > /dev/null || ret=1
;;
bad-update-policy[67].conf|bad-update-policy1[2345].conf)
pat="missing name field type '.*' found"
grep "$pat" checkconf.out > /dev/null || ret=1
;;
esac
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
+1
View File
@@ -148,6 +148,7 @@ PYTHON=@PYTHON@
#
# Determine if we support various optional features.
#
CHECK_DSA=@CHECK_DSA@
HAVEXMLSTATS=@XMLSTATS@
HAVEJSONSTATS=@JSONSTATS@
ZLIB=@ZLIB@
+2 -1
View File
@@ -102,7 +102,7 @@ SEQUENTIALDIRS="acl additional addzone autosign builtin \
# tests can be run in parallel.
#
# This symbol must be kept in step with the PARALLEL macro in Makefile.in
PARALLELDIRS="allow-query catz rpzrecurse serve-stale"
PARALLELDIRS="allow_query catz rpzrecurse serve-stale"
SUBDIRS="$SEQUENTIALDIRS $PARALLELDIRS"
@@ -147,6 +147,7 @@ PYTHON=@PYTHON@
#
# Determine if we support various optional features.
#
CHECK_DSA=@CHECK_DSA@
HAVEXMLSTATS=@XMLSTATS@
HAVEJSONSTATS=@JSONSTATS@
ZLIB=@ZLIB@
+1 -1
View File
@@ -769,7 +769,7 @@ create_db(isc_mem_t *mctx, const dns_name_t *origin, dns_dbtype_t type,
sampledb->common.attributes = 0;
sampledb->common.rdclass = rdclass;
dns_name_dupwithoffsets(origin, mctx, &sampledb->common.origin);
CHECK(dns_name_dupwithoffsets(origin, mctx, &sampledb->common.origin));
isc_refcount_init(&sampledb->refs, 1);
+1 -1
View File
@@ -51,7 +51,7 @@ create_zone(sample_instance_t * const inst, dns_name_t * const name,
CHECK(dns_zonemgr_managezone(inst->zmgr, raw));
/* This is completely insecure - use some sensible values instead! */
dns_acl_any(inst->mctx, &acl_any);
CHECK(dns_acl_any(inst->mctx, &acl_any));
dns_zone_setupdateacl(raw, acl_any);
dns_zone_setqueryacl(raw, acl_any);
dns_zone_setxfracl(raw, acl_any);
+1 -1
View File
@@ -175,7 +175,7 @@ main(int argc, char **argv) {
int s;
int n = -1;
int v6only = -1;
socklen_t len = sizeof(v6only);
ISC_SOCKADDR_LEN_T len = sizeof(v6only);
s = socket(AF_INET6, SOCK_DGRAM, IPPROTO_UDP);
if (s >= 0) {
+4 -4
View File
@@ -12,10 +12,10 @@
#
# Set up interface aliases for bind9 system tests.
#
# IPv4: 10.53.0.{1..10} RFC 1918
# IPv4: 10.53.0.{1..8} RFC 1918
# 10.53.1.{0..2}
# 10.53.2.{0..2}
# IPv6: fd92:7065:b8e:ffff::{1..10} ULA
# IPv6: fd92:7065:b8e:ffff::{1..8} ULA
# fd92:7065:b8e:99ff::{1..2}
# fd92:7065:b8e:ff::{1..2}
#
@@ -65,7 +65,7 @@ case "$1" in
2) ipv6="00" ;;
*) ipv6="" ;;
esac
for ns in 1 2 3 4 5 6 7 8 9 10
for ns in 1 2 3 4 5 6 7 8
do
[ $i -gt 0 -a $ns -gt 2 ] && break
int=`expr $i \* 10 + $ns`
@@ -171,7 +171,7 @@ case "$1" in
2) ipv6="00" ;;
*) ipv6="" ;;
esac
for ns in 10 9 8 7 6 5 4 3 2 1
for ns in 8 7 6 5 4 3 2 1
do
[ $i -gt 0 -a $ns -gt 2 ] && continue
int=`expr $i \* 10 + $ns - 1`
+1
View File
@@ -0,0 +1 @@
checkdsa.sh
+17
View File
@@ -0,0 +1,17 @@
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
if [ "@CHECK_DSA@" -eq 0 ]; then
exit 1
fi
if [ ! -r /dev/random -o ! -r /dev/urandom ]; then
exit 1
fi
exit 0
+18 -2
View File
@@ -135,6 +135,22 @@ rm -f K${zone}.+*+*.private
for alg in ECDSAP256SHA256 NSEC3RSASHA1 DSA
do
case $alg in
DSA)
$SHELL ../checkdsa.sh 2> /dev/null || continue
checkfile=../checkdsa
touch $checkfile ;;
ECDSAP256SHA256)
fail=0
$KEYGEN -q -a ecdsap256sha256 test > /dev/null 2>&1 || fail=1
rm -f Ktest*
[ $fail != 0 ] && continue
$SHELL ../checkdsa.sh 2> /dev/null || continue
checkfile=../checkecdsa
touch $checkfile ;;
*) ;;
esac
k1=`$KEYGEN -q -a $alg -b 1024 -n zone -f KSK $zone`
k2=`$KEYGEN -q -a $alg -b 1024 -n zone $zone`
k3=`$KEYGEN -q -a $alg -b 1024 -n zone $zone`
@@ -145,9 +161,9 @@ do
rm -f $k1.private
mv $k1.key a-file
$IMPORTKEY -P now -D now+3600 -f a-file $zone > /dev/null 2>&1 ||
( echo "importkey failed: $alg" )
( echo "importkey failed: $alg"; rm -f $checkfile )
rm -f $k2.private
mv $k2.key a-file
$IMPORTKEY -f a-file $zone > /dev/null 2>&1 ||
( echo "importkey failed: $alg" )
( echo "importkey failed: $alg"; rm -f $checkfile )
done
+3 -3
View File
@@ -8,9 +8,9 @@
# information regarding copyright ownership.
rm -f dig.out.*
rm -f ns*/named.conf
rm -f ns*/named.memstats
rm -f ns*/named.run
rm -f ns?/named.conf
rm -f ns?/named.memstats
rm -f ns?/named.run
rm -f ns*/named.lock
# build.sh
-6
View File
@@ -23,9 +23,3 @@ edns512. NS ns.edns512.
ns.edns512. A 10.53.0.6
edns512-notcp. NS ns.edns512-notcp.
ns.edns512-notcp. A 10.53.0.7
ednsformerr. NS ns.ednsformerr.
ns.ednsformerr. A 10.53.0.8
ednsnotimp. NS ns.ednsnotimp.
ns.ednsnotimp. A 10.53.0.9
ednsrefused. NS ns.ednsrefused.
ns.ednsrefused. A 10.53.0.10
@@ -1,12 +0,0 @@
; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
;
; This Source Code Form is subject to the terms of the Mozilla Public
; License, v. 2.0. If a copy of the MPL was not distributed with this
; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;
; See the COPYRIGHT file distributed with this work for additional
; information regarding copyright ownership.
@ 60 SOA ns marka.isc.org. 1 0 0 0 0
@ 60 NS ns
ns 60 A 10.53.0.8
@@ -1,27 +0,0 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
options {
query-source address 10.53.0.10;
notify-source 10.53.0.10;
transfer-source 10.53.0.10;
port @PORT@;
pid-file "named.pid";
listen-on { 10.53.0.10; };
listen-on-v6 { none; };
recursion no;
dnssec-validation no;
};
zone "ednsrefused" {
type master;
file "ednsrefused.db";
};
@@ -1 +0,0 @@
ednsrefused
@@ -1,12 +0,0 @@
; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
;
; This Source Code Form is subject to the terms of the Mozilla Public
; License, v. 2.0. If a copy of the MPL was not distributed with this
; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;
; See the COPYRIGHT file distributed with this work for additional
; information regarding copyright ownership.
@ 60 SOA ns marka.isc.org. 1 0 0 0 0
@ 60 NS ns
ns 60 A 10.53.0.8
-27
View File
@@ -1,27 +0,0 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
options {
query-source address 10.53.0.8;
notify-source 10.53.0.8;
transfer-source 10.53.0.8;
port @PORT@;
pid-file "named.pid";
listen-on { 10.53.0.8; };
listen-on-v6 { none; };
recursion no;
dnssec-validation no;
};
zone "ednsformerr" {
type master;
file "ednsformerr.db";
};
@@ -1 +0,0 @@
ednsformerr
-12
View File
@@ -1,12 +0,0 @@
; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
;
; This Source Code Form is subject to the terms of the Mozilla Public
; License, v. 2.0. If a copy of the MPL was not distributed with this
; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;
; See the COPYRIGHT file distributed with this work for additional
; information regarding copyright ownership.
@ 60 SOA ns marka.isc.org. 1 0 0 0 0
@ 60 NS ns
ns 60 A 10.53.0.8
-27
View File
@@ -1,27 +0,0 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
options {
query-source address 10.53.0.9;
notify-source 10.53.0.9;
transfer-source 10.53.0.9;
port @PORT@;
pid-file "named.pid";
listen-on { 10.53.0.9; };
listen-on-v6 { none; };
recursion no;
dnssec-validation no;
};
zone "ednsnotimp" {
type master;
file "ednsnotimp.db";
};
@@ -1 +0,0 @@
ednsnotimp
+1 -3
View File
@@ -15,12 +15,10 @@ SYSTEMTESTTOP=..
$SHELL clean.sh
copy_setports ns1/named1.conf.in ns1/named.conf
copy_setports ns2/named.conf.in ns2/named.conf
copy_setports ns3/named.conf.in ns3/named.conf
copy_setports ns4/named.conf.in ns4/named.conf
copy_setports ns5/named.conf.in ns5/named.conf
copy_setports ns6/named.conf.in ns6/named.conf
copy_setports ns7/named.conf.in ns7/named.conf
copy_setports ns8/named.conf.in ns8/named.conf
copy_setports ns9/named.conf.in ns9/named.conf
copy_setports ns10/named.conf.in ns10/named.conf
+8 -62
View File
@@ -17,60 +17,6 @@ DIGOPTS="-p ${PORT}"
status=0
n=0
n=`expr $n + 1`
echo_i "checking formerr edns server setup ($n)"
ret=0
$DIG $DIGOPTS +edns @10.53.0.8 ednsformerr soa > dig.out.1.test$n || ret=1
grep "status: FORMERR" dig.out.1.test$n > /dev/null || ret=1
$DIG $DIGOPTS +noedns @10.53.0.8 ednsformerr soa > dig.out.2.test$n || ret=1
grep "status: NOERROR" dig.out.2.test$n > /dev/null || ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
n=`expr $n + 1`
echo_i "checking recursive lookup to formerr edns server succeeds ($n)"
ret=0
$DIG $DIGOPTS +tcp @10.53.0.1 ednsformerr soa > dig.out.test$n || ret=1
grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
n=`expr $n + 1`
echo_i "checking notimp edns server setup ($n)"
ret=0
$DIG $DIGOPTS +edns @10.53.0.9 ednsnotimp soa > dig.out.1.test$n || ret=1
grep "status: NOTIMP" dig.out.1.test$n > /dev/null || ret=1
$DIG $DIGOPTS +noedns @10.53.0.9 ednsnotimp soa > dig.out.2.test$n || ret=1
grep "status: NOERROR" dig.out.2.test$n > /dev/null || ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
n=`expr $n + 1`
echo_i "checking recursive lookup to notimp edns server fails ($n)"
ret=0
$DIG $DIGOPTS +tcp @10.53.0.1 ednsnotimp soa > dig.out.test$n
grep "status: NOERROR" dig.out.test$n > /dev/null && ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
n=`expr $n + 1`
echo_i "checking refused edns server setup ($n)"
ret=0
$DIG $DIGOPTS +edns @10.53.0.10 ednsrefused soa > dig.out.1.test$n || ret=1
grep "status: REFUSED" dig.out.1.test$n > /dev/null || ret=1
$DIG $DIGOPTS +noedns @10.53.0.10 ednsrefused soa > dig.out.2.test$n || ret=1
grep "status: NOERROR" dig.out.2.test$n > /dev/null || ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
n=`expr $n + 1`
echo_i "checking recursive lookup to refused edns server fails ($n)"
ret=0
$DIG $DIGOPTS +tcp @10.53.0.1 ednsrefused soa > dig.out.test$n
grep "status: NOERROR" dig.out.test$n > /dev/null && ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
n=`expr $n + 1`
echo_i "checking drop edns server setup ($n)"
ret=0
@@ -88,10 +34,10 @@ if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
n=`expr $n + 1`
echo_i "checking recursive lookup to drop edns server fails ($n)"
echo_i "checking recursive lookup to drop edns server succeeds ($n)"
ret=0
$DIG $DIGOPTS +tcp @10.53.0.1 dropedns soa > dig.out.test$n
grep "status: NOERROR" dig.out.test$n > /dev/null && ret=1
$DIG $DIGOPTS +tcp @10.53.0.1 dropedns soa > dig.out.test$n || ret=1
grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
@@ -109,10 +55,10 @@ if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
n=`expr $n + 1`
echo_i "checking recursive lookup to drop edns + no tcp server fails ($n)"
echo_i "checking recursive lookup to drop edns + no tcp server succeeds ($n)"
ret=0
$DIG $DIGOPTS +tcp @10.53.0.1 dropedns-notcp soa > dig.out.test$n
grep "status: NOERROR" dig.out.test$n > /dev/null && ret=1
$DIG $DIGOPTS +tcp @10.53.0.1 dropedns-notcp soa > dig.out.test$n || ret=1
grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
@@ -189,10 +135,10 @@ if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
n=`expr $n + 1`
echo_i "checking recursive lookup to edns 512 + no tcp server fails ($n)"
echo_i "checking recursive lookup to edns 512 + no tcp server succeeds ($n)"
ret=0
$DIG $DIGOPTS +tcp @10.53.0.1 edns512-notcp soa > dig.out.test$n || ret=1
grep "status: NOERROR" dig.out.test$n > /dev/null && ret=1
grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
-12
View File
@@ -40,18 +40,6 @@ rm -f ns3/nsec3param.test.db
rm -f ns3/too-big.test.db
rm -f ns5/local.db
rm -f ns6/in-addr.db
rm -f ns7/in-addr.db
rm -f ns7/example.com.db
rm -f ns7/_default.tsigkeys
rm -f ns8/in-addr.db
rm -f ns8/example.com.db
rm -f ns8/_default.tsigkeys
rm -f ns9/in-addr.db
rm -f ns9/example.com.db
rm -f ns9/_default.tsigkeys
rm -f ns10/example.com.db
rm -f ns10/in-addr.db
rm -f ns10/_default.tsigkeys
rm -f nsupdate.out*
rm -f typelist.out.*
rm -f ns1/sample.db
-113
View File
@@ -1,113 +0,0 @@
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
set -x
PWD=`pwd`
KRB5_CONFIG="${PWD}/krb5.conf"
export KRB5_CONFIG
KRB5_KDC_PROFILE=${PWD}/krb5kdc
export KRB5_KDC_PROFILE
now=`date +%s`
lifetime=`expr 2147483647 - $now`
lifetime=`expr $lifetime / 3600 / 24 - 30`
cat << EOF > "${KRB5_CONFIG}"
[libdefaults]
default_realm = EXAMPLE.COM
dns_lookup_kdc = false
# Depending on what you are testing, you may want something like:
# default_keytab_name = FILE:/usr/local/var/keytab
[realms]
EXAMPLE.COM = {
admin_server = 127.0.0.1:50001
kdc = 127.0.0.1:50000
database_module = DB2
kdc_ports = 50000
kadmind_port = 50001
}
[dbmodules]
DB2 = {
db_library = db2
}
[logging]
# Use any pathnames you want here.
kdc = FILE:${PWD}/kdc.log
admin_server = FILE:${PWD}/kadmin.log
# Depending on what you are testing, you may want:
# [domain_realm]
# your.domain = EXAMPLE.COM
EOF
rm -rf ${KRB5_KDC_PROFILE}
mkdir -p ${KRB5_KDC_PROFILE}
chmod 700 ${KRB5_KDC_PROFILE}
cat << EOF > "${KRB5_KDC_PROFILE}"/kdc.conf
[kdcdefaults]
kdc_ports = 50000
kdc_tcp_ports = 50000
[realms]
EXAMPLE.COM = {
key_stash_file = ${KRB5_KDC_PROFILE}/.k5.EXAMPLE.COM
database_module = EXAMPLE.COM
max_life = ${lifetime}d
}
[dbmodules]
EXAMPLE.COM = {
db_library = db2
database_name = ${KRB5_KDC_PROFILE}/principal
}
EOF
kdb5_util create -s <<EOF
master
master
EOF
krb5kdc -n &
krb5kdcpid=$!
#trap "kill $krb5kdcpid; wait; trap 0; exit" 0 15
kadmin.local addprinc -maxlife ${lifetime}d -randkey DNS/ns7.example.com@EXAMPLE.COM
kadmin.local addprinc -maxlife ${lifetime}d -randkey DNS/ns8.example.com@EXAMPLE.COM
kadmin.local addprinc -maxlife ${lifetime}d -randkey host/machine.example.com@EXAMPLE.COM
kadmin.local ktadd -k ns7-server.keytab DNS/ns7.example.com@EXAMPLE.COM
kadmin.local ktadd -k ns8-server.keytab DNS/ns8.example.com@EXAMPLE.COM
kadmin.local ktadd -k krb5-machine.keytab host/machine.example.com@EXAMPLE.COM
kadmin.local addprinc -maxlife ${lifetime}d -randkey 'DNS/ns9.example.com@EXAMPLE.COM'
kadmin.local addprinc -maxlife ${lifetime}d -randkey 'DNS/ns10.example.com@EXAMPLE.COM'
kadmin.local addprinc -maxlife ${lifetime}d -randkey 'machine$@EXAMPLE.COM'
kadmin.local ktadd -k ns9-server.keytab 'DNS/ns9.example.com@EXAMPLE.COM'
kadmin.local ktadd -k ns10-server.keytab 'DNS/ns10.example.com@EXAMPLE.COM'
kadmin.local ktadd -k ms-machine.keytab 'machine$@EXAMPLE.COM'
kinit -V -k -t krb5-machine.keytab -l ${lifetime}d -c krb5-machine.ccache host/machine.example.com@EXAMPLE.COM
kinit -V -k -t ms-machine.keytab -l ${lifetime}d -c ms-machine.ccache 'machine$@EXAMPLE.COM'
cp ns7-server.keytab ../ns7/dns.keytab
cp ns8-server.keytab ../ns8/dns.keytab
cp ns9-server.keytab ../ns9/dns.keytab
cp ns10-server.keytab ../ns10/dns.keytab
cp krb5-machine.ccache ../ns7/machine.ccache
cp krb5-machine.ccache ../ns8/machine.ccache
cp ms-machine.ccache ../ns9/machine.ccache
cp ms-machine.ccache ../ns10/machine.ccache
echo krb5kdc pid:$krb5kdcpid
Binary file not shown.
@@ -1,19 +0,0 @@
; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
;
; This Source Code Form is subject to the terms of the Mozilla Public
; License, v. 2.0. If a copy of the MPL was not distributed with this
; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;
; See the COPYRIGHT file distributed with this work for additional
; information regarding copyright ownership.
$TTL 300 ; 5 minutes
@ IN SOA ns10.example.com. hostmaster.example.com. (
1 ; serial
2000 ; refresh (2000 seconds)
2000 ; retry (2000 seconds)
1814400 ; expire (3 weeks)
3600 ; minimum (1 hour)
)
NS ns10
ns10 A 10.53.0.10
@@ -1,19 +0,0 @@
; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
;
; This Source Code Form is subject to the terms of the Mozilla Public
; License, v. 2.0. If a copy of the MPL was not distributed with this
; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;
; See the COPYRIGHT file distributed with this work for additional
; information regarding copyright ownership.
$TTL 300 ; 5 minutes
@ IN SOA ns10.example.com. hostmaster.example.com. (
1 ; serial
2000 ; refresh (2000 seconds)
2000 ; retry (2000 seconds)
1814400 ; expire (3 weeks)
3600 ; minimum (1 hour)
)
NS ns10
ns10 A 10.53.0.10
Binary file not shown.
@@ -1,48 +0,0 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
options {
query-source address 10.53.0.10;
notify-source 10.53.0.10;
transfer-source 10.53.0.10;
port @PORT@;
pid-file "named.pid";
session-keyfile "session.key";
listen-on { 10.53.0.10; };
recursion no;
notify yes;
minimal-responses no;
tkey-gssapi-keytab "dns.keytab";
};
key rndc_key {
secret "1234abcd8765";
algorithm hmac-sha256;
};
controls {
inet 10.53.0.10 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
};
zone "in-addr.arpa" {
type master;
file "in-addr.db";
update-policy { grant EXAMPLE.COM ms-subdomain . PTR; };
};
zone "example.com" {
type master;
file "example.com.db";
update-policy {
grant EXAMPLE.COM ms-selfsub . ANY;
grant EXAMPLE.COM ms-subdomain _tcp.example.com SRV;
};
};

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