Repository navigation
SELinux: Relabel the confext and sysexts correctly - #4385
Merged
Merged
Conversation
chewi
force-pushed
the
chewi/relabel-exts
branch
from
November 17, 2026 12:19
3d96253 to
3c751d7
Compare
We have been relabelling /etc (for the confext) already, but this was broken in CI and other systems where SELinux was enabled on the host, even when it was permissive. We were previously not relabelling sysexts at all, but they were still picking up the container_file_t label from Docker. systemd-repart was silently dropping our labels because they couldn't be applied to its staging directory within Docker's overlay. The staging directory needs to be on a bind mount instead. Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
chewi
force-pushed
the
chewi/relabel-exts
branch
from
November 17, 2026 13:03
3c751d7 to
3049fd5
Compare
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
SELinux label preservation, execution domains, and standalone boot and container behavior require human validation on SELinux-enabled builders because the reported amd64 Kola run also includes separate ZFS fixes.
No open issues 🎉
1 resolved since last review
Review effort: Balanced
1 of 2 tasks
tormath1
approved these changes
Nov 17, 2026
tormath1
left a comment
Contributor
There was a problem hiding this comment.
That looks good to me - I think this might solve some calico denials as well (projectcalico/calico#13685 (comment))
3 tasks
This branch is waiting to be deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

We have been relabelling /etc (for the confext) already, but this was broken in CI and other systems where SELinux was enabled on the host, even when it was permissive.
We were previously not relabelling sysexts at all, but they were still picking up the
container_file_tlabel from Docker.systemd-repart was silently dropping our labels because they couldn't be applied to its staging directory within Docker's overlay. The staging directory needs to be on a bind mount instead.
This is basically a subset of #1517. Relabelling the entire system still results in heavy breakage.
How to use
Run
ls -lZagainst locations like /etc and /usr/bin/docker*. There should be no instance ofcontainer_file_t.Testing done
I have manually inspected the CI build. Kola passed for amd64 on Jenkins, when combined with the ZFS fixes, which were previously still failing without these additional changes. The ZFS fixes will follow in #4377.
changelog/directory (user-facing change, bug fix, security fix, update)/bootand/usrsize, packages, list files for any missing binaries, kernel modules, config files, kernel modules, etc.