diff options
Diffstat (limited to 'hcid')
-rw-r--r-- | hcid/dbus-service.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/hcid/dbus-service.c b/hcid/dbus-service.c index ec29c2e5..d2f5cd87 100644 --- a/hcid/dbus-service.c +++ b/hcid/dbus-service.c @@ -651,6 +651,9 @@ static DBusHandlerResult register_service_record(DBusConnection *conn, DBusMessage *reply; sdp_record_t *record; + if (strcmp(dbus_message_get_sender(msg), agent->id)) + return error_not_authorized(conn, msg); + /* Check if it is an array of bytes */ if (strcmp(dbus_message_get_signature(msg), "ay")) return error_invalid_arguments(conn, msg); @@ -692,6 +695,9 @@ static DBusHandlerResult unregister_service_record(DBusConnection *conn, uint32_t handle; void *rec; + if (strcmp(dbus_message_get_sender(msg), agent->id)) + return error_not_authorized(conn, msg); + if (!dbus_message_get_args(msg, NULL, DBUS_TYPE_UINT32, &handle, DBUS_TYPE_INVALID)) |