Validate process configuration for runc exec

We make sure that the args are present. All other items are optional and default to sensible values.

Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
This commit is contained in:
Mrunal Patel 2015-11-06 14:08:50 -05:00
parent 83d7331acc
commit 9f739e0429
1 changed files with 3 additions and 0 deletions

View File

@ -23,6 +23,9 @@ var execCommand = cli.Command{
if os.Geteuid() != 0 {
logrus.Fatal("runc should be run as root")
}
if config.Args == nil {
logrus.Fatal("args missing in process configuration")
}
status, err := execProcess(context, config)
if err != nil {
logrus.Fatalf("exec failed: %v", err)