- [regress/test-exec.sh] Use sudo, search for "whoami" equivalent, always

use Strictmodes no, wait longer for sshd startup.
This commit is contained in:
Darren Tucker 2003-09-04 15:35:48 +10:00
parent bd05609dff
commit 6d3921f64b
2 changed files with 14 additions and 5 deletions

View File

@ -21,6 +21,8 @@
regress/test-exec.sh] Handle different was of echoing without newlines. regress/test-exec.sh] Handle different was of echoing without newlines.
- [regress/dynamic-forward.sh] Some "which" programs output on stderr. - [regress/dynamic-forward.sh] Some "which" programs output on stderr.
- [regress/sftp-cmds.sh] Use portable "test" option. - [regress/sftp-cmds.sh] Use portable "test" option.
- [regress/test-exec.sh] Use sudo, search for "whoami" equivalent, always
use Strictmodes no, wait longer for sshd startup.
20030903 20030903
- (djm) OpenBSD CVS Sync - (djm) OpenBSD CVS Sync
@ -1011,4 +1013,4 @@
- Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
Report from murple@murple.net, diagnosis from dtucker@zip.com.au Report from murple@murple.net, diagnosis from dtucker@zip.com.au
$Id: ChangeLog,v 1.2955 2003/09/04 05:26:57 dtucker Exp $ $Id: ChangeLog,v 1.2956 2003/09/04 05:35:48 dtucker Exp $

View File

@ -2,10 +2,16 @@
# Placed in the Public Domain. # Placed in the Public Domain.
PORT=4242 PORT=4242
USER=`id -un`
SUDO=
#SUDO=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 OBJ=$1
if [ "x$OBJ" = "x" ]; then if [ "x$OBJ" = "x" ]; then
echo '$OBJ not defined' echo '$OBJ not defined'
@ -141,6 +147,7 @@ cat << EOF > $OBJ/sshd_config
PidFile $PIDFILE PidFile $PIDFILE
AuthorizedKeysFile $OBJ/authorized_keys_%u AuthorizedKeysFile $OBJ/authorized_keys_%u
LogLevel QUIET LogLevel QUIET
StrictModes no
EOF EOF
# server config for proxy connects # server config for proxy connects
@ -200,7 +207,7 @@ chmod 644 $OBJ/authorized_keys_$USER
# create a proxy version of the client config # create a proxy version of the client config
( (
cat $OBJ/ssh_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 ) > $OBJ/ssh_proxy
# check proxy config # check proxy config
@ -214,7 +221,7 @@ start_sshd ()
trace "wait for sshd" trace "wait for sshd"
i=0; i=0;
while [ ! -f $PIDFILE -a $i -lt 5 ]; do while [ ! -f $PIDFILE -a $i -lt 10 ]; do
i=`expr $i + 1` i=`expr $i + 1`
sleep $i sleep $i
done done