diff options
author | Zdenek Kotala <Zdenek.Kotala@Sun.COM> | 2009-10-26 19:32:06 +0100 |
---|---|---|
committer | Zdenek Kotala <Zdenek.Kotala@Sun.COM> | 2009-10-26 19:32:06 +0100 |
commit | d92fc07239af943d62e4e67791879707ec89e7d3 (patch) | |
tree | ebabfe52246a865dbb2e1197d129cfb9e04993d5 /usr/src/cmd/ssh/libssh/common | |
parent | 15cf376d144661c5c48ea6f62083a36d18d430fd (diff) | |
download | illumos-gate-d92fc07239af943d62e4e67791879707ec89e7d3.tar.gz |
6882255 sftp connection fails when .bashrc generates output on stderr
6886656 unlimited window size causes problems with limited buffer sizes
6894519 USE_PIPES is not used on Solaris and should be removed
Diffstat (limited to 'usr/src/cmd/ssh/libssh/common')
-rw-r--r-- | usr/src/cmd/ssh/libssh/common/channels.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr/src/cmd/ssh/libssh/common/channels.c b/usr/src/cmd/ssh/libssh/common/channels.c index c38a012dfe..3a0e6bad22 100644 --- a/usr/src/cmd/ssh/libssh/common/channels.c +++ b/usr/src/cmd/ssh/libssh/common/channels.c @@ -723,7 +723,8 @@ channel_pre_open(Channel *c, fd_set * readset, fd_set * writeset) if (c->istate == CHAN_INPUT_OPEN && limit > 0 && - buffer_len(&c->input) < limit) + buffer_len(&c->input) < limit && + buffer_check_alloc(&c->input, CHAN_RBUF)) FD_SET(c->rfd, readset); if (c->ostate == CHAN_OUTPUT_OPEN || c->ostate == CHAN_OUTPUT_WAIT_DRAIN) { @@ -1383,7 +1384,7 @@ channel_post_connecting(Channel *c, fd_set * readset, fd_set * writeset) static int channel_handle_rfd(Channel *c, fd_set * readset, fd_set * writeset) { - char buf[16*1024]; + char buf[CHAN_RBUF]; int len; if (c->rfd != -1 && @@ -1477,7 +1478,7 @@ channel_handle_wfd(Channel *c, fd_set * readset, fd_set * writeset) static int channel_handle_efd(Channel *c, fd_set * readset, fd_set * writeset) { - char buf[16*1024]; + char buf[CHAN_RBUF]; int len; /** XXX handle drain efd, too */ |