Commit ef9334d7 authored by Mukund Sivaraman's avatar Mukund Sivaraman
Browse files

3795. [bug] Make named-checkconf detect raw masterfiles for

                        hint zones and reject them. [RT #35268]

Squashed commit of the following:

commit 5b0254711d6b77940d6217b9131b9d401df8a866
Author: Mukund Sivaraman <muks@isc.org>
Date:   Fri Mar 28 02:09:01 2014 +0530

    Remove redundant helper function

commit a4341c1a2ba830c8cee1def57a533f987f67c3dc
Author: Mark Andrews <marka@isc.org>
Date:   Thu Jan 30 10:08:17 2014 +1100

    error out if masterfile-format raw is specified for a hint zone.
parent 657099c9
3795. [bug] Make named-checkconf detect raw masterfiles for
hint zones and reject them. [RT #35268]
3794. [maint] Added AAAA for C.ROOT-SERVERS.NET.
3793. [bug] zone.c:save_nsec3param() could assert when out of
......
......@@ -142,18 +142,6 @@ get_checknames(const cfg_obj_t **maps, const cfg_obj_t **obj) {
}
}
static isc_result_t
config_get(const cfg_obj_t **maps, const char *name, const cfg_obj_t **obj) {
int i;
for (i = 0;; i++) {
if (maps[i] == NULL)
return (ISC_R_NOTFOUND);
if (cfg_map_get(maps[i], name, obj) == ISC_R_SUCCESS)
return (ISC_R_SUCCESS);
}
}
static isc_result_t
configure_hint(const char *zfile, const char *zclass, isc_mem_t *mctx) {
isc_result_t result;
......@@ -367,8 +355,7 @@ configure_zone(const char *vclass, const char *view,
masterformat = dns_masterformat_text;
fmtobj = NULL;
result = config_get(maps, "masterfile-format", &fmtobj);
if (result == ISC_R_SUCCESS) {
if (get_maps(maps, "masterfile-format", &fmtobj)) {
const char *masterformatstr = cfg_obj_asstring(fmtobj);
if (strcasecmp(masterformatstr, "text") == 0)
masterformat = dns_masterformat_text;
......
zone "." {
type hint;
masterfile-format raw;
file "hint";
};
......@@ -1486,7 +1486,7 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
{ "integrity-check", MASTERZONE },
{ "check-mx-cname", MASTERZONE },
{ "check-srv-cname", MASTERZONE },
{ "masterfile-format", MASTERZONE | SLAVEZONE | STUBZONE | HINTZONE |
{ "masterfile-format", MASTERZONE | SLAVEZONE | STUBZONE |
REDIRECTZONE },
{ "update-check-ksk", MASTERZONE | SLAVEZONE },
{ "dnssec-dnskey-kskonly", MASTERZONE | SLAVEZONE },
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment