summaryrefslogtreecommitdiff
path: root/regress/principals-command.sh
diff options
context:
space:
mode:
Diffstat (limited to 'regress/principals-command.sh')
-rw-r--r--regress/principals-command.sh18
1 files changed, 9 insertions, 9 deletions
diff --git a/regress/principals-command.sh b/regress/principals-command.sh
index 9b38eb105..bcc68e80b 100644
--- a/regress/principals-command.sh
+++ b/regress/principals-command.sh
@@ -1,4 +1,4 @@
1# $OpenBSD: principals-command.sh,v 1.3 2016/09/26 21:34:38 bluhm Exp $ 1# $OpenBSD: principals-command.sh,v 1.4 2017/04/30 23:34:55 djm Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4tid="authorized principals command" 4tid="authorized principals command"
@@ -78,7 +78,7 @@ if [ -x $PRINCIPALS_COMMAND ]; then
78 # Empty authorized_principals 78 # Empty authorized_principals
79 verbose "$tid: ${_prefix} empty authorized_principals" 79 verbose "$tid: ${_prefix} empty authorized_principals"
80 echo > $OBJ/authorized_principals_$USER 80 echo > $OBJ/authorized_principals_$USER
81 ${SSH} -2i $OBJ/cert_user_key \ 81 ${SSH} -i $OBJ/cert_user_key \
82 -F $OBJ/ssh_proxy somehost true >/dev/null 2>&1 82 -F $OBJ/ssh_proxy somehost true >/dev/null 2>&1
83 if [ $? -eq 0 ]; then 83 if [ $? -eq 0 ]; then
84 fail "ssh cert connect succeeded unexpectedly" 84 fail "ssh cert connect succeeded unexpectedly"
@@ -87,7 +87,7 @@ if [ -x $PRINCIPALS_COMMAND ]; then
87 # Wrong authorized_principals 87 # Wrong authorized_principals
88 verbose "$tid: ${_prefix} wrong authorized_principals" 88 verbose "$tid: ${_prefix} wrong authorized_principals"
89 echo gregorsamsa > $OBJ/authorized_principals_$USER 89 echo gregorsamsa > $OBJ/authorized_principals_$USER
90 ${SSH} -2i $OBJ/cert_user_key \ 90 ${SSH} -i $OBJ/cert_user_key \
91 -F $OBJ/ssh_proxy somehost true >/dev/null 2>&1 91 -F $OBJ/ssh_proxy somehost true >/dev/null 2>&1
92 if [ $? -eq 0 ]; then 92 if [ $? -eq 0 ]; then
93 fail "ssh cert connect succeeded unexpectedly" 93 fail "ssh cert connect succeeded unexpectedly"
@@ -96,7 +96,7 @@ if [ -x $PRINCIPALS_COMMAND ]; then
96 # Correct authorized_principals 96 # Correct authorized_principals
97 verbose "$tid: ${_prefix} correct authorized_principals" 97 verbose "$tid: ${_prefix} correct authorized_principals"
98 echo mekmitasdigoat > $OBJ/authorized_principals_$USER 98 echo mekmitasdigoat > $OBJ/authorized_principals_$USER
99 ${SSH} -2i $OBJ/cert_user_key \ 99 ${SSH} -i $OBJ/cert_user_key \
100 -F $OBJ/ssh_proxy somehost true >/dev/null 2>&1 100 -F $OBJ/ssh_proxy somehost true >/dev/null 2>&1
101 if [ $? -ne 0 ]; then 101 if [ $? -ne 0 ]; then
102 fail "ssh cert connect failed" 102 fail "ssh cert connect failed"
@@ -105,7 +105,7 @@ if [ -x $PRINCIPALS_COMMAND ]; then
105 # authorized_principals with bad key option 105 # authorized_principals with bad key option
106 verbose "$tid: ${_prefix} authorized_principals bad key opt" 106 verbose "$tid: ${_prefix} authorized_principals bad key opt"
107 echo 'blah mekmitasdigoat' > $OBJ/authorized_principals_$USER 107 echo 'blah mekmitasdigoat' > $OBJ/authorized_principals_$USER
108 ${SSH} -2i $OBJ/cert_user_key \ 108 ${SSH} -i $OBJ/cert_user_key \
109 -F $OBJ/ssh_proxy somehost true >/dev/null 2>&1 109 -F $OBJ/ssh_proxy somehost true >/dev/null 2>&1
110 if [ $? -eq 0 ]; then 110 if [ $? -eq 0 ]; then
111 fail "ssh cert connect succeeded unexpectedly" 111 fail "ssh cert connect succeeded unexpectedly"
@@ -115,7 +115,7 @@ if [ -x $PRINCIPALS_COMMAND ]; then
115 verbose "$tid: ${_prefix} authorized_principals command=false" 115 verbose "$tid: ${_prefix} authorized_principals command=false"
116 echo 'command="false" mekmitasdigoat' > \ 116 echo 'command="false" mekmitasdigoat' > \
117 $OBJ/authorized_principals_$USER 117 $OBJ/authorized_principals_$USER
118 ${SSH} -2i $OBJ/cert_user_key \ 118 ${SSH} -i $OBJ/cert_user_key \
119 -F $OBJ/ssh_proxy somehost true >/dev/null 2>&1 119 -F $OBJ/ssh_proxy somehost true >/dev/null 2>&1
120 if [ $? -eq 0 ]; then 120 if [ $? -eq 0 ]; then
121 fail "ssh cert connect succeeded unexpectedly" 121 fail "ssh cert connect succeeded unexpectedly"
@@ -125,7 +125,7 @@ if [ -x $PRINCIPALS_COMMAND ]; then
125 verbose "$tid: ${_prefix} authorized_principals command=true" 125 verbose "$tid: ${_prefix} authorized_principals command=true"
126 echo 'command="true" mekmitasdigoat' > \ 126 echo 'command="true" mekmitasdigoat' > \
127 $OBJ/authorized_principals_$USER 127 $OBJ/authorized_principals_$USER
128 ${SSH} -2i $OBJ/cert_user_key \ 128 ${SSH} -i $OBJ/cert_user_key \
129 -F $OBJ/ssh_proxy somehost false >/dev/null 2>&1 129 -F $OBJ/ssh_proxy somehost false >/dev/null 2>&1
130 if [ $? -ne 0 ]; then 130 if [ $? -ne 0 ]; then
131 fail "ssh cert connect failed" 131 fail "ssh cert connect failed"
@@ -144,7 +144,7 @@ if [ -x $PRINCIPALS_COMMAND ]; then
144 printf 'cert-authority,principals="gregorsamsa" ' 144 printf 'cert-authority,principals="gregorsamsa" '
145 cat $OBJ/user_ca_key.pub 145 cat $OBJ/user_ca_key.pub
146 ) > $OBJ/authorized_keys_$USER 146 ) > $OBJ/authorized_keys_$USER
147 ${SSH} -2i $OBJ/cert_user_key \ 147 ${SSH} -i $OBJ/cert_user_key \
148 -F $OBJ/ssh_proxy somehost true >/dev/null 2>&1 148 -F $OBJ/ssh_proxy somehost true >/dev/null 2>&1
149 if [ $? -eq 0 ]; then 149 if [ $? -eq 0 ]; then
150 fail "ssh cert connect succeeded unexpectedly" 150 fail "ssh cert connect succeeded unexpectedly"
@@ -156,7 +156,7 @@ if [ -x $PRINCIPALS_COMMAND ]; then
156 printf 'cert-authority,principals="mekmitasdigoat" ' 156 printf 'cert-authority,principals="mekmitasdigoat" '
157 cat $OBJ/user_ca_key.pub 157 cat $OBJ/user_ca_key.pub
158 ) > $OBJ/authorized_keys_$USER 158 ) > $OBJ/authorized_keys_$USER
159 ${SSH} -2i $OBJ/cert_user_key \ 159 ${SSH} -i $OBJ/cert_user_key \
160 -F $OBJ/ssh_proxy somehost true >/dev/null 2>&1 160 -F $OBJ/ssh_proxy somehost true >/dev/null 2>&1
161 if [ $? -ne 0 ]; then 161 if [ $? -ne 0 ]; then
162 fail "ssh cert connect failed" 162 fail "ssh cert connect failed"