4382. [bug] rndc {addzone,modzone,delzone,showzone} should all

compare the zone name using a canonical format.
                        [RT #42630]
This commit is contained in:
Mark Andrews
2016-06-10 11:03:53 +10:00
parent e211ffb1f1
commit fbc50678e1
4 changed files with 107 additions and 21 deletions

View File

@@ -39,3 +39,8 @@ zone "normal.example" {
type master;
file "normal.db";
};
zone "finaldot.example." {
type master;
file "normal.db";
};

View File

@@ -162,6 +162,15 @@ n=`expr $n + 1`
if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
echo "I:checking rndc showzone with a normally-loaded zone with trailing dot ($n)"
ret=0
$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 showzone finaldot.example > rndc.out.ns2.$n
expected='zone "finaldot.example." { type master; file "normal.db"; };'
[ "`cat rndc.out.ns2.$n`" = "$expected" ] || ret=1
n=`expr $n + 1`
if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
echo "I:delete a normally-loaded zone ($n)"
ret=0
$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 delzone normal.example 2> rndc.out.ns2.$n