diff options
author | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2008-05-01 01:05:46 +0000 |
---|---|---|
committer | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2008-05-01 01:05:46 +0000 |
commit | 098cd10838193272c669348c5ffd0410218e1bcc (patch) | |
tree | eb7fffb0e440dbb33391029c607de2b678bb3c2e /hcid/plugin.c | |
parent | 2d5441331d402a0d78c4b84a028df076f6aab8cf (diff) |
fixed service authorization
Diffstat (limited to 'hcid/plugin.c')
-rw-r--r-- | hcid/plugin.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/hcid/plugin.c b/hcid/plugin.c index 7d275786..6cc54de1 100644 --- a/hcid/plugin.c +++ b/hcid/plugin.c @@ -38,6 +38,7 @@ #include <dbus/dbus.h> #include "dbus-helper.h" +#include "dbus-service.h" #include "adapter.h" #include "dbus-hci.h" #include "agent.h" @@ -210,18 +211,15 @@ int plugin_req_auth(bdaddr_t *src, bdaddr_t *dst, dst, active_conn_find_by_bdaddr)) return -ENOTCONN; - /* FIXME: Is there a plugin that exports this service? */ - ba2str(dst, address); device = adapter_find_device(adapter, address); if (!device) return -EPERM; - /* - * FIXME: Trusted device? Currently, service are based on a friendly - * name, it is necessary convert UUID128 to friendly name or store the - * UUID128 in the trusted file. - */ + if (!search_service_by_uuid(uuid)) + return -EPERM; + + /* FIXME: Missing check trusted file entries */ agent = (device->agent ? : adapter->agent); if (!agent) |