3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-22 04:32:37 +01:00

device: Add extra sanity check to UnregisterAgent

We have to make sure that the path the application passes to
UnregisterAgent is the same as the one passed to RegisterAgent
This commit is contained in:
Denis Kenzior 2017-05-30 11:07:38 -05:00
parent f38287f457
commit c68200b5a1

View File

@ -1773,6 +1773,9 @@ static struct l_dbus_message *device_signal_agent_unregister(
if (!l_dbus_message_get_arguments(message, "o", &path))
return dbus_error_invalid_args(message);
if (strcmp(device->signal_agent->path, path))
return dbus_error_not_found(message);
sender = l_dbus_message_get_sender(message);
if (strcmp(device->signal_agent->owner, sender))