From 8ee1a7b57cfb99259164e45922df556382c0e0ad Mon Sep 17 00:00:00 2001 From: Jacek Bukarewicz Date: Fri, 14 Nov 2014 18:39:38 +0000 Subject: [PATCH] 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 --- bus/bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bus/bus.c b/bus/bus.c index 47cc3452..f0d980e5 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; }