From 42ddfcd1e196ff0acc09d938501f7e7334eef4cd Mon Sep 17 00:00:00 2001 From: dtucker Date: Sat, 13 Mar 2021 01:52:16 +0000 Subject: [PATCH] Add TEST_SSH_MODULI_FILE variable to allow overriding of the moduli file used during the test run. --- regress/usr.bin/ssh/test-exec.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/regress/usr.bin/ssh/test-exec.sh b/regress/usr.bin/ssh/test-exec.sh index e010c1f0b22..648a9ff5143 100644 --- a/regress/usr.bin/ssh/test-exec.sh +++ b/regress/usr.bin/ssh/test-exec.sh @@ -1,4 +1,4 @@ -# $OpenBSD: test-exec.sh,v 1.77 2021/02/17 03:59:00 dtucker Exp $ +# $OpenBSD: test-exec.sh,v 1.78 2021/03/13 01:52:16 dtucker Exp $ # Placed in the Public Domain. USER=`id -un` @@ -284,7 +284,7 @@ EOF # but if you aren't careful with permissions then the unit tests could # be abused to locally escalate privileges. if [ ! -z "$TEST_SSH_UNSAFE_PERMISSIONS" ]; then - echo "StrictModes no" >> $OBJ/sshd_config + echo " StrictModes no" >> $OBJ/sshd_config else # check and warn if excessive permissions are likely to cause failures. unsafe="" @@ -312,6 +312,11 @@ EOD fi fi +if [ ! -z "$TEST_SSH_MODULI_FILE" ]; then + trace "adding modulifile='$TEST_SSH_MODULI_FILE' to sshd_config" + echo " ModuliFile '$TEST_SSH_MODULI_FILE'" >> $OBJ/sshd_config +fi + if [ ! -z "$TEST_SSH_SSHD_CONFOPTS" ]; then trace "adding sshd_config option $TEST_SSH_SSHD_CONFOPTS" echo "$TEST_SSH_SSHD_CONFOPTS" >> $OBJ/sshd_config -- 2.20.1