From a83507ccd11fa87b7d1751952cc22a2c1cd4bdda Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Sun, 6 Nov 2011 17:04:55 -0500 Subject: [PATCH] Tests for empty sudoers (should parse OK) and syntax errors within a line (should report correct line number) both with and without the trailing newline. --- plugins/sudoers/regress/sudoers/test10.in | 1 + plugins/sudoers/regress/sudoers/test10.out.ok | 4 ++++ plugins/sudoers/regress/sudoers/test10.toke.ok | 1 + plugins/sudoers/regress/sudoers/test10.toke.out.ok | 0 plugins/sudoers/regress/sudoers/test11.in | 1 + plugins/sudoers/regress/sudoers/test11.out.ok | 4 ++++ plugins/sudoers/regress/sudoers/test11.toke.ok | 2 ++ plugins/sudoers/regress/sudoers/test11.toke.out.ok | 0 plugins/sudoers/regress/sudoers/test12.in | 1 + plugins/sudoers/regress/sudoers/test12.out.ok | 4 ++++ plugins/sudoers/regress/sudoers/test12.toke.ok | 2 ++ plugins/sudoers/regress/sudoers/test13.in | 1 + plugins/sudoers/regress/sudoers/test13.out.ok | 4 ++++ plugins/sudoers/regress/sudoers/test13.toke.ok | 1 + plugins/sudoers/regress/sudoers/test9.in | 0 plugins/sudoers/regress/sudoers/test9.out.ok | 4 ++++ plugins/sudoers/regress/sudoers/test9.toke.ok | 0 plugins/sudoers/regress/sudoers/test9.toke.out.ok | 0 18 files changed, 30 insertions(+) create mode 100644 plugins/sudoers/regress/sudoers/test10.in create mode 100644 plugins/sudoers/regress/sudoers/test10.out.ok create mode 100644 plugins/sudoers/regress/sudoers/test10.toke.ok create mode 100644 plugins/sudoers/regress/sudoers/test10.toke.out.ok create mode 100644 plugins/sudoers/regress/sudoers/test11.in create mode 100644 plugins/sudoers/regress/sudoers/test11.out.ok create mode 100644 plugins/sudoers/regress/sudoers/test11.toke.ok create mode 100644 plugins/sudoers/regress/sudoers/test11.toke.out.ok create mode 100644 plugins/sudoers/regress/sudoers/test12.in create mode 100644 plugins/sudoers/regress/sudoers/test12.out.ok create mode 100644 plugins/sudoers/regress/sudoers/test12.toke.ok create mode 100644 plugins/sudoers/regress/sudoers/test13.in create mode 100644 plugins/sudoers/regress/sudoers/test13.out.ok create mode 100644 plugins/sudoers/regress/sudoers/test13.toke.ok create mode 100644 plugins/sudoers/regress/sudoers/test9.in create mode 100644 plugins/sudoers/regress/sudoers/test9.out.ok create mode 100644 plugins/sudoers/regress/sudoers/test9.toke.ok create mode 100644 plugins/sudoers/regress/sudoers/test9.toke.out.ok diff --git a/plugins/sudoers/regress/sudoers/test10.in b/plugins/sudoers/regress/sudoers/test10.in new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/plugins/sudoers/regress/sudoers/test10.in @@ -0,0 +1 @@ + diff --git a/plugins/sudoers/regress/sudoers/test10.out.ok b/plugins/sudoers/regress/sudoers/test10.out.ok new file mode 100644 index 000000000..ea87d793c --- /dev/null +++ b/plugins/sudoers/regress/sudoers/test10.out.ok @@ -0,0 +1,4 @@ +Parses OK. + + + diff --git a/plugins/sudoers/regress/sudoers/test10.toke.ok b/plugins/sudoers/regress/sudoers/test10.toke.ok new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/plugins/sudoers/regress/sudoers/test10.toke.ok @@ -0,0 +1 @@ + diff --git a/plugins/sudoers/regress/sudoers/test10.toke.out.ok b/plugins/sudoers/regress/sudoers/test10.toke.out.ok new file mode 100644 index 000000000..e69de29bb diff --git a/plugins/sudoers/regress/sudoers/test11.in b/plugins/sudoers/regress/sudoers/test11.in new file mode 100644 index 000000000..5ffba7b57 --- /dev/null +++ b/plugins/sudoers/regress/sudoers/test11.in @@ -0,0 +1 @@ +bogus diff --git a/plugins/sudoers/regress/sudoers/test11.out.ok b/plugins/sudoers/regress/sudoers/test11.out.ok new file mode 100644 index 000000000..c2b9d282c --- /dev/null +++ b/plugins/sudoers/regress/sudoers/test11.out.ok @@ -0,0 +1,4 @@ +Parse error in sudoers near line 1. + + + diff --git a/plugins/sudoers/regress/sudoers/test11.toke.ok b/plugins/sudoers/regress/sudoers/test11.toke.ok new file mode 100644 index 000000000..d57d6c391 --- /dev/null +++ b/plugins/sudoers/regress/sudoers/test11.toke.ok @@ -0,0 +1,2 @@ +WORD(5) +<*> \ No newline at end of file diff --git a/plugins/sudoers/regress/sudoers/test11.toke.out.ok b/plugins/sudoers/regress/sudoers/test11.toke.out.ok new file mode 100644 index 000000000..e69de29bb diff --git a/plugins/sudoers/regress/sudoers/test12.in b/plugins/sudoers/regress/sudoers/test12.in new file mode 100644 index 000000000..23bda4a6a --- /dev/null +++ b/plugins/sudoers/regress/sudoers/test12.in @@ -0,0 +1 @@ +user ALL = (ALL) diff --git a/plugins/sudoers/regress/sudoers/test12.out.ok b/plugins/sudoers/regress/sudoers/test12.out.ok new file mode 100644 index 000000000..c2b9d282c --- /dev/null +++ b/plugins/sudoers/regress/sudoers/test12.out.ok @@ -0,0 +1,4 @@ +Parse error in sudoers near line 1. + + + diff --git a/plugins/sudoers/regress/sudoers/test12.toke.ok b/plugins/sudoers/regress/sudoers/test12.toke.ok new file mode 100644 index 000000000..a1995f0d6 --- /dev/null +++ b/plugins/sudoers/regress/sudoers/test12.toke.ok @@ -0,0 +1,2 @@ +WORD(5) ALL = ( ALL ) +<*> \ No newline at end of file diff --git a/plugins/sudoers/regress/sudoers/test13.in b/plugins/sudoers/regress/sudoers/test13.in new file mode 100644 index 000000000..b8002bcd2 --- /dev/null +++ b/plugins/sudoers/regress/sudoers/test13.in @@ -0,0 +1 @@ +user ALL = (ALL) \ No newline at end of file diff --git a/plugins/sudoers/regress/sudoers/test13.out.ok b/plugins/sudoers/regress/sudoers/test13.out.ok new file mode 100644 index 000000000..c2b9d282c --- /dev/null +++ b/plugins/sudoers/regress/sudoers/test13.out.ok @@ -0,0 +1,4 @@ +Parse error in sudoers near line 1. + + + diff --git a/plugins/sudoers/regress/sudoers/test13.toke.ok b/plugins/sudoers/regress/sudoers/test13.toke.ok new file mode 100644 index 000000000..e189ffded --- /dev/null +++ b/plugins/sudoers/regress/sudoers/test13.toke.ok @@ -0,0 +1 @@ +WORD(5) ALL = ( ALL ) <*> \ No newline at end of file diff --git a/plugins/sudoers/regress/sudoers/test9.in b/plugins/sudoers/regress/sudoers/test9.in new file mode 100644 index 000000000..e69de29bb diff --git a/plugins/sudoers/regress/sudoers/test9.out.ok b/plugins/sudoers/regress/sudoers/test9.out.ok new file mode 100644 index 000000000..ea87d793c --- /dev/null +++ b/plugins/sudoers/regress/sudoers/test9.out.ok @@ -0,0 +1,4 @@ +Parses OK. + + + diff --git a/plugins/sudoers/regress/sudoers/test9.toke.ok b/plugins/sudoers/regress/sudoers/test9.toke.ok new file mode 100644 index 000000000..e69de29bb diff --git a/plugins/sudoers/regress/sudoers/test9.toke.out.ok b/plugins/sudoers/regress/sudoers/test9.toke.out.ok new file mode 100644 index 000000000..e69de29bb -- 2.40.0