Accepting request 926720 from home:jsegitz:branches:systemdhardening:security:chipcard

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/926720
OBS-URL: https://build.opensuse.org/package/show/security:chipcard/pcsc-lite?expand=0&rev=171
This commit is contained in:
Wolfgang Rosenauer 2021-10-21 17:20:22 +00:00 committed by Git OBS Bridge
parent 833d15102d
commit b0ba46745c
3 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,22 @@
Index: pcsc-lite-1.9.4/etc/pcscd.service.in
===================================================================
--- pcsc-lite-1.9.4.orig/etc/pcscd.service.in
+++ pcsc-lite-1.9.4/etc/pcscd.service.in
@@ -4,6 +4,17 @@ Requires=pcscd.socket
Documentation=man:pcscd(8)
[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
Environment="PCSCD_OPTIONS="
EnvironmentFile=-/etc/sysconfig/pcscd
ExecStart=@sbindir_exp@/pcscd --foreground $PCSCD_OPTIONS

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Oct 18 13:25:25 UTC 2021 - Johannes Segitz <jsegitz@suse.com>
- Added hardening to systemd service(s) (bsc#1181400). Added patch(es):
* harden_pcscd.service.patch
-------------------------------------------------------------------
Thu Oct 7 14:36:44 UTC 2021 - Wolfgang Rosenauer <wr@rosenauer.org>

View File

@ -40,6 +40,7 @@ Source6: pcsc-lite-reader-conf
Source7: https://pcsclite.apdu.fr/files/%{name}-%{version}.tar.bz2.asc
Source8: %{name}.keyring
Patch0: systemd-service.patch
Patch1: harden_pcscd.service.patch
BuildRequires: gcc
BuildRequires: libtool
BuildRequires: pkg-config
@ -109,6 +110,7 @@ compile plugins for the pcsc-lite package.
%setup -q
%patch0 -p1
cp -a %{SOURCE1} %{SOURCE2} %{SOURCE6} .
%patch1 -p1
%build
%configure \