policy: Handle absolute symlinks in system policy path resolution - #2343
Open
Johan-Liebert1 wants to merge 1 commit into
Open
policy: Handle absolute symlinks in system policy path resolution#2343Johan-Liebert1 wants to merge 1 commit into
Johan-Liebert1 wants to merge 1 commit into
Conversation
cgwalters
reviewed
Jul 27, 2026
cgwalters
requested changes
Jul 27, 2026
Johan-Liebert1
force-pushed
the
cap-std-symlink
branch
from
July 28, 2026 05:02
7c28ce7 to
16d2c1b
Compare
cgwalters
previously approved these changes
Jul 28, 2026
Comment on lines
+343
to
+344
| /// procfs because cap-std (by design) refuses to create symlinks with | ||
| /// absolute targets. |
Collaborator
There was a problem hiding this comment.
Collaborator
Author
There was a problem hiding this comment.
This is from cap-std which would error out on absolute symlinks
cap-std refuses to follow absolute symlinks since they would escape the sandbox, returning PermissionDenied. When /etc/containers/policy.json is a symlink to e.g. /usr/share/containers/policy.json, this caused policy resolution to silently skip the file. Switch to `cap_std_ext::RootDir` that handles the above semantics by itself Test written by Claude Fixes: bootc-dev#2339 Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
Johan-Liebert1
force-pushed
the
cap-std-symlink
branch
from
July 29, 2026 07:06
16d2c1b to
6ae6669
Compare
Johan-Liebert1
enabled auto-merge
July 29, 2026 07:06
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.
cap-std refuses to follow absolute symlinks since they would escape the sandbox, returning PermissionDenied. When /etc/containers/policy.json is a symlink to e.g. /usr/share/containers/policy.json, this caused policy resolution to silently skip the file.
Switch to
cap_std_ext::RootDirthat handles the above semantics by itselfTest written by Claude
Fixes: #2339