aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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>