Prechádzať zdrojové kódy

Bluetooth: Require CAP_NET_ADMIN for HCI User Channel operation

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>
Marcel Holtmann 12 rokov pred
rodič
commit
10a8b86f57
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      net/bluetooth/hci_sock.c

+ 1 - 1
net/bluetooth/hci_sock.c

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