Repository navigation
refactor(sandbox): remove the unused Landlock root allow-list helper - #5221
Merged
FrostGod merged 1 commit intoNov 4, 2026
Merged
Conversation
The root allow-list was implemented twice: open_root_allowlist and RootEntryHandle in linux/landlock.rs were documented as the audited primitive but had no production caller, while the capability-free baseline enumerates the root itself in sandbox/linux/landlock.rs. Remove the unused helper, its handle type, their tests, and the dead imports, so the audited module describes only what runs. abi_version stays; it backs probe_availability. Reword the baseline's private-root comment to match the code: the descriptor backs only the eager O_DIRECTORY|O_NOFOLLOW validation and is dropped before enumeration, which excludes the private name and opens every entry with O_NOFOLLOW. Closes NVIDIA#5190 Signed-off-by: Emilien Macchi <emacchi@redhat.com>
3 tasks
Collaborator
|
/ok to test 23165ba |
TaylorMutch
approved these changes
Nov 3, 2026
TaylorMutch
left a comment
Collaborator
There was a problem hiding this comment.
Reviewed the complete diff and verified that the removed root allow-list helper has no production callers. Runtime Landlock enforcement and ABI probing remain unchanged, and the revised comment accurately describes descriptor lifetime. CI has passed for this commit.
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Nov 3, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Nov 4, 2026
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.
Summary
Removes the unused Landlock root allow-list helper from the audited
linuxmodule so the root enumeration has one implementation, and rewords the capability-free baseline's private-root comment to match what the code does.Related Issue
Closes #5190
Changes
open_root_allowlist,RootEntryHandle,validate_component, and their tests fromcrates/openshell-sandbox/src/linux/landlock.rs.abi_versionstays; it backsprobe_availability. Dead imports pruned, module doc rewritten._private_rootcomment incapability_free_baseline_entries: the descriptor backs only the eagerO_DIRECTORY|O_NOFOLLOWvalidation and is dropped before any per-entry descriptor is opened; exclusion during enumeration is by name plusO_NOFOLLOW.Release Notes
None: dead-code removal and a comment fix, no behavior change.
Testing
cargo fmt --check,cargo clippy -p openshell-sandbox --all-targets -- -D warnings, andcargo test -p openshell-sandbox(284 tests, 0 failures) on the branch rebased on currentmain, including the Landlock baseline regression tests (capability_free_baseline_*). Also merged locally with #5144 (touches the same file) andcargo checkpasses.Checklist