<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Feb 21, 2016 at 9:48 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
according to a discussion with John on IRC, denied_mask="x" can only<br>
happen for 'exec' log events. This patch raises an exception if John<br>
is wrong ;-)<br>
<br>
<br>
[ 75-x-but-not-exec-exception.diff ]<br>
<br>
=== modified file ./utils/apparmor/aa.py<br>
--- utils/apparmor/aa.py        2016-02-21 15:43:58.021985441 +0100<br>
+++ utils/apparmor/aa.py        2016-02-21 16:06:41.744595751 +0100<br>
@@ -1210,6 +1210,8 @@<br>
                 if mode & str_to_mode('x'):<br>
                     if os.path.isdir(exec_target):<br>
                         raise AppArmorBug('exec permissions requested for directory %s. This should not happen - please open a bugreport!' % exec_target)<br>
+                    elif typ != 'exec':<br>
+                        raise AppArmorBug('exec permissions requested for %i(exec_target)s, but mode is %(mode)s instead of exec. This </blockquote><div>Is that "%i(exec_target)s: above containing the "%i" what you were aiming for?<br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">should not happen - please open a bugreport!' % {'exec_target': exec_target, 'mode':mode})<br>
                     else:<br>
                         do_execute = True<br>
<br>
<br>
<br>
Regards,<br>
<br>
Christian Boltz<br>
<span class="HOEnZb"><font color="#888888">--<br>
>Weil es sehr weit verbreitet ist, eingespielt und "überall drauf".<br>
Die weite Verbreitung ist allenfalls geeignet, die kaputte Syntax<br>
auszugleichen, ein Erfordernis also, kein Pluspunkt.<br>
[> Ratti und Thorsten Haude in suse-linux zur Frage "Warum procmail?"]<br>
</font></span><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" rel="noreferrer" target="_blank">https://lists.ubuntu.com/mailman/listinfo/apparmor</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><div>Regards,<br><br></div>Kshitij Gupta<br></div></div>
</div></div>