Adding configuration file regarding dbus policy.
authorMarcin Niesluchowski <m.niesluchow@samsung.com>
Wed, 29 Jan 2014 08:57:23 +0000 (09:57 +0100)
committerMarcin Niesluchowski <m.niesluchow@samsung.com>
Wed, 29 Jan 2014 11:21:27 +0000 (12:21 +0100)
[Issue#]        SSDWSSP-750
[Bug/Feature]   Security-server tests using dbus fail.
[Cause]         Lack of dbus policy for security-tests.
[Solution]      Adding conf file.
[Verification]  Build, install, run tests.

Change-Id: I932fc6712aee0211a06940133e09db61dde45c12

packaging/security-tests.spec
tests/common/CMakeLists.txt
tests/common/security-tests.conf [new file with mode: 0644]

index a21c76e..c944bc0 100644 (file)
@@ -79,6 +79,8 @@ osp-installer -u V5LKqDFBXm
 /usr/bin/test-performance-check.sh
 /usr/bin/perf
 
+/etc/dbus-1/system.d/security-tests.conf
+
 /usr/bin/libsmack-test
 /usr/bin/libprivilege-control-test
 /usr/bin/security-server-tests-client-smack
index b3eeede..669ed2e 100644 (file)
@@ -32,3 +32,5 @@ INCLUDE_DIRECTORIES(
 ADD_LIBRARY(${COMMON_TARGET_TEST} ${COMMON_TARGET_TEST_SOURCES})
 
 TARGET_LINK_LIBRARIES(${COMMON_TARGET_TEST} ${COMMON_TARGET_DEP_LIBRARIES})
+
+INSTALL (FILES ${PROJECT_SOURCE_DIR}/tests/common/security-tests.conf DESTINATION /etc/dbus-1/system.d)
diff --git a/tests/common/security-tests.conf b/tests/common/security-tests.conf
new file mode 100644 (file)
index 0000000..0ae6722
--- /dev/null
@@ -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>
+  <!-- Only root can own this service -->
+  <policy user="root">
+       <allow own="tests.dbus.client"/>
+       <allow own="test.method.caller"/>
+       <allow own="test.method.server"/>
+  </policy>
+</busconfig>