mirror of
https://github.com/kairos-io/packages.git
synced 2025-09-17 07:50:16 +00:00
Disable selinux for all flavors (#1022)
because in order to support selinux, we need to do more than just enable it in the cmdline. Fixes https://github.com/kairos-io/kairos/issues/2802 Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
This commit is contained in:
committed by
GitHub
parent
8693ab1602
commit
9a729607cf
@@ -1,4 +1,4 @@
|
||||
packages:
|
||||
- name: "kairos-overlay-files"
|
||||
category: "static"
|
||||
version: "1.1.46"
|
||||
version: "1.1.47"
|
||||
|
@@ -1,14 +1,18 @@
|
||||
function setSelinux {
|
||||
source (loop0)/etc/os-release
|
||||
set baseSelinuxCmd=""
|
||||
if test $KAIROS_FAMILY == "rhel" -o test $ID == "opensuse-tumbleweed" -o test $ID == "opensuse-leap"; then
|
||||
|
||||
# Disable selinux for all distros. Supporting selinux requires more than
|
||||
# just enabling it like this.
|
||||
set baseSelinuxCmd="selinux=0"
|
||||
else
|
||||
# if not in recovery
|
||||
if [ -z "$recoverylabel" ];then
|
||||
set baseSelinuxCmd="security=selinux selinux=1"
|
||||
fi
|
||||
fi
|
||||
|
||||
#if test $KAIROS_FAMILY == "rhel" -o test $ID == "opensuse-tumbleweed" -o test $ID == "opensuse-leap"; then
|
||||
# set baseSelinuxCmd="selinux=0"
|
||||
#else
|
||||
# # if not in recovery
|
||||
# if [ -z "$recoverylabel" ];then
|
||||
# set baseSelinuxCmd="security=selinux selinux=1"
|
||||
# fi
|
||||
#fi
|
||||
}
|
||||
|
||||
function setExtraConsole {
|
||||
|
@@ -4,6 +4,10 @@ stages:
|
||||
- name: "Relabelling"
|
||||
if: |
|
||||
cat /proc/cmdline | grep "selinux=1"
|
||||
# NOTE: restorecon below is labeling all the files recursively, which may
|
||||
# delay booting significantly (we had users reporting 30-minute delays)
|
||||
# When we support selinux, consider whether we need to run it on every boot
|
||||
# or not.
|
||||
commands:
|
||||
- |
|
||||
load_policy -i
|
||||
|
Reference in New Issue
Block a user