Skip to content

Conversation

@himaja-kesari
Copy link
Contributor

@himaja-kesari himaja-kesari commented Oct 20, 2025

This PR enhances the SELinux mode detection in BootCustomizer by implementing robust fallback logic between GRUB configuration variables and providing comprehensive error reporting. The changes improve reliability when detecting SELinux configuration in different GRUB setups, particularly for Fedora distributions.

Problem:
The existing SELinux mode detection logic in getSELinuxModeFromGrub() was fragile and could fail when:

GRUB_CMDLINE_LINUX variable was not present in grub
Only GRUB_CMDLINE_LINUX_DEFAULT contained the SELinux configuration

changes made :
Try to extract SELinux args from GRUB_CMDLINE_LINUX (higher priority) and also GRUB_CMDLINE_LINUX_DEFAULT
Enhanced error reporting: Capture and report both errors if both attempts fail

Checklist

  • Tests added/updated
  • Documentation updated (if needed)
  • Code conforms to style guidelines

@himaja-kesari himaja-kesari requested a review from a team as a code owner October 20, 2025 20:30
@himaja-kesari himaja-kesari requested a review from cwize1 October 22, 2025 00:04
@himaja-kesari himaja-kesari requested a review from cwize1 October 22, 2025 22:36
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