summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2016-09-08 17:22:10 (GMT)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2016-09-09 13:34:54 (GMT)
commit55ba261ad3a44d46b4fc0afa34d57db56556755b (patch)
tree65a8da468da0e6cef95235031cfa87740f5be303
parent5eea8f3da0969792ba766e7d4247572d6421a16d (diff)
downloadtraprain-55ba261ad3a44d46b4fc0afa34d57db56556755b.tar.gz
traprain-55ba261ad3a44d46b4fc0afa34d57db56556755b.tar.xz
mock-service: add D-Bus config file
Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk> Differential Revision: https://phabricator.apertis.org/D4280
-rw-r--r--Makefile.am8
-rw-r--r--mock-service/org.apertis.Traprain1.Mock.conf.in18
2 files changed, 26 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index 5773609..f7cce73 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -460,11 +460,18 @@ apparmor_policy_DATA = \
mock-service/usr.bin.traprain-mock-service \
$(NULL)
+# D-Bus config
+dbusconfdir = $(sysconfdir)/dbus-1/system.d
+dbusconf_DATA = \
+ mock-service/org.apertis.Traprain1.Mock.conf \
+ $(NULL)
+
EXTRA_DIST += \
$(dbus_service_DATA:%=%.in) \
$(systemdsystemunit_DATA:%=%.in) \
$(systemdsysusers_DATA:%=%.in) \
$(apparmor_policy_DATA:%=%.in) \
+ $(dbusconf_DATA:%=%.in) \
$(NULL)
CLEANFILES += \
@@ -472,6 +479,7 @@ CLEANFILES += \
$(systemdsysusers_DATA) \
$(systemdsystemunit_DATA) \
$(apparmor_policy_DATA) \
+ $(dbusconf_DATA) \
$(NULL)
# Tests
diff --git a/mock-service/org.apertis.Traprain1.Mock.conf.in b/mock-service/org.apertis.Traprain1.Mock.conf.in
new file mode 100644
index 0000000..dfc35a4
--- /dev/null
+++ b/mock-service/org.apertis.Traprain1.Mock.conf.in
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE busconfig PUBLIC
+ "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
+ "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
+
+<busconfig>
+ <!-- Allow the daemon to own its name. -->
+ <policy user="@MOCK_USER@">
+ <allow own="org.apertis.Traprain1.Mock"/>
+ <allow own="org.apertis.Navigation1"/>
+ </policy>
+
+ <!-- Allow SDK applications to use the SDK API. -->
+ <policy context="default">
+ <allow send_destination="org.apertis.Traprain1.Mock"/>
+ <allow send_destination="org.apertis.Navigation1"/>
+ </policy>
+</busconfig>