1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Update lxc with libcontainer SetupUser change

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby 2015-01-12 10:43:33 -08:00
parent 115d8bac60
commit 582a79f00a

View file

@ -2,6 +2,8 @@ package lxc
import ( import (
"fmt" "fmt"
"github.com/docker/libcontainer"
"github.com/docker/libcontainer/namespaces" "github.com/docker/libcontainer/namespaces"
"github.com/docker/libcontainer/utils" "github.com/docker/libcontainer/utils"
) )
@ -10,14 +12,13 @@ func finalizeNamespace(args *InitArgs) error {
if err := utils.CloseExecFrom(3); err != nil { if err := utils.CloseExecFrom(3); err != nil {
return err return err
} }
if err := namespaces.SetupUser(&libcontainer.Config{
if err := namespaces.SetupUser(args.User); err != nil { User: args.User,
}); err != nil {
return fmt.Errorf("setup user %s", err) return fmt.Errorf("setup user %s", err)
} }
if err := setupWorkingDirectory(args); err != nil { if err := setupWorkingDirectory(args); err != nil {
return err return err
} }
return nil return nil
} }