From 61cf245d7457913fa4556bce598d8b423183d833 Mon Sep 17 00:00:00 2001 From: djm Date: Mon, 7 Jun 2021 00:00:50 +0000 Subject: [PATCH] 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 --- regress/usr.bin/ssh/allow-deny-users.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/regress/usr.bin/ssh/allow-deny-users.sh b/regress/usr.bin/ssh/allow-deny-users.sh index 5c389512247..6c053eef088 100644 --- a/regress/usr.bin/ssh/allow-deny-users.sh +++ b/regress/usr.bin/ssh/allow-deny-users.sh @@ -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=$? -- 2.20.1