Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable selinux for all flavors #1022

Merged
merged 1 commit into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/static/kairos-overlay-files/collection.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
packages:
- name: "kairos-overlay-files"
category: "static"
version: "1.1.46"
version: "1.1.47"
22 changes: 13 additions & 9 deletions packages/static/kairos-overlay-files/files/etc/cos/bootargs.cfg
Original file line number Diff line number Diff line change
@@ -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
set baseSelinuxCmd="selinux=0"
else
# if not in recovery
if [ -z "$recoverylabel" ];then
set baseSelinuxCmd="security=selinux selinux=1"
fi
fi

# Disable selinux for all distros. Supporting selinux requires more than
# just enabling it like this.
set baseSelinuxCmd="selinux=0"

#if test $KAIROS_FAMILY == "rhel" -o test $ID == "opensuse-tumbleweed" -o test $ID == "opensuse-leap"; then
mauromorales marked this conversation as resolved.
Show resolved Hide resolved
# set baseSelinuxCmd="selinux=0"
#else
# # if not in recovery
# if [ -z "$recoverylabel" ];then
# set baseSelinuxCmd="security=selinux selinux=1"
# fi
#fi
}

function setExtraConsole {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading