summaryrefslogtreecommitdiffhomepage
path: root/runsc
diff options
context:
space:
mode:
authorFabricio Voznika <fvoznika@google.com>2018-08-31 09:44:31 -0700
committerShentubot <shentubot@google.com>2018-08-31 09:45:32 -0700
commite669697241e9774f1a1e4ab609dde933a0563ba6 (patch)
tree020bf11e2a47c2ed634f0569821d26f55859c209 /runsc
parent3f04bd68b24c939b2342047dd022837c3b1b6085 (diff)
Fix RunAsRoot arguments forwarding
It was including the path to the executable twice in the arguments. PiperOrigin-RevId: 211098311 Change-Id: I5357c51c63f38dfab551b17bb0e04011a0575010
Diffstat (limited to 'runsc')
-rw-r--r--runsc/test/testutil/testutil.go2
1 files changed, 1 insertions, 1 deletions
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.