Hallo, this patch adds some comments to create-apparmor.vim.py that explain the more interesting[tm] regexes.
=== modified file 'utils/vim/create-apparmor.vim.py' --- utils/vim/create-apparmor.vim.py 2012-03-22 20:26:20 +0000 +++ utils/vim/create-apparmor.vim.py 2012-03-23 23:19:05 +0000 @@ -78,12 +78,13 @@ # -> currently (2011-01-11) not, but might come back aa_regex_map = { - 'FILE': r'\v^\s*(audit\s+)?(deny\s+)?(owner\s+)?(\/|\@\{\S*\})\S*\s+', - 'DENYFILE': r'\v^\s*(audit\s+)?deny\s+(owner\s+)?(\/|\@\{\S*\})\S*\s+', + 'FILE': r'\v^\s*(audit\s+)?(deny\s+)?(owner\s+)?(\/|\@\{\S*\})\S*\s+', # Start of a file rule + # (whitespace_+_, owner etc. flag_?_, filename pattern, whitespace_+_) + 'DENYFILE': r'\v^\s*(audit\s+)?deny\s+(owner\s+)?(\/|\@\{\S*\})\S*\s+', # deny, otherwise like FILE 'auditdenyowner': r'(audit\s+)?(deny\s+)?(owner\s+)?', 'auditdeny': r'(audit\s+)?(deny\s+)?', - 'FILENAME': r'(\/|\@\{\S*\})\S*', - 'EOL': r'\s*,(\s*$|(\s*#.*$)\@=)', + 'FILENAME': r'(\/|\@\{\S*\})\S*', # just a filename (taken from @@FILE@@) + 'EOL': r'\s*,(\s*$|(\s*#.*$)\@=)', # End of a line (whitespace_?_, comma, whitespace_?_ comment.*) 'TRANSITION': r'(\s+-\>\s+\S+)?', 'sdKapKey': " ".join(benign_caps), 'sdKapKeyDanger': " ".join(danger_caps), Regards, Christian Boltz -- | Yes, I know. But there are even conjobs running as user games? Sometimes when cron is bored he starts playing games, didn't you know? ;-) [Aschwin Marsman and Robert Schiele opensuse] -- AppArmor mailing list AppArmor@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/apparmor