<div class="gmail_quote">On Tue, Jul 17, 2012 at 7:32 PM, Seth Arnold <span dir="ltr"><<a href="mailto:seth.arnold@gmail.com" target="_blank">seth.arnold@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I don't think "but nothing happens" is the entire story -- check your audit messages and you will see that the profile of your R executable _has_ changed -- iirc, it'll append //null-1, //null-2, etc. to the existing profile name.<br>
</blockquote><div><br></div><div>Below output from kern.log when switching to non-existing profile "doesnotexist":</div><div><br></div><div><div>jeroen@jeroen-Ubuntu:/etc/apparmor.d$ tail -n0 -f /var/log/kern.log</div>
<div>Jul 17 20:20:13 jeroen-Ubuntu kernel: [34431.046663] audit_printk_skb: 3 callbacks suppressed</div><div>Jul 17 20:20:13 jeroen-Ubuntu kernel: [34431.046666] type=1400 audit(1342549213.530:618): apparmor="ALLOWED" operation="open" parent=9716 profile="/usr/bin/R" name="/proc/17462/attr/current" pid=17462 comm="R" requested_mask="w" denied_mask="w" fsuid=1000 ouid=1000</div>
<div>Jul 17 20:20:13 jeroen-Ubuntu kernel: [34431.046681] type=1400 audit(1342549213.530:619): apparmor="ALLOWED" operation="change_profile" parent=9716 profile="/usr/bin/R" pid=17462 comm="R" target="doesnotexist"</div>
</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Complain mode is intended to be used with the automated tools when generating profiles. If the change profile permission is not yet in the profile, allowing the request and continuing as normal will then report the full behavior in the logs and the admin can later allow or deny and all the subsequent file accesses are then stored on the new or old profile as requested.<br>
</blockquote><div><br></div><div>That is the behavior I was expecting. But instead it does *not* change into the profile, although aa_change_profile says it did.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
What are you trying to do with R while in complain mode? Would it make sense to instead use the audit keyword in your R profile?<br></blockquote><div><br></div><div>I was trying to debug some change_profile policies when I was running into this odd behavior.</div>
</div>