Comment 3 for bug 1296218

Revision history for this message
MattJ (mwild1) wrote :

I'm also experiencing this, but not with the chromium-browser profile. I'm still trying to learn AppArmor, and am trying to create a profile for Spotify. I have attached the profile. I get this output:

$ sudo aa-complain /opt/spotify/spotify-client/spotify
Setting /opt/spotify/spotify-client/spotify to complain mode.
Traceback (most recent call last):
  File "/usr/sbin/aa-complain", line 30, in <module>
    tool.cmd_complain()
  File "/usr/lib/python3/dist-packages/apparmor/tools.py", line 178, in cmd_complain
    apparmor.set_complain(profile, program)
  File "/usr/lib/python3/dist-packages/apparmor/aa.py", line 267, in set_complain
    change_profile_flags(filename, program, 'complain', True)
  File "/usr/lib/python3/dist-packages/apparmor/aa.py", line 606, in change_profile_flags
    old_flags = get_profile_flags(filename, program)
  File "/usr/lib/python3/dist-packages/apparmor/aa.py", line 603, in get_profile_flags
    raise AppArmorException(_('%s contains no profile') % filename)
apparmor.common.AppArmorException: '/etc/apparmor.d/opt.spotify.spotify-client.spotify contains no profile'

As far as I can see the profile's filename and the name of the binary in the profile match.