diff options
author | Yun-Hao Chung <howardchung@chromium.org> | 2021-08-03 19:43:08 +0800 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2021-08-04 15:01:33 -0700 |
commit | ebaa144d72bebb130935ba49fca7fefa567684f9 (patch) | |
tree | 7b832c4e680cb54f6554857b7e18eba86a9f73f6 /src/adapter.c | |
parent | b084a69a067dd520b4eabcd8ddfaa15b614166b4 (diff) | |
download | bluez-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.c | 5 |
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; |