Bugzilla – Attachment 2499 Details for
Bug 2300
reexec.sh and login-timeout.sh fail due to a race condition
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
fix race condition between kill sshd and start_sshd
0001-regress-test-exec.sh-regress-reexec.sh-regress-login.patch (text/plain), 1.97 KB, created by
Petr Lautrbach
on 2014-10-25 09:08:42 AEDT
(
hide
)
Description:
fix race condition between kill sshd and start_sshd
Filename:
MIME Type:
Creator:
Petr Lautrbach
Created:
2014-10-25 09:08:42 AEDT
Size:
1.97 KB
patch
obsolete
>From 3db291c85e218b11d2b8ff91940034149d2e101b Mon Sep 17 00:00:00 2001 >From: Petr Lautrbach <plautrba@redhat.com> >Date: Sat, 25 Oct 2014 00:01:30 +0200 >Subject: [PATCH] [regress/test-exec.sh regress/reexec.sh > regress/login-timeout.sh] fix race condition between kill sshd and start_sshd > >--- > regress/login-timeout.sh | 2 +- > regress/reexec.sh | 6 +++--- > regress/test-exec.sh | 15 +++++++++++++++ > 3 files changed, 19 insertions(+), 4 deletions(-) > >diff --git a/regress/login-timeout.sh b/regress/login-timeout.sh >index eb76f55..45e1c93 100644 >--- a/regress/login-timeout.sh >+++ b/regress/login-timeout.sh >@@ -17,7 +17,7 @@ if [ $? -ne 0 ]; then > fail "ssh connect after login grace timeout failed with privsep" > fi > >-$SUDO kill `$SUDO cat $PIDFILE` >+kill_sshd > > trace "test login grace without privsep" > echo "UsePrivilegeSeparation no" >> $OBJ/sshd_config >diff --git a/regress/reexec.sh b/regress/reexec.sh >index 433573f..b950d1d 100644 >--- a/regress/reexec.sh >+++ b/regress/reexec.sh >@@ -39,7 +39,7 @@ echo "InvalidXXX=no" >> $OBJ/sshd_config > > copy_tests > >-$SUDO kill `$SUDO cat $PIDFILE` >+kill_sshd > rm -f $PIDFILE > > cp $OBJ/sshd_config.orig $OBJ/sshd_config >@@ -54,7 +54,7 @@ rm -f $SSHD_COPY > > copy_tests > >-$SUDO kill `$SUDO cat $PIDFILE` >+kill_sshd > rm -f $PIDFILE > > verbose "test reexec fallback without privsep" >@@ -67,7 +67,7 @@ rm -f $SSHD_COPY > > copy_tests > >-$SUDO kill `$SUDO cat $PIDFILE` >+kill_sshd > rm -f $PIDFILE > > fi >diff --git a/regress/test-exec.sh b/regress/test-exec.sh >index a1bab83..0de7afd 100644 >--- a/regress/test-exec.sh >+++ b/regress/test-exec.sh >@@ -481,6 +481,21 @@ start_sshd () > test -f $PIDFILE || fatal "no sshd running on port $PORT" > } > >+kill_sshd () >+{ >+ PID=`$SUDO cat $PIDFILE` >+ # kill sshd >+ $SUDO kill $PID >+ >+ i=0; >+ while $SUDO kill -0 $PID 2> /dev/null && [ $i -lt 10 ]; do >+ i=`expr $i + 1` >+ sleep 1 >+ done >+ >+ $SUDO kill -0 $PID 2> /dev/null && fatal "sshd with pid $PID is still running" >+} >+ > # source test body > . $SCRIPT > >-- >2.1.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 2300
: 2499