From fa90ac11c872228469aef1c1643ee76732aa5bdf Mon Sep 17 00:00:00 2001 From: Serge Hallyn Date: Sun, 11 Apr 2021 22:14:27 -0500 Subject: [PATCH] su/03: export shell = sh Otherwise our su -p uses bash if that is what root was configured to use, and then fails to read /root/ for .bash_profile. This caused an unexpected error message in /tmp/err, failing the test. Signed-off-by: Serge Hallyn --- tests/su/03/su_run_command13.test | 1 + tests/su/03/su_run_command14.test | 1 + tests/su/03/su_run_command15.test | 1 + tests/su/03/su_run_command16.test | 1 + tests/su/03/su_run_command17.test | 1 + 5 files changed, 5 insertions(+) diff --git a/tests/su/03/su_run_command13.test b/tests/su/03/su_run_command13.test index c52dd933..0b042b96 100755 --- a/tests/su/03/su_run_command13.test +++ b/tests/su/03/su_run_command13.test @@ -17,6 +17,7 @@ trap 'log_status "$0" "FAILURE"; restore_config' 0 change_config +export SHELL=/bin/sh echo "/bin/su -p -c pwd -- - myuser> tmp/out 2> tmp/err" /bin/su -p -c pwd -- - myuser> tmp/out 2> tmp/err diff --git a/tests/su/03/su_run_command14.test b/tests/su/03/su_run_command14.test index 82f29271..c8fc49b7 100755 --- a/tests/su/03/su_run_command14.test +++ b/tests/su/03/su_run_command14.test @@ -17,6 +17,7 @@ trap 'log_status "$0" "FAILURE"; restore_config' 0 change_config +export SHELL=/bin/sh echo "/bin/su -p -c pwd - myuser> tmp/out 2> tmp/err" /bin/su -p -c pwd - myuser> tmp/out 2> tmp/err diff --git a/tests/su/03/su_run_command15.test b/tests/su/03/su_run_command15.test index 7e34e48f..d57b27de 100755 --- a/tests/su/03/su_run_command15.test +++ b/tests/su/03/su_run_command15.test @@ -17,6 +17,7 @@ trap 'log_status "$0" "FAILURE"; restore_config' 0 change_config +export SHELL=/bin/sh echo "/bin/su -c pwd -p - myuser> tmp/out 2> tmp/err" /bin/su -c pwd -p - myuser> tmp/out 2> tmp/err diff --git a/tests/su/03/su_run_command16.test b/tests/su/03/su_run_command16.test index 4fbe1afa..28765168 100755 --- a/tests/su/03/su_run_command16.test +++ b/tests/su/03/su_run_command16.test @@ -17,6 +17,7 @@ trap 'log_status "$0" "FAILURE"; restore_config' 0 change_config +export SHELL=/bin/sh echo "/bin/su -c pwd - -p myuser> tmp/out 2> tmp/err" /bin/su -c pwd - -p myuser> tmp/out 2> tmp/err diff --git a/tests/su/03/su_run_command17.test b/tests/su/03/su_run_command17.test index c1f15c5e..b423faa5 100755 --- a/tests/su/03/su_run_command17.test +++ b/tests/su/03/su_run_command17.test @@ -17,6 +17,7 @@ trap 'log_status "$0" "FAILURE"; restore_config' 0 change_config +export SHELL=/bin/sh echo "/bin/su -c pwd - myuser -p> tmp/out 2> tmp/err" /bin/su -c pwd - myuser -p> tmp/out 2> tmp/err