diff --git a/namespaces/nsenter.c b/namespaces/nsenter.c index 7eab421b..9afe2f01 100644 --- a/namespaces/nsenter.c +++ b/namespaces/nsenter.c @@ -117,6 +117,10 @@ void nsenter() } } + if (strcmp(argv[optind], kNsEnter) != 0) { + return; + } + if (init_pid_str == NULL) { print_usage(); exit(1); diff --git a/nsinit/exec.go b/nsinit/exec.go index cef4fcbd..4a38a61b 100644 --- a/nsinit/exec.go +++ b/nsinit/exec.go @@ -50,7 +50,7 @@ func execAction(context *cli.Context) { // the process for execing a new process inside an existing container is that we have to exec ourself // with the nsenter argument so that the C code can setns an the namespaces that we require. Then that -// code path will drop us into the path that we can do the file setup of the namespace and exec the users +// code path will drop us into the path that we can do the final setup of the namespace and exec the users // application. func startInExistingContainer(config *libcontainer.Config, state *libcontainer.State, context *cli.Context) (int, error) { var (