tests.sh revision 8a743600ddfcd97adbbd83f8e9f546ce7d365acb
# tests for TSIG-GSS updates
status=0
DIGOPTS="@10.53.0.1 -p 5300"
# we don't want a KRB5_CONFIG setting breaking the tests
export KRB5_CONFIG
host="$1"
type="$2"
cmd="$3"
digout="$4"
cat <<EOF > ns1/update.txt
server 10.53.0.1 5300
update add $host $cmd
send
EOF
$NSUPDATE -g ns1/update.txt || {
return 1
}
return 1
}
return 0
}
echo "I:testing updates as administrator"
export KRB5CCNAME
echo "I:testing updates as a user"
export KRB5CCNAME
echo "I:testing external update policy"
test_update testcname.example.nil. TXT "86400 CNAME testdenied.example.nil" "testdenied" && status=1
sleep 1
test_update testcname.example.nil. TXT "86400 CNAME testdenied.example.nil" "testdenied" || status=1
kill `cat authsock.pid`
exit $status