projects
/
deliverable
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cd82e61
)
Bluetooth: Restrict access to management interface
author
Marcel Holtmann
<marcel@holtmann.org>
Mon, 20 Feb 2012 19:54:10 +0000
(20:54 +0100)
committer
Johan Hedberg
<johan.hedberg@intel.com>
Mon, 20 Feb 2012 21:06:43 +0000
(23:06 +0200)
The management interface on the HCI control channel should be restricted
to applications with CAP_NET_ADMIN permission.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
net/bluetooth/hci_sock.c
patch
|
blob
|
blame
|
history
diff --git
a/net/bluetooth/hci_sock.c
b/net/bluetooth/hci_sock.c
index 213697d23771cb5902082555fc18f6b945af7c05..8c429a179aa4d0e4370d8d3d5dc18d793d79817e 100644
(file)
--- a/
net/bluetooth/hci_sock.c
+++ b/
net/bluetooth/hci_sock.c
@@
-656,6
+656,11
@@
static int hci_sock_bind(struct socket *sock, struct sockaddr *addr, int addr_le
goto done;
}
+ if (!capable(CAP_NET_ADMIN)) {
+ err = -EPERM;
+ goto done;
+ }
+
set_bit(HCI_PI_MGMT_INIT, &hci_pi(sk)->flags);
break;
This page took
0.025218 seconds
and
5
git commands to generate.