-
Notifications
You must be signed in to change notification settings - Fork 50
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
fix: Use ignore_selinux_state
module option
#194
fix: Use ignore_selinux_state
module option
#194
Conversation
76fc56a
to
6dabe43
Compare
ignore_selinux_state
module optionignore_selinux_state
module option
[citest] |
lgtm, let's wait for tests. Please update PR description by filling in Enhancement:, Reason:, Result: template. |
Please hold this PR for now. I'll probably make another change booleans settings, Something like the following change could improve the role for SELinux disabled mode. I'm working also on seboolean module change for this.
|
seboolean PR - ansible-collections/ansible.posix#496 |
6dabe43
to
6acedd2
Compare
The PR is updated and if everything pass I think it's ready. It'll be possible to set SELinux booleans when ansible-collections/ansible.posix#496 is accepted and shipped. |
How can we test this? Do we already have a test that attempts to disable selinux then update settings? |
on SELinux disabled system You could simulate SELinux disabled system using
Maybe add a note that it's possible to configure SELinux in disabled mode when selinux-policy-targeted is installed.
All but booleans should work without ansible-collections/ansible.posix#496
No |
6acedd2
to
d82684c
Compare
d82684c
to
1b29f9c
Compare
Note added |
2510ca2
to
9a8b0f0
Compare
It is possible to configure SELinux on nodes with SELinux disabled before they're switch to permissive/enforcing. The only requirement is that targeted SELinux policy (or a policy configured in /etc/selinux/config) needs to be installed. It's also necessary to use seboolean module with `persistent: true` when SELinux is disabled. Fixes: linux-system-roles#188 Signed-off-by: Petr Lautrbach <[email protected]>
Signed-off-by: Petr Lautrbach <[email protected]>
9a8b0f0
to
f9fb73b
Compare
It is possible to configure SELinux on nodes with SELinux disabled before they're switch to permissive/enforcing. The only requirement is that targeted SELinux policy (or a policy configured in /etc/selinux/config) needs to be installed.
Fixes: #188
Note that boolean settings doesn't work work even with
ignore_selinux_state=true
- it's a bug in seboolean module which usesselinux.security_get_boolean_names()
instead ofseobject
API from semanage.Enhancement: SELinux ports, fcontexts, booleans mappings can be configured on nodes with SELinux disabled.
Reason: It should be possible to configure SELinux - ports, fcontexts, booleans - on nodes with SELinux disabled before they're switch to permissive/enforcing.
Result: It is possible to configure SELinux on nodes with SELinux disabled before they're switch to permissive/enforcing.
Issue Tracker Tickets (Jira or BZ if any):