2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 05:57:52 +00:00

1114 Commits

Author SHA1 Message Date
Mukund Sivaraman
975afc508d Fix ARM about min-update-interval default for RPZ zones
Also, use variable names consistent with catz for rpz configuration functions
2018-05-17 19:02:51 -07:00
Ondřej Surý
3a4f820d62 Replace all random functions with isc_random, isc_random_buf and isc_random_uniform API.
The three functions has been modeled after the arc4random family of
functions, and they will always return random bytes.

The isc_random family of functions internally use these CSPRNG (if available):

1. getrandom() libc call (might be available on Linux and Solaris)
2. SYS_getrandom syscall (might be available on Linux, detected at runtime)
3. arc4random(), arc4random_buf() and arc4random_uniform() (available on BSDs and Mac OS X)
4. crypto library function:
4a. RAND_bytes in case OpenSSL
4b. pkcs_C_GenerateRandom() in case PKCS#11 library
2018-05-16 09:54:35 +02:00
Michał Kępień
172d0c401e Address GCC 8 -Wformat-truncation warnings 2018-05-10 10:35:01 +02:00
Ondřej Surý
9a3a257374 Always use random data from the crypto provider 2018-05-03 15:03:46 +02:00
Mark Andrews
68e9315c7d add named.conf option root-key-sentinel 2018-04-18 08:49:55 -07:00
Mathieu Arnold
ebf7641610 Rename the last occurence of dns_dt_create2. 2018-04-09 16:46:07 +02:00
Michał Kępień
4df4a8e731 Use dns_fixedname_initname() where possible
Replace dns_fixedname_init() calls followed by dns_fixedname_name()
calls with calls to dns_fixedname_initname() where it is possible
without affecting current behavior and/or performance.

This patch was mostly prepared using Coccinelle and the following
semantic patch:

    @@
    expression fixedname, name;
    @@
    -	dns_fixedname_init(&fixedname);
    	...
    -	name = dns_fixedname_name(&fixedname);
    +	name = dns_fixedname_initname(&fixedname);

The resulting set of changes was then manually reviewed to exclude false
positives and apply minor tweaks.

It is likely that more occurrences of this pattern can be refactored in
an identical way.  This commit only takes care of the low-hanging fruit.
2018-04-09 12:14:16 +02:00
Witold Kręcicki
102a397e39 libdns refactoring: get rid of multiple versions of dns_keytable_add, dns_iptable_addprefix and dns_iptable_addprefix 2018-04-06 08:04:41 +02:00
Witold Kręcicki
c8aa1ee9e6 libdns refactoring: get rid of multiple versions of dns_dt_create, dns_view_setcache, dns_zt_apply, dns_message_logfmtpacket, dns_message_logpacket, dns_ssutable_checkrules and dns_ttl_totext 2018-04-06 08:04:41 +02:00
Witold Kręcicki
d54d482af0 libdns refactoring: get rid of multiple versions of dns_view_find, dns_view_findzonecut and dns_view_flushcache 2018-04-06 08:04:41 +02:00
Witold Kręcicki
702c022016 libdns refactoring: get rid of multiple versions of dns_xfrin_create, dst_key_generate, dst_lib_init and dst_context_create 2018-04-06 08:04:41 +02:00
Witold Kręcicki
ef0e68bfc3 libdns refactoring: integrate zone->options and zone->options2 into one enum, removing unnecessary flags. 2018-04-06 08:04:41 +02:00
Witold Kręcicki
7dbc6768d6 libdns refactoring: get rid of multiple versions of dns_zone_setfile, dns_zone_notifyreceive, dns_zone_dumptostream, dns_zone_getserial 2018-04-06 08:04:41 +02:00
Witold Kręcicki
42ee8c853a libdns refactoring: get rid of 3 versions of dns_resolver_createfetch 2018-04-06 08:04:41 +02:00
Witold Kręcicki
d39b3209fb libdns refactoring: get rid of 3 versions of dns_cache_create 2018-04-06 08:04:41 +02:00
Ondřej Surý
b097be17ef Remove unused obsolete isc_hash_* function, and just keep the FNV-1a version 2018-04-04 23:12:14 +02:00
Mark Andrews
d24fb6b032 fix log message about 'dnsrps-enable yes;' when not configured (this will only ever be emitted if the parser is incorrectly updated as the error is normally caught there) 2018-03-07 15:35:38 -05:00
Evan Hunt
ab0fe63f07 minor cleanup and addressed a sprintf format warning 2018-02-24 17:56:17 -08:00
Ondřej Surý
843d389661 Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
Michał Kępień
8e3c16175a Make dns_dt_reopen() request task-exclusive mode on its own
Instead of relying on the caller to set up task-exclusive mode, make
dns_dt_reopen() enforce task-exclusive mode itself, using the task
specified at dnstap environment creation time.
2018-02-16 09:39:24 +01:00
Mark Andrews
64bc122d11 use %u instead of %d 2018-02-16 10:20:38 +11:00
Mark Andrews
f5ee6f7292 use %u rather than %d; pass a unsigned int pointer 2018-02-16 10:19:57 +11:00
Mark Andrews
baef0ca988 4889. [func] Warn about the use of old root keys without the new
root key being present.  Warn about dlv.isc.org's
                        key being present. Warn about both managed and
                        trusted root keys being present. [RT #43670]
2018-02-09 12:04:45 +11:00
Michał Kępień
af1937c35a [master] Prevent crashing due to a race during server shutdown
4884.	[bug]		named could crash on shutdown due to a race between
			shutdown_server() and ns__client_request(). [RT #47120]
2018-02-05 20:24:14 +01:00
Evan Hunt
cf8f4241e7 [master] normalize rndc on/off commands
4867.	[cleanup]	Normalize rndc on/off commands (validation,
			querylog, serve-stale) so they all accept the
			same synonyms for on/off (yes/no, true/false,
			enable/disable). Thanks to Tony Finch. [RT #47022]
2018-01-18 10:50:13 -08:00
Michał Kępień
ae51a676c9 [master] Ensure all master definitions in a catalog zone contain an IP address
4864.	[bug]		named acting as a slave for a catalog zone crashed if
			the latter contained a master definition without an IP
			address. [RT #45999]
2018-01-15 20:50:09 +01:00
Tinderbox User
a280a7871d update copyright notice / whitespace 2018-01-03 23:45:29 +00:00
Mark Andrews
0b27aa0712 4856. [bug] 'rndc zonestatus' reported the wrong underlying type
for a inline slave zone. [RT #46875]
2018-01-04 10:10:05 +11:00
Mark Andrews
9bec7facfb 4850. [bug] Named failed to restart with multiple added zones in
lmdb database. [RT #46889]
2017-12-27 16:24:33 +11:00
Mark Andrews
2d7f89b9c7 4849. [bug] Duplicate zones could appear in the .nzf file if
addzone failed. [RT #46435]
2017-12-20 17:13:58 +11:00
Evan Hunt
79c2400d91 [master] allow primary/secondary as synonyms for master/slave
4848.	[func]		Zone types "primary" and "secondary" can now be used
			as synonyms for "master" and "slave" in named.conf.
			[RT #46713]
2017-12-15 01:47:05 -08:00
Evan Hunt
f29ca5db28 [master] fix incorrect comment 2017-11-30 13:35:20 -08:00
Evan Hunt
e197a2bd15 [master] fix "allow-transfer" inheritance and clean up ACL configuration
4836.	[bug]		Zones created using "rndc addzone" could
			temporarily fail to inherit an "allow-transfer"
			ACL that had been configured in the options
			statement. [RT #46603]
2017-11-30 12:37:08 -08:00
Michał Kępień
2c20fc0d13 [master] Fix LMDB support on OpenBSD; clean up and refactor LMDB-related code
4835.	[cleanup]	Clean up and refactor LMDB-related code. [RT #46718]

4834.	[port]		Fix LMDB support on OpenBSD. [RT #46718]
2017-11-30 14:34:04 +01:00
Michał Kępień
40a90fbf89 [master] Do not use thread-local storage for storing LMDB reader locktable slots
4828.	[bug]		Do not use thread-local storage for storing LMDB reader
			locktable slots. [RT #46556]
2017-11-27 09:48:10 +01:00
Mark Andrews
78e1d7cdde style 2017-11-23 16:09:27 +11:00
Michał Kępień
312c84c73a [master] Minor improvements to code handling managed keys
4812.	[bug]		Minor improvements to stability and consistency of code
			handling managed keys. [RT #46468]
2017-11-09 15:18:39 +01:00
Mukund Sivaraman
7e1df5182c [master] isc_rng_randombytes()
4807.	[cleanup]	isc_rng_randombytes() returns a specified number of
			bytes from the PRNG; this is now used instead of
			calling isc_rng_random() multiple times. [RT #46230]
2017-11-06 10:44:37 -08:00
Evan Hunt
9bb007fd2d [master] "zoneload" logging category
4806.	[func]		Log messages related to loading of zones are now
			directed to the "zoneload" logging category.
			[RT #41640]
2017-11-01 22:48:12 -07:00
Mark Andrews
ff30290b48 4804. [port] win32: access() does not work on directories as
required by POSIX.  Supply a alternative in
                        isc_file_isdirwritable. [RT #46394]
2017-11-01 09:29:24 +11:00
Mark Andrews
f5e1b555c5 4801. [func] 'dnssec-lookaside auto;' and 'dnssec-lookaside .
trust-anchor dlv.isc.org;' now elicit warnings rather
                        than being fatal configuration errors. [RT #46410]
2017-10-30 07:40:59 +11:00
Mukund Sivaraman
625f656aa8 When processing delzone, write one zone config per line to the NZF (#46323) 2017-10-29 07:40:20 +05:30
Evan Hunt
c9f8165a06 [master] tag initializing keys
4798.	[func]		Keys specified in "managed-keys" statements
			are tagged as "initializing" until they have been
			updated by a key refresh query. If initialization
			fails it will be visible from "rndc secroots".
			[RT #46267]
2017-10-27 15:49:44 -07:00
Brian Conry
864bc6b56e [master] Increase the maximum TCP keepalive timeout to 65535
4796.	[bug]		Increase the maximum configurable TCP keepalive
			timeout to 65535. [RT #44710]
2017-10-27 14:58:48 +02:00
Evan Hunt
eb2ef7b53e [master] check new-zones-directory
4789.	[cleanup]	Check writability of new-zones-directory. [RT #46308]
2017-10-25 01:19:46 -07:00
Evan Hunt
65314b0fd8 [master] "enable-filter-aaaa" no longer optional
4786.	[func]		The "filter-aaaa-on-v4" and "filter-aaaa-on-v6"
			options are no longer conditionally compiled.
			[RT #46340]
2017-10-25 00:33:51 -07:00
Evan Hunt
89636d8f30 [master] clean up a redundancy
4777.	[cleanup]	Removed a redundant call to configure_view_acl().
			[RT #46369]
2017-10-23 11:11:19 -07:00
Evan Hunt
3abcd7cd8a [master] Revert "[master] tag initializing keys so they can't be used for normal validation"
This reverts commit 560d8b833edceb4b715fe46b45f2009dc09fdb5d.

This change created a potential race between key refresh queries and
root zone priming queries which could leave the root name servers in
the bad-server cache.
2017-10-12 10:53:35 -07:00
Evan Hunt
560d8b833e [master] tag initializing keys so they can't be used for normal validation
4773.	[bug]		Keys specified in "managed-keys" statements
			can now only be used when validating key refresh
			queries during initialization of RFC 5011 key
			maintenance. If initialization fails, DNSSEC
			validation of normal queries will also fail.
			Previously, validation of normal queries could
			succeed using the initializing key, potentially
			masking problems with managed-keys. [RT #46077]
2017-10-11 21:01:13 -07:00
Evan Hunt
9f1e715a64 [master] X_OK bit not supported on windows 2017-10-11 17:43:16 -07:00