From 3251264ac483680b4a5fe808729f7e3b34f41fd4 Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Tue, 14 Oct 2003 22:16:03 +0000 Subject: 2003-10-14 Havoc Pennington * bus/bus.c (bus_context_check_security_policy): revamp this to work more sanely with new policy-based requested reply setup * bus/connection.c (bus_transaction_send_from_driver): set bus driver messages as no reply * bus/policy.c (bus_client_policy_check_can_receive): handle a requested_reply attribute on allow/deny rules * bus/system.conf: add * bus/driver.c (bus_driver_handle_message): fix check for replies sent to the bus driver, which was backward. How did this ever work at all though? I think I'm missing something. * dbus/dbus-message.c (decode_header_data): require error and method return messages to have a reply serial field to be valid (_dbus_message_loader_queue_messages): break up this function; validate that reply serial and plain serial are nonzero; clean up the OOM/error handling. (get_uint_field): don't return -1 from this (dbus_message_create_header): fix signed/unsigned bug * bus/connection.c (bus_connections_expect_reply): save serial of the incoming message, not reply serial --- bus/policy.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'bus/policy.h') diff --git a/bus/policy.h b/bus/policy.h index 63981cc0..17dfbf27 100644 --- a/bus/policy.h +++ b/bus/policy.h @@ -61,7 +61,7 @@ struct BusPolicyRule char *interface; char *member; char *error; - char *destination; + char *destination; } send; struct @@ -75,6 +75,7 @@ struct BusPolicyRule char *error; char *origin; unsigned int eavesdrop : 1; + unsigned int requested_reply : 1; } receive; struct @@ -134,6 +135,7 @@ dbus_bool_t bus_client_policy_check_can_send (BusClientPolicy *policy, DBusMessage *message); dbus_bool_t bus_client_policy_check_can_receive (BusClientPolicy *policy, BusRegistry *registry, + dbus_bool_t requested_reply, DBusConnection *sender, DBusConnection *addressed_recipient, DBusConnection *proposed_recipient, -- cgit