summaryrefslogtreecommitdiff
path: root/regress/key-options.sh
diff options
context:
space:
mode:
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 f98d78b30..7a68ad358 100644
--- a/regress/key-options.sh
+++ b/regress/key-options.sh
@@ -1,4 +1,4 @@
1# $OpenBSD: key-options.sh,v 1.2 2008/06/30 08:07:34 djm Exp $ 1# $OpenBSD: key-options.sh,v 1.3 2015/03/03 22:35:19 markus Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4tid="key options" 4tid="key options"
@@ -8,7 +8,7 @@ authkeys="$OBJ/authorized_keys_${USER}"
8cp $authkeys $origkeys 8cp $authkeys $origkeys
9 9
10# Test command= forced command 10# Test command= forced command
11for p in 1 2; do 11for p in ${SSH_PROTOCOLS}; do
12 for c in 'command="echo bar"' 'no-pty,command="echo bar"'; do 12 for c in 'command="echo bar"' 'no-pty,command="echo bar"'; do
13 sed "s/.*/$c &/" $origkeys >$authkeys 13 sed "s/.*/$c &/" $origkeys >$authkeys
14 verbose "key option proto $p $c" 14 verbose "key option proto $p $c"
@@ -24,7 +24,7 @@ done
24 24
25# Test no-pty 25# Test no-pty
26sed 's/.*/no-pty &/' $origkeys >$authkeys 26sed 's/.*/no-pty &/' $origkeys >$authkeys
27for p in 1 2; do 27for p in ${SSH_PROTOCOLS}; do
28 verbose "key option proto $p no-pty" 28 verbose "key option proto $p no-pty"
29 r=`${SSH} -$p -q -F $OBJ/ssh_proxy somehost tty` 29 r=`${SSH} -$p -q -F $OBJ/ssh_proxy somehost tty`
30 if [ -f "$r" ]; then 30 if [ -f "$r" ]; then
@@ -35,7 +35,7 @@ done
35# Test environment= 35# Test environment=
36echo 'PermitUserEnvironment yes' >> $OBJ/sshd_proxy 36echo 'PermitUserEnvironment yes' >> $OBJ/sshd_proxy
37sed 's/.*/environment="FOO=bar" &/' $origkeys >$authkeys 37sed 's/.*/environment="FOO=bar" &/' $origkeys >$authkeys
38for p in 1 2; do 38for p in ${SSH_PROTOCOLS}; do
39 verbose "key option proto $p environment" 39 verbose "key option proto $p environment"
40 r=`${SSH} -$p -q -F $OBJ/ssh_proxy somehost 'echo $FOO'` 40 r=`${SSH} -$p -q -F $OBJ/ssh_proxy somehost 'echo $FOO'`
41 if [ "$r" != "bar" ]; then 41 if [ "$r" != "bar" ]; then
@@ -45,7 +45,7 @@ done
45 45
46# Test from= restriction 46# Test from= restriction
47start_sshd 47start_sshd
48for p in 1 2; do 48for p in ${SSH_PROTOCOLS}; do
49 for f in 127.0.0.1 '127.0.0.0\/8'; do 49 for f in 127.0.0.1 '127.0.0.0\/8'; do
50 cat $origkeys >$authkeys 50 cat $origkeys >$authkeys
51 ${SSH} -$p -q -F $OBJ/ssh_proxy somehost true 51 ${SSH} -$p -q -F $OBJ/ssh_proxy somehost true