mirror of
https://github.com/isc-projects/bind9.git
synced 2026-03-01 04:50:50 -05:00
Fix parsing of NZFs saved by rndc addzone with view specified (#39845)
(cherry picked from commit0439bfedd9) Conflicts: bin/named/server.c bin/tests/system/addzone/tests.sh (cherry picked from commit8134e7662e) Conflicts: CHANGES
This commit is contained in:
parent
734c2fd9fc
commit
22f467116c
3 changed files with 32 additions and 18 deletions
4
CHANGES
4
CHANGES
|
|
@ -1,3 +1,7 @@
|
|||
4142. [bug] rndc addzone with view specified saved NZF config
|
||||
that could not be read back by named. This has now
|
||||
been fixed. [RT #39845]
|
||||
|
||||
4138. [bug] An uninitialized value in validator.c could result
|
||||
in an assertion failure. (CVE-2015-4620) [RT #39795]
|
||||
|
||||
|
|
|
|||
|
|
@ -215,6 +215,17 @@ n=`expr $n + 1`
|
|||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
echo "I:checking rndc reload causes named to reload the external view's NZF file ($n)"
|
||||
ret=0
|
||||
$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reload 2>&1 | sed 's/^/I:ns2 /'
|
||||
$DIG +norec $DIGOPTS @10.53.0.2 -b 10.53.0.2 a.added.example a > dig.out.ns2.int.$n || ret=1
|
||||
grep 'status: NOERROR' dig.out.ns2.int.$n > /dev/null || ret=1
|
||||
$DIG +norec $DIGOPTS @10.53.0.4 -b 10.53.0.4 a.added.example a > dig.out.ns2.ext.$n || ret=1
|
||||
grep 'status: NOERROR' dig.out.ns2.ext.$n > /dev/null || ret=1
|
||||
grep '^a.added.example' dig.out.ns2.ext.$n > /dev/null || ret=1
|
||||
n=`expr $n + 1`
|
||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
echo "I:deleting newly added zone ($n)"
|
||||
ret=0
|
||||
|
|
|
|||
|
|
@ -1613,24 +1613,6 @@ LIBISCCFG_EXTERNAL_DATA cfg_type_t cfg_type_bindkeys = {
|
|||
&cfg_rep_map, bindkeys_clausesets
|
||||
};
|
||||
|
||||
/*% The new-zone-file syntax (for zones added by 'rndc addzone') */
|
||||
static cfg_clausedef_t
|
||||
newzones_clauses[] = {
|
||||
{ "zone", &cfg_type_zone, CFG_CLAUSEFLAG_MULTI },
|
||||
{ NULL, NULL, 0 }
|
||||
};
|
||||
|
||||
static cfg_clausedef_t *
|
||||
newzones_clausesets[] = {
|
||||
newzones_clauses,
|
||||
NULL
|
||||
};
|
||||
|
||||
LIBISCCFG_EXTERNAL_DATA cfg_type_t cfg_type_newzones = {
|
||||
"newzones", cfg_parse_mapbody, cfg_print_mapbody, cfg_doc_mapbody,
|
||||
&cfg_rep_map, newzones_clausesets
|
||||
};
|
||||
|
||||
/*% The "options" statement syntax. */
|
||||
|
||||
static cfg_clausedef_t *
|
||||
|
|
@ -1827,6 +1809,23 @@ LIBISCCFG_EXTERNAL_DATA cfg_type_t cfg_type_addzoneconf = {
|
|||
&cfg_rep_map, addzoneconf_clausesets
|
||||
};
|
||||
|
||||
/*% The new-zone-file syntax (for zones added by 'rndc addzone') */
|
||||
static cfg_clausedef_t
|
||||
newzones_clauses[] = {
|
||||
{ "zone", &cfg_type_addzone, CFG_CLAUSEFLAG_MULTI },
|
||||
{ NULL, NULL, 0 }
|
||||
};
|
||||
|
||||
static cfg_clausedef_t *
|
||||
newzones_clausesets[] = {
|
||||
newzones_clauses,
|
||||
NULL
|
||||
};
|
||||
|
||||
LIBISCCFG_EXTERNAL_DATA cfg_type_t cfg_type_newzones = {
|
||||
"newzones", cfg_parse_mapbody, cfg_print_mapbody, cfg_doc_mapbody,
|
||||
&cfg_rep_map, newzones_clausesets
|
||||
};
|
||||
|
||||
static isc_result_t
|
||||
parse_unitstring(char *str, isc_resourcevalue_t *valuep) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue