upstream: prepare for stricter sshd_config parsing that will refuse

a config that has {Allow,Deny}{Users,Groups} on a line with no subsequent
arguments. Such lines are permitted but are nonsensical noops ATM

OpenBSD-Regress-ID: ef65463fcbc0bd044e27f3fe400ea56eb4b8f650
This commit is contained in:
djm@openbsd.org 2021-06-07 00:00:50 +00:00 committed by Damien Miller
parent a10f929d1c
commit 9018bd821f
1 changed files with 3 additions and 5 deletions

View File

@ -1,6 +1,6 @@
# Public Domain
# Zev Weiss, 2016
# $OpenBSD: allow-deny-users.sh,v 1.5 2018/07/13 02:13:50 djm Exp $
# $OpenBSD: allow-deny-users.sh,v 1.6 2021/06/07 00:00:50 djm Exp $
tid="AllowUsers/DenyUsers"
@ -20,10 +20,8 @@ test_auth()
failmsg="$4"
cp $OBJ/sshd_proxy.orig $OBJ/sshd_proxy
echo DenyUsers="$deny" >> $OBJ/sshd_proxy
echo AllowUsers="$allow" >> $OBJ/sshd_proxy
start_sshd -oDenyUsers="$deny" -oAllowUsers="$allow"
test -z "$deny" || echo DenyUsers="$deny" >> $OBJ/sshd_proxy
test -z "$allow" || echo AllowUsers="$allow" >> $OBJ/sshd_proxy
${SSH} -F $OBJ/ssh_proxy "$me@somehost" true
status=$?