Subject: KAUTH_REQ_NETWORK_SOCKET_OPEN
To: None <tech-kern@netbsd.org>
From: Iain Hibbert <plunky@rya-online.net>
List: tech-kern
Date: 01/31/2007 00:16:15
Hi,
   I'm just catching up my kernel sources (I've been a little behind due
to lack of bandwidth) and I notice that bluetooth utilities no longer work
for normal users, because of the KAUTH_REQ_NETWORK_SOCKET_OPEN checks
which disallow SOCK_RAW access for all but root.

The problem is, that the bluetooth utils use SOCK_RAW, BTPROTO_HCI sockets
to talk to or query the controllers. Security is managed by the HCI socket
code which allows unprivileged users a limited access. (netbt/hci_socket.c
and netbt/hci_ioctl.c)

So, this is inconvenient and I'm not sure how it should be fixed..

1. specifically allow (PF_BLUETOOTH, SOCK_RAW, BTPROTO_HCI) access to all..

2. rewrite the HCI socket code so that its not socket based..

3. other..

any preferences or other ideas?

iain