summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Davies <jpds@protonmail.com>2021-04-08 22:01:11 +0100
committerJason Zaman <perfinion@gentoo.org>2021-07-05 21:41:35 +0200
commit82e30f21ab85b6de3ebc45ae10b28b9bd280e4a1 (patch)
treefa318796c8e79545697e72d49f5efacaaffee747 /eclass/selinux-policy-2.eclass
parentprofiles/arch/riscv: slurm-related mask adjustments (diff)
downloadgentoo-82e30f21ab85b6de3ebc45ae10b28b9bd280e4a1.tar.gz
gentoo-82e30f21ab85b6de3ebc45ae10b28b9bd280e4a1.tar.bz2
gentoo-82e30f21ab85b6de3ebc45ae10b28b9bd280e4a1.zip
eclass/selinux-policy-2: Skip unconfined on MCS/MLS policy types
Closes: https://github.com/gentoo/gentoo/pull/20308 Signed-off-by: Jonathan Davies <jpds@protonmail.com> Signed-off-by: Jason Zaman <perfinion@gentoo.org>
Diffstat (limited to 'eclass/selinux-policy-2.eclass')
-rw-r--r--eclass/selinux-policy-2.eclass13
1 files changed, 9 insertions, 4 deletions
diff --git a/eclass/selinux-policy-2.eclass b/eclass/selinux-policy-2.eclass
index 5def86fbef9..1af7ba3a80b 100644
--- a/eclass/selinux-policy-2.eclass
+++ b/eclass/selinux-policy-2.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# Eclass for installing SELinux policy, and optionally
@@ -263,10 +263,15 @@ selinux-policy-2_pkg_postinst() {
local COMMAND
for i in ${POLICY_TYPES}; do
- if [[ "${i}" == "strict" ]] && [[ "${MODS}" = "unconfined" ]]; then
- einfo "Ignoring loading of unconfined module in strict module store.";
- continue;
+ if [[ "${MODS}" = "unconfined" ]]; then
+ case ${i} in
+ strict|mcs|mls)
+ einfo "Ignoring loading of unconfined module in ${i} module store.";
+ continue
+ ;;
+ esac
fi
+
einfo "Inserting the following modules into the $i module store: ${MODS}"
cd "${ROOT%/}/usr/share/selinux/${i}" || die "Could not enter /usr/share/selinux/${i}"