diff --git a/internal/executor/sandbox/executor.go b/internal/executor/sandbox/executor.go index 39f2461..d8d3e4f 100644 --- a/internal/executor/sandbox/executor.go +++ b/internal/executor/sandbox/executor.go @@ -103,6 +103,9 @@ func (e *Sandbox) runWithTar(cmds []stage.Cmd, tarData []byte) ([]stage.Executor tarCmd := stage.Cmd{ Args: []string{"/bin/tar", "xf", tarFileName, "-C", "/w"}, Env: cmds[0].Env, + Stdin: &stage.CmdFile{Content: strPtr("")}, + Stdout: &stage.CmdFile{Name: strPtr("__tar_stdout"), Max: int64Ptr(1)}, + Stderr: &stage.CmdFile{Name: strPtr("__tar_stderr"), Max: int64Ptr(1)}, CPULimit: cmds[0].CPULimit, ClockLimit: cmds[0].ClockLimit, MemoryLimit: cmds[0].MemoryLimit, @@ -326,3 +329,7 @@ func (e *Sandbox) Cleanup() error { } return nil } + +func strPtr(s string) *string { return &s } + +func int64Ptr(i int64) *int64 { return &i }