After parsing flags check that the command is nsenter
Signed-off-by: Michael Crosby <michael@docker.com>
This commit is contained in:
parent
5226b39d15
commit
ae9af437f0
|
@ -117,6 +117,10 @@ void nsenter()
|
|||
}
|
||||
}
|
||||
|
||||
if (strcmp(argv[optind], kNsEnter) != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (init_pid_str == NULL) {
|
||||
print_usage();
|
||||
exit(1);
|
||||
|
|
|
@ -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 (
|
||||
|
|
Loading…
Reference in New Issue