summaryrefslogtreecommitdiff
path: root/src/adapter.c
diff options
context:
space:
mode:
authorYun-Hao Chung <howardchung@chromium.org>2021-08-03 19:43:08 +0800
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2021-08-04 15:01:33 -0700
commitebaa144d72bebb130935ba49fca7fefa567684f9 (patch)
tree7b832c4e680cb54f6554857b7e18eba86a9f73f6 /src/adapter.c
parentb084a69a067dd520b4eabcd8ddfaa15b614166b4 (diff)
downloadbluez-ebaa144d72bebb130935ba49fca7fefa567684f9.tar.gz
core: block not allowed UUID connect in auth
This ensures any incoming profile connection will be blocked if its UUID is not allowed by the following assumption: 1. Each system profile asks adapter authorization when seeing a incoming connection. 2. Each external profile checks if its UUID is allowed by adapter when seeing a incoming connection.
Diffstat (limited to 'src/adapter.c')
-rw-r--r--src/adapter.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/adapter.c b/src/adapter.c
index 0ca4b4f6f..3c2008285 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -7182,6 +7182,11 @@ static gboolean process_auth_queue(gpointer user_data)
if (auth->svc_id > 0)
return FALSE;
+ if (!btd_adapter_is_uuid_allowed(adapter, auth->uuid)) {
+ auth->cb(&err, auth->user_data);
+ goto next;
+ }
+
if (device_is_trusted(device) == TRUE) {
auth->cb(NULL, auth->user_data);
goto next;