escape() in aa.py is broken

Bug #1593324 reported by Jakub Wilk
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
AppArmor
Fix Released
Undecided
Christian Boltz

Bug Description

The escape() function in utils/apparmor/aa.py is completely broken.
It tries to use a malformed regular expression, resulting in:

    sre_constants.error: missing ), unterminated subpattern at position 0

The function doesn't seem to be used anywhere, so it should be probably removed.

This bug was found using pydiatra:
http://jwilk.net/software/pydiatra

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

Thanks for the report!

You are right that the function is unused (I have a
    raise Exception("dead code walking")
in it since some months ;-) and grep also didn't bring up any usage of it)

I just sent a patch to the mailinglist that removes the function.

Changed in apparmor:
status: New → In Progress
assignee: nobody → Christian Boltz (cboltz)
milestone: none → 2.11
Revision history for this message
Christian Boltz (cboltz) wrote :

Commited to bzr trunk r3484.

Changed in apparmor:
status: In Progress → Fix Committed
Christian Boltz (cboltz)
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.