This is still a problem with up to date karmic, however the error message is different. Using the above test case I get:
$ sudo ./a.out could not change profile: Permission denied
$ cat /proc/version_signature Ubuntu 2.6.31-5.24-generic
apparmor: 2.3.1+1403-0ubuntu9
This is still a problem with up to date karmic, however the error message is different. Using the above test case I get:
$ sudo ./a.out
could not change profile: Permission denied
$ cat /proc/version_ signature
Ubuntu 2.6.31-5.24-generic
apparmor: 2.3.1+1403-0ubuntu9