diff options
author | Havoc Pennington <hp@redhat.com> | 2003-04-27 06:25:42 +0000 |
---|---|---|
committer | Havoc Pennington <hp@redhat.com> | 2003-04-27 06:25:42 +0000 |
commit | e8d396efef695b9868b0112c4a6266c97678fa8a (patch) | |
tree | e6702685d70c2dd65c6b301de8904a672ef7b419 /bus/driver.c | |
parent | b3bd48edfc1aab0a9dc64bfa4c380d845d218e73 (diff) |
2003-04-27 Havoc Pennington <hp@pobox.com>
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
Diffstat (limited to 'bus/driver.c')
-rw-r--r-- | bus/driver.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/bus/driver.c b/bus/driver.c index 9839ff03..3c4847ba 100644 --- a/bus/driver.c +++ b/bus/driver.c @@ -298,9 +298,9 @@ bus_driver_handle_hello (DBusConnection *connection, goto out_0; } - if (!bus_connection_set_name (connection, &unique_name)) + if (!bus_connection_complete (connection, &unique_name, error)) { - BUS_SET_OOM (error); + _DBUS_ASSERT_ERROR_IS_SET (error); goto out_0; } @@ -627,15 +627,8 @@ bus_driver_handle_message (DBusConnection *connection, name = dbus_message_get_name (message); sender = dbus_message_get_sender (message); - if (sender == NULL && (strcmp (name, DBUS_MESSAGE_HELLO) != 0)) - { - dbus_set_error (error, DBUS_ERROR_ACCESS_DENIED, - "Client tried to send a message other than %s without being registered", - DBUS_MESSAGE_HELLO); - - dbus_connection_disconnect (connection); - return FALSE; - } + /* security checks should have kept this from getting here */ + _dbus_assert (sender != NULL || strcmp (name, DBUS_MESSAGE_HELLO) == 0); if (dbus_message_get_reply_serial (message) == 0) { |