aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2017-04-17 07:34:13 +0000
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2017-04-20 09:40:50 +0000
commit5c71ba5d53adcedb2ae4f0adceae34e3c096bc60 (patch)
treeb489bbbbf0a6eb573cca4aa60f6c5c4288ad52c5
parent11d11336d2d7e3edf7059bd346d32672546f76c6 (diff)
bluez5: add interface access for MediaPlayer application
MediaPlayer needs to receive a few signals from org.bluez to trigger various AVRCP metadata and position data. Change-Id: I5b54f91dc5654d2e0208ae564de2440dc6bd5f48 AGL-Bug: SPEC-541 Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com> Reviewed-on: https://gerrit.automotivelinux.org/gerrit/9125 Tested-by: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org> ci-image-build: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org> Reviewed-by: José Bollo <jobol@nonadev.net> Reviewed-by: Stéphane Desneux <stephane.desneux@iot.bzh> Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org> Reviewed-by: Matt Porter <mporter@konsulko.com>
-rw-r--r--meta-agl/recipes-connectivity/bluez5/bluez5.inc3
-rw-r--r--meta-agl/recipes-connectivity/bluez5/bluez5/bluetooth.conf39
2 files changed, 42 insertions, 0 deletions
diff --git a/meta-agl/recipes-connectivity/bluez5/bluez5.inc b/meta-agl/recipes-connectivity/bluez5/bluez5.inc
index 8189dc81a..5869a1764 100644
--- a/meta-agl/recipes-connectivity/bluez5/bluez5.inc
+++ b/meta-agl/recipes-connectivity/bluez5/bluez5.inc
@@ -23,6 +23,7 @@ SRC_URI = "\
file://run-ptest \
${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', 'file://0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch', d)} \
file://0001-tests-add-a-target-for-building-tests-without-runnin.patch \
+ file://bluetooth.conf \
"
SRCREV = "c64b4d9e8dc3e36672061f39a9dba19ad0fb1ef1"
S = "${WORKDIR}/git"
@@ -62,6 +63,8 @@ do_install_append() {
install -m 0644 ${S}/profiles/input/input.conf ${D}/${sysconfdir}/bluetooth/
fi
+ install -m 0644 ${WORKDIR}/bluetooth.conf ${D}${sysconfdir}/dbus-1/system.d/bluetooth.conf
+
if [ -f ${D}/${sysconfdir}/init.d/bluetooth ]; then
sed -i -e 's#@LIBEXECDIR@#${libexecdir}#g' ${D}/${sysconfdir}/init.d/bluetooth
fi
diff --git a/meta-agl/recipes-connectivity/bluez5/bluez5/bluetooth.conf b/meta-agl/recipes-connectivity/bluez5/bluez5/bluetooth.conf
new file mode 100644
index 000000000..8e2204b22
--- /dev/null
+++ b/meta-agl/recipes-connectivity/bluez5/bluez5/bluetooth.conf
@@ -0,0 +1,39 @@
+<!-- This configuration file specifies the required security policies
+ for Bluetooth core daemon to work. -->
+
+<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
+ "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
+<busconfig>
+
+ <!-- ../system.conf have denied everything, so we just punch some holes -->
+
+ <policy user="root">
+ <allow own="org.bluez"/>
+ <allow send_destination="org.bluez"/>
+ <allow send_interface="org.bluez.Agent1"/>
+ <allow send_interface="org.bluez.MediaEndpoint1"/>
+ <allow send_interface="org.bluez.MediaPlayer1"/>
+ <allow send_interface="org.bluez.ThermometerWatcher1"/>
+ <allow send_interface="org.bluez.AlertAgent1"/>
+ <allow send_interface="org.bluez.Profile1"/>
+ <allow send_interface="org.bluez.HeartRateWatcher1"/>
+ <allow send_interface="org.bluez.CyclingSpeedWatcher1"/>
+ <allow send_interface="org.bluez.GattCharacteristic1"/>
+ <allow send_interface="org.bluez.GattDescriptor1"/>
+ <allow send_interface="org.freedesktop.DBus.ObjectManager"/>
+ <allow send_interface="org.freedesktop.DBus.Properties"/>
+ <allow receive_type="signal" receive_sender="org.bluez" receive_interface="org.freedesktop.DBus.Properties"/>
+ <allow receive_type="signal" receive_sender="org.bluez" receive_interface="org.freedesktop.DBus.ObjectManager"/>
+ </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>
+
+</busconfig>