diff options
author | Fabricio Voznika <fvoznika@google.com> | 2018-08-31 09:44:31 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-08-31 09:45:32 -0700 |
commit | e669697241e9774f1a1e4ab609dde933a0563ba6 (patch) | |
tree | 020bf11e2a47c2ed634f0569821d26f55859c209 /runsc/test | |
parent | 3f04bd68b24c939b2342047dd022837c3b1b6085 (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/test')
-rw-r--r-- | runsc/test/testutil/testutil.go | 2 |
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. |