mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
runsc: pass the GLIBC_TUNABLES env to the sandbox process
It is required to disable rseq for runsc-race. PiperOrigin-RevId: 653752784
This commit is contained in:
@@ -811,6 +811,11 @@ func (s *Sandbox) createSandboxProcess(conf *config.Config, args *Args, startSyn
|
||||
if !conf.TestOnlyAllowRunAsCurrentUserWithoutChroot {
|
||||
// Setting cmd.Env = nil causes cmd to inherit the current process's env.
|
||||
cmd.Env = []string{}
|
||||
// runsc-race with glibc needs to disable rseq.
|
||||
glibcTunables := os.Getenv("GLIBC_TUNABLES")
|
||||
if glibcTunables != "" {
|
||||
cmd.Env = append(cmd.Env, fmt.Sprintf("GLIBC_TUNABLES=%s", glibcTunables))
|
||||
}
|
||||
}
|
||||
|
||||
// If there is a gofer, sends all socket ends to the sandbox.
|
||||
|
||||
Reference in New Issue
Block a user