From e669697241e9774f1a1e4ab609dde933a0563ba6 Mon Sep 17 00:00:00 2001 From: Fabricio Voznika Date: Fri, 31 Aug 2018 09:44:31 -0700 Subject: [PATCH] Fix RunAsRoot arguments forwarding It was including the path to the executable twice in the arguments. PiperOrigin-RevId: 211098311 Change-Id: I5357c51c63f38dfab551b17bb0e04011a0575010 --- runsc/test/testutil/testutil.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runsc/test/testutil/testutil.go b/runsc/test/testutil/testutil.go index 4a1c37105..4429b981b 100644 --- a/runsc/test/testutil/testutil.go +++ b/runsc/test/testutil/testutil.go @@ -254,7 +254,7 @@ func RunAsRoot(m *testing.M) { runtime.LockOSThread() defer runtime.UnlockOSThread() - cmd := exec.Command("/proc/self/exe", os.Args...) + cmd := exec.Command("/proc/self/exe", os.Args[1:]...) cmd.SysProcAttr = &syscall.SysProcAttr{ Cloneflags: syscall.CLONE_NEWUSER | syscall.CLONE_NEWNS, // Set current user/group as root inside the namespace.