]> git.ipfire.org Git - thirdparty/vim.git/commit
runtime(sudoers): improve recognized Runas_Spec and Tag_Spec items
authorChristian Brabandt <cb@256bit.org>
Mon, 2 Sep 2024 07:53:53 +0000 (09:53 +0200)
committerChristian Brabandt <cb@256bit.org>
Mon, 2 Sep 2024 07:55:00 +0000 (09:55 +0200)
commitbd69b39514f1fec45a5ac76cd36db5dec2faebe2
treee2b776ca6db51f7183fe7a3f42eb206fc5efb2c2
parent3d5065fc7553c8de3d0555c3085165bdd724663b
runtime(sudoers): improve recognized Runas_Spec and Tag_Spec items

Recognize colon-delimited second part of Runas_Spec that specifies
permitted groups, e.g.:

    alan ALL = (root, bin : operator, system) ALL

This implementation is sloppy because it accepts any amount of colons
delimiting further Runas_Lists, but for now that's better than bailing
out completely as soon as a colon is encountered (esp. given that the
default sudoers uses these colons, breaking highlighting OOTB).

Also, while at it, make Vim recognize all Tag_Spec items, not just
{,NO}PASSWD

closes: #15607

Signed-off-by: Ivan Shapovalov <intelfx@intelfx.name>
Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/syntax/sudoers.vim