summaryrefslogtreecommitdiffstats
path: root/plugins/sudoers/regress/testsudoers/test12.sh
blob: d496e3dcf1fc019fe0ec12664a7b7e637c37f9da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh
#
# Test sudoers file with multiple syntax errors
# The standard error output is dup'd to the standard output.
#

: ${TESTSUDOERS=testsudoers}

# Avoid warnings about memory leaks when there is a syntax error
ASAN_OPTIONS=detect_leaks=0; export ASAN_OPTIONS

echo "Testing sudoers with multiple syntax errors"
echo ""
$TESTSUDOERS -d <<EOF 2>&1 | sed 's/\(syntax error\), .*/\1/' 
User_Alias A1 = u1 u2 : A2 = u3, u4

millert ALL = /fail : foo

root ALL = ALL bar
EOF