Skip to content
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

Enable selinux for liveos iso flow #11198

Merged
merged 2 commits into from
Dec 17, 2024
Merged

Conversation

gmileka
Copy link
Contributor

@gmileka gmileka commented Nov 23, 2024

Merge Checklist

All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)

  • The toolchain has been rebuilt successfully (or no changes were made to it)
  • The toolchain/worker package manifests are up-to-date
  • Any updated packages successfully build (or no packages were changed)
  • Packages depending on static components modified in this PR (Golang, *-static subpackages, etc.) have had their Release tag incremented.
  • Package tests (%check section) have been verified with RUN_CHECK=y for existing SPEC files, or added to new SPEC files
  • All package sources are available
  • cgmanifest files are up-to-date and sorted (./cgmanifest.json, ./toolkit/scripts/toolchain/cgmanifest.json, .github/workflows/cgmanifest.json)
  • LICENSE-MAP files are up-to-date (./LICENSES-AND-NOTICES/SPECS/data/licenses.json, ./LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md, ./LICENSES-AND-NOTICES/SPECS/LICENSE-EXCEPTIONS.PHOTON)
  • All source files have up-to-date hashes in the *.signatures.json files
  • sudo make go-tidy-all and sudo make go-test-coverage pass
  • Documentation has been updated to match any changes to the build system
  • Ready to merge

Summary

To enable SELinux for the LiveOS ISO flow we need to:

  • update the selinux policies.
    • this is done through the patch to the selinux-policy package.
  • label the new overlay folders with root_t so that they match the expect context of the root /.
    • this is done by adding a new pre-pivot script to the dracut's overlayfs module which will mark the new folders correctly when SELinux is enabled.
Change Log
Does this affect the toolchain?
  • NO
Associated issues
  • #xxxx
Links to CVEs
  • n/a
Test Methodology
  • Build baremetal images with SELinux enabled in enforcing mode.
  • Use MIC to create a LiveOS ISO, boot it, and log-in.

@gmileka gmileka force-pushed the gmileka/enable-selinux-for-iso branch from 31d94c7 to 8bf2c27 Compare December 11, 2024 02:26
@gmileka gmileka marked this pull request as ready for review December 11, 2024 02:29
@gmileka gmileka requested a review from a team as a code owner December 11, 2024 02:29
Copy link
Contributor

@pebenito pebenito left a comment

Choose a reason for hiding this comment

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

A couple minor comments, otherwise looks good to me.

SPECS/selinux-policy/0038-enable-liveos-iso-flow.patch Outdated Show resolved Hide resolved
SPECS/selinux-policy/0038-enable-liveos-iso-flow.patch Outdated Show resolved Hide resolved
@gmileka gmileka changed the title Enable selinux for liveos iso flow. Enable selinux for liveos iso flow Dec 11, 2024
@gmileka gmileka merged commit 05db65d into 3.0-dev Dec 17, 2024
13 checks passed
@gmileka gmileka deleted the gmileka/enable-selinux-for-iso branch December 17, 2024 19:14
durgajagadeesh pushed a commit to durgajagadeesh/azurelinux_djpalli that referenced this pull request Dec 31, 2024
durgajagadeesh pushed a commit to durgajagadeesh/azurelinux_djpalli that referenced this pull request Dec 31, 2024
aninda-al pushed a commit to aninda-al/azurelinux-test that referenced this pull request Jan 3, 2025
JocelynBerrendonner pushed a commit to JocelynBerrendonner/azurelinux that referenced this pull request Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants