]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
su/03: export shell = sh
authorSerge Hallyn <serge@hallyn.com>
Mon, 12 Apr 2021 03:14:27 +0000 (22:14 -0500)
committerSerge Hallyn <serge@hallyn.com>
Sat, 17 Apr 2021 02:03:08 +0000 (21:03 -0500)
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 <serge@hallyn.com>
tests/su/03/su_run_command13.test
tests/su/03/su_run_command14.test
tests/su/03/su_run_command15.test
tests/su/03/su_run_command16.test
tests/su/03/su_run_command17.test

index c52dd933cad72bf36f418f9d48f4e4068ac64fb2..0b042b9627de9793acf758466a48cf8fd50bf75b 100755 (executable)
@@ -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
 
index 82f29271ff2b02010919ae5d6a2ae84b3289e5c1..c8fc49b744b9205f9e3ce819c639e1884df860e1 100755 (executable)
@@ -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
 
index 7e34e48f75198c5c8f0fb61a43608d19ff9ba3cb..d57b27de1d3de56cf93e9f4f712612196a3b2daa 100755 (executable)
@@ -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
 
index 4fbe1afac15bba1f23d7238ff3f26a8a457f1b45..28765168016f6fb67f37aa8b42b295e426f42abc 100755 (executable)
@@ -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
 
index c1f15c5eb26bac32c5f9f83f0620d41d81050e53..b423faa522a8b1083f521aec7629d9636f5dde41 100755 (executable)
@@ -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