From fdc38c861f20b8963c0b86d472b6ed6d285eb24dbff858fd1a0d97e6ab90007c Mon Sep 17 00:00:00 2001 From: Johannes Segitz Date: Wed, 11 Aug 2021 12:31:49 +0000 Subject: [PATCH 1/2] Accepting request 911222 from home:lnussel:branches:security:SELinux - Fix quoting in postInstall macro OBS-URL: https://build.opensuse.org/request/show/911222 OBS-URL: https://build.opensuse.org/package/show/security:SELinux/selinux-policy?expand=0&rev=114 --- selinux-policy.changes | 5 +++++ selinux-policy.spec | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/selinux-policy.changes b/selinux-policy.changes index a097bed..957ec61 100644 --- a/selinux-policy.changes +++ b/selinux-policy.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Aug 10 08:31:16 UTC 2021 - Ludwig Nussel + +- Fix quoting in postInstall macro + ------------------------------------------------------------------- Fri Jul 16 07:11:57 UTC 2021 - Johannes Segitz diff --git a/selinux-policy.spec b/selinux-policy.spec index 413e576..86cca83 100644 --- a/selinux-policy.spec +++ b/selinux-policy.spec @@ -304,9 +304,9 @@ fi; %define postInstall() \ . %{_sysconfdir}/selinux/config; \ -if [ -e %{_sysconfdir}/selinux/%%2/.rebuild ]; then \ - rm %{_sysconfdir}/selinux/%%2/.rebuild; \ - /usr/sbin/semodule -B -n -s %%2; \ +if [ -e %{_sysconfdir}/selinux/%2/.rebuild ]; then \ + rm %{_sysconfdir}/selinux/%2/.rebuild; \ + /usr/sbin/semodule -B -n -s %2; \ fi; \ if [ -n "${TRANSACTIONAL_UPDATE}" ]; then \ touch /etc/selinux/.autorelabel \ From e9e2930221ed8fc86904f0f60c0968e163353e7283d932bd2d4bb77230a0e014 Mon Sep 17 00:00:00 2001 From: Ales Kedroutek Date: Wed, 18 Aug 2021 10:42:18 +0000 Subject: [PATCH 2/2] Accepting request 912846 from home:lnussel:usrmove - Allow systemd-sysctl to read kernel specific sysctl.conf (fix_kernel_sysctl.patch, boo#1184804) OBS-URL: https://build.opensuse.org/request/show/912846 OBS-URL: https://build.opensuse.org/package/show/security:SELinux/selinux-policy?expand=0&rev=115 --- fix_kernel_sysctl.patch | 26 ++++++++++++++++++++++++++ selinux-policy.changes | 6 ++++++ selinux-policy.spec | 2 ++ 3 files changed, 34 insertions(+) create mode 100644 fix_kernel_sysctl.patch diff --git a/fix_kernel_sysctl.patch b/fix_kernel_sysctl.patch new file mode 100644 index 0000000..757d195 --- /dev/null +++ b/fix_kernel_sysctl.patch @@ -0,0 +1,26 @@ +Index: fedora-policy-20210716/policy/modules/kernel/files.fc +=================================================================== +--- fedora-policy-20210716.orig/policy/modules/kernel/files.fc ++++ fedora-policy-20210716/policy/modules/kernel/files.fc +@@ -236,6 +236,8 @@ ifdef(`distro_redhat',` + /usr/lib/ostree-boot(/.*)? gen_context(system_u:object_r:usr_t,s0) + /usr/lib/modules(/.*)/vmlinuz -- gen_context(system_u:object_r:usr_t,s0) + /usr/lib/modules(/.*)/initramfs.img -- gen_context(system_u:object_r:usr_t,s0) ++/usr/lib/modules(/.*)/sysctl.conf -- gen_context(system_u:object_r:usr_t,s0) ++/usr/lib/modules(/.*)/System.map -- gen_context(system_u:object_r:system_map_t,s0) + + /usr/doc(/.*)?/lib(/.*)? gen_context(system_u:object_r:usr_t,s0) + +Index: fedora-policy-20210716/policy/modules/system/systemd.te +=================================================================== +--- fedora-policy-20210716.orig/policy/modules/system/systemd.te ++++ fedora-policy-20210716/policy/modules/system/systemd.te +@@ -1027,6 +1027,8 @@ init_stream_connect(systemd_sysctl_t) + logging_send_syslog_msg(systemd_sysctl_t) + + systemd_read_efivarfs(systemd_sysctl_t) ++# kernel specific sysctl.conf may be in modules dir ++allow systemd_sysctl_t modules_object_t:dir search; + + ####################################### + # diff --git a/selinux-policy.changes b/selinux-policy.changes index 957ec61..2c52444 100644 --- a/selinux-policy.changes +++ b/selinux-policy.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Aug 17 16:03:08 UTC 2021 - Ludwig Nussel + +- Allow systemd-sysctl to read kernel specific sysctl.conf + (fix_kernel_sysctl.patch, boo#1184804) + ------------------------------------------------------------------- Tue Aug 10 08:31:16 UTC 2021 - Ludwig Nussel diff --git a/selinux-policy.spec b/selinux-policy.spec index 86cca83..dce81b7 100644 --- a/selinux-policy.spec +++ b/selinux-policy.spec @@ -131,6 +131,8 @@ Patch051: fix_dovecot.patch # https://github.com/cockpit-project/cockpit/pull/15758 Patch052: fix_cockpit.patch Patch053: fix_systemd_watch.patch +# kernel specific sysctl.conf (boo#1184804) +Patch054: fix_kernel_sysctl.patch Patch100: sedoctool.patch