From 1abd0f321a8c1ade741d647328e17f25c51f4cccd0356ef0e4ef1305890f7cf9 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Sat, 16 Oct 2021 09:50:31 +0000 Subject: [PATCH] Accepting request 925360 from home:jsegitz:branches:systemdhardening:Base:System 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/925360 OBS-URL: https://build.opensuse.org/package/show/Base:System/ledmon?expand=0&rev=42 --- harden_ledmon.service.patch | 22 ++++++++++++++++++++++ ledmon.changes | 6 ++++++ ledmon.spec | 3 ++- 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 harden_ledmon.service.patch diff --git a/harden_ledmon.service.patch b/harden_ledmon.service.patch new file mode 100644 index 0000000..97470b6 --- /dev/null +++ b/harden_ledmon.service.patch @@ -0,0 +1,22 @@ +Index: ledmon-0.95/systemd/ledmon.service.in +=================================================================== +--- ledmon-0.95.orig/systemd/ledmon.service.in ++++ ledmon-0.95/systemd/ledmon.service.in +@@ -5,6 +5,17 @@ Description=Enclosure LED Utilities + WantedBy=multi-user.target + + [Service] ++# 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 + Type=simple + User=root + ExecStart=@sbindir@/ledmon --foreground diff --git a/ledmon.changes b/ledmon.changes index 39bf263..05d35a7 100644 --- a/ledmon.changes +++ b/ledmon.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Oct 15 07:28:48 UTC 2021 - Johannes Segitz + +- Added hardening to systemd service(s) (bsc#1181400). Added patch(es): + * harden_ledmon.service.patch + ------------------------------------------------------------------- Thu Jul 1 14:27:36 UTC 2021 - Ferdinand Thiessen diff --git a/ledmon.spec b/ledmon.spec index b0834d7..085c3d4 100644 --- a/ledmon.spec +++ b/ledmon.spec @@ -24,6 +24,7 @@ License: GPL-2.0-only Group: Hardware/Other URL: https://github.com/intel/ledmon/ Source0: https://github.com/intel/ledmon/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz +Patch0: harden_ledmon.service.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: libsgutils-devel @@ -42,7 +43,7 @@ ControlUtilities. They help to enable LED management for software RAID solutions. %prep -%autosetup +%autosetup -p1 %build %define _lto_cflags %{nil}