<div dir="ltr">Hello,<br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 25, 2015 at 9:42 PM, Christian Boltz <span dir="ltr"><<a href="mailto:apparmor@cboltz.de" target="_blank">apparmor@cboltz.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello,<br>
<br>
aa-complain is part of the enforce/complain/disable triple. Therefore<br>
I expect it to actually load a profile in complain mode.<br>
<br>
To do this, it has to delete the 'disable' symlink, but set_complain()<br>
in aa.py didn't do this (and therefore kept the profile disabled).<br>
<br>
<br>
I propose this patch for trunk and 2.9.<br>
<br>
<br>
[ 38-aa-complain-delete-disable-symlink.diff ]<br>
<br>
=== modified file utils/apparmor/aa.py<br>
--- utils/apparmor/aa.py 2015-05-25 12:17:39.156441255 +0200<br>
+++ utils/apparmor/aa.py 2015-05-25 18:06:42.137124875 +0200<br>
@@ -284,6 +284,7 @@<br>
aaui.UI_Info(_('Setting %s to complain mode.') % (filename if program is None else program))<br>
# a force-complain symlink is more packaging-friendly, but breaks caching<br>
# create_symlink('force-complain', filename)<br>
+ delete_symlink('disable', filename)<br>
change_profile_flags(filename, program, 'complain', True)<br>
<br>
def set_enforce(filename, program):<br>
<br>
<br></blockquote><div><div>Thanks for the patch.<br> <br></div><div>Acked-by: Kshitij Gupta <<a href="mailto:kgupta8592@gmail.com" target="_blank">kgupta8592@gmail.com</a>>. <br><br></div><div>Regards,<br><br></div>Kshitij Gupta <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Regards,<br>
<br>
Christian Boltz<br>
<span class=""><font color="#888888">--<br>
> Also, Hosen runter:<br>
Hose*n*! Du hast nur "die" Hose runtergelassen und die Unterhose<br>
anbehalten. Nix da!<br>
[> Stefan G. Weichinger und Peer Heinlein in postfixbuch-users]<br>
<br>
<br>
--<br>
AppArmor mailing list<br>
<a href="mailto:AppArmor@lists.ubuntu.com">AppArmor@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/apparmor" target="_blank">https://lists.ubuntu.com/mailman/listinfo/apparmor</a><br>
</font></span></blockquote></div><br></div></div>