apparmor_parser does not handle escaped space in profile name

Bug #897958 reported by John Johansen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
AppArmor
Triaged
Wishlist
Unassigned

Bug Description

apparmor does not correctly handle profile names containing an space that has been escaped with the \ character, ie
  profile test\ space { }

This can currently be worked around using quotes
  profile "test space" { }

Tags: aa-parser
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Is this bug fixed in newer releases?

Changed in apparmor:
status: New → Incomplete
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Yes, it is.

Changed in apparmor:
importance: Undecided → Wishlist
status: Incomplete → Triaged
tags: added: aa-parser
Revision history for this message
Steve Beattie (sbeattie) wrote :

Hrm, the current behavior in trunk, as of rev 2757, doesn't work as intended, I think:

$ echo 'profile test\ space { }' | sudo ./apparmor_parser -r
Warning from stdin (line 1): ./apparmor_parser: cannot use or update cache, disable, or force-complain via stdin
Warning from stdin (stdin line 2): Character was quoted unnecessarily, dropped preceding quote ('\') character

$ sudo grep space /sys/kernel/security/apparmor/profiles
test\ space (enforce)

$ echo 'profile "test space" { }' | sudo apparmor_parser -r
Warning from stdin (line 1): apparmor_parser: cannot use or update cache, disable, or force-complain via stdin

$ sudo grep space /sys/kernel/security/apparmor/profiles
test space (enforce)
test\ space (enforce)

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.