Bug 1199

Summary: ssh sends invalid ttymodes when stdin is not a tty
Product: Portable OpenSSH Reporter: Damien Miller <djm>
Component: sshAssignee: Damien Miller <djm>
Status: CLOSED FIXED    
Severity: normal    
Priority: P2    
Version: -current   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 1452    
Attachments:
Description Flags
Daniel's patch
none
revised patch none

Description Damien Miller 2006-06-23 18:15:41 AEST
Daniel Ritz <daniel.ritz AT alcatel.ch> reports:

ssh client sends a wrong all-zero terminal info when requesting forced pseudo-terminal allocation while stdin is not a terminal. sshd then sets the terminals ospeed to 0 because it receives this information from the client. on solaris this means that the pseudo-terminal is closed and output of any remote command is dropped.
Comment 1 Damien Miller 2006-06-23 18:17:43 AEST
Created attachment 1146 [details]
Daniel's patch

This is Daniel's patch for the bug
Comment 2 Damien Miller 2006-06-23 18:18:34 AEST
I think there is a related bug in connection multiplexing too: it looks like we incorrectly reuse the ttymodes from the master's stdin rather than picking it up each time
Comment 3 Damien Miller 2008-05-19 11:35:08 AEST
Created attachment 1502 [details]
revised patch

This is an improved patch, that also removes some of the verbose debugging in ttymodes.c.

I was wrong about there being a bug in the multiplexing tty modes handling, it correctly handles this case by extracting the tty modes from the stdin that is fd-passed to the mux master.
Comment 4 Damien Miller 2008-05-20 01:47:33 AEST
patch applied - thanks! This will be in OpenSSH 5.1
Comment 5 Damien Miller 2008-06-12 18:31:09 AEST
oops, forgot to mark as RESOLVED.
Comment 6 Damien Miller 2008-07-22 12:08:27 AEST
Mass update RESOLVED->CLOSED after release of openssh-5.1