8000 pkg/oci: add WithAppendAdditionalGIDs option, add fast-path to WithAppendAdditionalGroups by thaJeztah · Pull Request #11974 · containerd/containerd · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

pkg/oci: add WithAppendAdditionalGIDs option, add fast-path to WithAppendAdditionalGroups #11974

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

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

Conversation

thaJeztah
Copy link
Member

pkg/oci: add WithAppendAdditionalGIDs option

This option allows setting additional GIDs for the process, similar to
WithAppendAdditionalGroups, but without involving resolving group-name
to GIDs. This allows adding additional groups in situations where the
GIDs have already been resolved.

pkg/oci: add fast-path to WithAppendAdditionalGroups option

WithAppendAdditionalGroups was unconditionally resolving group-names and,
because of that, requiring /etc/group to be present (and a read-only
mount to be created).

In situations where all groups passed are numeric IDs, we can skip those
steps, and add the GIDs directly without performing a lookup.

This option allows setting additional GIDs for the process, similar to
WithAppendAdditionalGroups, but without involving resolving group-name
to GIDs. This allows adding additional groups in situations where the
GIDs have already been resolved.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
WithAppendAdditionalGroups was unconditionally resolving group-names and,
because of that, requiring `/etc/group` to be present (and a read-only
mount to be created).

In situations where all groups passed are numeric IDs, we can skip those
steps, and add the GIDs directly without performing a lookup.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah force-pushed the oci_additionalgids branch from c65352c to cab1d12 Compare June 11, 2025 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Needs Triage
Development

Successfully merging this pull request may close these issues.

2 participants
0