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
This commit is contained in:
Jacek Bukarewicz 2014-11-14 18:39:38 +00:00 committed by Simon McVittie
parent 3210bda801
commit 8ee1a7b57c

View file

@ -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;
}