[apparmor] [patch] Update change_profile highlighting in apparmor.vim

Christian Boltz apparmor at cboltz.de
Thu May 26 10:49:18 UTC 2016


Hallo,

this patch allows several details in change_profile highlighting:
- audit and deny keywords
- allow bare change_profile rules
- allow change_profile rules without '-> ...' part
- allow usage of the new 'safe' and 'unsafe' keywords
- ensure the exec condition starts with / or @


[ apparmor-vim-change_profile.diff ]

=== modified file 'utils/vim/apparmor.vim.in'
--- utils/vim/apparmor.vim.in   2014-10-16 21:55:43 +0000
+++ utils/vim/apparmor.vim.in   2016-05-26 10:30:27 +0000
@@ -147,9 +147,9 @@
 
 
 " Change Profile
-" TODO: audit and deny support will be added (JJ, 2011-01-11)
-syn match   sdEntryChangeProfile    /\v^\s*change_profile\s+-\>\s+\S+@@EOL@@/ contains=sdGlob,sdComment nextgroup=@sdEntry,sdComment,sdError,sdInclude
-
+syn match   sdEntryChangeProfile    /\v^\s*@@auditdeny@@change_profile\s+(safe\s+[/@]\S+|unsafe\s+[/@]\S+|[/@]\S+)?\s*(-\>\s*\S+)?@@EOL@@/ contains=sdGlob,sdComment nextgroup=@sdEntry,sdComment,sdError,sdInclude
+" bare change_profile rule
+syn match   sdEntryChangeProfile    /\v^\s*@@auditdeny@@change_profile@@EOL@@/ contains=sdComment nextgroup=@sdEntry,sdComment,sdError,sdInclude
 
 " rlimit
 " TODO: audit and deny support will be added (JJ, 2011-01-11)



Regards,

Christian Boltz
-- 
> Der Postfix-Gott und Joda habe ich mal auch angetriggert
> (denn die haben ja die besten Kontakte zu Marc).
Öhm so gute connection nach so weit oben hab ich nicht.
Wenn die da oben im Olymp zu Rat sitzen wird das dann wohl reichen...
[> Django und Uwe Drießen in postfixbuch-users]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20160526/9923ef71/attachment-0001.pgp>


More information about the AppArmor mailing list