mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Fix RunAsRoot arguments forwarding
It was including the path to the executable twice in the arguments. PiperOrigin-RevId: 211098311 Change-Id: I5357c51c63f38dfab551b17bb0e04011a0575010
This commit is contained in:
committed by
Shentubot
parent
3f04bd68b2
commit
e669697241
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user