MCPcopy Index your code
hub / github.com/containerd/containerd / WithUIDOwner

Function WithUIDOwner

client/task_opts_unix.go:59–68  ·  view source on GitHub ↗

WithUIDOwner allows console I/O to work with the remapped UID in user namespace

(uid uint32)

Source from the content-addressed store, hash-verified

57
58// WithUIDOwner allows console I/O to work with the remapped UID in user namespace
59func WithUIDOwner(uid uint32) NewTaskOpts {
60 return func(ctx context.Context, c *Client, ti *TaskInfo) error {
61 opts, err := ti.getRuncOptions()
62 if err != nil {
63 return err
64 }
65 opts.IoUid = uid
66 return nil
67 }
68}
69
70// WithGIDOwner allows console I/O to work with the remapped GID in user namespace
71func WithGIDOwner(gid uint32) NewTaskOpts {

Callers 1

Calls 1

getRuncOptionsMethod · 0.80

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…