~osomon/apparmor/newer-nvidia-abstraction-trunk

Viewing all changes in revision 3644.

  • Committer: Christian Boltz
  • Date: 2017-03-03 12:14:55 UTC
  • Revision ID: apparmor@cboltz.de-20170303121455-ssjhtkjvw5tb91ha
Fix regressions caused by init_aa()

With the init_aa() patch series commited, minitools_test.py showed
several test failures - which effectively means the -d option of
aa-complain, aa-cleanprof etc. was broken.

These failures were caused by
- calling init_aa() too late in tools.py - _after_ setting the
  profiledir, which then got overwritten by init_aa()
- calling init_aa() twice (because apparmor.aa gets imported in two
  modules used by aa-cleanprof), which overwrote the manually set values
  on the second run

This patch fixes the call order in tools.py and adds a check to
init_aa() so that it only runs once and ignores additional calls.


Acked-by: Tyler Hicks <tyhicks@canonical.com>
Acked-by: Seth Arnold <seth.arnold@canonical.com>

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: