[apparmor] [patch] apparmor.vim: add support for the "hat" keyword
Steve Beattie
steve at nxnw.org
Thu Oct 16 21:18:11 UTC 2014
On Thu, Oct 16, 2014 at 09:04:36PM +0200, Christian Boltz wrote:
> $subject says it all ;-)
Acked-by: Steve Beattie <steve at nxnw.org>, thanks!
> === modified file 'utils/vim/apparmor.vim.in'
> --- utils/vim/apparmor.vim.in 2014-10-14 19:36:41 +0000
> +++ utils/vim/apparmor.vim.in 2014-10-16 19:01:34 +0000
> @@ -167,7 +167,7 @@
> syn match sdEntryW /\v^\s+@@auditdenyowner@@link\s+(subset\s+)?@@FILENAME@@\s+-\>\s+@@FILENAME@@@@EOL@@/ contains=sdGlob,sdComment
>
>
> -syn match sdExtHat /\v^\s+(\^|profile\s+)\S+@@EOL@@/ contains=sdComment " hat without {...}
> +syn match sdExtHat /\v^\s+(\^|hat\s+|profile\s+)\S+@@EOL@@/ contains=sdComment " hat without {...}
>
>
>
> @@ -176,7 +176,7 @@
> syn match sdProfileStart /{/ contained
> syn match sdProfileEnd /^}\s*(#.*)?$/ contained " TODO: syn region does not (yet?) allow usage of comment in end=
> " TODO: Removing the $ mark from end= will allow non-comments also :-(
> -syn match sdHatName /\v^\s+(\^|profile\s+)\S+\s+@@flags@@=\{/ contains=sdProfileStart,sdFlags,sdComment
> +syn match sdHatName /\v^\s+(\^|hat\s+|profile\s+)\S+\s+@@flags@@=\{/ contains=sdProfileStart,sdFlags,sdComment
> syn match sdHatStart /{/ contained
> syn match sdHatEnd /}/ contained " TODO: allow comments + [same as for syn match sdProfileEnd]
> syn match sdFlags /\v@@flags@@/ contained contains=sdFlagKey
> @@ -190,7 +190,7 @@
> " basic profile block...
> " \s+ does not work in end=, therefore using \s\s*
> syn region Normal start=/\v^(profile\s+)?\S+\s+@@flags@@=\{/ matchgroup=sdProfileEnd end=/^}\s*$/ contains=sdProfileName,Hat, at sdEntry,sdComment,sdError,sdInclude
> -syn region Hat start=/\v^\s+(\^|profile\s+)\S+\s+@@flags@@=\{/ matchgroup=sdHatEnd end=/^\s\s*}\s*$/ contains=sdHatName, at sdEntry,sdComment,sdError,sdInclude
> +syn region Hat start=/\v^\s+(\^|hat\s+|profile\s+)\S+\s+@@flags@@=\{/ matchgroup=sdHatEnd end=/^\s\s*}\s*$/ contains=sdHatName, at sdEntry,sdComment,sdError,sdInclude
>
> " file permissions
--
Steve Beattie
<sbeattie at ubuntu.com>
http://NxNW.org/~steve/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20141016/8ed172f2/attachment-0001.pgp>
More information about the AppArmor
mailing list