+ bluez-5.50-8
Backport loads of fixes from upstream, including: dbus-broker support (#1711594) a2dp codecs discovery discoverability filter support (used in gnome-bluetooth, #1583442) sixaxis pairing fixes
This commit is contained in:
parent
2a0eb3509f
commit
3c5fd713ee
@ -0,0 +1,43 @@
|
||||
From 74174217fc3f15255be875659d1e1d9403646bba Mon Sep 17 00:00:00 2001
|
||||
From: Tom Gundersen <teg@jklm.no>
|
||||
Date: Tue, 6 Nov 2018 12:07:17 +0100
|
||||
Subject: [PATCH] bluetooth.conf: remove deprecated at_console statement
|
||||
|
||||
As described in [0], this likely did not have the intended effect, so
|
||||
simply remove it. The change in behavior is that up until this patch
|
||||
it would be possible for root, lp, and any non-system user to potentially
|
||||
gain access to bluez' dbus interface. Now this is extended to also allow
|
||||
any system user.
|
||||
|
||||
[0]: <https://www.spinics.net/lists/linux-bluetooth/msg75267.html>
|
||||
---
|
||||
src/bluetooth.conf | 12 +-----------
|
||||
1 file changed, 1 insertion(+), 11 deletions(-)
|
||||
|
||||
diff --git a/src/bluetooth.conf b/src/bluetooth.conf
|
||||
index 0c0b221bb..05f407d1a 100644
|
||||
--- a/src/bluetooth.conf
|
||||
+++ b/src/bluetooth.conf
|
||||
@@ -21,18 +21,8 @@
|
||||
<allow send_interface="org.freedesktop.DBus.Properties"/>
|
||||
</policy>
|
||||
|
||||
- <policy at_console="true">
|
||||
- <allow send_destination="org.bluez"/>
|
||||
- </policy>
|
||||
-
|
||||
- <!-- allow users of lp group (printing subsystem) to
|
||||
- communicate with bluetoothd -->
|
||||
- <policy group="lp">
|
||||
- <allow send_destination="org.bluez"/>
|
||||
- </policy>
|
||||
-
|
||||
<policy context="default">
|
||||
- <deny send_destination="org.bluez"/>
|
||||
+ <allow send_destination="org.bluez"/>
|
||||
</policy>
|
||||
|
||||
</busconfig>
|
||||
--
|
||||
2.21.0
|
||||
|
4714
bluez-5.50-a2dp-backports.patch
Normal file
4714
bluez-5.50-a2dp-backports.patch
Normal file
File diff suppressed because it is too large
Load Diff
81
bluez-5.50-autopair-backports.patch
Normal file
81
bluez-5.50-autopair-backports.patch
Normal file
@ -0,0 +1,81 @@
|
||||
From b83e617e98ddfce94f3209399c290c8a764ffe3e Mon Sep 17 00:00:00 2001
|
||||
From: Bastien Nocera <hadess@hadess.net>
|
||||
Date: Mon, 27 Nov 2017 16:26:50 +0100
|
||||
Subject: [PATCH 1/2] autopair: Add more common PIN codes for audio devices
|
||||
|
||||
PIN codes "1111", and "1234" are fairly common PIN codes used for audio
|
||||
devices such as speakers and headsets. This replaces similar quirks
|
||||
already present in gnome-bluetooth's PIN database.
|
||||
---
|
||||
plugins/autopair.c | 18 ++++++++++++++----
|
||||
1 file changed, 14 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/plugins/autopair.c b/plugins/autopair.c
|
||||
index 6980b0a64..70e19930e 100644
|
||||
--- a/plugins/autopair.c
|
||||
+++ b/plugins/autopair.c
|
||||
@@ -92,10 +92,20 @@ static ssize_t autopair_pincb(struct btd_adapter *adapter,
|
||||
case 0x06: /* Headphones */
|
||||
case 0x07: /* Portable Audio */
|
||||
case 0x0a: /* HiFi Audio Device */
|
||||
- if (attempt > 1)
|
||||
- return 0;
|
||||
- memcpy(pinbuf, "0000", 4);
|
||||
- return 4;
|
||||
+ {
|
||||
+ const char *pincodes[] = {
|
||||
+ "0000",
|
||||
+ "1234",
|
||||
+ "1111"
|
||||
+ };
|
||||
+ const char *pincode;
|
||||
+
|
||||
+ if (attempt > G_N_ELEMENTS(pincodes))
|
||||
+ return 0;
|
||||
+ pincode = pincodes[attempt - 1];
|
||||
+ memcpy(pinbuf, pincode, strlen(pincode));
|
||||
+ return strlen(pincode);
|
||||
+ }
|
||||
}
|
||||
break;
|
||||
|
||||
--
|
||||
2.21.0
|
||||
|
||||
|
||||
From 62d8a8237e3cb5bea5333d485416cc8d8b92556c Mon Sep 17 00:00:00 2001
|
||||
From: Bastien Nocera <hadess@hadess.net>
|
||||
Date: Mon, 27 Nov 2017 16:26:51 +0100
|
||||
Subject: [PATCH 2/2] autopair: Add pin codes to try for gaming input devices
|
||||
|
||||
As well as remote controls.
|
||||
---
|
||||
plugins/autopair.c | 12 ++++++++++++
|
||||
1 file changed, 12 insertions(+)
|
||||
|
||||
diff --git a/plugins/autopair.c b/plugins/autopair.c
|
||||
index 70e19930e..043bd9b9d 100644
|
||||
--- a/plugins/autopair.c
|
||||
+++ b/plugins/autopair.c
|
||||
@@ -111,6 +111,18 @@ static ssize_t autopair_pincb(struct btd_adapter *adapter,
|
||||
|
||||
case 0x05: /* Peripheral */
|
||||
switch ((class & 0xc0) >> 6) {
|
||||
+ case 0x00:
|
||||
+ switch ((class & 0x1e) >> 2) {
|
||||
+ case 0x01: /* Joystick */
|
||||
+ case 0x02: /* Gamepad */
|
||||
+ case 0x03: /* Remote Control */
|
||||
+ if (attempt > 1)
|
||||
+ return 0;
|
||||
+ memcpy(pinbuf, "0000", 4);
|
||||
+ return 4;
|
||||
+ }
|
||||
+
|
||||
+ break;
|
||||
case 0x01: /* Keyboard */
|
||||
case 0x03: /* Combo keyboard/pointing device */
|
||||
/* For keyboards rejecting the first random code
|
||||
--
|
||||
2.21.0
|
||||
|
1243
bluez-5.50-discoverability-backports.patch
Normal file
1243
bluez-5.50-discoverability-backports.patch
Normal file
File diff suppressed because it is too large
Load Diff
60
bluez-5.50-sixaxis-fixes.patch
Normal file
60
bluez-5.50-sixaxis-fixes.patch
Normal file
@ -0,0 +1,60 @@
|
||||
From f12e00b5127589589d476817cb528d442c30b2c7 Mon Sep 17 00:00:00 2001
|
||||
From: Bastien Nocera <hadess@hadess.net>
|
||||
Date: Thu, 6 Jun 2019 18:42:42 +0200
|
||||
Subject: [PATCH 1/2] sixaxis: Fix another problem with already setup devices
|
||||
|
||||
If the device went through any kind of pairing once, it might have been
|
||||
set as trusted. Make sure to set the device as untrusted before starting
|
||||
the cable pairing authorization so that we don't exit early from
|
||||
process_auth_queue() (which considers trusted devices to be paired).
|
||||
---
|
||||
plugins/sixaxis.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/plugins/sixaxis.c b/plugins/sixaxis.c
|
||||
index fed68d2d8..12638829b 100644
|
||||
--- a/plugins/sixaxis.c
|
||||
+++ b/plugins/sixaxis.c
|
||||
@@ -365,6 +365,7 @@ static bool setup_device(int fd, const char *sysfs_path,
|
||||
|
||||
btd_device_device_set_name(device, cp->name);
|
||||
btd_device_set_pnpid(device, cp->source, cp->vid, cp->pid, cp->version);
|
||||
+ btd_device_set_trusted(device, false);
|
||||
btd_device_set_temporary(device, true);
|
||||
|
||||
closure = g_new0(struct authentication_closure, 1);
|
||||
--
|
||||
2.21.0
|
||||
|
||||
|
||||
From 32f6e03823970796b7e08718fe28c76c96de32ac Mon Sep 17 00:00:00 2001
|
||||
From: Bastien Nocera <hadess@hadess.net>
|
||||
Date: Thu, 6 Jun 2019 18:46:23 +0200
|
||||
Subject: [PATCH 2/2] sixaxis: Throw an error when cable setup fails
|
||||
|
||||
If btd_request_authorization_cable_configured() fails, throw an error
|
||||
and free resources.
|
||||
---
|
||||
plugins/sixaxis.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/plugins/sixaxis.c b/plugins/sixaxis.c
|
||||
index 12638829b..939fed759 100644
|
||||
--- a/plugins/sixaxis.c
|
||||
+++ b/plugins/sixaxis.c
|
||||
@@ -384,6 +384,12 @@ static bool setup_device(int fd, const char *sysfs_path,
|
||||
adapter_bdaddr, &device_bdaddr,
|
||||
HID_UUID, agent_auth_cb, closure);
|
||||
|
||||
+ if (closure->auth_id == 0) {
|
||||
+ error("sixaxis: could not request cable authorization");
|
||||
+ auth_closure_destroy(closure, true);
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
g_hash_table_insert(pending_auths, closure->sysfs_path, closure);
|
||||
|
||||
return true;
|
||||
--
|
||||
2.21.0
|
||||
|
22
bluez.spec
22
bluez.spec
@ -1,7 +1,7 @@
|
||||
Name: bluez
|
||||
Summary: Bluetooth utilities
|
||||
Version: 5.50
|
||||
Release: 7%{?dist}
|
||||
Release: 8%{?dist}
|
||||
License: GPLv2+
|
||||
URL: http://www.bluez.org/
|
||||
|
||||
@ -30,6 +30,18 @@ Patch23: 0004-systemd-More-lockdown.patch
|
||||
# Fix A2DP disconnection with some headsets
|
||||
Patch30: 0001-policy-Add-logic-to-connect-a-Sink.patch
|
||||
|
||||
# Backports:
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1711594
|
||||
Patch40: 0001-bluetooth.conf-remove-deprecated-at_console-statemen.patch
|
||||
# autopair enhancements
|
||||
Patch41: bluez-5.50-autopair-backports.patch
|
||||
# Discoverable filters support, as used in gnome-bluetooth
|
||||
Patch42: bluez-5.50-discoverability-backports.patch
|
||||
# a2dp fixes for newer codecs
|
||||
Patch43: bluez-5.50-a2dp-backports.patch
|
||||
# sixaxis pairing fixes
|
||||
Patch44: bluez-5.50-sixaxis-fixes.patch
|
||||
|
||||
BuildRequires: git-core
|
||||
BuildRequires: dbus-devel >= 1.6
|
||||
BuildRequires: glib2-devel
|
||||
@ -271,6 +283,14 @@ install -D -p -m0755 %{SOURCE4} ${RPM_BUILD_ROOT}/%{_libexecdir}/bluetooth/
|
||||
%{_userunitdir}/obex.service
|
||||
|
||||
%changelog
|
||||
* Thu Jun 06 2019 Bastien Nocera <bnocera@redhat.com> - 5.50-8
|
||||
+ bluez-5.50-8
|
||||
- Backport loads of fixes from upstream, including:
|
||||
- dbus-broker support (#1711594)
|
||||
- a2dp codecs discovery
|
||||
- discoverability filter support (used in gnome-bluetooth, #1583442)
|
||||
- sixaxis pairing fixes
|
||||
|
||||
* Tue Apr 16 2019 Eduardo Minguez <edu@linux.com> - 5.50-7
|
||||
- Added avinfo
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user