deepin-daemon/harden_hwclock_stop.service.patch

24 lines
797 B
Diff

Index: dde-daemon-5.13.36/misc/systemd/services/hwclock_stop.service
===================================================================
--- dde-daemon-5.13.36.orig/misc/systemd/services/hwclock_stop.service
+++ dde-daemon-5.13.36/misc/systemd/services/hwclock_stop.service
@@ -3,6 +3,18 @@ Description=sync RTC from system time
Before=shutdown.target
[Service]
+# added automatically, for details please see
+# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
+ProtectSystem=full
+ProtectHome=true
+PrivateDevices=true
+ProtectHostname=true
+ProtectKernelTunables=true
+ProtectKernelModules=true
+ProtectKernelLogs=true
+ProtectControlGroups=true
+RestrictRealtime=true
+# end of automatic additions
ExecStart=hwclock -s
ExecStop=hwclock -w
RemainAfterExit=yes