From e8d396efef695b9868b0112c4a6266c97678fa8a Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Sun, 27 Apr 2003 06:25:42 +0000 Subject: 2003-04-27 Havoc Pennington Unbreak my code... * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status): report correct status if we finish processing authentication inside this function. * bus/activation.c (try_send_activation_failure): use bus_transaction_send_error_reply * bus/connection.c (bus_connection_get_groups): return an error explaining the problem * bus/bus.c (bus_context_check_security_policy): implement restriction here that inactive connections can only send the hello message. Also, allow bus driver to send anything to any recipient. * bus/connection.c (bus_connection_complete): create the BusClientPolicy here instead of on-demand. (bus_connection_get_policy): don't return an error * dbus/dbus-message.c (dbus_message_new_error_reply): allow NULL sender field in message being replied to * bus/bus.c (bus_context_check_security_policy): fix silly typo causing it to return FALSE always * bus/policy.c (bus_client_policy_check_can_send): fix bug where we checked sender rather than destination --- bus/dispatch.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'bus/dispatch.c') diff --git a/bus/dispatch.c b/bus/dispatch.c index 2f865bf7..8b2ba08e 100644 --- a/bus/dispatch.c +++ b/bus/dispatch.c @@ -183,10 +183,14 @@ bus_dispatch (DBusConnection *connection, { if (!bus_context_check_security_policy (context, connection, NULL, message, &error)) - goto out; - + { + _dbus_verbose ("Security policy rejected message\n"); + goto out; + } + + _dbus_verbose ("Giving message to %s\n", DBUS_SERVICE_DBUS); if (!bus_driver_handle_message (connection, transaction, message, &error)) - goto out; + goto out; } else if (!bus_connection_is_active (connection)) /* clients must talk to bus driver first */ { @@ -249,6 +253,7 @@ bus_dispatch (DBusConnection *connection, /* If we disconnected it, we won't bother to send it any error * messages. */ + _dbus_verbose ("Not sending error to connection we disconnected\n"); } else if (dbus_error_has_name (&error, DBUS_ERROR_NO_MEMORY)) { -- cgit