Python tools don't understand 'unmount' directive

Bug #1325109 reported by Andrew Lewis
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
AppArmor
Fix Released
Medium
Tyler Hicks
apparmor (Ubuntu)
Fix Released
Medium
Unassigned
Trusty
Fix Released
Medium
Marc Deslauriers
Utopic
Fix Released
Medium
Unassigned

Bug Description

If one has a rule like 'unmount,' anywhere in policy this will cause tools like aa-genprof and aa-enforce to throw errors:

Traceback (most recent call last):
  File "/usr/sbin/aa-enforce", line 30, in <module>
    tool.cmd_enforce()
  File "/usr/lib/python3/dist-packages/apparmor/tools.py", line 153, in cmd_enforce
    apparmor.read_profiles()
  File "/usr/lib/python3/dist-packages/apparmor/aa.py", line 2564, in read_profiles
    read_profile(profile_dir + '/' + file, True)
  File "/usr/lib/python3/dist-packages/apparmor/aa.py", line 2590, in read_profile
    profile_data = parse_profile_data(data, file, 0)
  File "/usr/lib/python3/dist-packages/apparmor/aa.py", line 3199, in parse_profile_data
    raise AppArmorException(_('Syntax Error: Unknown line found in file: %s line: %s') % (file, lineno + 1))
apparmor.common.AppArmorException: 'Syntax Error: Unknown line found in file: /etc/apparmor.d/usr.local.bin.foo line: 19'

Related branches

Revision history for this message
Tyler Hicks (tyhicks) wrote :

Thanks for the bug report. I've sent a fix to the upstream AppArmor list for review:

https://lists.ubuntu.com/archives/apparmor/2014-June/005796.html

Changed in apparmor:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Tyler Hicks (tyhicks)
Changed in apparmor (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Marc Deslauriers (mdeslaur)
Revision history for this message
Tyler Hicks (tyhicks) wrote :

The fix has been pushed to lp:apparmor as revision 2520

Changed in apparmor:
status: In Progress → Fix Committed
Steve Beattie (sbeattie)
Changed in apparmor:
milestone: none → 2.9.0
Changed in apparmor (Ubuntu Trusty):
assignee: nobody → Marc Deslauriers (mdeslaur)
importance: Undecided → Medium
status: New → Triaged
Changed in apparmor (Ubuntu Utopic):
assignee: Marc Deslauriers (mdeslaur) → nobody
status: Triaged → Fix Released
Revision history for this message
Steve Beattie (sbeattie) wrote :

Apparmor 2.9.0 has been released; closing.

Changed in apparmor:
status: Fix Committed → Fix Released
Changed in apparmor (Ubuntu Trusty):
status: Triaged → 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.