summaryrefslogtreecommitdiff
path: root/channels.c
diff options
context:
space:
mode:
authordjm <djm>2013-08-01 04:29:20 +0000
committerdjm <djm>2013-08-01 04:29:20 +0000
commitc2ea88fbd9fc116c34eaed565867042670407fc7 (patch)
tree022ec86baf3f7ee40a1f80691399ef1ef23b2d6f /channels.c
parentcbe342a579f9d3d0bc16f2288d10a66efaf205bb (diff)
downloadopenssh-c2ea88fbd9fc116c34eaed565867042670407fc7.tar.gz
- (djm) [channels.c channels.h] bz#2135: On Solaris, isatty() on a non-
blocking connecting socket will clear any stored errno that might otherwise have been retrievable via getsockopt(). A hack to limit writes to TTYs on AIX was triggering this. Since only AIX needs the hack, wrap it in an #ifdef. Diagnosis and patch from Ivo Raisr.
Diffstat (limited to 'channels.c')
-rw-r--r--channels.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/channels.c b/channels.c
index 9e87bfb9..281df380 100644
--- a/channels.c
+++ b/channels.c
@@ -248,7 +248,10 @@ channel_register_fds(Channel *c, int rfd, int wfd, int efd,
if ((c->isatty = is_tty) != 0)
debug2("channel %d: rfd %d isatty", c->self, c->rfd);
+#ifdef _AIX
+ /* XXX: Later AIX versions can't push as much data to tty */
c->wfd_isatty = is_tty || isatty(c->wfd);
+#endif
/* enable nonblocking mode */
if (nonblock) {