Accepting request 924889 from home:jsegitz:branches:systemdhardening:hardware

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/924889
OBS-URL: https://build.opensuse.org/package/show/hardware/neard?expand=0&rev=25
This commit is contained in:
Al Cho 2021-10-13 07:22:45 +00:00 committed by Git OBS Bridge
parent be74693901
commit 87b89ebc60
4 changed files with 45 additions and 0 deletions

View File

@ -0,0 +1,23 @@
Index: neard-0.16/src/neard.service.in
===================================================================
--- neard-0.16.orig/src/neard.service.in
+++ neard-0.16/src/neard.service.in
@@ -3,6 +3,18 @@ Description=neard service
Documentation=man:neard(8)
[Service]
+# added automatically, for details please see
+# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
+ProtectSystem=full
+ProtectHome=true
+ProtectHostname=true
+ProtectClock=true
+ProtectKernelTunables=true
+ProtectKernelModules=true
+ProtectKernelLogs=true
+ProtectControlGroups=true
+RestrictRealtime=true
+# end of automatic additions
Type=dbus
BusName=org.neard
ExecStart=@pkglibexecdir@/neard -n

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Mon Oct 11 07:29:41 UTC 2021 - Johannes Segitz <jsegitz@suse.com>
- Added hardening to systemd service(s) (bsc#1181400). Added patch(es):
* harden_neard.service.patch
Modified:
* neard.service
-------------------------------------------------------------------
Sun Aug 16 20:04:59 UTC 2020 - Dirk Mueller <dmueller@suse.com>

View File

@ -3,6 +3,18 @@ Description=neard service
Documentation=man:neard(8)
[Service]
# added automatically, for details please see
# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
ProtectSystem=full
ProtectHome=true
ProtectHostname=true
ProtectClock=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectKernelLogs=true
ProtectControlGroups=true
RestrictRealtime=true
# end of automatic additions
Type=dbus
BusName=org.neard
ExecStart=/usr/lib/nfc/neard -n

View File

@ -29,6 +29,7 @@ Source: https://www.kernel.org/pub/linux/network/nfc/neard-%{version}.ta
Source1: neard.service
Source2: 99-neard.rules
Patch1: neard-0.13-fix-dbus_send_destination_config.patch
Patch2: harden_neard.service.patch
BuildRequires: automake
BuildRequires: check-devel
BuildRequires: libtool
@ -62,6 +63,7 @@ Files needed to test applications for the NFC stack.
%prep
%setup -q
%patch1 -p1
%patch2 -p1
%build
autoreconf -fiv