diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2010-04-11 20:34:45 +0300 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2010-04-12 01:35:19 +0300 |
commit | 78c8da05216642cd7f668c19a03ce15cd021686c (patch) | |
tree | 0eaefe529b7e38fca2b98f76779bb7b47f0a2405 | |
parent | 32c43b955601343cbaa041be0ec1c8671071db5c (diff) | |
download | bluez-78c8da05216642cd7f668c19a03ce15cd021686c.tar.gz |
Set HID socket security back to LOW after the BtIO default change
At least mice require a lower security level, however for now this patch
changes the level back to low for all HID sockets.
-rw-r--r-- | input/device.c | 2 | ||||
-rw-r--r-- | input/server.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/input/device.c b/input/device.c index 922dc981a..e047009ae 100644 --- a/input/device.c +++ b/input/device.c @@ -886,6 +886,7 @@ static void control_connect_cb(GIOChannel *chan, GError *conn_err, BT_IO_OPT_SOURCE_BDADDR, &idev->src, BT_IO_OPT_DEST_BDADDR, &idev->dst, BT_IO_OPT_PSM, L2CAP_PSM_HIDP_INTR, + BT_IO_OPT_SEC_LEVEL, BT_IO_SEC_LOW, BT_IO_OPT_INVALID); if (!io) { error("%s", err->message); @@ -964,6 +965,7 @@ static DBusMessage *input_device_connect(DBusConnection *conn, BT_IO_OPT_SOURCE_BDADDR, &idev->src, BT_IO_OPT_DEST_BDADDR, &idev->dst, BT_IO_OPT_PSM, L2CAP_PSM_HIDP_CTRL, + BT_IO_OPT_SEC_LEVEL, BT_IO_SEC_LOW, BT_IO_OPT_INVALID); iconn->ctrl_io = io; } diff --git a/input/server.c b/input/server.c index 93ceea660..7eddf93a6 100644 --- a/input/server.c +++ b/input/server.c @@ -187,6 +187,7 @@ int server_start(const bdaddr_t *src) server, NULL, &err, BT_IO_OPT_SOURCE_BDADDR, src, BT_IO_OPT_PSM, L2CAP_PSM_HIDP_CTRL, + BT_IO_OPT_SEC_LEVEL, BT_IO_SEC_LOW, BT_IO_OPT_INVALID); if (!server->ctrl) { error("Failed to listen on control channel"); @@ -199,6 +200,7 @@ int server_start(const bdaddr_t *src) server, NULL, &err, BT_IO_OPT_SOURCE_BDADDR, src, BT_IO_OPT_PSM, L2CAP_PSM_HIDP_INTR, + BT_IO_OPT_SEC_LEVEL, BT_IO_SEC_LOW, BT_IO_OPT_INVALID); if (!server->intr) { error("Failed to listen on interrupt channel"); |