Accepting request 935169 from security:SELinux
OBS-URL: https://build.opensuse.org/request/show/935169 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/restorecond?expand=0&rev=10
This commit is contained in:
commit
038f42ce92
20
harden_restorecond.service.patch
Normal file
20
harden_restorecond.service.patch
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
Index: restorecond-3.2/restorecond.service
|
||||||
|
===================================================================
|
||||||
|
--- restorecond-3.2.orig/restorecond.service
|
||||||
|
+++ restorecond-3.2/restorecond.service
|
||||||
|
@@ -5,6 +5,15 @@ ConditionPathExists=/etc/selinux/restore
|
||||||
|
ConditionSecurity=selinux
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
+# added automatically, for details please see
|
||||||
|
+# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
|
||||||
|
+ProtectHostname=true
|
||||||
|
+ProtectKernelTunables=true
|
||||||
|
+ProtectKernelModules=true
|
||||||
|
+ProtectKernelLogs=true
|
||||||
|
+ProtectControlGroups=true
|
||||||
|
+RestrictRealtime=true
|
||||||
|
+# end of automatic additions
|
||||||
|
Type=forking
|
||||||
|
ExecStart=/usr/sbin/restorecond
|
||||||
|
PIDFile=/run/restorecond.pid
|
@ -1,3 +1,14 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Dec 2 12:10:11 UTC 2021 - Johannes Segitz <jsegitz@suse.com>
|
||||||
|
|
||||||
|
- Claim ownership for %{_sysconfdir}/selinux
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Nov 15 15:48:12 UTC 2021 - Johannes Segitz <jsegitz@suse.com>
|
||||||
|
|
||||||
|
- Added hardening to systemd service(s) (bsc#1181400). Added patch(es):
|
||||||
|
* harden_restorecond.service.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Nov 11 14:17:58 UTC 2021 - Johannes Segitz <jsegitz@suse.com>
|
Thu Nov 11 14:17:58 UTC 2021 - Johannes Segitz <jsegitz@suse.com>
|
||||||
|
|
||||||
|
@ -25,6 +25,7 @@ License: GPL-2.0-or-later
|
|||||||
Group: Productivity/Security
|
Group: Productivity/Security
|
||||||
URL: https://github.com/SELinuxProject/selinux.git
|
URL: https://github.com/SELinuxProject/selinux.git
|
||||||
Source0: https://github.com/SELinuxProject/selinux/releases/download/%{version}/%{name}-%{version}.tar.gz
|
Source0: https://github.com/SELinuxProject/selinux/releases/download/%{version}/%{name}-%{version}.tar.gz
|
||||||
|
Patch0: harden_restorecond.service.patch
|
||||||
BuildRequires: dbus-1-glib-devel
|
BuildRequires: dbus-1-glib-devel
|
||||||
BuildRequires: libselinux-devel >= %{libselinux_ver}
|
BuildRequires: libselinux-devel >= %{libselinux_ver}
|
||||||
Requires: libselinux1 >= %{libselinux_ver}
|
Requires: libselinux1 >= %{libselinux_ver}
|
||||||
@ -35,6 +36,7 @@ Daemon that watches for file creation and then sets the default SELinux file con
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export CFLAGS="%optflags"
|
export CFLAGS="%optflags"
|
||||||
@ -58,6 +60,7 @@ ln -s /sbin/service %{buildroot}%{_sbindir}/rcrestorecond
|
|||||||
%service_del_postun restorecond.service
|
%service_del_postun restorecond.service
|
||||||
|
|
||||||
%files
|
%files
|
||||||
|
%dir %{_sysconfdir}/selinux
|
||||||
%config %{_sysconfdir}/selinux/restorecond.conf
|
%config %{_sysconfdir}/selinux/restorecond.conf
|
||||||
%config(noreplace) %{_sysconfdir}/selinux/restorecond_user.conf
|
%config(noreplace) %{_sysconfdir}/selinux/restorecond_user.conf
|
||||||
%{_sysconfdir}/xdg/autostart/restorecond.desktop
|
%{_sysconfdir}/xdg/autostart/restorecond.desktop
|
||||||
|
Loading…
Reference in New Issue
Block a user