Python tools don't understand 'unmount' directive

Bug #1325109 reported by Andrew Lewis on 2014-05-30
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
AppArmor
Medium
Tyler Hicks
apparmor (Ubuntu)
Medium
Unassigned
Trusty
Medium
Marc Deslauriers
Utopic
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

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)
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) on 2014-06-03
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
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  Edit
Everyone can see this information.

Other bug subscribers