diff options
Diffstat (limited to 'regress')
-rw-r--r-- | regress/test-exec.sh | 15 |
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 | ||
4 | PORT=4242 | 4 | PORT=4242 |
5 | USER=`id -un` | ||
6 | SUDO= | ||
7 | #SUDO=sudo | 5 | #SUDO=sudo |
8 | 6 | ||
7 | if [ -x /usr/ucb/whoami ]; then | ||
8 | USER=`/usr/ucb/whoami` | ||
9 | elif [ -x "`which whoami 2>&1`" ]; then | ||
10 | USER=`whoami` | ||
11 | else | ||
12 | USER=`id -un` | ||
13 | fi | ||
14 | |||
9 | OBJ=$1 | 15 | OBJ=$1 |
10 | if [ "x$OBJ" = "x" ]; then | 16 | if [ "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 | ||
144 | EOF | 151 | EOF |
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 |