summaryrefslogtreecommitdiffstats
path: root/plugins/sudoers/regress/visudo/test2.sh
blob: 8ab2382bde2bf52e474fae9e8db838aa48c25252 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/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=visudo}

$VISUDO -csf - <<EOF
User_Alias YYY = FOO
User_Alias XXX = nobody
User_Alias FOO = XXX, YYY
FOO ALL = ALL
EOF

exit 0