diff options
Diffstat (limited to 'tests/su/13_su_child_success/su.test')
-rwxr-xr-x | tests/su/13_su_child_success/su.test | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/su/13_su_child_success/su.test b/tests/su/13_su_child_success/su.test new file mode 100755 index 0000000..6ff932c --- /dev/null +++ b/tests/su/13_su_child_success/su.test @@ -0,0 +1,31 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "su return failures of its child" + + +# no testsuite password +# root password: rootF00barbaz +# myuser password: myuserF00barbaz + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "Run su, execute false..." +su -l myuser -c true +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + |