aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2019-07-30 03:38:48 +0300
committerMatt Ranostay <matt.ranostay@konsulko.com>2019-07-31 16:06:00 +0000
commitffc532b38c5f7c19c37ecb2eb6744c4b76b207e9 (patch)
treec40ac1f36f983d2edf8391bfe054bc76e48137b7
parent875f5d817a204146f8628e37bfc90e8324394495 (diff)
bluez5: add obex.service.d conf to fix smack label issues
All data transfer from obexd need to be located in a direcory that has a User::App-Shared label for bindings to be able to access them. This is done by moving the TMPDIR to /run/user/UID/usrshr Bug-AGL: SPEC-2695 Change-Id: I076eb89d0ed14af67811d497217db583e4f5902b Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com> (cherry picked from commit b999b3e4147d065b55c1a7ce53125f767c0a0c8f)
-rw-r--r--meta-agl-profile-core/recipes-connectivity/bluez5/bluez5/tmpdir.conf2
-rw-r--r--meta-agl-profile-core/recipes-connectivity/bluez5/bluez5_%.bbappend5
2 files changed, 7 insertions, 0 deletions
diff --git a/meta-agl-profile-core/recipes-connectivity/bluez5/bluez5/tmpdir.conf b/meta-agl-profile-core/recipes-connectivity/bluez5/bluez5/tmpdir.conf
new file mode 100644
index 000000000..8545d76ec
--- /dev/null
+++ b/meta-agl-profile-core/recipes-connectivity/bluez5/bluez5/tmpdir.conf
@@ -0,0 +1,2 @@
+[Service]
+Environment="TMPDIR=/run/user/%U/usrshr"
diff --git a/meta-agl-profile-core/recipes-connectivity/bluez5/bluez5_%.bbappend b/meta-agl-profile-core/recipes-connectivity/bluez5/bluez5_%.bbappend
index 736f18c79..36fb31517 100644
--- a/meta-agl-profile-core/recipes-connectivity/bluez5/bluez5_%.bbappend
+++ b/meta-agl-profile-core/recipes-connectivity/bluez5/bluez5_%.bbappend
@@ -1,13 +1,18 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
SRC_URI_append = " \
file://bluetooth.conf \
+ file://tmpdir.conf \
file://0001-obex-report-notification-status-on-incoming-message.patch \
"
+FILES_${PN} += "${systemd_user_unitdir}/obex.service.d/tmpdir.conf"
+
do_install_append() {
install -m 0644 ${WORKDIR}/bluetooth.conf ${D}${sysconfdir}/dbus-1/system.d/bluetooth.conf
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+ mkdir -p ${D}${systemd_user_unitdir}/obex.service.d
+ install -m 0644 ${WORKDIR}/tmpdir.conf ${D}${systemd_user_unitdir}/obex.service.d/tmpdir.conf
mkdir -p ${D}/etc/systemd/user
ln -sf ${systemd_user_unitdir}/obex.service ${D}/etc/systemd/user/dbus-org.bluez.obex.service
fi