Bluetooth: Require CAP_NET_ADMIN for HCI User Channel operation
authorMarcel Holtmann <marcel@holtmann.org>
Wed, 2 Oct 2013 05:59:24 +0000 (22:59 -0700)
committerJohan Hedberg <johan.hedberg@intel.com>
Wed, 2 Oct 2013 06:10:04 +0000 (09:10 +0300)
The HCI User Channel operation is an admin operation that puts the
device into promiscuous mode for single use. It is more suitable
to require CAP_NET_ADMIN than CAP_NET_RAW.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
net/bluetooth/hci_sock.c

index c09e97638065f1c29336667906913576514535b3..579886186c3a826f126f19929541a0c0788d4e12 100644 (file)
@@ -687,7 +687,7 @@ static int hci_sock_bind(struct socket *sock, struct sockaddr *addr,
                        goto done;
                }
 
-               if (!capable(CAP_NET_RAW)) {
+               if (!capable(CAP_NET_ADMIN)) {
                        err = -EPERM;
                        goto done;
                }