From 9f739e0429cffd9b994cba4f7131527c7a228410 Mon Sep 17 00:00:00 2001 From: Mrunal Patel Date: Fri, 6 Nov 2015 14:08:50 -0500 Subject: [PATCH] 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 --- exec.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/exec.go b/exec.go index e46e2ebc..afb4c6d9 100644 --- a/exec.go +++ b/exec.go @@ -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)