From 9c78a025a874643819bb67465d9208cbebdfa03b Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Tue, 3 Feb 2015 14:43:31 +0000 Subject: [PATCH 1/8] bus_transaction_capture_error_reply: we must set the sender dbus-daemon refuses to send a message with no sender, even to eavesdroppers. The one case where this function is used is untested and possibly untestable, but I'm about to use it for fake replies to broadcasts as well. --- bus/connection.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bus/connection.c b/bus/connection.c index 4abde10..6477d80 100644 --- a/bus/connection.c +++ b/bus/connection.c @@ -2187,7 +2187,7 @@ bus_transaction_capture_error_reply (BusTransaction *transaction, { BusConnections *connections; DBusMessage *reply; - dbus_bool_t ret; + dbus_bool_t ret = FALSE; _dbus_assert (error != NULL); _DBUS_ASSERT_ERROR_IS_SET (error); @@ -2205,7 +2205,12 @@ bus_transaction_capture_error_reply (BusTransaction *transaction, if (reply == NULL) return FALSE; + if (!dbus_message_set_sender (reply, DBUS_SERVICE_DBUS)) + goto out; + ret = bus_transaction_capture (transaction, NULL, reply); + +out: dbus_message_unref (reply); return ret; } -- 2.1.4