From: Marcel Holtmann Date: Wed, 2 Oct 2013 05:59:24 +0000 (-0700) Subject: Bluetooth: Require CAP_NET_ADMIN for HCI User Channel operation X-Git-Tag: v3.13-rc1~105^2~225^2~24^2~35 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=10a8b86f575235258bdf195e4503f2c2ddfd2e26;p=kernel%2Fkernel-generic.git 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 Signed-off-by: Johan Hedberg --- diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c index c09e976..5798861 100644 --- a/net/bluetooth/hci_sock.c +++ b/net/bluetooth/hci_sock.c @@ -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; }