Comment 2 for bug 190516

Revision history for this message
Daedalus (osd-daedalus) wrote :

Well, I don't remember well which kernel version I used, because for another reason I had to format and reinstall Gutsy. It was, however, the Hardy alpha 4 kernel for 386 (2.6.24-something-386...).
In the link mentioned above there are all log entries. I'll write here briefly:

I have created a profile for MUGEN (it is, in my case, in /home/deda/mugen)
and I have monitored /var/log/messages and /var/log/syslog (it seems that entries related to apparmor are same).

I started MUGEN, ok it doesn't work.

Here is /var/log/syslog output:

Feb 6 15:22:45 kubuntu kernel: [ 1725.519674] audit(1202307765.222:6): operation="inode_create" request_mask="w::" denied_mask="w::" name="/tmp/upxBOSMZWCAHVV" pid=7861 profile="/home/deda/mugen/mugen" namespace="default"
Feb 6 15:22:45 kubuntu kernel: [ 1725.519707] audit(1202307765.222:7): operation="setattr" request_mask="w::" denied_mask="w::" attribute="size,mtime,ctime," name="/tmp/upxBOSMZWCAHVV" pid=7861 profile="/home/deda/mugen/mugen" namespace="default"
Feb 6 15:22:45 kubuntu kernel: [ 1726.005895] audit(1202307765.710:8): operation="inode_permission" request_mask="r::" denied_mask="r::" name="/tmp/upxBOSMZWCAHVV" pid=7861 profile="/home/deda/mugen/mugen" namespace="default"
Feb 6 15:22:45 kubuntu kernel: [ 1726.005928] audit(1202307765.710:9): operation="inode_permission" request_mask="rUx::" denied_mask="rUx::" name="/tmp/upxBOSMZWCAHVV" pid=7861 profile="/home/deda/mugen/mugen" namespace="default"
Feb 6 15:22:45 kubuntu kernel: [ 1726.005940] audit(1202307765.710:10): operation="inode_unlink" request_mask="w::" denied_mask="w::" name="/tmp/upxBOSMZWCAHVV" pid=7861 profile="/home/deda/mugen/mugen" namespace="default"
Feb 6 15:22:45 kubuntu kernel: [ 1726.005962] audit(1202307765.710:11): operation="inode_permission" request_mask="Ux::" denied_mask="Ux::" pid=7861 profile="/home/deda/mugen/mugen" namespace="default"

This is /var/log/messages output:

[ 1725.519674] audit(1202307765.222:6): operation="inode_create" request_mask="w::" denied_mask="w::" name="/tmp/upxBOSMZWCAHVV" pid=7861 profile="/home/deda/mugen/mugen" namespace="default"
[ 1725.519707] audit(1202307765.222:7): operation="setattr" request_mask="w::" denied_mask="w::" attribute="size,mtime,ctime," name="/tmp/upxBOSMZWCAHVV" pid=7861 profile="/home/deda/mugen/mugen" namespace="default"
[ 1726.005895] audit(1202307765.710:8): operation="inode_permission" request_mask="r::" denied_mask="r::" name="/tmp/upxBOSMZWCAHVV" pid=7861 profile="/home/deda/mugen/mugen" namespace="default"
[ 1726.005928] audit(1202307765.710:9): operation="inode_permission" request_mask="rUx::" denied_mask="rUx::" name="/tmp/upxBOSMZWCAHVV" pid=7861 profile="/home/deda/mugen/mugen" namespace="default"
[ 1726.005940] audit(1202307765.710:10): operation="inode_unlink" request_mask="w::" denied_mask="w::" name="/tmp/upxBOSMZWCAHVV" pid=7861 profile="/home/deda/mugen/mugen" namespace="default"
[ 1726.005962] audit(1202307765.710:11): operation="inode_permission" request_mask="Ux::" denied_mask="Ux::" pid=7861 profile="/home/deda/mugen/mugen" namespace="default"
[ 1726.005974] AppArmor: aa_register: Failed to get filename

So I modified /etc/apparmor.d/home.deda.mugen.mugen (the profile):

#include <tunables/global>
/home/deda/mugen/mugen {
  #include <abstractions/base>

  /home/deda/mugen/** rwUx,
  /tmp/** rwUx,
}

I restarted Apparmor, and tried to restart MUGEN. Now the only entry in var/log/syslog is:

Feb 6 21:20:57 kubuntu kernel: [ 1606.641929] audit(1202329257.493:13): operation="inode_permission" request_mask="Ux::" denied_mask="Ux::" pid=11770 profile="/home/deda/mugen/mugen" namespace="default"

Stranger than before, there is no "name" field.

At the end, I tried modifying /etc/apparmor.d/home.deda.mugen.mugen this way:

#include <tunables/global>
/home/deda/mugen/mugen {
# #include <abstractions/base>

/** rwUx,
}

but the error still persists.

If you need to know other log entries I am here, but keep in consideration that I am using Gutsy kernel now (2.6.22-14-386).