diff options
author | Alban Crequy <alban.crequy@collabora.co.uk> | 2014-07-15 11:29:41 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2014-09-15 18:03:18 +0200 |
commit | 6c9b2607d281ac78e32a31d65ae2a71357757844 (patch) | |
tree | eff765c31ae18ee46fdc7516b366f8f68cf117bc | |
parent | a50ee1686f046c9b87725ee9edb2af13c1473ce7 (diff) | |
download | neard-6c9b2607d281ac78e32a31d65ae2a71357757844.tar.gz neard-6c9b2607d281ac78e32a31d65ae2a71357757844.tar.bz2 neard-6c9b2607d281ac78e32a31d65ae2a71357757844.zip |
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.
-rw-r--r-- | gdbus/watch.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gdbus/watch.c b/gdbus/watch.c index 2f5e865..0d0054c 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) |