diff options
Diffstat (limited to '')
-rwxr-xr-x | plugins/sudoers/regress/testsudoers/test22.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/plugins/sudoers/regress/testsudoers/test22.sh b/plugins/sudoers/regress/testsudoers/test22.sh new file mode 100755 index 0000000..9d4dbcb --- /dev/null +++ b/plugins/sudoers/regress/testsudoers/test22.sh @@ -0,0 +1,18 @@ +#!/bin/sh +# +# Verify that a user is only allowed to run commands with a group +# that is specified by sudoers (or that the runas user is a member of). +# This tests a bug fixed in sudo 1.9.14. +# + +: ${TESTSUDOERS=testsudoers} + +exec 2>&1 + +# The root user must *not* belong to the group specified below. +$TESTSUDOERS -u root -g bin -p ${TESTDIR}/passwd -P ${TESTDIR}/group \ + admin /bin/ls <<'EOF' +admin ALL = /bin/ls +EOF + +exit 0 |