From 6ebf1cb0ef645167b26156f96236dc70106363d6 Mon Sep 17 00:00:00 2001 From: Christian Boltz Date: Mon, 30 Sep 2024 21:36:26 +0000 Subject: [PATCH] Merge apparmor.vim: Add missing units for rlimit cpu and rttime ... and allow whitespace between the number and the unit. I propose this patch for 3.x, 4.0 and master. MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1336 Approved-by: Georgia Garcia Merged-by: Christian Boltz (cherry picked from commit 247bdd5deb51bd950b1f7be735234553d0c8c1c2) 9cb591c5 apparmor.vim: Add missing units for rlimit cpu and rttime Co-authored-by: Christian Boltz --- utils/vim/apparmor.vim.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/vim/apparmor.vim.in b/utils/vim/apparmor.vim.in index 89c6d2eab..2886a6f2b 100644 --- a/utils/vim/apparmor.vim.in +++ b/utils/vim/apparmor.vim.in @@ -159,8 +159,8 @@ syn match sdRLimit /\v^\s*set\s+rlimit\s+(nofile|ofile|nproc|rtprio)\s+\<\=\s+[0 syn match sdRLimit /\v^\s*set\s+rlimit\s+(locks|sigpending)\s+\<\=\s+[0-9]+@@EOL@@/ contains=sdComment syn match sdRLimit /\v^\s*set\s+rlimit\s+(fsize|data|stack|core|rss|as|memlock|msgqueue)\s+\<\=\s+[0-9]+([KMG]B)?@@EOL@@/ contains=sdComment syn match sdRLimit /\v^\s*set\s+rlimit\s+nice\s+\<\=\s+(-1?[0-9]|-20|1?[0-9])@@EOL@@/ contains=sdComment -syn match sdRLimit /\v^\s*set\s+rlimit\s+cpu\s+\<\=\s+[0-9]+(seconds|minutes|hours|days)?@@EOL@@/ contains=sdComment -syn match sdRLimit /\v^\s*set\s+rlimit\s+rttime\s+\<\=\s+[0-9]+(ms|seconds|minutes)?@@EOL@@/ contains=sdComment +syn match sdRLimit /\v^\s*set\s+rlimit\s+cpu\s+\<\=\s+[0-9]+\s*(s|sec|second|seconds|min|minute|minutes|h|hour|hours|d|day|days|week|weeks)?@@EOL@@/ contains=sdComment +syn match sdRLimit /\v^\s*set\s+rlimit\s+rttime\s+\<\=\s+[0-9]+\s*(us|microsecond|microseconds|ms|millisecond|milliseconds|s|sec|second|seconds|min|minute|minutes|h|hour|hours|d|day|days|week|weeks)?@@EOL@@/ contains=sdComment syn match sdRLimit /\v^\s*set\s+rlimit\s+(cpu|rttime|nofile|nproc|rtprio|locks|sigpending|fsize|data|stack|core|rss|as|memlock|msgqueue|nice)\s+\<\=\s+infinity@@EOL@@/ contains=sdComment " link rules