diff --git a/MANIFEST b/MANIFEST index 9a32a6e9b..4bea0a5f4 100644 --- a/MANIFEST +++ b/MANIFEST @@ -827,6 +827,8 @@ plugins/sudoers/regress/testsudoers/test10.out.ok plugins/sudoers/regress/testsudoers/test10.sh plugins/sudoers/regress/testsudoers/test11.out.ok plugins/sudoers/regress/testsudoers/test11.sh +plugins/sudoers/regress/testsudoers/test12.out.ok +plugins/sudoers/regress/testsudoers/test12.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/test12.out.ok b/plugins/sudoers/regress/testsudoers/test12.out.ok new file mode 100644 index 000000000..5dd75fb19 --- /dev/null +++ b/plugins/sudoers/regress/testsudoers/test12.out.ok @@ -0,0 +1,15 @@ +Testing sudoers with multiple syntax errors + +sudoers:1: syntax error +User_Alias A1 = u1 u2 : A2 = u3, u4 + ^~ +sudoers:3: syntax error +millert ALL = /fail : foo + ^ +sudoers:5: syntax error +root ALL = ALL bar + ^~~ + +User_Alias A1 = u1 + +millert ALL = /fail diff --git a/plugins/sudoers/regress/testsudoers/test12.sh b/plugins/sudoers/regress/testsudoers/test12.sh new file mode 100755 index 000000000..0a1510c5c --- /dev/null +++ b/plugins/sudoers/regress/testsudoers/test12.sh @@ -0,0 +1,18 @@ +#!/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 <&1 | sed 's/\(syntax error\), .*/\1/' +User_Alias A1 = u1 u2 : A2 = u3, u4 + +millert ALL = /fail : foo + +root ALL = ALL bar +EOF