diff options
author | Alexander Yurchenko <grange@cvs.openbsd.org> | 2005-01-14 20:22:55 +0000 |
---|---|---|
committer | Alexander Yurchenko <grange@cvs.openbsd.org> | 2005-01-14 20:22:55 +0000 |
commit | 316d9fdf57811beb0ff60e327474a79b5a96c833 (patch) | |
tree | cc37b5a7f7bad3fc76fed61572c3d0fda4340d0b /sys | |
parent | 00c0ffb862836558128125bf053d7d842636d2ce (diff) |
Restrict AF_BLUETOOTH sockets to root for now. Discussed with theo and
markus.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netbt/hci_raw.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/netbt/hci_raw.c b/sys/netbt/hci_raw.c index 930606f5e69..ae29dcda412 100644 --- a/sys/netbt/hci_raw.c +++ b/sys/netbt/hci_raw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hci_raw.c,v 1.1 2005/01/14 12:04:02 grange Exp $ */ +/* $OpenBSD: hci_raw.c,v 1.2 2005/01/14 20:22:54 grange Exp $ */ /* * ng_btsocket_hci_raw.c @@ -27,7 +27,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: hci_raw.c,v 1.1 2005/01/14 12:04:02 grange Exp $ + * $Id: hci_raw.c,v 1.2 2005/01/14 20:22:54 grange Exp $ * $FreeBSD: src/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c,v 1.16 2004/10/18 22:19:42 rwatson Exp $ */ @@ -1682,6 +1682,10 @@ hci_raw_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *nam, struct sockaddr *sa; int error = 0; + /* XXX: restrict AF_BLUETOOTH sockets to root for now */ + if ((error = suser(curproc, 0)) != 0) + return (error); + if (req == PRU_CONTROL) return (ng_btsocket_hci_raw_control(so, (u_long)m, (caddr_t)nam, (struct ifnet *)control, curproc)); |