Skip to content

[ENHANCEMENT] Update all states that currently use file.* to set SELinux labels #653

Closed

Description

@ferricoxide

Is your feature request related to a problem? Please describe.

This project has been running since September of 2014. The first state-handler that included setting of SELinux labels was October 28, 2014 (ash-linux/el6/STIGbyID/cat2/V38667.sls). At that point in time, the method selected for setting SELinux labes was to use the file.managed state's selinux parameter (available since Saltstack 3000).

Since SaltStack 2017.7.0, SaltStack added better, dedicated SELinux states for updating SELinux labels on filesystem objects. This project never switched over to that method. Recent compatibility issues with the file.managed state's selinux parameter-handler have been uncovered when used for AL2023 and RHEL (and derived-distros) 10. PR #652 was the first address such compatibility issues with the new capability.

Describe the solution you'd like

Retrofit the capabilities/methods used for PR #652 into handlers still using the file.managed state's selinux parameter. As of the opening of this ticket, that should cover the files:

  • ash-linux/el8/VendorSTIG/aws_cli_v2.sls
  • ash-linux/el8/STIGbyID/cat2/RHEL-08-pam_faillock.sls
  • ash-linux/el8/STIGbyID/cat2/RHEL-08-020040.sls
  • ash-linux/el8/STIGbyID/cat2/RHEL-08-010490.sls
  • ash-linux/el8/STIGbyID/cat1/RHEL-08-010150.sls
  • ash-linux/el8/STIGbyID/cat1/RHEL-08-010140.sls
  • ash-linux/el9/VendorSTIG/aws_cli_v2.sls
  • ash-linux/el9/STIGbyID/cat2/RHEL-09-651025.sls
  • ash-linux/el9/STIGbyID/cat2/ALMA-09-030490.sls
  • ash-linux/el9/STIGbyID/cat2/RHEL-09-213105.sls
  • ash-linux/el9/STIGbyID/cat2/RHEL-09-654140.sls
  • ash-linux/el9/STIGbyID/cat2/RHEL-09-255120.sls
  • ash-linux/el9/STIGbyID/cat2/RHEL-09-611170.sls
  • ash-linux/el9/STIGbyID/cat2/RHEL-09-213065.sls
  • ash-linux/el9/STIGbyID/cat2/RHEL-09-291010.sls
  • ash-linux/el9/STIGbyID/cat2/ALMA-09-030380.sls
  • ash-linux/el9/STIGbyID/cat2/ALMA-09-052490.sls
  • ash-linux/el9/STIGbyID/cat2/RHEL-09-654270.sls
  • ash-linux/el9/STIGbyID/cat2/RHEL-09-654025.sls
  • ash-linux/el9/STIGbyID/cat2/RHEL-09-654080.sls
  • ash-linux/el9/RuleById/high/content_rule_grub2_uefi_password.sls
  • ash-linux/el9/RuleById/medium/content_rule_mount_option_tmp_noexec.sls
  • ash-linux/el9/RuleById/medium/content_rule_configure_tmux_lock_after_time.sls
  • ash-linux/el9/RuleById/medium/content_rule_configure_bashrc_exec_tmux.sls
  • ash-linux/el9/RuleById/medium/content_rule_configure_tmux_lock_command.sls
  • ash-linux/el9/RuleById/medium/content_rule_chronyd_server_directive.sls

Describe alternatives you've considered

Using restorecon -F, via SaltStack's cmd.run module (see branch-history for PR #651). This would have been a good method prior to SaltStack 2017.7.0, however "native" modules are generally preferred over cmd.run types of solutions.

Additional context

Activity

  1. self-assigned this
    on Oct 16, 2026
  2. ferricoxide commented on Oct 16, 2026

    @ferricoxide
    MemberAuthor

    Working resolution… See fork/branch: ENHANCEMENT/Issue_653.

  3. ferricoxide commented on Oct 19, 2026

    @ferricoxide
    MemberAuthor

    Closed by #654

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions