diff options
Diffstat (limited to '')
-rwxr-xr-x | plugins/sudoers/regress/testsudoers/test27.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/plugins/sudoers/regress/testsudoers/test27.sh b/plugins/sudoers/regress/testsudoers/test27.sh new file mode 100755 index 0000000..8733bb8 --- /dev/null +++ b/plugins/sudoers/regress/testsudoers/test27.sh @@ -0,0 +1,22 @@ +#!/bin/sh +# +# Verify that runas_check_shell works as expected. +# + +: ${TESTSUDOERS=testsudoers} + +exec 2>&1 + +# This should fail due to fakeshell's shell +$TESTSUDOERS -u fakeshell -p ${TESTDIR}/passwd -P ${TESTDIR}/group \ + admin /bin/ls <<'EOF' +Defaults runas_check_shell +admin ALL = (ALL) /bin/ls +EOF + +# Expected failure +if [ $? -eq 0 ]; then + exit 1 +else + exit 0 +fi |