summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2009-08-28 11:02:37 +1000
committerDarren Tucker <dtucker@zip.com.au>2009-08-28 11:02:37 +1000
commit3980b636312516ee823e84e884dadbc86e6795d3 (patch)
tree9831ee718e444151d57aae8f045db8e4ff04ce76
parent7d4a2685f78440f09d25bf3fc7236a5f99af208a (diff)
- (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@
-rw-r--r--ChangeLog4
-rw-r--r--channels.c2
-rw-r--r--configure.ac5
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 @@
8 attempting atomic rename(); ok dtucker@ 8 attempting atomic rename(); ok dtucker@
9 - (djm) [Makefile.in] bz#1505: Solaris make(1) doesn't accept make variables 9 - (djm) [Makefile.in] bz#1505: Solaris make(1) doesn't accept make variables
10 in argv, so pass them in the environment; ok dtucker@ 10 in argv, so pass them in the environment; ok dtucker@
11 - (dtucker) [channels.c configure.ac] Bug #1528: skip the tcgetattr call on
12 the pty master on Solaris, since it never succeeds and can hang if large
13 amounts of data is sent to the slave (eg a copy-paste). Based on a patch
14 originally from Doke Scott, ok djm@
11 15
1220090820 1620090820
13 - (dtucker) [includes.h] Bug #1634: do not include system glob.h if we're not 17 - (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)
1653 } 1653 }
1654 return -1; 1654 return -1;
1655 } 1655 }
1656#ifndef BROKEN_TCGETATTR_ICANON
1656 if (compat20 && c->isatty && dlen >= 1 && buf[0] != '\r') { 1657 if (compat20 && c->isatty && dlen >= 1 && buf[0] != '\r') {
1657 if (tcgetattr(c->wfd, &tio) == 0 && 1658 if (tcgetattr(c->wfd, &tio) == 0 &&
1658 !(tio.c_lflag & ECHO) && (tio.c_lflag & ICANON)) { 1659 !(tio.c_lflag & ECHO) && (tio.c_lflag & ICANON)) {
@@ -1666,6 +1667,7 @@ channel_handle_wfd(Channel *c, fd_set *readset, fd_set *writeset)
1666 packet_send(); 1667 packet_send();
1667 } 1668 }
1668 } 1669 }
1670#endif
1669 buffer_consume(&c->output, len); 1671 buffer_consume(&c->output, len);
1670 if (compat20 && len > 0) { 1672 if (compat20 && len > 0) {
1671 c->local_consumed += len; 1673 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 @@
1# $Id: configure.ac,v 1.422 2009/08/16 23:35:22 dtucker Exp $ 1# $Id: configure.ac,v 1.423 2009/08/28 01:02:37 dtucker Exp $
2# 2#
3# Copyright (c) 1999-2004 Damien Miller 3# Copyright (c) 1999-2004 Damien Miller
4# 4#
@@ -15,7 +15,7 @@
15# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 16
17AC_INIT(OpenSSH, Portable, openssh-unix-dev@mindrot.org) 17AC_INIT(OpenSSH, Portable, openssh-unix-dev@mindrot.org)
18AC_REVISION($Revision: 1.422 $) 18AC_REVISION($Revision: 1.423 $)
19AC_CONFIG_SRCDIR([ssh.c]) 19AC_CONFIG_SRCDIR([ssh.c])
20 20
21AC_CONFIG_HEADER(config.h) 21AC_CONFIG_HEADER(config.h)
@@ -671,6 +671,7 @@ mips-sony-bsd|mips-sony-newsos4)
671 after setsid()]) 671 after setsid()])
672 AC_DEFINE(PASSWD_NEEDS_USERNAME, 1, [must supply username to passwd 672 AC_DEFINE(PASSWD_NEEDS_USERNAME, 1, [must supply username to passwd
673 in case the name is longer than 8 chars]) 673 in case the name is longer than 8 chars])
674 AC_DEFINE(BROKEN_TCGETATTR_ICANON, tcgetattr with ICANON may hang)
674 external_path_file=/etc/default/login 675 external_path_file=/etc/default/login
675 # hardwire lastlog location (can't detect it on some versions) 676 # hardwire lastlog location (can't detect it on some versions)
676 conf_lastlog_location="/var/adm/lastlog" 677 conf_lastlog_location="/var/adm/lastlog"