Bug 1199 - ssh sends invalid ttymodes when stdin is not a tty
Summary: ssh sends invalid ttymodes when stdin is not a tty
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: ssh (show other bugs)
Version: -current
Hardware: All All
: P2 normal
Assignee: Damien Miller
URL:
Keywords:
Depends on:
Blocks: V_5_1
  Show dependency treegraph
 
Reported: 2006-06-23 18:15 AEST by Damien Miller
Modified: 2023-01-13 13:56 AEDT (History)
0 users

See Also:


Attachments
Daniel's patch (1.92 KB, patch)
2006-06-23 18:17 AEST, Damien Miller
no flags Details | Diff
revised patch (3.19 KB, patch)
2008-05-19 11:35 AEST, Damien Miller
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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