Skip to content

Use restorecon for usbguard config-file SELinux context - #652

Merged
ferricoxide merged 6 commits into
plus3it:masterfrom
ferricoxide:FIX/fix-usbguard-selinux-context
Oct 16, 2026
Merged

ferricoxide merged 6 commits into
plus3it:masterfrom
ferricoxide:FIX/fix-usbguard-selinux-context

Conversation

@ferricoxide

@ferricoxide ferricoxide commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Supercedes #651

Useses native selinux.* states to ensure labels are set both on the active file and in the event that a system-owner relabels the filesystem

Reference Issue (from #651):

Prior method was based on method established before release of SaltStack
2017.7.0. With the 2017.7.0 release, the `selinux.fcontext_policy_applied`
state became available. Use of it, rather than statically-prescribed SELinux
attributes via `file.managed`:

-   Ensures that the labels applied match what `matchpathcon` say they
    should be
-   Ensures that if someone subequently does an system-wide SELinux
    relabel task, the labels don't "drift"
Addition of the STIG rule-ID `RHEL-09-291025` and the associated logic in

  ash-linux/el9/STIGbyID/cat2/RHEL-09-291025.sls

Obviates the need for this rule-handler

@ferricoxide ferricoxide left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/build

*SHOULD* be superfluous when `replace: False` is set

@ferricoxide ferricoxide left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/build

@ferricoxide
ferricoxide requested review from a team October 16, 2026 15:38
@mergify

mergify Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

@ferricoxide
ferricoxide merged commit e26af7f into plus3it:master Oct 16, 2026
20 checks passed
@ferricoxide
ferricoxide deleted the FIX/fix-usbguard-selinux-context branch October 16, 2026 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants