summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChengwei Yang <chengwei.yang@intel.com>2013-08-21 12:47:47 +0800
committerChengwei Yang <chengwei.yang@intel.com>2013-08-21 13:12:48 +0800
commitf84d14659501e1614f4587d503ef72ae80084500 (patch)
treee90e0836110d23bdf2f8ccff521159813945e2ec
parent3b269607504c4ab518dab56cdaaf4270da022017 (diff)
downloadoma-ds-agent-f84d14659501e1614f4587d503ef72ae80084500.tar.gz
oma-ds-agent-f84d14659501e1614f4587d503ef72ae80084500.tar.bz2
oma-ds-agent-f84d14659501e1614f4587d503ef72ae80084500.zip
Add dbus policy conf
By default, dbus will reject own bus name request, this patch add a dbus policy conf to make it's allowed to own the bus name and request send to it. Bug: https://bugs.tizen.org/jira/browse/TDIST-268 Change-Id: If2a831778175cb5feab8ed63295df76326e16cd3 Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
-rw-r--r--com.samsung.omadsagent.conf10
-rwxr-xr-xoma-ds-agent.manifest1
-rw-r--r--packaging/oma-ds-agent.changes3
-rwxr-xr-xpackaging/oma-ds-agent.spec1
-rwxr-xr-xsrc/agent/CMakeLists.txt1
5 files changed, 16 insertions, 0 deletions
diff --git a/com.samsung.omadsagent.conf b/com.samsung.omadsagent.conf
new file mode 100644
index 0000000..ae996fa
--- /dev/null
+++ b/com.samsung.omadsagent.conf
@@ -0,0 +1,10 @@
+<!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="root">
+ <allow own="com.samsung.omadsagent"/>
+ </policy>
+ <policy context="default">
+ <allow send_destination="com.samsung.omadsagent"/>
+ </policy>
+</busconfig>
diff --git a/oma-ds-agent.manifest b/oma-ds-agent.manifest
index d0ef48a..76626bf 100755
--- a/oma-ds-agent.manifest
+++ b/oma-ds-agent.manifest
@@ -17,6 +17,7 @@
<filesystem path="/etc/rc.d/rc5.d/S91oma-ds-agent" label="_" exec_label="none"/>
<filesystem path="/etc/init.d/oma-ds" label="_" exec_label="none"/>
<filesystem path="/usr/share/dbus-1/services/com.samsung.omadsagent.service" label="_"/>
+ <filesystem path="/etc/dbus-1/system.d/com.samsung.omadsagent.conf" label="_"/>
</assign>
<request>
<domain name="oma-ds-agent" />
diff --git a/packaging/oma-ds-agent.changes b/packaging/oma-ds-agent.changes
index db80206..2d14198 100644
--- a/packaging/oma-ds-agent.changes
+++ b/packaging/oma-ds-agent.changes
@@ -1,4 +1,7 @@
* Wed Aug 21 2013 Chengwei Yang <chengwei.yang@intel.com>
+- Add dbus policy conf
+
+* Wed Aug 21 2013 Chengwei Yang <chengwei.yang@intel.com>
- Move systemd unit out of packaging
* Mon Aug 12 2013 Chengwei Yang <chengwei.yang@intel.com>
diff --git a/packaging/oma-ds-agent.spec b/packaging/oma-ds-agent.spec
index d3fbf7b..1a2ffec 100755
--- a/packaging/oma-ds-agent.spec
+++ b/packaging/oma-ds-agent.spec
@@ -119,6 +119,7 @@ rm -rf /usr/share/oma-ds-cfg
%defattr(644,root,root)
/usr/lib/systemd/system/oma-ds-agent.service
/usr/lib/systemd/system/graphical.target.wants/oma-ds-agent.service
+/etc/dbus-1/system.d/com.samsung.omadsagent.conf
%files -n ds-public-plugins
%manifest ds-public-plugins.manifest
diff --git a/src/agent/CMakeLists.txt b/src/agent/CMakeLists.txt
index 5588bdb..4c98e87 100755
--- a/src/agent/CMakeLists.txt
+++ b/src/agent/CMakeLists.txt
@@ -73,6 +73,7 @@ INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/oma-ds-cfg DESTINATION /usr/share)
# install oma ds dbus file
INSTALL(FILES ${CMAKE_SOURCE_DIR}/com.samsung.omadsagent.service DESTINATION /usr/share/dbus-1/services)
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/com.samsung.omadsagent.conf DESTINATION /etc/dbus-1/system.d)
# install systemd unit
INSTALL(FILES ${CMAKE_SOURCE_DIR}/oma-ds-agent.service DESTINATION /usr/lib/systemd/system)