## Copyright (C) 2025 - 2025 ENCRYPTED SUPPORT LLC <adrelanos@whonix.org>
## See the file COPYING for copying conditions.

[action:sdwdate-clock-jump]
Command=/usr/sbin/sdwdate-clock-jump
AuthorizedGroups=sudo,privleap
AuthorizedUsers=user

[action:sdwdate-libexec]
Command=/usr/libexec/sdwdate/sdwdate
TargetUser=sdwdate
AuthorizedGroups=sudo,privleap
AuthorizedUsers=user

[action:start-sdwdate]
Command=/bin/systemctl --no-pager --no-block start sdwdate
AuthorizedGroups=sudo,privleap
AuthorizedUsers=user

[action:restart-sdwdate]
Command=/bin/systemctl --no-pager --no-block restart sdwdate
AuthorizedGroups=sudo,privleap
AuthorizedUsers=user

[action:stop-sdwdate]
Command=/bin/systemctl --no-pager --no-block stop sdwdate
AuthorizedGroups=sudo,privleap
AuthorizedUsers=user

[action:sdwdate-log-viewer]
Command=/usr/bin/sdwdate-log-viewer
AuthorizedGroups=sudo,privleap
AuthorizedUsers=user

[action:sdwdate-sync-hwclock]
Command=if [ ! -f /usr/share/qubes/marker-vm ]; then /usr/sbin/hwclock --verbose --systohc; fi
AuthorizedUsers=sdwdate

[action:sdwdate-clock-jump-do-once-file-create]
Command=/usr/bin/touch -- /run/sdwdate/clock_jump_do_once
## XXX: sdwdate-clock-jump runs as root, but nested privleap refuses this anyhow.
#AuthorizedUsers=root
#AuthorizedGroups=root
AuthorizedGroups=sudo,privleap
AuthorizedUsers=user
TargetUser=sdwdate

[persistent-users]
User=sdwdate
