From 10f9242b86bc570638b5c0e985e4f4b98c1dd073 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Tue, 10 Jun 2008 23:16:46 +1000 Subject: - dtucker@cvs.openbsd.org 2008/06/10 05:23:32 [addrmatch.sh Makefile] Regress test for Match CIDR rules. ok djm@ --- regress/addrmatch.sh | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 regress/addrmatch.sh (limited to 'regress/addrmatch.sh') diff --git a/regress/addrmatch.sh b/regress/addrmatch.sh new file mode 100644 index 000000000..f89e9f053 --- /dev/null +++ b/regress/addrmatch.sh @@ -0,0 +1,41 @@ +# $OpenBSD: addrmatch.sh,v 1.0 2008/06/10 05:23:32 dtucker Exp $ +# Placed in the Public Domain. + +tid="address match" + +mv $OBJ/sshd_proxy $OBJ/sshd_proxy_orig + +run_trial() +{ + user="$1"; addr="$2"; host="$3"; expected="$4"; descr="$5" + + verbose "test $descr for $user $addr $host" + result=`${SSHD} -f $OBJ/sshd_proxy -T \ + -C user=${user},addr=${addr},host=${host} | \ + awk '/passwordauthentication/ {print $2}'` + if [ "$result" != "$expected" ]; then + fail "failed for $user $addr $host: expected $expected, got $result" + fi +} + +cp $OBJ/sshd_proxy_orig $OBJ/sshd_proxy +cat >>$OBJ/sshd_proxy <