mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 13:02:44 +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:
parent
f38287f457
commit
c68200b5a1
@ -1773,6 +1773,9 @@ static struct l_dbus_message *device_signal_agent_unregister(
|
|||||||
if (!l_dbus_message_get_arguments(message, "o", &path))
|
if (!l_dbus_message_get_arguments(message, "o", &path))
|
||||||
return dbus_error_invalid_args(message);
|
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);
|
sender = l_dbus_message_get_sender(message);
|
||||||
|
|
||||||
if (strcmp(device->signal_agent->owner, sender))
|
if (strcmp(device->signal_agent->owner, sender))
|
||||||
|
Loading…
Reference in New Issue
Block a user