mirror of
https://github.com/systemd/systemd.git
synced 2024-11-25 11:13:34 +08:00
6a716208b3
No setuid programs are expected to be executed, so add SecureBits=noroot noroot-locked to unit files.
35 lines
1.0 KiB
SYSTEMD
35 lines
1.0 KiB
SYSTEMD
# 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.
|
|
|
|
[Unit]
|
|
Description=Network Time Synchronization
|
|
Documentation=man:systemd-timesyncd.service(8)
|
|
ConditionCapability=CAP_SYS_TIME
|
|
ConditionVirtualization=no
|
|
DefaultDependencies=no
|
|
RequiresMountsFor=/var/lib/systemd/clock
|
|
After=systemd-remount-fs.service systemd-tmpfiles-setup.service systemd-sysusers.service
|
|
Before=time-sync.target sysinit.target shutdown.target
|
|
Conflicts=shutdown.target
|
|
Wants=time-sync.target
|
|
|
|
[Service]
|
|
Type=notify
|
|
Restart=always
|
|
RestartSec=0
|
|
ExecStart=@rootlibexecdir@/systemd-timesyncd
|
|
CapabilityBoundingSet=CAP_SYS_TIME CAP_SETUID CAP_SETGID CAP_SETPCAP CAP_CHOWN CAP_DAC_OVERRIDE CAP_FOWNER
|
|
SecureBits=noroot noroot-locked
|
|
PrivateTmp=yes
|
|
PrivateDevices=yes
|
|
ProtectSystem=full
|
|
ProtectHome=yes
|
|
WatchdogSec=1min
|
|
|
|
[Install]
|
|
WantedBy=sysinit.target
|