When aa.py is imported, it looks for a set of profiles and it also looks for the parser. Both of these paths are configured by logprof.conf but it isn't always obvious which logprof.conf file was used and, therefore, it isn't always obvious where aa.py is looking. This patch includes the paths in the error messages.
Signed-off-by: Tyler Hicks <tyhi...@canonical.com> Cc: Christian Boltz <appar...@cboltz.de> --- utils/apparmor/aa.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/apparmor/aa.py b/utils/apparmor/aa.py index ab7f6c9..eecf8c7 100644 --- a/utils/apparmor/aa.py +++ b/utils/apparmor/aa.py @@ -3754,11 +3754,11 @@ if cfg['settings'].get('default_owner_prompt', False): profile_dir = conf.find_first_dir(cfg['settings'].get('profiledir')) or '/etc/apparmor.d' if not os.path.isdir(profile_dir): - raise AppArmorException('Can\'t find AppArmor profiles') + raise AppArmorException('Can\'t find AppArmor profiles in %s' % (profile_dir)) extra_profile_dir = conf.find_first_dir(cfg['settings'].get('inactive_profiledir')) or '/usr/share/apparmor/extra-profiles/' parser = conf.find_first_file(cfg['settings'].get('parser')) or '/sbin/apparmor_parser' if not os.path.isfile(parser) or not os.access(parser, os.EX_OK): - raise AppArmorException('Can\'t find apparmor_parser') + raise AppArmorException('Can\'t find apparmor_parser at %s' % (parser)) -- 2.7.4 -- AppArmor mailing list AppArmor@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/apparmor