diff --git a/MANIFEST b/MANIFEST index f2ffc49564..aaf84d54d2 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1020,6 +1020,8 @@ plugins/sudoers/regress/testsudoers/test17.out.ok plugins/sudoers/regress/testsudoers/test17.sh plugins/sudoers/regress/testsudoers/test18.out.ok plugins/sudoers/regress/testsudoers/test18.sh +plugins/sudoers/regress/testsudoers/test19.out.ok +plugins/sudoers/regress/testsudoers/test19.sh plugins/sudoers/regress/testsudoers/test2.inc plugins/sudoers/regress/testsudoers/test2.out.ok plugins/sudoers/regress/testsudoers/test2.sh diff --git a/plugins/sudoers/regress/testsudoers/test19.out.ok b/plugins/sudoers/regress/testsudoers/test19.out.ok new file mode 100644 index 0000000000..a0de2408e3 --- /dev/null +++ b/plugins/sudoers/regress/testsudoers/test19.out.ok @@ -0,0 +1,20 @@ +Parses OK + +Entries for user root: + +ALL = /bin/ls "" + host matched + runas matched + cmnd allowed + +Command allowed +Parses OK + +Entries for user root: + +ALL = /bin/ls "" + host matched + runas matched + cmnd unmatched + +Command unmatched diff --git a/plugins/sudoers/regress/testsudoers/test19.sh b/plugins/sudoers/regress/testsudoers/test19.sh new file mode 100755 index 0000000000..113eb2ad46 --- /dev/null +++ b/plugins/sudoers/regress/testsudoers/test19.sh @@ -0,0 +1,20 @@ +#!/bin/sh +# +# Verify that "" in sudoers does not match a literal "" on the command line. +# + +: ${TESTSUDOERS=testsudoers} + +exec 2>&1 + +# This should succeed +$TESTSUDOERS root /bin/ls <<'EOF' +root ALL = /bin/ls "" +EOF + +# This should fail +$TESTSUDOERS root /bin/ls '""' <<'EOF' +root ALL = /bin/ls "" +EOF + +exit 0