dbus/bus bus.c,1.66,1.67
John Palmieri
johnp at kemper.freedesktop.org
Wed Jun 7 13:07:36 PDT 2006
Update of /cvs/dbus/dbus/bus
In directory kemper:/tmp/cvs-serv30462/bus
Modified Files:
bus.c
Log Message:
* bus/bus.c: Fix eavesdropping on method calls
Index: bus.c
===================================================================
RCS file: /cvs/dbus/dbus/bus/bus.c,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -d -r1.66 -r1.67
--- bus.c 6 Mar 2006 19:06:45 -0000 1.66
+++ bus.c 7 Jun 2006 20:07:34 -0000 1.67
@@ -1355,21 +1355,21 @@
return FALSE;
}
- if (type == DBUS_MESSAGE_TYPE_METHOD_CALL)
+ /* Record that we will allow a reply here in the future (don't
+ * bother if the recipient is the bus or this is an eavesdropping
+ * connection). Only the addressed recipient may reply.
+ */
+ if (type == DBUS_MESSAGE_TYPE_METHOD_CALL &&
+ sender &&
+ addressed_recipient &&
+ addressed_recipient == proposed_recipient && /* not eavesdropping */
+ !bus_connections_expect_reply (bus_connection_get_connections (sender),
+ transaction,
+ sender, addressed_recipient,
+ message, error))
{
- /* Record that we will allow a reply here in the future (don't
- * bother if the recipient is the bus). Only the addressed recipient
- * may reply.
- */
- if (sender && addressed_recipient &&
- !bus_connections_expect_reply (bus_connection_get_connections (sender),
- transaction,
- sender, addressed_recipient,
- message, error))
- {
- _dbus_verbose ("Failed to record reply expectation or problem with the message expecting a reply\n");
- return FALSE;
- }
+ _dbus_verbose ("Failed to record reply expectation or problem with the message expecting a reply\n");
+ return FALSE;
}
_dbus_verbose ("security policy allowing message\n");
More information about the dbus-commit
mailing list