From 263a104f435ed2742dc6ed926278d422527d482f Mon Sep 17 00:00:00 2001 From: Takanori Watanabe Date: Wed, 1 Jul 2020 04:00:54 +0000 Subject: [PATCH] Allow some Bluetooth LE related HCI request to non-root user. PR: 247588 Reported by: Greg V (greg@unrelenting.technology) Reviewed by: emax Differential Revision: https://reviews.freebsd.org/D25516 --- sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c b/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c index faf2b3534740..1e2cde0f489c 100644 --- a/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c +++ b/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c @@ -861,6 +861,7 @@ ng_btsocket_hci_raw_init(void) bit_set(f, NG_HCI_OCF_READ_IAC_LAP - 1); bit_set(f, NG_HCI_OCF_READ_PAGE_SCAN_PERIOD - 1); bit_set(f, NG_HCI_OCF_READ_PAGE_SCAN - 1); + bit_set(f, NG_HCI_OCF_READ_LE_HOST_SUPPORTED -1); /* Commands - Informational */ f = ng_btsocket_hci_raw_sec_filter->commands[NG_HCI_OGF_INFO - 1]; @@ -881,6 +882,11 @@ ng_btsocket_hci_raw_init(void) bit_set(f, NG_HCI_OCF_READ_LOOPBACK_MODE - 1); /*Commands - LE*/ f = ng_btsocket_hci_raw_sec_filter->commands[NG_HCI_OGF_LE -1]; + bit_set(f, NG_HCI_OCF_LE_SET_SCAN_ENABLE - 1); + bit_set(f, NG_HCI_OCF_LE_SET_SCAN_PARAMETERS - 1); + bit_set(f, NG_HCI_OCF_LE_READ_LOCAL_SUPPORTED_FEATURES - 1); + bit_set(f, NG_HCI_OCF_LE_READ_BUFFER_SIZE - 1); + bit_set(f, NG_HCI_OCF_LE_READ_WHITE_LIST_SIZE - 1); } /* ng_btsocket_hci_raw_init */