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

Set SELinux in permissive mode on recovery, leave default on active #1395

Merged
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
7 changes: 7 additions & 0 deletions .obs/dockerfile/micro-k3s-selinux-os/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,10 @@ RUN rm -rf /var/log/update* && \

# Rebuild initrd to setup dracut with the boot configurations
RUN elemental init --force elemental-rootfs,elemental-sysroot,grub-config,dracut-config,cloud-config-essentials,elemental-setup,boot-assessment

# Set SELinux, this should be the default and not needed anymore as soon as SELinux
# is fully supported. Manually set here in a hacky way for testing purposes only
RUN sed -i "s|SELINUX=.*|SELINUX=enforcing|g" /etc/selinux/config && \
sed -i "s| enforcing=0||g" /etc/elemental/bootargs.cfg && \
sed -i "s|selinux=0|enforcing=0|g" /etc/elemental/bootargs.cfg && \
sed -i "s| selinux=1||g" /etc/elemental/bootargs.cfg
7 changes: 7 additions & 0 deletions .obs/dockerfile/micro-rke2-selinux-os/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,10 @@ RUN rm -rf /var/log/update* && \

# Rebuild initrd to setup dracut with the boot configurations
RUN elemental init --force elemental-rootfs,elemental-sysroot,grub-config,dracut-config,cloud-config-essentials,elemental-setup,boot-assessment

# Set SELinux, this should be the default and not needed anymore as soon as SELinux
# is fully supported. Manually set here in a hacky way for testing purposes only
RUN sed -i "s|SELINUX=.*|SELINUX=enforcing|g" /etc/selinux/config && \
sed -i "s| enforcing=0||g" /etc/elemental/bootargs.cfg && \
sed -i "s|selinux=0|enforcing=0|g" /etc/elemental/bootargs.cfg && \
sed -i "s| selinux=1||g" /etc/elemental/bootargs.cfg
Loading