Files
org-vim/runtime/syntax/testdir/input/sudoers_user-spec.sudoers
Eisuke Kawashima 8f2cd47404 runtime(sudoers): update filetype plugin and syntax script
- remove `set isk+=-` to highlight `-=` operator correctly
- implement highlighting of GID
- fix highlight of hostname and add special value ALL
- fix highlight of IP address
- update include and includedir patterns
- remove duplicate syntax rules
- add missing options
- fix highlight of parameter assignment (limit operators to list
  parameters)
- fix highlight of string and list parameters with trailing whitespaces
- implement highlight of permission (octal)
- implement highlight of floating point numbers
- implement highlight of timeout-specific options
- support highlight of negatable options (integer, mode, float, timeout,
  string)
- allow sudoersListParameter to be negated
- fix highlight of comma-separated parameter list used as boolean
- fix highlight of parameter negation (prevent highlighting ill-formed `! !`)
- fix highlight of Tag_Spec
- allow empty Runas spec: `()` and `(:)`
- fix highlight of comma-concatenated commands, hosts, and users
- check word boundaries for special value ALL
- implement highlight of Option_Spec
- fix highlight in User_Spec (specifically for Host position)
- fix highlight of `Default!` command
- support highlight of digests (sha224, etc.)
- add syntax test and update header

closes: #19634

Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-03-11 19:33:36 +00:00

44 lines
1.7 KiB
Plaintext

# vi:ft=sudoers
ALL ALL = ALL
ALL ALL = NOSETENV : ALL
ALL ALL = CWD = * ALL
ALL ALL = (ALL) ALL
ALL ALL = (ALL) ALL
ALL ALL = (ALL) NOSETENV : ALL
ALL ALL = (ALL) CWD = * ALL
ALL ALL = (ALL) CWD = * NOSETENV : ALL
!user0, %group0 ALL = (user0, !user1 : !group0, group1) ALL
#1000, %#1000 ALL = (#1000 : #1000) ALL
ALL ALL = ( ) ALL
ALL ALL = (ALL ) ALL
ALL ALL = ( : ) ALL
ALL ALL = ( :ALL) ALL
ALL ALL = (ALL:ALL) ALL
ALL node0 , ! node1 = ALL : ! node2 , node3 = (ALL:ALL) CWD=/ ALL
user0 node0 = APPARMOR_PROFILE=unconfined /bin/pwd ""
user1 node1 = (root) APPARMOR_PROFILE=prof_a//&prof_b NOEXEC: /bin/ping
user0 node0 = PRIVS="proc_info,proc_session" /bin/kill
#1000 node0 = NOTBEFORE= 2026013123 NOTAFTER = 20270131235959 /bin/crontab
#1001 node1 = () NOTAFTER = 20270131235959Z NOTBEFORE= 2026013123Z MAIL : /bin/crontab
#1002 node2 = (ALL) NOTBEFORE= 20260131235959-1200 NOTAFTER = 2027013123+1400 /bin/crontab
%group0 node0 = TIMEOUT = 1 /bin/more
%group1 node0 = TIMEOUT = 2s /bin/more, (ALL:ALL) TIMEOUT=2S NOFOLLOW: /bin/less
%group2 node0 = TIMEOUT = 3m /bin/more, (ALL:ALL) TIMEOUT=3M NOFOLLOW: /bin/less
%group3 node0 = TIMEOUT = 4h /bin/more, (ALL:ALL) TIMEOUT=4H NOFOLLOW: /bin/less
%group4 node0 = TIMEOUT = 5d /bin/more, (ALL:ALL) TIMEOUT=5D NOFOLLOW: /bin/less
%group5 node0 = TIMEOUT = 1D2h3M4s /bin/more, (ALL:ALL) TIMEOUT=1d2H3m4S NOFOLLOW: /bin/less
%#1000 node0 = CWD=/srv list
%#1001 node0 = ( ) CWD=~root list
%#1002 node0 = (:ALL) CWD=* NOEXEC : list
#65535 ALL = (ALL) NOEXEC:NOFOLLOW:NOLOG_INPUT:NOMAIL:NOINTERCEPT:NOPASSWD:NOSETENV: sudoedit
ALL ALL = (ALL:ALL) TIMEOUT=1m CWD=* FOLLOW : ^/bin/[ef]?grep$