]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
Set error when message delivery is denied due to receive rule
authorJacek Bukarewicz <j.bukarewicz@samsung.com>
Fri, 14 Nov 2014 18:39:38 +0000 (18:39 +0000)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Fri, 14 Nov 2014 18:40:50 +0000 (18:40 +0000)
This makes bus_context_check_security_policy follow convention of
setting errors if function indicates failure and has error parameter.
Notable implication is that AccessDenied error will be sent if sending message
to addressed recipient is denied due to receive rule. Previously, message
was silently dropped.

This also fixes assertion failure when message is denied at addressed recipient
while sending pending auto activation messages.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=86194

bus/bus.c

index 47cc3452a4fc914c04fea3f475dfb95bf7cb0b7f..f0d980e506f1444215446dbcccf25bcf56cc17c8 100644 (file)
--- a/bus/bus.c
+++ b/bus/bus.c
@@ -1660,7 +1660,7 @@ bus_context_check_security_policy (BusContext     *context,
       complain_about_message (context, DBUS_ERROR_ACCESS_DENIED,
           "Rejected receive message", toggles,
           message, sender, proposed_recipient, requested_reply,
-          (addressed_recipient == proposed_recipient), NULL);
+          (addressed_recipient == proposed_recipient), error);
       _dbus_verbose ("security policy disallowing message due to recipient policy\n");
       return FALSE;
     }