diff options
author | Andrei Vagin <avagin@google.com> | 2019-01-22 16:45:45 -0800 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2019-01-22 16:46:42 -0800 |
commit | 5f08f8fd8162fa2fc2ca7b862263081d8d07b206 (patch) | |
tree | df94de296220411b976f5730f71f6495ea1dc650 /runsc/cmd/cmd.go | |
parent | ceb3dcfb72fe050bb0d90a7285cd1b56d1b4dfeb (diff) |
Don't bind-mount runsc into a sandbox mntns
PiperOrigin-RevId: 230437407
Change-Id: Id9d8ceeb018aad2fe317407c78c6ee0f4b47aa2b
Diffstat (limited to 'runsc/cmd/cmd.go')
-rw-r--r-- | runsc/cmd/cmd.go | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/runsc/cmd/cmd.go b/runsc/cmd/cmd.go index fbfc18fc9..208cf5304 100644 --- a/runsc/cmd/cmd.go +++ b/runsc/cmd/cmd.go @@ -80,13 +80,10 @@ func setCapsAndCallSelf(args []string, caps *specs.LinuxCapabilities) error { if err := applyCaps(caps); err != nil { return fmt.Errorf("applyCaps() failed: %v", err) } - binPath, err := specutils.BinPath() - if err != nil { - return err - } + binPath := specutils.ExePath log.Infof("Execve %q again, bye!", binPath) - err = syscall.Exec(binPath, args, []string{}) + err := syscall.Exec(binPath, args, []string{}) return fmt.Errorf("error executing %s: %v", binPath, err) } @@ -105,7 +102,7 @@ func callSelfAsNobody(args []string) error { return fmt.Errorf("error setting gid: %v", err) } - binPath := "/runsc" + binPath := specutils.ExePath log.Infof("Execve %q again, bye!", binPath) err := syscall.Exec(binPath, args, []string{}) |