2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

Merge branch '2882-deprecate-masterfile-map-option' into 'main'

Mark the masterfile-format type 'map' as deprecated

Closes #2882

See merge request isc-projects/bind9!5418
This commit is contained in:
Ondřej Surý
2021-09-17 04:18:19 +00:00
8 changed files with 91 additions and 0 deletions

View File

@@ -1,3 +1,7 @@
5719. [func] The "masterfile-format" format "map" has been marked
as deprecated. The "map" format will be permanently
removed in a future release. [GL #2882]
5718. [bug] Changing the sig signing type, by specifing
sig-signing-type, failed as the configuration was
incorrectly rejected. [GL #2906]

View File

@@ -1053,6 +1053,9 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
masterformat = dns_masterformat_raw;
} else if (strcasecmp(masterformatstr, "map") == 0) {
masterformat = dns_masterformat_map;
cfg_obj_log(obj, named_g_lctx, ISC_LOG_WARNING,
"masterfile-format: format 'map' is "
"deprecated");
} else {
INSIST(0);
ISC_UNREACHABLE();

View File

@@ -0,0 +1,20 @@
/*
* 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 5300;
};
zone example {
type secondary;
primaries { ::1; };
masterfile-format map;
};

View File

@@ -0,0 +1,20 @@
/*
* 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 5300;
};
zone example {
type secondary;
primaries { ::1; };
masterfile-format raw;
};

View File

@@ -0,0 +1,20 @@
/*
* 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 5300;
};
zone example {
type secondary;
primaries { ::1; };
masterfile-format text;
};

View File

@@ -571,6 +571,24 @@ grep "not recommended" < checkconf.out$n > /dev/null || ret=1
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
status=`expr $status + $ret`
n=$((n+1))
echo_i "check that masterfile-format map generates deprecation warning ($n)"
ret=0
$CHECKCONF deprecated-masterfile-format-map.conf > checkconf.out$n 2>/dev/null || ret=1
grep "is deprecated" < checkconf.out$n >/dev/null || ret=1
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
status=$((status+ret))
n=$((n+1))
echo_i "check that masterfile-format text and raw don't generate deprecation warning ($n)"
ret=0
$CHECKCONF good-masterfile-format-text.conf > checkconf.out$n 2>/dev/null || ret=1
grep "is deprecated" < checkconf.out$n >/dev/null && ret=1
$CHECKCONF good-masterfile-format-raw.conf > checkconf.out$n 2>/dev/null || ret=1
grep "is deprecated" < checkconf.out$n >/dev/null && ret=1
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
status=$((status+ret))
rmdir keys
echo_i "exit status: $status"

View File

@@ -47,6 +47,9 @@ Feature Changes
9.16.0 but no error was reported, although sending UDP messages
(such as notifies) would fail. :gl:`#2888`
- The ``masterfile-format`` format ``map`` has been marked as deprecated and
will be removed in a future release. :gl:`#2882`
Bug Fixes
~~~~~~~~~

View File

@@ -3459,6 +3459,9 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
masterformat = dns_masterformat_raw;
} else if (strcasecmp(masterformatstr, "map") == 0) {
masterformat = dns_masterformat_map;
cfg_obj_log(obj, logctx, ISC_LOG_WARNING,
"masterfile-format: format 'map' is "
"deprecated");
} else {
INSIST(0);
ISC_UNREACHABLE();