diff options
Diffstat (limited to 'regress/addrmatch.sh')
-rw-r--r-- | regress/addrmatch.sh | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/regress/addrmatch.sh b/regress/addrmatch.sh index a258f7bb4..23ddd65ce 100644 --- a/regress/addrmatch.sh +++ b/regress/addrmatch.sh | |||
@@ -1,9 +1,9 @@ | |||
1 | # $OpenBSD: addrmatch.sh,v 1.1 2008/06/10 05:23:32 dtucker Exp $ | 1 | # $OpenBSD: addrmatch.sh,v 1.3 2010/02/09 04:57:36 djm Exp $ |
2 | # Placed in the Public Domain. | 2 | # Placed in the Public Domain. |
3 | 3 | ||
4 | tid="address match" | 4 | tid="address match" |
5 | 5 | ||
6 | mv $OBJ/sshd_proxy $OBJ/sshd_proxy_orig | 6 | mv $OBJ/sshd_proxy $OBJ/sshd_proxy_bak |
7 | 7 | ||
8 | run_trial() | 8 | run_trial() |
9 | { | 9 | { |
@@ -12,13 +12,13 @@ run_trial() | |||
12 | verbose "test $descr for $user $addr $host" | 12 | verbose "test $descr for $user $addr $host" |
13 | result=`${SSHD} -f $OBJ/sshd_proxy -T \ | 13 | result=`${SSHD} -f $OBJ/sshd_proxy -T \ |
14 | -C user=${user},addr=${addr},host=${host} | \ | 14 | -C user=${user},addr=${addr},host=${host} | \ |
15 | awk '/passwordauthentication/ {print $2}'` | 15 | awk '/^passwordauthentication/ {print $2}'` |
16 | if [ "$result" != "$expected" ]; then | 16 | if [ "$result" != "$expected" ]; then |
17 | fail "failed for $user $addr $host: expected $expected, got $result" | 17 | fail "failed for $user $addr $host: expected $expected, got $result" |
18 | fi | 18 | fi |
19 | } | 19 | } |
20 | 20 | ||
21 | cp $OBJ/sshd_proxy_orig $OBJ/sshd_proxy | 21 | cp $OBJ/sshd_proxy_bak $OBJ/sshd_proxy |
22 | cat >>$OBJ/sshd_proxy <<EOD | 22 | cat >>$OBJ/sshd_proxy <<EOD |
23 | PasswordAuthentication no | 23 | PasswordAuthentication no |
24 | Match Address 192.168.0.0/16,!192.168.30.0/24,10.0.0.0/8,host.example.com | 24 | Match Address 192.168.0.0/16,!192.168.30.0/24,10.0.0.0/8,host.example.com |
@@ -40,3 +40,6 @@ run_trial user ::3 somehost no "deny IP6 negated" | |||
40 | run_trial user ::4 somehost no "deny, IP6 no match" | 40 | run_trial user ::4 somehost no "deny, IP6 no match" |
41 | run_trial user 2000::1 somehost yes "permit, IP6 network" | 41 | run_trial user 2000::1 somehost yes "permit, IP6 network" |
42 | run_trial user 2001::1 somehost no "deny, IP6 network" | 42 | run_trial user 2001::1 somehost no "deny, IP6 network" |
43 | |||
44 | cp $OBJ/sshd_proxy_bak $OBJ/sshd_proxy | ||
45 | rm $OBJ/sshd_proxy_bak | ||