From owner-svn-src-head@freebsd.org Wed Jul 1 04:00:55 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7BC8C35CEFA; Wed, 1 Jul 2020 04:00:55 +0000 (UTC) (envelope-from takawata@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xSFM2jFsz4JqY; Wed, 1 Jul 2020 04:00:55 +0000 (UTC) (envelope-from takawata@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 40DBC22E7F; Wed, 1 Jul 2020 04:00:55 +0000 (UTC) (envelope-from takawata@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06140tqF063882; Wed, 1 Jul 2020 04:00:55 GMT (envelope-from takawata@FreeBSD.org) Received: (from takawata@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06140tZb063881; Wed, 1 Jul 2020 04:00:55 GMT (envelope-from takawata@FreeBSD.org) Message-Id: <202007010400.06140tZb063881@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: takawata set sender to takawata@FreeBSD.org using -f From: Takanori Watanabe Date: Wed, 1 Jul 2020 04:00:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362825 - head/sys/netgraph/bluetooth/socket X-SVN-Group: head X-SVN-Commit-Author: takawata X-SVN-Commit-Paths: head/sys/netgraph/bluetooth/socket X-SVN-Commit-Revision: 362825 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 04:00:55 -0000 Author: takawata Date: Wed Jul 1 04:00:54 2020 New Revision: 362825 URL: https://svnweb.freebsd.org/changeset/base/362825 Log: 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 Modified: head/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c Modified: head/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c ============================================================================== --- head/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c Wed Jul 1 02:32:41 2020 (r362824) +++ head/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c Wed Jul 1 04:00:54 2020 (r362825) @@ -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 */