Add systemd conf file for dbus daemon 12/42612/1 accepted/tizen/mobile/20150701.001807 accepted/tizen/tv/20150701.001819 submit/tizen_mobile/20150630.143244 submit/tizen_tv/20150630.143515
authorMu-Woong <muwoong.lee@samsung.com>
Tue, 30 Jun 2015 13:43:05 +0000 (22:43 +0900)
committerMu-Woong <muwoong.lee@samsung.com>
Tue, 30 Jun 2015 13:43:05 +0000 (22:43 +0900)
Change-Id: Ie6579e5bc59937a57ba0f23faeec4bad58cf7504
Signed-off-by: Mu-Woong <muwoong.lee@samsung.com>
packaging/context-service.spec
packaging/org.tizen.context.conf [new file with mode: 0644]

index 99ac01a39c38fb3621d86bffe854d23a09fc8f65..5508ac7f06b160abf302a37f1ddaa706290ed15b 100644 (file)
@@ -6,6 +6,7 @@ Group:      System/Service
 License:    Apache-2.0
 Source0:    %{name}-%{version}.tar.gz
 Source1:       context-service.service
+Source2:       org.tizen.context.conf
 
 # For active window hooking, we need to use 'ecore' mainloop instead of the 'glib' mainloop.
 %define MAINLOOP glib
@@ -87,6 +88,9 @@ cp data/access-config.xml %{buildroot}/opt/data/context-service/
 cp data/trigger-template.json %{buildroot}/opt/data/context-service/
 sh data/template-json-to-sql.sh data/trigger-template.json > %{buildroot}/opt/data/context-service/trigger-template.sql
 
+mkdir -p %{buildroot}%{_sysconfdir}/dbus-1/system.d
+install -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/dbus-1/system.d/
+
 %post
 sqlite3 -echo /opt/dbspace/.context-service.db < /opt/data/context-service/trigger-template.sql
 chsmack -a "context-service" /opt/dbspace/.context-service.db*
@@ -107,6 +111,7 @@ systemctl daemon-reload
 
 %files
 %manifest packaging/%{name}.manifest
+%config %{_sysconfdir}/dbus-1/system.d/*
 %defattr(-,root,root,-)
 %{_bindir}/*
 %{_unitdir}/context-service.service
diff --git a/packaging/org.tizen.context.conf b/packaging/org.tizen.context.conf
new file mode 100644 (file)
index 0000000..be59b20
--- /dev/null
@@ -0,0 +1,16 @@
+<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
+"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
+<busconfig>
+       <policy user="system">
+               <allow own="org.tizen.context"/>
+               <allow send_destination="org.tizen.context"/>
+               <allow send_interface="org.tizen.context"/>
+       </policy>
+       <policy at_console="true">
+               <allow send_destination="org.tizen.context"/>
+       </policy>
+       <policy context="default">
+               <deny own="org.tizen.context"/>
+               <allow send_destination="org.tizen.context"/>
+       </policy>
+</busconfig>