Skip to content

Conversation

@cgwalters
Copy link
Collaborator

Apply system_u:object_r:usr_t:s0 context to readonly virtiofs mounts to avoid SELinux denials when accessing them as container storage. This allows readonly bind mounts to work correctly with podman.

The function was renamed from generate_mount_unit to generate_virtiofs_mount_unit for clarity.

Assisted-by: Claude Code (Sonnet 4.5)

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a default SELinux context for readonly virtiofs mounts to resolve issues with container storage. The change is well-contained and also includes a function rename from generate_mount_unit to generate_virtiofs_mount_unit for better clarity. My review focuses on the hardcoded SELinux context, suggesting an improvement to make it more maintainable by using a constant. Overall, this is a good improvement.

Apply system_u:object_r:usr_t:s0 context to readonly virtiofs mounts
to avoid SELinux denials when accessing them as container storage.
This allows readonly bind mounts to work correctly with podman.

The function was renamed from generate_mount_unit to
generate_virtiofs_mount_unit for clarity.

Assisted-by: Claude Code (Sonnet 4.5)
Signed-off-by: Colin Walters <[email protected]>
@cgwalters cgwalters force-pushed the bind-storage-ro-selinux branch from cf26e0f to 36367a3 Compare November 21, 2025 21:55
@cgwalters cgwalters enabled auto-merge (rebase) November 24, 2025 13:33
@cgwalters cgwalters merged commit a5a9c4b into bootc-dev:main Nov 24, 2025
11 of 13 checks passed
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