pick: Add initial support for libsubid #3476
Open
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.
Pick and adapt apptainer/apptainer#2433
Original description:
This commit adds support for remote access to /etc/subuid and /etc/subgid mappings from ldap services using libsubid. Requires shadow-utils + libsubid.
Code ported from podman / container storage.
Additional adaptation:
fakeroot: don't use libsubid in config fakeroot operations
When reading or modifying an
/etc/sub[ug]id
file, via theconfig fakeroot
commands, don't consider libsubid results.Prevents e.g.
config fakeroot --remove user
giving a confusing failure whenuser
is not in the file, but present in results from libsubid.Only use
libsubid
for thefakeroot.GetIDRange
function, which is used by the runtime engines to discover applicable ID mapping ranges.Note - no further adapation for OCI mode was needed, as it already works through
fakeroot.GetIDRange
where necessary.Closes #3434
Closes #3435