Skip to content

Commit 4d629f3

Browse files
Ian Campbellestesp
authored andcommitted
oci: Update docs for oci.WithUserID
The behaviour was changed in 99df1a9 ("Set gid 0 when no group is specified"), part of #2529. Take the opportunity to tighten up the grammar a bit too. Signed-off-by: Ian Campbell <[email protected]> Signed-off-by: Phil Estes <[email protected]>
1 parent 087dc69 commit 4d629f3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

oci/spec_opts_unix.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,8 +348,8 @@ func WithUIDGID(uid, gid uint32) SpecOpts {
348348

349349
// WithUserID sets the correct UID and GID for the container based
350350
// on the image's /etc/passwd contents. If /etc/passwd does not exist,
351-
// or uid is not found in /etc/passwd, it sets gid to be the same with
352-
// uid, and not returns error.
351+
// or uid is not found in /etc/passwd, it sets the requested uid,
352+
// additionally sets the gid to 0, and does not return an error.
353353
func WithUserID(uid uint32) SpecOpts {
354354
return func(ctx context.Context, client Client, c *containers.Container, s *specs.Spec) (err error) {
355355
setProcess(s)

0 commit comments

Comments
 (0)