2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-27 12:38:24 +00:00

317 Commits

Author SHA1 Message Date
Evan Hunt
d07053c8f6 fail if using both dnssec-keys and managed-keys in the same config 2019-06-05 07:49:57 -07:00
Evan Hunt
821f041d8c "dnssec-keys" is now a synonym for "managed-keys"
- managed-keys is now deprecated as well as trusted-keys, though
  it continues to work as a synonym for dnssec-keys
- references to managed-keys have been updated throughout the code.
- tests have been updated to use dnssec-keys format
- also the trusted-keys entries have been removed from the generated
  bind.keys.h file and are no longer generated by bindkeys.pl.
2019-06-05 07:49:57 -07:00
Evan Hunt
82f5bce1bb update key checks in lib/bind9/check.c and fix checkconf test
- any use of trusted or static keys for the root zone will now
  elicit a warning, regardless of what the keys may be
- ditto for any use of a key for dlv.isc.org, static or managed
2019-06-05 07:49:57 -07:00
Evan Hunt
5ab252183b deprecate "trusted-keys"
- trusted-keys is now flagged as deprecated, but still works
- managed-keys can be used to configure permanent trust anchors by
  using the "static-key" keyword in place of "initial-key"
- parser now uses an enum for static-key and initial-key keywords
2019-06-05 07:49:23 -07:00
Tony Finch
a9dca5831b Remove cleaning-interval remnants.
Since 2008, the cleaning-interval timer has been documented as
"effectively obsolete" and disabled in the default configuration with
a comment saying "now meaningless".

This change deletes all the code that implements the cleaning-interval
timer, except for the config parser in whcih it is now explicitly
marked as obsolete.

I have verified (using the deletelru and deletettl cache stats) that
named still cleans the cache after this change.
2019-06-05 13:08:12 +10:00
Evan Hunt
37e79bd79c reject the use of trusted-keys and managed-keys for the same name 2019-05-07 22:02:37 -07:00
Evan Hunt
91dca0f8da don't fail when allow-update{,-forwarding} is used globally 2019-03-21 21:17:49 -07:00
Evan Hunt
b3ff3bf2e4 remove configuration, syntax checking and implementation of dnssec-enable 2019-03-14 23:29:07 -07:00
Ondřej Surý
78d0cb0a7d Use coccinelle to remove explicit '#include <config.h>' from the source files 2019-03-08 15:15:05 +01:00
Michał Kępień
1a9fc624ca Look for named plugins in ${libdir}/named
When the "library" part of a "plugin" configuration stanza does not
contain at least one path separator, treat it as a filename and assume
it is a name of a shared object present in the named plugin installation
directory.  Absolute and relative paths can still be used and will be
used verbatim.  Get the full path to a plugin before attempting to
check/register it so that all relevant log messages include the same
plugin path (apart from the one logged when the full path cannot be
determined).
2019-03-05 16:06:25 -08:00
Evan Hunt
adcc16f2d7 error on allow-update and allow-update-forwarding at options/view level 2019-01-15 23:20:38 -08:00
Mark Andrews
b75970efa3 named-checkconf triggered a assertion when a mirror zone had a bad name 2018-12-20 13:19:18 +11:00
Mark Andrews
53a33f7365 pass the correct object to cfg_obj_log 2018-12-14 16:29:02 +11:00
Ondřej Surý
e69dc0dbc7 Remove RSAMD5 support 2018-12-11 11:32:24 +01:00
Michał Kępień
4234968798 add a function for processing a list of configured plugins
Add a new libisccfg function, cfg_pluginlist_foreach(), which allows an
arbitrary callback to be invoked for every "plugin" stanza present in a
configuration object.  Use this function for both loading plugins and
checking their configuration in order to reduce duplication of
configuration processing code present in bin/named/server.c and
lib/bind9/check.c.
2018-12-06 10:36:50 -08:00
Evan Hunt
fd20f10d52 name change from "hook modules" to "plugins"
- "hook" is now used only for hook points and hook actions
- the "hook" statement in named.conf is now "plugin"
- ns_module and ns_modlist are now ns_plugin and ns_plugins
- ns_module_load is renamed ns_plugin_register
- the mandatory functions in plugin modules (hook_register,
  hook_check, hook_version, hook_destroy) have been renamed
2018-12-06 10:36:50 -08:00
Evan Hunt
8da0c0e7d5 eliminate ns_hookctx structure, pass mctx/lctx/view directly 2018-12-06 10:36:44 -08:00
Evan Hunt
7a47e4d85f restore filter-aaaa syntax checking
- added functionality to check hook parameters in named-checkconf,
  and restored the checkconf tests that were removed from the
  filter-aaaa test.
2018-12-06 10:29:12 -08:00
Evan Hunt
9911c835d3 add a parser to filter-aaaa.so and pass in the parameters
- make some cfg-parsing functions global so they can be run
  from filter-aaaa.so
- add filter-aaaa options to the hook module's parser
- mark filter-aaaa options in named.conf as obsolete, remove
  from named and checkconf, and update the filter-aaaa test not to
  use checkconf anymore
- remove filter-aaaa-related struct members from dns_view
2018-12-06 10:29:11 -08:00
Mark Andrews
5744415a75 only test for prefixlen <= 63 2018-12-03 16:26:54 +11:00
Ondřej Surý
e9a939841d Add min-cache-ttl and min-ncache-ttl keywords
Sometimes it is useful to set a 'floor' on the TTL for records
to be cached.  Some sites like to use ridiculously low TTLs for
some reason, and that often is not compatible with slow links.

Signed-off-by: Michael Milligan <milli@acmeps.com>
Signed-off-by: LaMont Jones <lamont@debian.org>
2018-11-14 18:24:53 +01:00
Ondřej Surý
23fff6c569 Hint the compiler with ISC_UNREACHABLE(); that code after INSIST(0); cannot be reached 2018-11-08 12:22:17 +07:00
Ondřej Surý
7fd3dc63de Add generic message digest API (isc_md) to replace specific MD functions md5/sha1/sha256 2018-10-25 08:15:42 +02:00
Michał Kępień
2c69734bcf Define a default master server list for the root zone
To minimize the effort required to set up IANA root zone mirroring,
define a default master server list for the root zone and use it when
that zone is to be mirrored and no master server list was explicitly
specified.  Contents of that list are taken from RFC 7706 and are
subject to change in future releases.

Since the static get_masters_def() function in bin/named/config.c does
exactly what named_zone_configure() in bin/named/zoneconf.c needs to do,
make the former non-static and use it in the latter to prevent code
duplication.
2018-10-24 20:32:55 +02:00
Michał Kępień
34dc674fed Prevent mirror zones from being used when recursion is disabled
Since mirror zone data is treated as cache data for access control
purposes, configuring a mirror zone and disabling recursion at the same
time would effectively prevent mirror zone data from being used since
disabling recursion also disables cache access to all clients by
default.  Even though this behavior can be inhibited by configuration,
mirror zones are a recursive resolver feature and thus recursion is now
required to use them.

Ignore the fact that certain configurations might still trick named into
assuming recursion is enabled when it effectively is not since this
change is not meant to put a hard policy in place but rather just to
prevent accidental mirror zone misuse.
2018-10-24 20:32:55 +02:00
Michał Kępień
1d49b01cc6 Clean up handling of NOTIFY settings for mirror zones
Previous way of handling NOTIFY settings for mirror zones was a bit
tricky: any value of the "notify" option was accepted, but it was
subsequently overridden with dns_notifytype_explicit.  Given the way
zone configuration is performed, this resulted in the following
behavior:

  - if "notify yes;" was set explicitly at any configuration level or
    inherited from default configuration, it was silently changed and so
    only hosts specified in "also-notify", if any, were notified,

  - if "notify no;" was set at any configuration level, it was
    effectively honored since even though zone->notifytype was silently
    set to dns_notifytype_explicit, the "also-notify" option was never
    processed due to "notify no;" being set.

Effectively, this only allowed the hosts specified in "also-notify" to
be notified, when either "notify yes;" or "notify explicit;" was
explicitly set or inherited from default configuration.

Clean up handling of NOTIFY settings for mirror zones by:

  - reporting a configuration error when anything else than "notify no;"
    or "notify explicit;" is set for a mirror zone at the zone level,

  - overriding inherited "notify yes;" setting with "notify explicit;"
    for mirror zones,

  - informing the user when the "notify" setting is overridden, unless
    the setting in question was inherited from default configuration.
2018-10-24 20:32:55 +02:00
Michał Kępień
4a83ccf071 Handle "type mirror;" when parsing zone configuration
Add a new zone type, CFG_ZONE_MIRROR, to libisccfg, in order to limit
the list of options which are considered valid for mirror zones.  Update
the relevant configuration checks.
2018-10-24 20:32:55 +02:00
Michał Kępień
b324576858 Fix the configuration type used by the "server-addresses" option
Contrary to what the documentation states, the "server-addresses"
static-stub zone option does not accept custom port numbers.  Fix the
configuration type used by the "server-addresses" option to ensure
documentation matches source code.  Remove a check_zoneconf() test which
is unnecessary with this fix in place.
2018-10-24 15:13:31 +02:00
Mark Andrews
fbeefd4990 add krb5-selfsub and ms-selfsub 2018-09-10 09:32:31 +10:00
Mark Andrews
5fb75a3d75 check that name field is not a valid type 2018-09-10 09:32:31 +10:00
Mark Andrews
156d86e673 fix dns_ssumatchtype_subdomainms dns_ssumatchtype_subdomainkrb5 as they don't require the name field to be '.' 2018-09-10 09:32:31 +10:00
Witold Krecicki
d932ec871c Silence some warnings and errors 2018-08-31 13:48:26 -07:00
Ondřej Surý
994e656977 Replace custom isc_boolean_t with C standard bool type 2018-08-08 09:37:30 +02:00
Ondřej Surý
cb6a185c69 Replace custom isc_u?intNN_t types with C99 u?intNN_t types 2018-08-08 09:37:28 +02:00
Ondřej Surý
64fe6bbaf2 Replace ISC_PRINT_QUADFORMAT with inttypes.h format constants 2018-08-08 09:36:44 +02:00
Ondřej Surý
c3b8130fe8 Make OpenSSL mandatory 2018-07-19 12:47:03 -04:00
Mark Andrews
e01a4bcb20 construct a symtab of valid in-view targets then check that the target exists 2018-06-26 08:23:51 -07:00
Evan Hunt
e324449349 remove the experimental authoritative ECS support from named
- mark the 'geoip-use-ecs' option obsolete; warn when it is used
  in named.conf
- prohibit 'ecs' ACL tags in named.conf; note that this is a fatal error
  since simply ignoring the tags could make ACLs behave unpredictably
- re-simplify the radix and iptable code
- clean up dns_acl_match(), dns_aclelement_match(), dns_acl_allowed()
  and dns_geoip_match() so they no longer take ecs options
- remove the ECS-specific unit and system test cases
- remove references to ECS from the ARM
2018-05-25 08:21:25 -07:00
Evan Hunt
c592655c0f new option "dnskey-sig-validity"
- overrides "sig-validity-interval" for DNSKEY, CDNSKEY and CDS RRSIGs
2018-04-20 12:12:08 -07: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
Mukund Sivaraman
2a44fd3f80 Fix zone count check to only occur on RPZ zones 2018-03-18 10:08:22 +00:00
Mukund Sivaraman
d20d86e37d Check for more than 64 policy zones 2018-03-18 10:08:22 +00:00
Mark Andrews
3e7e280040 check for in-view zones colliding with other zone definitions; also check the syntax of the in-view zone name 2018-03-08 11:53:21 +11:00
Evan Hunt
ab0fe63f07 minor cleanup and addressed a sprintf format warning 2018-02-24 17:56:17 -08:00
Mark Andrews
dcd309bea1 conditionally typedef fstrmtable 2018-02-24 17:49:49 -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
Evan Hunt
b252549e5a [rt43670] more emphatic warning 2018-02-09 12:28:49 +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
Mark Andrews
ec771bbdc8 4885. [security] update-policy rules that otherwise ignore the name
field now require that it be set to "." to ensure
                        that any type list present is properly interpreted.
                        [RT #47126]
2018-02-07 13:34:02 +11:00
Tinderbox User
3fda67b596 update copyright notice / whitespace 2018-01-22 23:46:02 +00:00