provide access to systemd system
authorJosé Bollo <jose.bollo@iot.bzh>
Thu, 12 Oct 2017 20:40:35 +0000 (22:40 +0200)
committerJosé Bollo <jose.bollo@iot.bzh>
Fri, 24 Nov 2017 16:44:57 +0000 (17:44 +0100)
Change-Id: I1e3d2dc780a1449f2bfc894baa1f26a94be61cd8
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
conf/CMakeLists.txt
conf/afm-system-daemon.conf

index ad2090d..714c321 100644 (file)
@@ -25,10 +25,12 @@ configure_file(afm-system-daemon.socket.in afm-system-daemon.socket)
 configure_file(afm-user-daemon.service.in afm-user-daemon.service)
 
 if(NOT USE_SDK)
+       set(SYSCONFDIR_DBUS_SYSTEM ${CMAKE_INSTALL_SYSCONFDIR}/dbus-1/system.d CACHE STRING "Path to dbus system configuration files")
        set(SYSCONFDIR_DBUS_USER   ${CMAKE_INSTALL_SYSCONFDIR}/dbus-1/session.d CACHE STRING "Path to dbus session configuration files")
        set(UNITDIR_SYSTEM         ${CMAKE_INSTALL_LIBDIR}/systemd/system CACHE STRING "Path to systemd system unit files")
        set(UNITDIR_USER           ${CMAKE_INSTALL_LIBDIR}/systemd/user CACHE STRING "Path to systemd system unit files")
 
+       install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/afm-system-daemon.conf    DESTINATION ${SYSCONFDIR_DBUS_SYSTEM})
        install(FILES ${CMAKE_CURRENT_BINARY_DIR}/afm-system-daemon.service DESTINATION ${UNITDIR_SYSTEM})
        install(FILES ${CMAKE_CURRENT_BINARY_DIR}/afm-system-daemon.socket  DESTINATION ${UNITDIR_SYSTEM})
        install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/afm-user-daemon.conf      DESTINATION ${SYSCONFDIR_DBUS_USER})
index 9527435..18d45fb 100644 (file)
 -->
 
 <busconfig>
-
-        <policy user="afm">
-                <allow own="org.AGL.afm.system"/>
-        </policy>
-
-        <policy context="default">
-                <allow send_destination="org.AGL.afm.system"/>
-        </policy>
-
+       <policy user="afm">
+               <allow send_destination="org.freedesktop.systemd1"/>
+               <allow receive_sender="org.freedesktop.systemd1"/>
+       </policy>
 </busconfig>