daemon: add tuxclocker DBus service file

This commit is contained in:
jussi 2020-01-05 17:06:29 +02:00
parent 658ffea9a7
commit fccbe2c744
2 changed files with 27 additions and 0 deletions

View File

@ -21,3 +21,11 @@ executable('tuxclockerd',
dependencies : qt5_dep,
link_with : libtuxclocker,
install : true)
# DBus data directory
dbus_data_dir = join_paths(get_option('prefix'), get_option('datadir'), 'dbus-1')
dbus_system_services_dir = join_paths(dbus_data_dir, 'system.d')
install_data('org.tuxclocker.conf', install_dir : dbus_system_services_dir)

View File

@ -0,0 +1,19 @@
<!DOCTYPE busconfig PUBLIC
"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<!-- Only user root can own the daemon-->
<policy user="root">
<allow own="org.tuxclocker"/>
</policy>
<!-- Allow anyone to call into the service-->
<policy context="default">
<allow send_interface="org.tuxclocker"/>
<allow send_destination="org.tuxclocker"/>
<allow receive_sender="org.tuxclocker"/>
<allow receive_interface="org.tuxclocker"/>
</policy>
</busconfig>