summaryrefslogtreecommitdiff
path: root/regress/key-options.sh
diff options
context:
space:
mode:
authormarkus@openbsd.org <markus@openbsd.org>2015-03-03 22:35:19 +0000
committerDamien Miller <djm@mindrot.org>2015-03-05 05:59:47 +1100
commitdad2b1892b4c1b7e58df483a8c5b983c4454e099 (patch)
treefa461e273ef92414c934a88cc88b2875032e616f /regress/key-options.sh
parentd48a22601bdd3eec054794c535f4ae8d8ae4c6e2 (diff)
upstream commit
make it possible to run tests w/o ssh1 support; ok djm@
Diffstat (limited to 'regress/key-options.sh')
-rw-r--r--regress/key-options.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/regress/key-options.sh b/regress/key-options.sh
index f98d78b3..7a68ad35 100644
--- a/regress/key-options.sh
+++ b/regress/key-options.sh
@@ -1,4 +1,4 @@
-# $OpenBSD: key-options.sh,v 1.2 2008/06/30 08:07:34 djm Exp $
+# $OpenBSD: key-options.sh,v 1.3 2015/03/03 22:35:19 markus Exp $
# Placed in the Public Domain.
tid="key options"
@@ -8,7 +8,7 @@ authkeys="$OBJ/authorized_keys_${USER}"
cp $authkeys $origkeys
# Test command= forced command
-for p in 1 2; do
+for p in ${SSH_PROTOCOLS}; do
for c in 'command="echo bar"' 'no-pty,command="echo bar"'; do
sed "s/.*/$c &/" $origkeys >$authkeys
verbose "key option proto $p $c"
@@ -24,7 +24,7 @@ done
# Test no-pty
sed 's/.*/no-pty &/' $origkeys >$authkeys
-for p in 1 2; do
+for p in ${SSH_PROTOCOLS}; do
verbose "key option proto $p no-pty"
r=`${SSH} -$p -q -F $OBJ/ssh_proxy somehost tty`
if [ -f "$r" ]; then
@@ -35,7 +35,7 @@ done
# Test environment=
echo 'PermitUserEnvironment yes' >> $OBJ/sshd_proxy
sed 's/.*/environment="FOO=bar" &/' $origkeys >$authkeys
-for p in 1 2; do
+for p in ${SSH_PROTOCOLS}; do
verbose "key option proto $p environment"
r=`${SSH} -$p -q -F $OBJ/ssh_proxy somehost 'echo $FOO'`
if [ "$r" != "bar" ]; then
@@ -45,7 +45,7 @@ done
# Test from= restriction
start_sshd
-for p in 1 2; do
+for p in ${SSH_PROTOCOLS}; do
for f in 127.0.0.1 '127.0.0.0\/8'; do
cat $origkeys >$authkeys
${SSH} -$p -q -F $OBJ/ssh_proxy somehost true