keepalived/harden_keepalived.service.patch

25 lines
818 B
Diff

Index: keepalived-2.2.2/keepalived/keepalived.service.in
===================================================================
--- keepalived-2.2.2.orig/keepalived/keepalived.service.in
+++ keepalived-2.2.2/keepalived/keepalived.service.in
@@ -8,6 +8,19 @@ After=network-online.target syslog.targe
Documentation=https://keepalived.org
[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
+ProtectClock=true
+ProtectKernelTunables=true
+ProtectKernelModules=true
+ProtectKernelLogs=true
+ProtectControlGroups=true
+RestrictRealtime=true
+# end of automatic additions
Type=@SYSTEMD_SERVICE_TYPE@
PIDFile=@RUN_DIR@/run/keepalived.pid
KillMode=process