1 |
commit: 82e30f21ab85b6de3ebc45ae10b28b9bd280e4a1 |
2 |
Author: Jonathan Davies <jpds <AT> protonmail <DOT> com> |
3 |
AuthorDate: Thu Apr 8 21:01:11 2021 +0000 |
4 |
Commit: Jason Zaman <perfinion <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jul 5 19:41:35 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=82e30f21 |
7 |
|
8 |
eclass/selinux-policy-2: Skip unconfined on MCS/MLS policy types |
9 |
|
10 |
Closes: https://github.com/gentoo/gentoo/pull/20308 |
11 |
Signed-off-by: Jonathan Davies <jpds <AT> protonmail.com> |
12 |
Signed-off-by: Jason Zaman <perfinion <AT> gentoo.org> |
13 |
|
14 |
eclass/selinux-policy-2.eclass | 13 +++++++++---- |
15 |
1 file changed, 9 insertions(+), 4 deletions(-) |
16 |
|
17 |
diff --git a/eclass/selinux-policy-2.eclass b/eclass/selinux-policy-2.eclass |
18 |
index 5def86fbef9..1af7ba3a80b 100644 |
19 |
--- a/eclass/selinux-policy-2.eclass |
20 |
+++ b/eclass/selinux-policy-2.eclass |
21 |
@@ -1,4 +1,4 @@ |
22 |
-# Copyright 1999-2020 Gentoo Authors |
23 |
+# Copyright 1999-2021 Gentoo Authors |
24 |
# Distributed under the terms of the GNU General Public License v2 |
25 |
|
26 |
# Eclass for installing SELinux policy, and optionally |
27 |
@@ -263,10 +263,15 @@ selinux-policy-2_pkg_postinst() { |
28 |
local COMMAND |
29 |
|
30 |
for i in ${POLICY_TYPES}; do |
31 |
- if [[ "${i}" == "strict" ]] && [[ "${MODS}" = "unconfined" ]]; then |
32 |
- einfo "Ignoring loading of unconfined module in strict module store."; |
33 |
- continue; |
34 |
+ if [[ "${MODS}" = "unconfined" ]]; then |
35 |
+ case ${i} in |
36 |
+ strict|mcs|mls) |
37 |
+ einfo "Ignoring loading of unconfined module in ${i} module store."; |
38 |
+ continue |
39 |
+ ;; |
40 |
+ esac |
41 |
fi |
42 |
+ |
43 |
einfo "Inserting the following modules into the $i module store: ${MODS}" |
44 |
|
45 |
cd "${ROOT%/}/usr/share/selinux/${i}" || die "Could not enter /usr/share/selinux/${i}" |