summaryrefslogtreecommitdiff
path: root/gdbus
diff options
context:
space:
mode:
authorAlban Crequy <alban.crequy@collabora.co.uk>2014-07-15 11:29:41 +0100
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2014-09-15 14:33:32 +0300
commit71d317d0d4d8db1a921082c4d51ea1f4096c6aed (patch)
treee4b071eaff249b1415f6e2e3977f4ce34501cc20 /gdbus
parent8b0792b830277f79e143cb25af9d2df841c957dd (diff)
downloadbluez-71d317d0d4d8db1a921082c4d51ea1f4096c6aed.tar.gz
gdbus: Fix match rule for NameOwnerChanged
When subscribing to the D-Bus signal NameOwnerChanged from the bus driver, specify the object path and the sender in the match rule. Otherwise, random connections on the bus could impersonate the bus driver.
Diffstat (limited to 'gdbus')
-rw-r--r--gdbus/watch.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdbus/watch.c b/gdbus/watch.c
index 2f5e8657e..0d0054c11 100644
--- a/gdbus/watch.c
+++ b/gdbus/watch.c
@@ -703,7 +703,8 @@ guint g_dbus_add_service_watch(DBusConnection *connection, const char *name,
if (name == NULL)
return 0;
- data = filter_data_get(connection, service_filter, NULL, NULL,
+ data = filter_data_get(connection, service_filter,
+ DBUS_SERVICE_DBUS, DBUS_PATH_DBUS,
DBUS_INTERFACE_DBUS, "NameOwnerChanged",
name);
if (data == NULL)