-
Notifications
You must be signed in to change notification settings - Fork 167
Do not remove SELinux from the runtime #1496
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
Conversation
Pull Request Test Coverage Report for Build 18475283503Details
💛 - Coveralls |
|
This is a part of the effort to have bootc support: rhinstaller/anaconda#6298 |
|
I don't like adding this to the grub cmdline, I think it should be possible to write /etc/selinux/config with the right settings so that it is the default. |
|
@bcl Thanks for the review - to be honest I am not an SELinux expert so any suggestions how to do it right are welcome:) Bootc requires SELinux to be presented in runtime but at the same time we want to keep it turned off as we are not using it. Can you elaborate on this |
|
I think the same affect could be achieved with: ETA: I meant permissive here. No idea how I typoed that. |
91ae644 to
f215669
Compare
f215669 to
d8f6dde
Compare
|
Ok, now with updated code it works better. |
|
@bcl please share you thoughts about the current version :) |
|
Note: we want to keep it turned off as many, many things break when it's turned on. Too many things to diagnose in a release cycle. And it's also probably mostly pointless. The installer is expected to have complete control to modify the current system and use the network to do so. There's not a lot of limitation we could impose on the installer with SELinux that wouldn't cause problems. |
share/templates.d/99-generic/config_files/common/selinux.config
Outdated
Show resolved
Hide resolved
I do not believe this is a good idea:
We experimented with I see another part of this PR adds installing the selinux config file. Was that not being installed before? So maybe we need to test with |
|
I have no idea why I pasted 'disabled' there. I meant permissive. @abadger is correct, with it disabled the labels during a normal install won't get set at all. I'd forgotten that config file existed. According to commit d6584e1 it wasn't working because it would get removed with the selinux-policy package removal -- but now that we are leaving the package in place it should be ok to install it. |
|
@bcl so the right set of flags in the config it should be |
d8f6dde to
e7b6b1c
Compare
* Do not remove SELinux packages when ISO is created
* Make sure that /etc/selinux/config is being deployed
* /etc/selinux/config file content shall be:
* SELINUX=permissive
* SELINUXTYPE=targeted
* Add extra packages which may be required by selinux policies
processing
e7b6b1c to
6aa06a9
Compare
|
@bcl I think now it is working fine. |
Correct.
Nothing extra should be needed, that's the point of putting it into permissive, it will do everything except enforce the restrictions so that the installed files should have the correct labels. |
bcl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me and I've tested it locally.
jstodola
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good to me.
|
Hey @bcl just checking if this will be headed to the rhel10 refresh as well? |
not at this time. That depends on Anaconda requesting a backport and filing an issue for it. |
|
What about ELN lorax-templates-rhel for RHEL 11? ELN anaconda tracks rawhide. |
|
I think it should be added to the ELN templates as well ? Or are we waiting for it to potentially hit RHEL 10 first ? |

selinux=1 enforcing=0