Commit eb9aa9da authored by Havoc Pennington's avatar Havoc Pennington

2003-10-22 Havoc Pennington <hp@redhat.com>

	* bus/bus.c (bus_context_check_security_policy): fix up assertion

	* bus/connection.c (bus_transaction_send_from_driver): set the
	destination to the connection's base service
parent 10faede1
2003-10-22 Havoc Pennington <hp@redhat.com>
* bus/bus.c (bus_context_check_security_policy): fix up assertion
* bus/connection.c (bus_transaction_send_from_driver): set the
destination to the connection's base service
2003-10-20 Havoc Pennington <hp@redhat.com>
hmm, make check is currently not passing.
......
......@@ -919,9 +919,9 @@ bus_context_check_security_policy (BusContext *context,
type = dbus_message_get_type (message);
/* dispatch.c was supposed to ensure these invariants */
/* FIXME this assertion is failing in make check */
_dbus_assert (dbus_message_get_destination (message) != NULL ||
type == DBUS_MESSAGE_TYPE_SIGNAL);
type == DBUS_MESSAGE_TYPE_SIGNAL ||
(sender == NULL && !bus_connection_is_active (proposed_recipient)));
_dbus_assert (type == DBUS_MESSAGE_TYPE_SIGNAL ||
addressed_recipient != NULL ||
strcmp (dbus_message_get_destination (message), DBUS_SERVICE_ORG_FREEDESKTOP_DBUS) == 0);
......
......@@ -1862,6 +1862,13 @@ bus_transaction_send_from_driver (BusTransaction *transaction,
if (!dbus_message_set_sender (message, DBUS_SERVICE_ORG_FREEDESKTOP_DBUS))
return FALSE;
if (bus_connection_is_active (connection))
{
if (!dbus_message_set_destination (message,
bus_connection_get_name (connection)))
return FALSE;
}
/* bus driver never wants a reply */
dbus_message_set_no_reply (message, TRUE);
......
......@@ -1808,6 +1808,8 @@ _dbus_marshal_validate_type (const DBusString *str,
*end_pos = pos + 1;
return TRUE;
}
_dbus_verbose ("'%c' %d invalid type code\n", (int) *data, (int) *data);
return FALSE;
}
......
......@@ -4907,13 +4907,15 @@ decode_header_data (const DBusString *data,
if (!_dbus_marshal_validate_type (data, pos, &type, &pos))
{
_dbus_verbose ("Failed to validate type of named header field\n");
_dbus_verbose ("Failed to validate type of named header field pos = %d\n",
pos);
return FALSE;
}
if (!_dbus_marshal_validate_arg (data, byte_order, 0, type, -1, pos, &new_pos))
{
_dbus_verbose ("Failed to validate argument to named header field\n");
_dbus_verbose ("Failed to validate argument to named header field pos = %d\n",
pos);
return FALSE;
}
......@@ -5180,8 +5182,8 @@ load_one_message (DBusMessageLoader *loader,
message = NULL;
oom = FALSE;
#if 0
_dbus_verbose_bytes_of_string (&loader->data, 0, header_len + body_len);
#if 1
_dbus_verbose_bytes_of_string (&loader->data, 0, header_len /* + body_len */);
#endif
if (!decode_header_data (&loader->data,
......
......@@ -122,3 +122,7 @@
- the auth protocol may as well use hex encoding instead of
base64, then we can dump the base64 implementation and
save some bloat.
- rename HEADER_FIELD_SERVICE -> HEADER_FIELD_DESTINATION
and HEADER_FIELD_SENDER_SERVICE -> HEADER_FIELD_SENDER
for both dbus-protocol.h and in the spec
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment