summaryrefslogtreecommitdiff
path: root/regress/test-exec.sh
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2003-09-04 15:35:48 +1000
committerDarren Tucker <dtucker@zip.com.au>2003-09-04 15:35:48 +1000
commit6d3921f64bbdb304df9d8ef6887a46dacf3c60b9 (patch)
tree3fcdabe6c1576ff9cc9bac207e404579839d965c /regress/test-exec.sh
parentbd05609dff890e0667015d91591ef6630276804b (diff)
- [regress/test-exec.sh] Use sudo, search for "whoami" equivalent, always
use Strictmodes no, wait longer for sshd startup.
Diffstat (limited to 'regress/test-exec.sh')
-rw-r--r--regress/test-exec.sh15
1 files changed, 11 insertions, 4 deletions
diff --git a/regress/test-exec.sh b/regress/test-exec.sh
index 35f555b27..b5ef3bc7c 100644
--- a/regress/test-exec.sh
+++ b/regress/test-exec.sh
@@ -2,10 +2,16 @@
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4PORT=4242 4PORT=4242
5USER=`id -un`
6SUDO=
7#SUDO=sudo 5#SUDO=sudo
8 6
7if [ -x /usr/ucb/whoami ]; then
8 USER=`/usr/ucb/whoami`
9elif [ -x "`which whoami 2>&1`" ]; then
10 USER=`whoami`
11else
12 USER=`id -un`
13fi
14
9OBJ=$1 15OBJ=$1
10if [ "x$OBJ" = "x" ]; then 16if [ "x$OBJ" = "x" ]; then
11 echo '$OBJ not defined' 17 echo '$OBJ not defined'
@@ -141,6 +147,7 @@ cat << EOF > $OBJ/sshd_config
141 PidFile $PIDFILE 147 PidFile $PIDFILE
142 AuthorizedKeysFile $OBJ/authorized_keys_%u 148 AuthorizedKeysFile $OBJ/authorized_keys_%u
143 LogLevel QUIET 149 LogLevel QUIET
150 StrictModes no
144EOF 151EOF
145 152
146# server config for proxy connects 153# server config for proxy connects
@@ -200,7 +207,7 @@ chmod 644 $OBJ/authorized_keys_$USER
200# create a proxy version of the client config 207# create a proxy version of the client config
201( 208(
202 cat $OBJ/ssh_config 209 cat $OBJ/ssh_config
203 echo proxycommand ${SSHD} -i -f $OBJ/sshd_proxy 210 echo proxycommand ${SUDO} ${SSHD} -i -f $OBJ/sshd_proxy
204) > $OBJ/ssh_proxy 211) > $OBJ/ssh_proxy
205 212
206# check proxy config 213# check proxy config
@@ -214,7 +221,7 @@ start_sshd ()
214 221
215 trace "wait for sshd" 222 trace "wait for sshd"
216 i=0; 223 i=0;
217 while [ ! -f $PIDFILE -a $i -lt 5 ]; do 224 while [ ! -f $PIDFILE -a $i -lt 10 ]; do
218 i=`expr $i + 1` 225 i=`expr $i + 1`
219 sleep $i 226 sleep $i
220 done 227 done