diff --git a/bluez-pairing-security.patch b/bluez-pairing-security.patch new file mode 100644 index 0000000..f064caa --- /dev/null +++ b/bluez-pairing-security.patch @@ -0,0 +1,55 @@ +From 78c8da05216642cd7f668c19a03ce15cd021686c Mon Sep 17 00:00:00 2001 +From: Johan Hedberg +Date: Sun, 11 Apr 2010 20:34:45 +0300 +Subject: [PATCH] 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. +--- + input/device.c | 2 ++ + input/server.c | 2 ++ + 2 files changed, 4 insertions(+), 0 deletions(-) + +diff --git a/input/device.c b/input/device.c +index 922dc98..e047009 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 93ceea6..7eddf93 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"); +-- +1.7.0.4 + diff --git a/bluez.spec b/bluez.spec index d8d041b..8aa0b84 100644 --- a/bluez.spec +++ b/bluez.spec @@ -1,7 +1,7 @@ Summary: Bluetooth utilities Name: bluez Version: 4.63 -Release: 1%{?dist} +Release: 3%{?dist} License: GPLv2+ Group: Applications/System Source: http://www.kernel.org/pub/linux/bluetooth/%{name}-%{version}.tar.gz @@ -17,6 +17,8 @@ Patch1: bluez-utils-oui-usage.patch # https://bugzilla.redhat.com/show_bug.cgi?id=450081 # http://thread.gmane.org/gmane.linux.bluez.kernel/1687 Patch2: bluez-try-utf8-harder.patch +# http://git.kernel.org/?p=bluetooth/bluez.git;a=commitdiff;h=78c8da05216642cd7f668c19a03ce15cd021686c +Patch3: bluez-pairing-security.patch # https://bugzilla.redhat.com/show_bug.cgi?id=498756 Patch4: bluez-socket-mobile-cf-connection-kit.patch # http://thread.gmane.org/gmane.linux.bluez.kernel/2396 @@ -128,6 +130,7 @@ This includes hidd, dund and pand. %setup -q %patch1 -p0 -b .oui %patch2 -p1 -b .non-utf8-name +%patch3 -p1 -b .security %patch4 -p1 -b .socket-mobile %patch5 -p1 -b .cable-pairing @@ -270,6 +273,12 @@ fi %config(noreplace) %{_sysconfdir}/sysconfig/pand %changelog +* Mon Apr 12 2010 Bastien Nocera 4.63-3 +- And actually apply the aforementioned patch + +* Mon Apr 12 2010 Bastien Nocera 4.63-2 +- Fix pairing and using mice, due to recent BtIO changes + * Fri Mar 26 2010 Bastien Nocera 4.63-1 - Update to 4.63