mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-01-08 18:40:18 +01:00
* bus/bus.c: Fix eavesdropping on method calls
This commit is contained in:
parent
3ac2e48282
commit
d062db4c27
2 changed files with 18 additions and 14 deletions
|
|
@ -1,3 +1,7 @@
|
|||
2006-06-07 John (J5) Palmieri <johnp@redhat.com>
|
||||
|
||||
* bus/bus.c: Fix eavesdropping on method calls
|
||||
|
||||
2006-06-07 John (J5) Palmieri <johnp@redhat.com>
|
||||
|
||||
* configure.in:
|
||||
|
|
|
|||
28
bus/bus.c
28
bus/bus.c
|
|
@ -1355,21 +1355,21 @@ bus_context_check_security_policy (BusContext *context,
|
|||
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");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue