summaryrefslogtreecommitdiff
path: root/.gitignore
diff options
context:
space:
mode:
authorW. Trevor King <wking@tremily.us>2018-12-04 11:46:17 -0800
committerW. Trevor King <wking@tremily.us>2018-12-04 12:00:42 -0800
commit650f95cb06cb5a4e979fbe9f9fcd125a229e4e09 (patch)
tree596e05f14d58d6993667452ce3c111642f593da8 /.gitignore
parent480a179f019c343d8f778c0e0576390e7130b375 (diff)
downloadpodman-650f95cb06cb5a4e979fbe9f9fcd125a229e4e09.tar.gz
podman-650f95cb06cb5a4e979fbe9f9fcd125a229e4e09.tar.bz2
podman-650f95cb06cb5a4e979fbe9f9fcd125a229e4e09.zip
libpod/container_internal_linux: Allow gids that aren't in the group file
When an image config sets config.User [1] to a numeric group (like 1000:1000), but those values do not exist in the container's /etc/group, libpod is currently breaking: $ podman run --rm registry.svc.ci.openshift.org/ci-op-zvml7cd6/pipeline:installer --help error creating temporary passwd file for container 228f6e9943d6f18b93c19644e9b619ec4d459a3e0eb31680e064eeedf6473678: unable to get gid 1000 from group file: no matching entries in group file However, the OCI spec requires converters to copy numeric uid and gid to the runtime config verbatim [2]. With this commit, I'm frontloading the "is groupspec an integer?" check and only bothering with lookup.GetGroup when it was not. I've also removed a few .Mounted checks, which are originally from 00d38cb3 (podman create/run need to load information from the image, 2017-12-18, #110). We don't need a mounted container filesystem to translate integers. And when the lookup code needs to fall back to the mounted root to translate names, it can handle erroring out internally (and looking it over, it seems to do that already). [1]: https://github.com/opencontainers/image-spec/blame/v1.0.1/config.md#L118-L123 [2]: https://github.com/opencontainers/image-spec/blame/v1.0.1/conversion.md#L70 Signed-off-by: W. Trevor King <wking@tremily.us>
Diffstat (limited to '.gitignore')
0 files changed, 0 insertions, 0 deletions