utils crash if logfile does not exist

Bug #1423702 reported by Steve Beattie
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
AppArmor
Fix Released
Undecided
Unassigned

Bug Description

phablet@ubuntu-phablet:~/qrt-test-apparmor$ ls -l /var/log/syslog
ls: cannot access /var/log/syslog: No such file or directory

phablet@ubuntu-phablet:~/qrt-test-apparmor$ aa-enforce --help
Traceback (most recent call last):
  File "/usr/sbin/aa-enforce", line 17, in <module>
    import apparmor.tools
  File "/usr/lib/python3/dist-packages/apparmor/tools.py", line 17, in <module>
    import apparmor.aa as apparmor
  File "/usr/lib/python3/dist-packages/apparmor/aa.py", line 4641, in <module>
    raise AppArmorException('Can\'t find system log "%s".' % (filename))
apparmor.common.AppArmorException: 'Can\'t find system log "/var/log/syslog".'

While in general, systems should be in a state where the required logfile exists, the tools should not crash if they don't, due to a system problem or misconfiguration in /etc/apparmor/logprof.conf.

Tags: aa-tools
Revision history for this message
Christian Boltz (cboltz) wrote :

Well, at least only those tools that actually need a logfile (aa-logprof and aa-genprof) should error out ;-)

I'll send a patch to the ML in some minutes.

Revision history for this message
Christian Boltz (cboltz) wrote :

Fix commited to bzr r2869.

Changed in apparmor:
status: New → Fix Committed
Christian Boltz (cboltz)
Changed in apparmor:
milestone: none → 2.10
Revision history for this message
Steve Beattie (sbeattie) wrote :

AppArmor 2.10 has been released: https://launchpad.net/apparmor/2.10/2.10

Changed in apparmor:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.