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:
parent
6fe6ccb048
commit
db7ea4123a
3
MANIFEST
3
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
|
||||
|
1
plugins/sudoers/regress/visudo/test2.err.ok
Normal file
1
plugins/sudoers/regress/visudo/test2.err.ok
Normal file
@ -0,0 +1 @@
|
||||
visudo: Error: cycle in User_Alias `FOO'
|
0
plugins/sudoers/regress/visudo/test2.out.ok
Normal file
0
plugins/sudoers/regress/visudo/test2.out.ok
Normal file
13
plugins/sudoers/regress/visudo/test2.sh
Executable file
13
plugins/sudoers/regress/visudo/test2.sh
Executable 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
|
Loading…
x
Reference in New Issue
Block a user