executor/oci.GetUser(): remove unused context
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>v0.8
parent
547db0f588
commit
f26452a847
|
@ -111,7 +111,7 @@ func (w *containerdExecutor) Run(ctx context.Context, id string, root cache.Moun
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
uid, gid, sgids, err = oci.GetUser(ctx, rootfsPath, meta.User)
|
||||
uid, gid, sgids, err = oci.GetUser(rootfsPath, meta.User)
|
||||
if err != nil {
|
||||
lm.Unmount()
|
||||
return err
|
||||
|
|
|
@ -14,7 +14,7 @@ import (
|
|||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
func GetUser(ctx context.Context, root, username string) (uint32, uint32, []uint32, error) {
|
||||
func GetUser(root, username string) (uint32, uint32, []uint32, error) {
|
||||
// fast path from uid/gid
|
||||
if uid, gid, err := ParseUIDGID(username); err == nil {
|
||||
return uid, gid, nil, nil
|
||||
|
|
|
@ -212,7 +212,7 @@ func (w *runcExecutor) Run(ctx context.Context, id string, root cache.Mountable,
|
|||
}
|
||||
defer mount.Unmount(rootFSPath, 0)
|
||||
|
||||
uid, gid, sgids, err := oci.GetUser(ctx, rootFSPath, meta.User)
|
||||
uid, gid, sgids, err := oci.GetUser(rootFSPath, meta.User)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -385,7 +385,7 @@ func (w *runcExecutor) Exec(ctx context.Context, id string, process executor.Pro
|
|||
}
|
||||
|
||||
if process.Meta.User != "" {
|
||||
uid, gid, sgids, err := oci.GetUser(ctx, state.Rootfs, process.Meta.User)
|
||||
uid, gid, sgids, err := oci.GetUser(state.Rootfs, process.Meta.User)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue