From 880cc896f5400cb1c0e9c7824a2080f7b37f47adb5adb56f0aca6242547efdec Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Fri, 1 Oct 2021 19:30:46 +0000 Subject: [PATCH] Accepting request 922505 from home:jsegitz:branches:systemdhardening:network Automatic systemd hardening effort by the security team. This has not been tested. For details please see https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort OBS-URL: https://build.opensuse.org/request/show/922505 OBS-URL: https://build.opensuse.org/package/show/network/keepalived?expand=0&rev=75 --- harden_keepalived.service.patch | 24 ++++++++++++++++++++++++ keepalived.changes | 6 ++++++ keepalived.spec | 2 ++ 3 files changed, 32 insertions(+) create mode 100644 harden_keepalived.service.patch diff --git a/harden_keepalived.service.patch b/harden_keepalived.service.patch new file mode 100644 index 0000000..674f49f --- /dev/null +++ b/harden_keepalived.service.patch @@ -0,0 +1,24 @@ +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 +@@ -4,6 +4,19 @@ After=network-online.target syslog.targe + Wants=network-online.target @SNMP_SERVICE@ + + [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 diff --git a/keepalived.changes b/keepalived.changes index fde4e5c..c970bd1 100644 --- a/keepalived.changes +++ b/keepalived.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Sep 27 07:39:33 UTC 2021 - Johannes Segitz + +- Added hardening to systemd service(s) (bsc#1181400). Added patch(es): + * harden_keepalived.service.patch + ------------------------------------------------------------------- Wed Jul 21 12:03:14 UTC 2021 - Dirk Müller diff --git a/keepalived.spec b/keepalived.spec index 763879a..6a6e2a2 100644 --- a/keepalived.spec +++ b/keepalived.spec @@ -54,6 +54,7 @@ Source2: keepalive-rpmlintrc Patch1: keepalive-init.patch # PATCH-FIX-UPSTREAM: https://github.com/acassen/keepalived/pull/1915 Patch2: 1915.patch +Patch3: harden_keepalived.service.patch BuildRequires: file-devel BuildRequires: net-snmp-devel BuildRequires: pkgconfig @@ -104,6 +105,7 @@ resilient infrastructures. %patch1 -p1 %patch2 -p1 chmod 644 doc/samples/* +%patch3 -p1 %build export STRIP=true