2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-22 01:49:11 +00:00

Add test for visudo cycle check core dump; test case from Daniel Kopecek

This commit is contained in:
Todd C. Miller 2013-01-23 08:24:11 -05:00
parent 6fe6ccb048
commit db7ea4123a
4 changed files with 17 additions and 0 deletions

View File

@ -268,6 +268,9 @@ plugins/sudoers/regress/sudoers/test8.out.ok
plugins/sudoers/regress/sudoers/test8.toke.ok plugins/sudoers/regress/sudoers/test8.toke.ok
plugins/sudoers/regress/testsudoers/test1.out.ok plugins/sudoers/regress/testsudoers/test1.out.ok
plugins/sudoers/regress/testsudoers/test1.sh 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/set_perms.c
plugins/sudoers/sssd.c plugins/sudoers/sssd.c
plugins/sudoers/sudo_nss.c plugins/sudoers/sudo_nss.c

View File

@ -0,0 +1 @@
visudo: Error: cycle in User_Alias `FOO'

View File

@ -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 - <<EOF
User_Alias YYY = FOO
User_Alias XXX = nobody
User_Alias FOO = XXX, YYY
FOO ALL = ALL
EOF