Skip to content

stop using fixfiles relabel in remediations#13738

Merged
Mab879 merged 2 commits into
ComplianceAsCode:masterfrom
vojtapolasek:selinux_fixfiles
Jul 23, 2025
Merged

stop using fixfiles relabel in remediations#13738
Mab879 merged 2 commits into
ComplianceAsCode:masterfrom
vojtapolasek:selinux_fixfiles

Conversation

@vojtapolasek
Copy link
Copy Markdown
Collaborator

Description:

  • make following modifications to selinux_state and selinux_not_disabled rules:
    • stop using fixfiles -F relabel
    • enhance the description to inform that fixfiles onboot should be used and the system should be rebooted
    • add Ansible task which basically does the same thing as if fixfiles onboot would be run

Rationale:

  • there is no policy which mandates fixfiles relabel to be actually used, fixfiles onboot should be enough

  • Moreover, the current implementation is inconsistent - Bash remediation is not the same as Ansible.

  • Also the current Bash remediation clears the /tmp directory and that is not expected.

  • Fixes https://issues.redhat.com/browse/RHEL-99311

Review Hints:

Run Automatus tests.

use fixfiles onboot only
update rule description, Ansible and Bash
@vojtapolasek vojtapolasek added this to the 0.1.78 milestone Jul 23, 2025
@vojtapolasek vojtapolasek added bugfix Fixes to reported bugs. Ansible Ansible remediation update. Bash Bash remediation update. Update Rule Issues or pull requests related to Rules updates. labels Jul 23, 2025
@Mab879 Mab879 self-assigned this Jul 23, 2025
@Mab879 Mab879 merged commit 4744a72 into ComplianceAsCode:master Jul 23, 2025
128 of 129 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ansible Ansible remediation update. Bash Bash remediation update. bugfix Fixes to reported bugs. Update Rule Issues or pull requests related to Rules updates.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants