[apparmor] [PATCH] add --include-template-dir and --include-policy-groups-dir to easyprof

Jamie Strandboge jamie at canonical.com
Fri Mar 27 22:15:25 UTC 2015


Hi,

Attached is a patch that implements the following:

=item --include-templates-dir=PATH

Include PATH when searching for templates in addition to the system templates
directory (or the one specified with --templates-dir). System templates will
match before those in PATH.


=item --include-policy-groups-dir=PATH

Include PATH when searching for policy groups in addition to the system
policy-groups directory (or the one specified with --policy-groups-dir). System
policy-groups will match before those in PATH.


It makes the following changes:
* utils/aa-easyprof:
  - update --show-template to handle --include-templates-dir
  - update --show-policy-group to handle --include-policy-groups-dir
* utils/aa-easyprof.pod
  - minor corrections for --show-template and --show-policy-group
  - add --include-templates-dir and --include-policy-groups-dir
* utils/apparmor/easyprof.py: implement these options according to
  man page
* utils/test/test-aa-easyprof.py:
  - implement tests to exercise the changed/added code
  - correct test_policygroups_list() and test_policygroups_show() which
    were copy and wasted

This option can be used to extend the available templates and policy groups
beyond what are in the system directories. This is being implemented in support
of Snappy for Ubuntu Core. The changes do not change aa-easyprof default
behavior. --include-templates-dir and --include-policy-groups-dir cannot be used
to override system templates and policy groups.

Signed-off-by: Jamie Strandboge <jamie at canonical.com>

-- 
Jamie Strandboge                 http://www.ubuntu.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-easyprof-framework-policy.patch
Type: text/x-diff
Size: 18945 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20150327/2a7842b0/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20150327/2a7842b0/attachment.pgp>


More information about the AppArmor mailing list