From 6d3921f64bbdb304df9d8ef6887a46dacf3c60b9 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Thu, 4 Sep 2003 15:35:48 +1000 Subject: - [regress/test-exec.sh] Use sudo, search for "whoami" equivalent, always use Strictmodes no, wait longer for sshd startup. --- regress/test-exec.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'regress/test-exec.sh') 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 @@ # Placed in the Public Domain. PORT=4242 -USER=`id -un` -SUDO= #SUDO=sudo +if [ -x /usr/ucb/whoami ]; then + USER=`/usr/ucb/whoami` +elif [ -x "`which whoami 2>&1`" ]; then + USER=`whoami` +else + USER=`id -un` +fi + OBJ=$1 if [ "x$OBJ" = "x" ]; then echo '$OBJ not defined' @@ -141,6 +147,7 @@ cat << EOF > $OBJ/sshd_config PidFile $PIDFILE AuthorizedKeysFile $OBJ/authorized_keys_%u LogLevel QUIET + StrictModes no EOF # server config for proxy connects @@ -200,7 +207,7 @@ chmod 644 $OBJ/authorized_keys_$USER # create a proxy version of the client config ( cat $OBJ/ssh_config - echo proxycommand ${SSHD} -i -f $OBJ/sshd_proxy + echo proxycommand ${SUDO} ${SSHD} -i -f $OBJ/sshd_proxy ) > $OBJ/ssh_proxy # check proxy config @@ -214,7 +221,7 @@ start_sshd () trace "wait for sshd" i=0; - while [ ! -f $PIDFILE -a $i -lt 5 ]; do + while [ ! -f $PIDFILE -a $i -lt 10 ]; do i=`expr $i + 1` sleep $i done -- cgit v1.2.3