summaryrefslogtreecommitdiff
path: root/regress/allow-deny-users.sh
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2018-08-24 12:49:36 +0100
committerColin Watson <cjwatson@debian.org>2018-08-30 00:57:27 +0100
commit816386e17654ca36834bebbf351419e460fad8f6 (patch)
tree3dc79d831cb73bc25b92f5a4d18f8e328c0c570a /regress/allow-deny-users.sh
parent3e6f76c7039d3df22b1d0a3a5f30150efb09b69d (diff)
parent16a47fc4b04977a14f44dd433c8da1499fa80671 (diff)
New upstream release (7.8p1)
Closes: #907534
Diffstat (limited to 'regress/allow-deny-users.sh')
-rw-r--r--regress/allow-deny-users.sh12
1 files changed, 8 insertions, 4 deletions
diff --git a/regress/allow-deny-users.sh b/regress/allow-deny-users.sh
index 4165111e0..5c3895122 100644
--- a/regress/allow-deny-users.sh
+++ b/regress/allow-deny-users.sh
@@ -1,6 +1,6 @@
1# Public Domain 1# Public Domain
2# Zev Weiss, 2016 2# Zev Weiss, 2016
3# $OpenBSD: allow-deny-users.sh,v 1.4 2017/10/20 02:13:41 djm Exp $ 3# $OpenBSD: allow-deny-users.sh,v 1.5 2018/07/13 02:13:50 djm Exp $
4 4
5tid="AllowUsers/DenyUsers" 5tid="AllowUsers/DenyUsers"
6 6
@@ -10,6 +10,8 @@ if [ "x$me" = "x" ]; then
10fi 10fi
11other="nobody" 11other="nobody"
12 12
13cp $OBJ/sshd_proxy $OBJ/sshd_proxy.orig
14
13test_auth() 15test_auth()
14{ 16{
15 deny="$1" 17 deny="$1"
@@ -17,17 +19,19 @@ test_auth()
17 should_succeed="$3" 19 should_succeed="$3"
18 failmsg="$4" 20 failmsg="$4"
19 21
22 cp $OBJ/sshd_proxy.orig $OBJ/sshd_proxy
23 echo DenyUsers="$deny" >> $OBJ/sshd_proxy
24 echo AllowUsers="$allow" >> $OBJ/sshd_proxy
25
20 start_sshd -oDenyUsers="$deny" -oAllowUsers="$allow" 26 start_sshd -oDenyUsers="$deny" -oAllowUsers="$allow"
21 27
22 ${SSH} -F $OBJ/ssh_config "$me@somehost" true 28 ${SSH} -F $OBJ/ssh_proxy "$me@somehost" true
23 status=$? 29 status=$?
24 30
25 if (test $status -eq 0 && ! $should_succeed) \ 31 if (test $status -eq 0 && ! $should_succeed) \
26 || (test $status -ne 0 && $should_succeed); then 32 || (test $status -ne 0 && $should_succeed); then
27 fail "$failmsg" 33 fail "$failmsg"
28 fi 34 fi
29
30 stop_sshd
31} 35}
32 36
33# DenyUsers AllowUsers should_succeed failure_message 37# DenyUsers AllowUsers should_succeed failure_message