diff --git a/namespaces/execin.go b/namespaces/execin.go index d349282e..3e79f4cd 100644 --- a/namespaces/execin.go +++ b/namespaces/execin.go @@ -30,8 +30,8 @@ func ExecIn(container *libcontainer.Config, state *libcontainer.State, args []st panic("unreachable") } -// NsEnter is run after entering the namespace. -func NsEnter(container *libcontainer.Config, nspid int, args []string) error { +// Run a command in a container after entering the namespace. +func NsEnter(container *libcontainer.Config, args []string) error { // clear the current processes env and replace it with the environment // defined on the container if err := LoadContainerEnvironment(container); err != nil { diff --git a/nsinit/nsenter.go b/nsinit/nsenter.go index d3df4f66..743b20a9 100644 --- a/nsinit/nsenter.go +++ b/nsinit/nsenter.go @@ -34,7 +34,7 @@ func nsenterAction(context *cli.Context) { log.Fatalf("cannot enter into namespaces without valid pid: %q", nspid) } - if err := namespaces.NsEnter(container, nspid, args); err != nil { + if err := namespaces.NsEnter(container, args); err != nil { log.Fatalf("failed to nsenter: %s", err) } }