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 <serge@hallyn.com>
This commit is contained in:
Serge Hallyn 2021-04-11 22:14:27 -05:00
parent 716f3f99ce
commit fa90ac11c8
5 changed files with 5 additions and 0 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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