[apparmor] [patch] fix aa-complain to work with quoted profile names
apparmor at cboltz.de
Tue Jun 10 22:11:29 UTC 2014
the attached patch fixes a crash in aa-complain when a profile name is
quoted. It also makes sure aa-complain actually adds the complain flag
in such cases. (aa-enforce etc. will also benefit from this fix.)
Note: superfluous quotes will be removed when saving the profile (for
example with aa-cleanprof), but they are kept if needed, like in
profile "/bin/foo bar"
(tested with aa-complain and aa-cleanprof - and also with "rcapparmor
reload", where the initscript bailed out because my profile filename
contained a space...)
The patch also adds some TODO notes.
There are other regexes that handle quotes:
They probably also need to be changed to work with quotes (can someone
test them, please?), but that can be a separate patch.
I also noticed that aa-cleanprof (and therefore probably all python
tools) adds additional quotes in file rules, so
"/bin/foo bar" mrix,
""/bin/foo bar"" mrix,
and in the next run
"""/bin/foo bar""" mrix,
One more patch to write...
a computer without an Internet connection is essentially a very
expensive DVD player
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2844 bytes
Desc: not available
More information about the AppArmor