]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: notify userspace of security level change
authorGustavo Padovan <gustavo@padovan.org>
Sun, 13 May 2012 06:20:07 +0000 (03:20 -0300)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 14 May 2012 17:51:25 +0000 (13:51 -0400)
commit430247aae65917f8c735b3b0f3b74e2237dc2e1b
tree8e09cd37ed267e792481c2ad699bcaff9596e5e7
parent1c3169c934cfd80d983a6f9aa9ede44a8a6c9cdf
Bluetooth: notify userspace of security level change

It fixes L2CAP socket based security level elevation during a
connection. The HID profile needs this (for keyboards) and it is the only
way to achieve the security level elevation when using the management
interface to talk to the kernel (hence the management enabling patch
being the one that exposes this issue).

It enables the userspace a security level change when the socket is
already connected and create a way to notify the socket the result of the
request. At the moment of the request the socket is made non writable, if
the request fails the connections closes, otherwise the socket is made
writable again, POLL_OUT is emmited.

Signed-off-by: Gustavo Padovan <gustavo@padovan.org>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
include/net/bluetooth/bluetooth.h
net/bluetooth/af_bluetooth.c
net/bluetooth/hci_event.c
net/bluetooth/l2cap_core.c
net/bluetooth/l2cap_sock.c