Skip to content

Commit

Permalink
Bluetooth: Set authentication requirements if not available
Browse files Browse the repository at this point in the history
When no authentication requirements are selected, but an outgoing or
incoming connection has requested any kind of security enforcement,
then set these authentication requirements.

This ensures that the userspace always gets informed about the
authentication requirements (if available). Only when no security
enforcement has happened, the kernel will signal invalid requirements.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
  • Loading branch information
Marcel Holtmann committed Feb 27, 2009
1 parent 0684e5f commit 657e17b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions net/bluetooth/hci_conn.c
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,9 @@ int hci_conn_security(struct hci_conn *conn, __u8 sec_level, __u8 auth_type)
{
BT_DBG("conn %p", conn);

if (conn->auth_type == 0xff)
conn->auth_type = auth_type;

if (sec_level == BT_SECURITY_SDP)
return 1;

Expand Down

0 comments on commit 657e17b

Please sign in to comment.