Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/srv/reexec.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,13 +298,13 @@ func RunCommand() (errw io.Writer, code int, err error) {
// launch the shell under.
var pamEnvironment []string
if c.PAMConfig != nil {
// Connect std{in,out,err} to the TTY if it's a shell request, otherwise
// discard std{out,err}. If this was not done, things like MOTD would be
// printed for "exec" requests.
// Connect std{in,out,err} to the TTY if a terminal has been allocated,
// otherwise discard std{out,err}. If this was not done, things like MOTD
// would be printed for non-interactive "exec" requests.
var stdin io.Reader
var stdout io.Writer
var stderr io.Writer
if c.RequestType == sshutils.ShellRequest {
if tty != nil {
stdin = tty
stdout = tty
stderr = tty
Expand Down
Loading