Commit 06acadd1 authored by Alban Crequy's avatar Alban Crequy Committed by Marcel Holtmann
Browse files

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.
parent 3112f9b7
...@@ -703,7 +703,8 @@ guint g_dbus_add_service_watch(DBusConnection *connection, const char *name, ...@@ -703,7 +703,8 @@ guint g_dbus_add_service_watch(DBusConnection *connection, const char *name,
if (name == NULL) if (name == NULL)
return 0; return 0;
data = filter_data_get(connection, service_filter, NULL, NULL, data = filter_data_get(connection, service_filter,
DBUS_INTERFACE_DBUS, "NameOwnerChanged", DBUS_INTERFACE_DBUS, "NameOwnerChanged",
name); name);
if (data == NULL) if (data == NULL)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment