2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-22 01:49:11 +00:00
Todd C. Miller a51d194a73 Add test of multiple syntax errors.
Where possible, the portion of the line before the error should be
still be interpreted.
2020-09-02 12:40:39 -06:00

19 lines
449 B
Bash
Executable File

#!/bin/sh
#
# Test sudoers file with multiple syntax errors
# The standard error output is dup'd to the standard output.
#
# 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