summaryrefslogtreecommitdiffstats
path: root/plugins/sudoers/regress/testsudoers/test19.sh
blob: 113eb2ad4656d112436313570976fa2d91a21a26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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