commit e5b272fcf0a8510b9a6d6c9346c509572850ddde Author: Jacek Bukarewicz Date: Fri Nov 14 16:10:00 2014 +0100 Set error when message delivery is denied due to receive rule 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 diff --git a/bus/bus.c b/bus/bus.c index 47cc345..f0d980e 100644 --- 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; }