summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/clientloop.c
AgeCommit message (Collapse)Author
2009-01-22make a2port() return -1 when it encounters an invalid port numberDamien Miller
rather than 0, which it will now treat as valid (needed for future work) adjust current consumers of a2port() to check its return value is <= 0, which in turn required some things to be converted from u_short => int make use of int vs. u_short consistent in some other places too feedback & ok markus@
2008-12-09fix typo in error messageKevin Steves
2008-12-09The ~C escape handler does not work correctly for multiplexed sessions -Damien Miller
it opens a commandline on the master session, instead of on the slave that requested it. Disable it on slave sessions until such time as it is fixed; bz#1543 report from Adrian Bridgett via Colin Watson ok markus@
2008-12-02we have to use the recipient's channel number (RFC 4254) forMarkus Friedl
SSH2_MSG_CHANNEL_SUCCESS/SSH2_MSG_CHANNEL_FAILURE messages, otherwise we trigger 'Non-public channel' error messages on sshd systems with clientkeepalive enabled; noticed by sturm; ok djm;
2008-11-05add dynamic forward escape command line; ok djm@Kevin Steves
2008-11-01merge dynamic forward parsing into parse_forward(); 'i think this is OK' djm@Kevin Steves
2008-10-30don't need to #include "monitor_fdpass.h"Kevin Steves
2008-07-16rename variable first_gc -> last_gc (since it is actually the lastDamien Miller
in the list).
2008-07-10sync v1 and v2 traffic accounting; add it to sshd, too; ok djm@, dtucker@Markus Friedl
2008-06-12I was coalescing expected global request confirmation replies at theDamien Miller
wrong end of the queue - fix; prompted by markus@
2008-06-12The multiplexing escape char handler commit last night introduced aDamien Miller
small memory leak per session; plug it.
2008-06-12thall shalt not code past the eightieth columnDamien Miller
2008-06-12maintain an ordered queue of outstanding global requests that weDamien Miller
expect replies to, similar to the per-channel confirmation queue. Use this queue to verify success or failure for remote forward establishment in a race free way. ok dtucker@
2008-06-12Enable ~ escapes for multiplex slave sessions; give each channelDamien Miller
its own escape state and hook the escape filters up to muxed channels. bz #1331 Mux slaves do not currently support the ~^Z and ~& escapes. NB. this change cranks the mux protocol version, so a new ssh mux client will not be able to connect to a running old ssh mux master. ok dtucker@
2008-05-19unbreak tree by committing this bit that I missed from:Damien Miller
Fix sending tty modes when stdin is not a tty (bz#1199). Previously we would send the modes corresponding to a zeroed struct termios, whereas we should have been sending an empty list of modes. Based on patch from daniel.ritz AT alcatel.ch; ok dtucker@ markus@
2008-05-09unbreakMarkus Friedl
ssh -2 localhost od /bin/ls | true ignoring SIGPIPE by adding a new channel message (EOW) that signals the peer that we're not interested in any data it might send. fixes bz #85; discussion, debugging and ok djm@
2008-05-09tidy up session multiplexing code, moving it into its own file andDamien Miller
making the function names more consistent - making ssh.c and clientloop.c a fair bit more readable. ok markus@
2008-05-09Try additional addresses when connecting to a port forward destinationDamien Miller
whose DNS name resolves to more than one address. The previous behaviour was to try the first address and give up. Reported by stig AT venaas.com in bz#343 great feedback and ok markus@
2008-05-08Use new channel status confirmation callback system to properly dealDamien Miller
with "important" channel requests that fail, in particular command exec, shell and subsystem requests. Previously we would optimistically assume that the requests would always succeed, which could cause hangs if they did not (e.g. when the server runs out of fds) or were unimplemented by the server (bz #1384) Also, properly report failing multiplex channel requests via the mux client stderr (subject to LogLevel in the mux master) - better than silently failing. most bits ok markus@ (as part of a larger diff)
2008-05-08Implement a channel success/failure status confirmation callbackDamien Miller
mechanism. Each channel maintains a queue of callbacks, which will be drained in order (RFC4253 guarantees confirm messages are not reordered within an channel). Also includes a abandonment callback to clean up if a channel is closed without sending confirmation messages. This probably shouldn't happen in compliant implementations, but it could be abused to leak memory. ok markus@ (as part of a larger diff)
2008-02-22Allow all SSH2 packet types, including UNIMPLEMENTED to reset theDarren Tucker
keepalive timer (bz #1307). ok markus@
2008-01-23Revert the change for bz #1307 as it causes connection aborts if an IGNOREDarren Tucker
packet arrives while we're waiting in packet_read_expect (and possibly elsewhere).
2008-01-19fd leak on session multiplexing error path. Report and patch fromDamien Miller
gregory_shively AT fanniemae.com
2007-12-28Use the correct packet maximum sizes for remote port and agent forwarding.Darren Tucker
Prevents the server from killing the connection if too much data is queued and an excessively large packet gets sent. bz #1360, ok djm@.
2007-12-28Make SSH2_MSG_UNIMPLEMENTED and SSH2_MSG_IGNORE messages reset theDarren Tucker
ServerAlive and ClientAlive timers. Prevents dropping a connection when these are enabled but the peer does not support our keepalives. bz #1307, ok djm@.
2007-11-03fix memory leak in process_cmdline(), patch from Jan.Pechanec AT Sun.COM;Damien Miller
ok dtucker@
2007-09-04make file descriptor passing code return an error rather than call fatal()Damien Miller
when it encounters problems, and use this to make session multiplexing masters survive slaves failing to pass all stdio FDs; ok markus@
2007-08-15do NOT fall back to the trused x11 cookie if generation of an untrustedMarkus Friedl
cookie fails; from security-alert at sun.com; ok dtucker
2007-08-07bz#1232: ensure that any specified LocalCommand is executed after theDamien Miller
tunnel device is opened. Also, make failures to open a tunnel device fatal when ExitOnForwardFailure is active. Reported by h.goebel AT goebel-consult.de; ok dtucker markus reyk deraadt
2007-03-20remove some bogus *p tests from charles longeauTed Unangst
ok deraadt millert
2007-02-20set maximum packet and window sizes the same for multiplexed clientsDamien Miller
as normal connections; ok markus@
2007-01-21spacesKevin Steves
2006-10-11exit instead of doing a blocking tcp send if we detect a client/server timeout,Markus Friedl
since the tcp sendqueue might be already full (of alive requests); ok dtucker, report mpf
2006-08-03almost entirely get rid of the culture of ".h files that include .h files"Theo de Raadt
ok djm, sort of ok stevesk makes the pain stop in one easy step
2006-08-01move #include <stdio.h> out of includes.hKevin Steves
2006-07-26move #include <stdlib.h> out of includes.hKevin Steves
2006-07-26move #include <sys/param.h> out of includes.hKevin Steves
2006-07-25move #include <sys/time.h> out of includes.hKevin Steves
2006-07-22move #include <string.h> out of includes.hKevin Steves
2006-07-17move #include <unistd.h> out of includes.hKevin Steves
2006-07-11move #include <errno.h> out of includes.h; ok markus@Kevin Steves
2006-07-11add ExitOnForwardFailure: terminate the connection if ssh(1)Markus Friedl
cannot set up all requested dynamic, local, and remote port forwardings. ok djm, dtucker, stevesk, jmc
2006-07-08move #include <sys/socket.h> out of includes.hKevin Steves
2006-07-02use -KR[bind_address:]port here; ok djm@Kevin Steves
2006-06-26mention optional bind_address in runtime port forwarding setupDamien Miller
command-line help. patch from santhi.amirta AT gmail.com
2006-05-16missing free; from Kylene HallMarkus Friedl
2006-04-20replace the last non-sig_atomic_t flag used in a signal handler with aDamien Miller
sig_atomic_t, unfortunately with some knock-on effects in other (non- signal) contexts in which it is used; ok markus@
2006-03-25spacingTheo de Raadt
2006-03-25Put $OpenBSD$ tags back (as comments) to replace the RCSID()s thatDamien Miller
Theo nuked - our scripts to sync -portable need them in the files
2006-03-25introduce xcalloc() and xasprintf() failure-checked allocations functionsDamien Miller
and use them throughout openssh xcalloc is particularly important because malloc(nmemb * size) is a dangerous idiom (subject to integer overflow) and it is time for it to die feedback and ok deraadt@