From: Todd C. Miller Date: Wed, 23 Jan 2013 13:24:11 +0000 (-0500) Subject: Add test for visudo cycle check core dump; test case from Daniel Kopecek X-Git-Tag: SUDO_1_8_7~1^2~268 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=db7ea4123a6a14832a019f5e85734969d464ca2f;p=sudo Add test for visudo cycle check core dump; test case from Daniel Kopecek --- diff --git a/MANIFEST b/MANIFEST index 0253da6b5..f84cd10c7 100644 --- a/MANIFEST +++ b/MANIFEST @@ -268,6 +268,9 @@ plugins/sudoers/regress/sudoers/test8.out.ok plugins/sudoers/regress/sudoers/test8.toke.ok plugins/sudoers/regress/testsudoers/test1.out.ok plugins/sudoers/regress/testsudoers/test1.sh +plugins/sudoers/regress/testsudoers/test2.err.ok +plugins/sudoers/regress/testsudoers/test2.out.ok +plugins/sudoers/regress/testsudoers/test2.sh plugins/sudoers/set_perms.c plugins/sudoers/sssd.c plugins/sudoers/sudo_nss.c diff --git a/plugins/sudoers/regress/visudo/test2.err.ok b/plugins/sudoers/regress/visudo/test2.err.ok new file mode 100644 index 000000000..3cca2eb29 --- /dev/null +++ b/plugins/sudoers/regress/visudo/test2.err.ok @@ -0,0 +1 @@ +visudo: Error: cycle in User_Alias `FOO' diff --git a/plugins/sudoers/regress/visudo/test2.out.ok b/plugins/sudoers/regress/visudo/test2.out.ok new file mode 100644 index 000000000..e69de29bb diff --git a/plugins/sudoers/regress/visudo/test2.sh b/plugins/sudoers/regress/visudo/test2.sh new file mode 100755 index 000000000..d17866765 --- /dev/null +++ b/plugins/sudoers/regress/visudo/test2.sh @@ -0,0 +1,13 @@ +#!/bin/sh +# +# Test cycle detection +# Prior to sudo 1.8.6p5 this resulted in a core dump (stack smash) +# The names of the aliases (or rather their lexical order) is important. +# + +./visudo -csf - <