On 20/11/17 09:38, Christian Boltz wrote:
Thanks, but unfortunately I still can't reproduce the problem :-(
Can you add a bit of debugging code in aa.py, please?
Search for
     def get_profile_flags(filename, program):
and add the lines marked with "# added" (or just replace the function
with the code below) def get_profile_flags(filename, program):
     # To-Do
     # XXX If more than one profile in a file then second one is being ignored 
XXX
     # Do we return flags for both or
     print('looking for', filename, program)  # added
     flags = ''
     with open_file_read(filename) as f_in:
         print('reading file %s' % filename)  # added
         for line in f_in:
             if RE_PROFILE_START.search(line):
                 matches = parse_profile_start_line(line, filename)
                 profile = matches['profile']
                 flags = matches['flags']
                 print('found RE_PROFILE_START in %s' % line)  # added
                 print(profile, flags)  # added
                 if profile == program or program is None:
                     print('match, returning flags')  # added
                     return flags
     print('no profile', filename, program)  # added
     raise AppArmorException(_('%s contains no profile') % filename)
Then run   aa-complain thunderbird   again and send the output.

Sure. As requested:


# aa-complain thunderbird
Setting /usr/bin/thunderbird to complain mode.
looking for /etc/apparmor.d/usr.bin.thunderbird /usr/bin/thunderbird
reading file /etc/apparmor.d/usr.bin.thunderbird
found RE_PROFILE_START in profile thunderbird /usr/lib/thunderbird/thunderbird {

thunderbird None
found RE_PROFILE_START in   profile gpg {

gpg None
found RE_PROFILE_START in   profile lsb_release {

lsb_release None
no profile /etc/apparmor.d/usr.bin.thunderbird /usr/bin/thunderbird

ERROR: /etc/apparmor.d/usr.bin.thunderbird contains no profile


Kind regards,

--
Ben Caradoc-Davies <b...@transient.nz>
Director
Transient Software Limited <http://transient.nz/>
New Zealand

Reply via email to