powerman/harden_powerman.service.patch

23 lines
732 B
Diff

Index: powerman-2.3.26/scripts/powerman.service.in
===================================================================
--- powerman-2.3.26.orig/scripts/powerman.service.in
+++ powerman-2.3.26/scripts/powerman.service.in
@@ -5,6 +5,17 @@ After=syslog.target network.target
[Service]
Type=forking
PrivateTmp=yes
+# added automatically, for details please see
+# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
+ProtectSystem=full
+ProtectHome=true
+ProtectHostname=true
+ProtectKernelTunables=true
+ProtectKernelModules=true
+ProtectKernelLogs=true
+ProtectControlGroups=true
+RestrictRealtime=true
+# end of automatic additions
User=@RUN_AS_USER@
Group=@RUN_AS_GROUP@
ExecStart=/usr/sbin/powermand