Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pick: Add initial support for libsubid #3476

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dtrudg
Copy link
Member

@dtrudg dtrudg commented Jan 15, 2025

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 the config fakeroot commands, don't consider libsubid results.

Prevents e.g. config fakeroot --remove user giving a confusing failure when user is not in the file, but present in results from libsubid.

Only use libsubid for the fakeroot.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

@dtrudg dtrudg self-assigned this Jan 15, 2025
@dtrudg dtrudg force-pushed the pick-apptainer-libsubid branch from 3614878 to e92814e Compare January 15, 2025 10:48
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.

Signed-off-by: Andrew E. Bruno <[email protected]>
@dtrudg dtrudg force-pushed the pick-apptainer-libsubid branch from e92814e to 3c962f2 Compare January 15, 2025 11:12
When reading or modifying an `/etc/sub[ug]id` file, via the `config
fakeroot` commands, don't consider libsubid results.

Prevents e.g. `config fakeroot --remove user` giving a confusing failure
when `user` is not in the file, but present in results from libsubid.
@dtrudg dtrudg marked this pull request as ready for review January 15, 2025 13:29
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.

Adapt libsubid support for OCI mode in SingularityCE Pick libsubid support from Apptainer to SingularityCE
2 participants