diff options
Diffstat (limited to 'data')
| -rw-r--r-- | data/CMakeLists.txt | 16 | ||||
| -rw-r--r-- | data/org.freedesktop.timedate1.conf | 27 | ||||
| -rw-r--r-- | data/org.freedesktop.timedate1.policy | 41 | ||||
| -rw-r--r-- | data/org.freedesktop.timedate1.service.in | 4 | ||||
| -rw-r--r-- | data/org.freedesktop.timedate1.xml | 27 |
5 files changed, 115 insertions, 0 deletions
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt new file mode 100644 index 0000000..93c1f77 --- /dev/null +++ b/data/CMakeLists.txt @@ -0,0 +1,16 @@ +find_program(SED sed) + +add_custom_command(OUTPUT ${PROJECT_BINARY_DIR}/org.freedesktop.timedate1.service + COMMAND ${SED} -e s|@LIBEXECDIR@|${CMAKE_INSTALL_FULL_LIBEXECDIR}| ${CMAKE_CURRENT_SOURCE_DIR}/org.freedesktop.timedate1.service.in > ${PROJECT_BINARY_DIR}/org.freedesktop.timedate1.service + MAIN_DEPENDENCY org.freedesktop.timedate1.service.in + VERBATIM) +add_custom_target(service ALL DEPENDS ${PROJECT_BINARY_DIR}/org.freedesktop.timedate1.service) + +install(FILES org.freedesktop.timedate1.xml + DESTINATION ${CMAKE_INSTALL_DATADIR}/dbus-1/interfaces) +install(FILES org.freedesktop.timedate1.policy + DESTINATION ${CMAKE_INSTALL_DATADIR}/polkit-1/actions) +install(FILES org.freedesktop.timedate1.conf + DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/dbus-1/system.d) +install(FILES ${PROJECT_BINARY_DIR}/org.freedesktop.timedate1.service + DESTINATION ${CMAKE_INSTALL_DATADIR}/dbus-1/system-services) diff --git a/data/org.freedesktop.timedate1.conf b/data/org.freedesktop.timedate1.conf new file mode 100644 index 0000000..36557d5 --- /dev/null +++ b/data/org.freedesktop.timedate1.conf @@ -0,0 +1,27 @@ +<?xml version="1.0"?> <!--*-nxml-*--> +<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN" + "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> + +<!-- + This file is part of systemd. + + systemd is free software; you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. +--> + +<busconfig> + + <policy user="root"> + <allow own="org.freedesktop.timedate1"/> + <allow send_destination="org.freedesktop.timedate1"/> + <allow receive_sender="org.freedesktop.timedate1"/> + </policy> + + <policy context="default"> + <allow send_destination="org.freedesktop.timedate1"/> + <allow receive_sender="org.freedesktop.timedate1"/> + </policy> + +</busconfig> diff --git a/data/org.freedesktop.timedate1.policy b/data/org.freedesktop.timedate1.policy new file mode 100644 index 0000000..a3b1dc5 --- /dev/null +++ b/data/org.freedesktop.timedate1.policy @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd"> +<policyconfig> + <vendor>slack-timedate</vendor> + + <action id="org.freedesktop.timedate1.set-time"> + <message>Changes the system clock</message> + <defaults> + <allow_any>auth_admin_keep</allow_any> + <allow_inactive>auth_admin_keep</allow_inactive> + <allow_active>auth_admin_keep</allow_active> + </defaults> + </action> + + <action id="org.freedesktop.timedate1.set-timezone"> + <message>Sets the system timezone</message> + <defaults> + <allow_any>auth_admin_keep</allow_any> + <allow_inactive>auth_admin_keep</allow_inactive> + <allow_active>auth_admin_keep</allow_active> + </defaults> + </action> + + <action id="org.freedesktop.timedate1.set-local-rtc"> + <message>Controls whether the RTC is in local time or UTC</message> + <defaults> + <allow_any>auth_admin_keep</allow_any> + <allow_inactive>auth_admin_keep</allow_inactive> + <allow_active>auth_admin_keep</allow_active> + </defaults> + </action> + + <action id="org.freedesktop.timedate1.set-ntp"> + <message>Controls whether the system clock is synchronized with the network</message> + <defaults> + <allow_any>auth_admin_keep</allow_any> + <allow_inactive>auth_admin_keep</allow_inactive> + <allow_active>auth_admin_keep</allow_active> + </defaults> + </action> +</policyconfig> diff --git a/data/org.freedesktop.timedate1.service.in b/data/org.freedesktop.timedate1.service.in new file mode 100644 index 0000000..1849390 --- /dev/null +++ b/data/org.freedesktop.timedate1.service.in @@ -0,0 +1,4 @@ +[D-BUS Service] +Name=org.freedesktop.timedate1 +Exec=@LIBEXECDIR@/slack-timedate +User=root diff --git a/data/org.freedesktop.timedate1.xml b/data/org.freedesktop.timedate1.xml new file mode 100644 index 0000000..b035d10 --- /dev/null +++ b/data/org.freedesktop.timedate1.xml @@ -0,0 +1,27 @@ +<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" +"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"> +<node> + <interface name="org.freedesktop.timedate1"> + <property name="Timezone" type="s" access="read"/> + <property name="LocalRTC" type="b" access="read"/> + <property name="NTP" type="b" access="read"/> + <method name="SetTime"> + <arg name="usec_utc" type="x" direction="in"/> + <arg name="relative" type="b" direction="in"/> + <arg name="user_interaction" type="b" direction="in"/> + </method> + <method name="SetTimezone"> + <arg name="timezone" type="s" direction="in"/> + <arg name="user_interaction" type="b" direction="in"/> + </method> + <method name="SetLocalRTC"> + <arg name="local_rtc" type="b" direction="in"/> + <arg name="fix_system" type="b" direction="in"/> + <arg name="user_interaction" type="b" direction="in"/> + </method> + <method name="SetNTP"> + <arg name="use_ntp" type="b" direction="in"/> + <arg name="user_interaction" type="b" direction="in"/> + </method> + </interface> +</node> |
