diff --git a/cmd/toolsrv/internal/exec/exec.go b/cmd/toolsrv/internal/exec/exec.go index 2c8d7a8..9900294 100644 --- a/cmd/toolsrv/internal/exec/exec.go +++ b/cmd/toolsrv/internal/exec/exec.go @@ -272,11 +272,12 @@ func executeBypassDirect(ctx context.Context, cmd, cwd string, envExtra map[stri defer conn.Close() reqJSON, _ := json.Marshal(struct { - Cmd string `json:"cmd"` - Cwd string `json:"cwd"` - Env map[string]string `json:"env"` - Sudo bool `json:"sudo,omitempty"` - }{Cmd: cmd, Cwd: cwd, Env: envMap, Sudo: sudo}) + Cmd string `json:"cmd"` + Cwd string `json:"cwd"` + Env map[string]string `json:"env"` + Session string `json:"session"` + Sudo bool `json:"sudo,omitempty"` + }{Cmd: cmd, Cwd: cwd, Env: envMap, Session: os.Getenv("OLLIE_SESSION_ID"), Sudo: sudo}) reqJSON = append(reqJSON, '\n') if _, err := conn.Write(reqJSON); err != nil {