~cameronnemo/apparmor/gnome-abstraction

Viewing all changes in revision 3091.

  • Committer: Christian Boltz
  • Date: 2015-06-06 12:04:11 UTC
  • Revision ID: apparmor@cboltz.de-20150606120411-jn6juf1a9jyqobzc
Add and use logprof_header() and logprof_header_localvars() in *Rule classes

BaseRule:
- add logprof_header() - sets the 'Qualifier' (audit, allow/deny) header
  if a qualifier is specified, calls logprof_header_localvars() and then
  returns an array of headers to display in aa-logprof and aa-mergeprof
- add logprof_header_localvars() - dummy function that needs to be
  implemented in the child classes

NetworkRule: add logprof_header_localvars() - adds 'Network Family'
and 'Socket Type' to the headers

CapabilityRule: add logprof_header_localvars() - adds 'Capability' to
the headers

Also change aa-mergeprof to use rule_obj.logprof_header() for network
and capability rules. This means deleting lots of lines (that moved to
the *Rule classes) and also deleting the last differences between
capabiltiy and network rules.

Finally add tests for the newly added functions.


Acked-by: Steve Beattie <steve@nxnw.org>

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: