From 722b8d14f17f6471ef9b746f8b5942e1c7940d32 Mon Sep 17 00:00:00 2001 From: Tim Rice Date: Thu, 12 Aug 2010 09:43:13 -0700 Subject: [PATCH] - (tim) [regress/login-timeout.sh regress/reconfigure.sh regress/reexec.sh regress/test-exec.sh] Under certain conditions when testing with sudo tests would fail because the pidfile could not be read by a regular user. "cat: cannot open ...../regress/pidfile: Permission denied (error 13)" Make sure cat is run by $SUDO. no objection from me. djm@ --- ChangeLog | 7 +++++++ regress/login-timeout.sh | 2 +- regress/reconfigure.sh | 2 +- regress/reexec.sh | 6 +++--- regress/test-exec.sh | 2 +- 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 23ecb0618..daf1e98f5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +20100812 + - (tim) [regress/login-timeout.sh regress/reconfigure.sh regress/reexec.sh + regress/test-exec.sh] Under certain conditions when testing with sudo + tests would fail because the pidfile could not be read by a regular user. + "cat: cannot open ...../regress/pidfile: Permission denied (error 13)" + Make sure cat is run by $SUDO. no objection from me. djm@ + 20100809 - (djm) bz#1561: don't bother setting IFF_UP on tun(4) device if it is already set. Makes FreeBSD user openable tunnels useful; patch from diff --git a/regress/login-timeout.sh b/regress/login-timeout.sh index 15a887f74..55fbb324d 100644 --- a/regress/login-timeout.sh +++ b/regress/login-timeout.sh @@ -15,7 +15,7 @@ if [ $? -ne 0 ]; then fail "ssh connect after login grace timeout failed with privsep" fi -$SUDO kill `cat $PIDFILE` +$SUDO kill `$SUDO cat $PIDFILE` trace "test login grace without privsep" echo "UsePrivilegeSeparation no" >> $OBJ/sshd_config diff --git a/regress/reconfigure.sh b/regress/reconfigure.sh index 1daf29f9a..9fd289531 100644 --- a/regress/reconfigure.sh +++ b/regress/reconfigure.sh @@ -15,7 +15,7 @@ esac start_sshd -PID=`cat $PIDFILE` +PID=`$SUDO cat $PIDFILE` rm -f $PIDFILE $SUDO kill -HUP $PID diff --git a/regress/reexec.sh b/regress/reexec.sh index 4f824a31d..6edfc318e 100644 --- a/regress/reexec.sh +++ b/regress/reexec.sh @@ -41,7 +41,7 @@ echo "InvalidXXX=no" >> $OBJ/sshd_config copy_tests -$SUDO kill `cat $PIDFILE` +$SUDO kill `$SUDO cat $PIDFILE` rm -f $PIDFILE cp $OBJ/sshd_config.orig $OBJ/sshd_config @@ -53,7 +53,7 @@ rm -f $SSHD_COPY copy_tests -$SUDO kill `cat $PIDFILE` +$SUDO kill `$SUDO cat $PIDFILE` rm -f $PIDFILE verbose "test reexec fallback without privsep" @@ -66,7 +66,7 @@ rm -f $SSHD_COPY copy_tests -$SUDO kill `cat $PIDFILE` +$SUDO kill `$SUDO cat $PIDFILE` rm -f $PIDFILE diff --git a/regress/test-exec.sh b/regress/test-exec.sh index b3a19389d..b64dcdbcf 100644 --- a/regress/test-exec.sh +++ b/regress/test-exec.sh @@ -167,7 +167,7 @@ have_prog() cleanup () { if [ -f $PIDFILE ]; then - pid=`cat $PIDFILE` + pid=`$SUDO cat $PIDFILE` if [ "X$pid" = "X" ]; then echo no sshd running else