From 3980b636312516ee823e84e884dadbc86e6795d3 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Fri, 28 Aug 2009 11:02:37 +1000 Subject: - (dtucker) [channels.c configure.ac] Bug #1528: skip the tcgetattr call on the pty master on Solaris, since it never succeeds and can hang if large amounts of data is sent to the slave (eg a copy-paste). Based on a patch originally from Doke Scott, ok djm@ --- ChangeLog | 4 ++++ channels.c | 2 ++ configure.ac | 5 +++-- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 90da28c17..e24f73274 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,10 @@ attempting atomic rename(); ok dtucker@ - (djm) [Makefile.in] bz#1505: Solaris make(1) doesn't accept make variables in argv, so pass them in the environment; ok dtucker@ + - (dtucker) [channels.c configure.ac] Bug #1528: skip the tcgetattr call on + the pty master on Solaris, since it never succeeds and can hang if large + amounts of data is sent to the slave (eg a copy-paste). Based on a patch + originally from Doke Scott, ok djm@ 20090820 - (dtucker) [includes.h] Bug #1634: do not include system glob.h if we're not diff --git a/channels.c b/channels.c index efb04d655..e8b8aa07e 100644 --- a/channels.c +++ b/channels.c @@ -1653,6 +1653,7 @@ channel_handle_wfd(Channel *c, fd_set *readset, fd_set *writeset) } return -1; } +#ifndef BROKEN_TCGETATTR_ICANON if (compat20 && c->isatty && dlen >= 1 && buf[0] != '\r') { if (tcgetattr(c->wfd, &tio) == 0 && !(tio.c_lflag & ECHO) && (tio.c_lflag & ICANON)) { @@ -1666,6 +1667,7 @@ channel_handle_wfd(Channel *c, fd_set *readset, fd_set *writeset) packet_send(); } } +#endif buffer_consume(&c->output, len); if (compat20 && len > 0) { c->local_consumed += len; diff --git a/configure.ac b/configure.ac index cd8c27c8c..5f5a08a0a 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -# $Id: configure.ac,v 1.422 2009/08/16 23:35:22 dtucker Exp $ +# $Id: configure.ac,v 1.423 2009/08/28 01:02:37 dtucker Exp $ # # Copyright (c) 1999-2004 Damien Miller # @@ -15,7 +15,7 @@ # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. AC_INIT(OpenSSH, Portable, openssh-unix-dev@mindrot.org) -AC_REVISION($Revision: 1.422 $) +AC_REVISION($Revision: 1.423 $) AC_CONFIG_SRCDIR([ssh.c]) AC_CONFIG_HEADER(config.h) @@ -671,6 +671,7 @@ mips-sony-bsd|mips-sony-newsos4) after setsid()]) AC_DEFINE(PASSWD_NEEDS_USERNAME, 1, [must supply username to passwd in case the name is longer than 8 chars]) + AC_DEFINE(BROKEN_TCGETATTR_ICANON, tcgetattr with ICANON may hang) external_path_file=/etc/default/login # hardwire lastlog location (can't detect it on some versions) conf_lastlog_location="/var/adm/lastlog" -- cgit v1.2.3