File harden_telegraf.service.patch of Package telegraf
diff --git a/scripts/telegraf.service b/scripts/telegraf.service index 93731568..21e1c1d6 100644 --- a/scripts/telegraf.service +++ b/scripts/telegraf.service @@ -5,6 +5,20 @@ After=network-online.target Wants=network-online.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 +ProtectClock=true +ProtectKernelTunables=true +ProtectKernelModules=true +ProtectKernelLogs=true +ProtectControlGroups=true +RestrictRealtime=true +# end of automatic additions +Environment=HOME=/var/lib/telegraf Type=notify NotifyAccess=all EnvironmentFile=-/etc/default/telegraf