From 85c9953b0f04e63a0ea0812a82c796505bc2ea6b Mon Sep 17 00:00:00 2001 From: Stephen Watson Date: Fri, 29 Apr 2005 14:14:13 +0000 Subject: [PATCH] Compatability fixes for the su module git-svn-id: https://rox.svn.sourceforge.net/svnroot/rox/trunk/ROX-Lib2@3895 66de3db3-b00d-0410-b41b-f4738ad19bea --- Help/Changes | 4 ++++ python/rox/suchild.sh | 2 +- tests/python/testsu.py | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Help/Changes b/Help/Changes index 267b1e1..d29c7c2 100644 --- a/Help/Changes +++ b/Help/Changes @@ -3,6 +3,10 @@ by Thomas Leonard http://rox.sourceforge.net +29-Apr-2005 +~~~~~~~~~~~ +Compatability fixes for the su module (Stephen Watson). + 17-Apr-2005 ~~~~~~~~~~~ Fixed Zero Install version test in findrox.py (Thomas Leonard). diff --git a/python/rox/suchild.sh b/python/rox/suchild.sh index d03b3a3..260eab0 100755 --- a/python/rox/suchild.sh +++ b/python/rox/suchild.sh @@ -8,6 +8,6 @@ echo "$message" echo echo "Enter the root password:" while true; do - su -c 'nohup "$roxlib_python" "$roxlib_dir/suchild.py" $roxlib_to_parent $roxlib_from_parent >/dev/null &' && break + su root -c 'nohup "$roxlib_python" "$roxlib_dir/suchild.py" $roxlib_to_parent $roxlib_from_parent >/dev/null &' && break done sleep 1 diff --git a/tests/python/testsu.py b/tests/python/testsu.py index 00afb32..465533a 100755 --- a/tests/python/testsu.py +++ b/tests/python/testsu.py @@ -26,7 +26,8 @@ class TestSU(unittest.TestCase): response = root.waitpid(pid, 0) yield response (pid, status) = response.result - assert status == 0x100 + exitstatus = os.WEXITSTATUS(status) + assert exitstatus != 0 response = root.spawnvpe(os.P_WAIT, 'true', ['true']) yield response -- 2.11.4.GIT