[master] allow spaces in rndc arguments

4256.	[bug]		Allow rndc command arguments to be quoted so as
			to allow spaces. [RT #36665]
This commit is contained in:
Evan Hunt
2015-11-05 19:51:54 -08:00
parent e62b9c9ce6
commit b513918481
6 changed files with 367 additions and 238 deletions

View File

@@ -344,7 +344,7 @@ status=`expr $status + $ret`
echo "I:testing automatic zones are reported"
ret=0
$RNDC -s 10.53.0.4 -p 9956 -c ns4/key6.conf status > rndc.status || ret=1
grep "number of zones: 99 (98 automatic)" rndc.status > /dev/null || ret=1
grep "number of zones: 198 (196 automatic)" rndc.status > /dev/null || ret=1
if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
@@ -411,6 +411,13 @@ grep "ISC_R_SUCCESS 0" rndc.output > /dev/null || ret=1
if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
echo "I:testing rndc with a token containing a space"
ret=0
$RNDC -s 10.53.0.4 -p 9956 -c ns4/key6.conf -r flush '"view with a space"' 2>&1 > rndc.output || ret=1
grep "not found" rndc.output > /dev/null && ret=1
if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
echo "I:test 'rndc reconfig' with a broken config"
ret=0
$RNDC -s 10.53.0.4 -p 9956 -c ns4/key6.conf reconfig > /dev/null || ret=1