diff options
author | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2006-11-01 11:03:46 +0000 |
---|---|---|
committer | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2006-11-01 11:03:46 +0000 |
commit | a65ee7134a24338c1f4cd496f89d0cee49e89ba9 (patch) | |
tree | 8c244f61d389099c334719b5235a2178fb871995 | |
parent | 892d4b4cd7d79d86f1de3ee4dd77bac9cec454c1 (diff) |
Added sender id verification for RegisterServiceRecord/UnregisterServiceRecord
-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)) |