Skip to content

Resolve image users when group file is absent#81

Open
puneetdixit200 wants to merge 1 commit into
crossplane:mainfrom
puneetdixit200:fix-missing-user-spec
Open

Resolve image users when group file is absent#81
puneetdixit200 wants to merge 1 commit into
crossplane:mainfrom
puneetdixit200:fix-missing-user-spec

Conversation

@puneetdixit200
Copy link
Copy Markdown

Fixes #30

Summary

  • parse /etc/passwd even when an image rootfs does not include /etc/group
  • preserve primary GID resolution from passwd and simply omit supplementary groups without group data
  • add regression coverage for resolving an image config user with passwd present and group absent

Testing

  • GOMODCACHE=$PWD/.gomodcache GOCACHE=$PWD/.gocache go test ./internal/oci/spec -run 'Test(WithImageConfig|ParsePasswdFiles|WithUser)' -count=1
  • GOMODCACHE=$PWD/.gomodcache GOCACHE=$PWD/.gocache go test ./...
  • PATH=$PWD/.bin:$PATH GOBIN=$PWD/.bin GOMODCACHE=$PWD/.gomodcache GOCACHE=$PWD/.gocache make check-diff
  • git diff --check

Signed-off-by: Puneet Dixit <236133619+puneetdixit200@users.noreply.github.com>
@puneetdixit200 puneetdixit200 force-pushed the fix-missing-user-spec branch from 2bc8159 to a4e5325 Compare May 21, 2026 13:45
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.

Cannot start function container when container user does not exist within crossplane-xfn container

1 participant