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

« back to all changes in this revision

Viewing changes to utils/apparmor/logparser.py

  • Committer: Christian Boltz
  • Date: 2017-02-23 00:00:36 UTC
  • Revision ID: apparmor@cboltz.de-20170223000036-vig071xp2d6h1t78
Ignore change_hat events with error=-1 and "unconfined can not change_hat"

That's much better than crashing aa-logprof ;-)  (use the log line in
the added testcase if you want to see the crash)

Reported by pfak on IRC.


Acked-by: Seth Arnold <seth.arnold@canonical.com> for trunk, 2.10 and 2.9.

Show diffs side-by-side

added added

removed removed

Lines of Context:
243
243
        if e['operation'] == 'change_hat':
244
244
            if aamode != 'HINT' and aamode != 'PERMITTING':
245
245
                return None
 
246
            if e['error_code'] == 1 and e['info'] == 'unconfined can not change_hat':
 
247
                return None
246
248
            profile = e['name2']
247
249
            #hat = None
248
250
            if '//' in e['name2']: