summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/clientloop.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* bz#1818 - don't send channel success/failre replies on channels thatdjm2014-04-291-2/+2
| | | | | have sent a close already; analysis and patch from Simon Tatham; ok markus@
* convert memset of potentially-private data to explicit_bzero()djm2014-02-021-3/+3
|
* replace most bzero with explicit_bzero, except a few that cna be memsettedu2014-01-311-3/+3
| | | | ok djm dtucker
* unsigned casts for ctype macros where neccessaryderaadt2013-11-201-4/+4
| | | | ok guenther millert markus
* use calloc for all structure allocations; from markus@djm2013-11-081-4/+4
|
* fix connection crash when sending break (~B) on ControlPersist'd session;djm2013-09-121-2/+2
| | | | ok dtucker@
* Add an "ABANDONED" channel state and use for mux sessions that aredtucker2013-06-071-1/+4
| | | | | | | | | disconnected via the ~. escape sequence. Channels in this state will be able to close if the server responds, but do not count as active channels. This means that if you ~. all of the mux clients when using ControlPersist on a broken network, the backgrounded mux master will exit when the Control Persist time expires rather than hanging around indefinitely. bz#1917, also reported and tested by tedu@. ok djm@ markus@.
* No need for the mux cleanup callback to be visible so restore it to staticdtucker2013-06-021-3/+3
| | | | and call it through the detach_user function pointer. ok djm@
* Use clock_gettime(CLOCK_MONOTONIC ...) for ssh timers so that things likedtucker2013-06-011-7/+7
| | | | | keepalives and rekeying will work properly over clock steps. Suggested by markus@, "looks good" djm@.
* bye, bye xfree(); ok markus@djm2013-05-171-31/+24
|
* Add an optional second argument to RekeyLimit in the client to allowdtucker2013-05-161-6/+17
| | | | | rekeying based on elapsed time in addition to amount of traffic. with djm@ jmc@, ok djm
* channel_setup_local_fwd_listener() returns 0 on failure, not -vedjm2013-01-021-3/+3
| | | | bz#2055 reported by mathieu.lacage AT gmail.com
* when muxmaster is run with -N, make it shut down gracefully when a clientdtucker2012-09-071-4/+4
| | | | sends it "-O stop" rather than hanging around. ok djm@
* Merge escape help text for ~v and ~V; ok djm@dtucker2012-09-071-5/+4
|
* Print '^Z' instead of a raw ^Z when the sequence is not supported. ok djm@dtucker2012-09-071-3/+8
|
* Make the escape command help (~?) context sensitive so that only commandsdtucker2012-09-061-41/+62
| | | | that will work in the current session are shown. ok markus@
* Put help text for ~v and ~V around the correct waydtucker2012-09-061-3/+3
|
* Add ~v and ~V escape sequences to raise and lower the logging leveldtucker2012-09-061-1/+29
| | | | respectively. Man page help from jmc, ok deraadt jmc
* Force a clean shutdown of ControlMaster client sessions when the ~. escapedtucker2012-08-171-1/+3
| | | | | sequence is used. This means that ~. should now work in mux clients even if the server is no longer responding. Found by tedu, ok djm.
* initialise accept() backoff timer to avoid EINVAL from select(2) indjm2012-06-201-2/+2
| | | | rekeying
* don't spin in accept() when out of fds (ENFILE/ENFILE) - back off for adjm2012-04-111-2/+6
| | | | while; ok deraadt@ markus@
* Ensure that $DISPLAY contains only valid characters before using it todtucker2012-01-181-1/+21
| | | | | extract xauth data so that it can't be used to play local shell metacharacter games. Report from r00t_ati at ihteam.net, ok markus.
* support cancellation of local/dynamic forwardings from ~C commandline;markus2011-09-101-11/+23
| | | | ok & feedback djm@
* hook up a channel confirm callback to warn the user then requested X11djm2011-06-221-3/+2
| | | | forwarding was refused by the server; ok markus@
* setproctitle for a mux master that has been gracefully stopped;djm2011-06-171-2/+4
| | | | bz#1911 from Bert.Wesarg AT googlemail.com
* improve our behaviour when TTY allocation fails: if we are indjm2011-05-081-14/+39
| | | | | | | | | | | | RequestTTY=auto mode (the default), then do not treat at TTY allocation error as fatal but rather just restore the local TTY to cooked mode and continue. This is more graceful on devices that never allocate TTYs. If RequestTTY is set to "yes" or "force", then failure to allocate a TTY is fatal. ok markus@
* Add a RequestTTY ssh_config option to allow configuration-baseddjm2011-05-061-13/+11
| | | | control over tty allocation (like -t/-T); ok markus@
* allow graceful shutdown of multiplexing: request that a mux server removesdjm2011-04-171-9/+25
| | | | its listener socket and refuse future multiplexing requests; ok markus@
* a couple more tweaks to the post-close protocol 1 stderr/stdout flush:djm2011-01-161-11/+9
| | | | | now that we use atomicio(), convert them from while loops to if statements add test and cast to compile cleanly with -Wsigned
* Use atomicio when flushing protocol 1 std{out,err} buffers atdjm2011-01-161-7/+7
| | | | | session close. This was a latent bug exposed by setting a SIGCHLD handler and spotted by kevin.brott AT gmail.com; ok dtucker@
* some unsigned long long casts that make things a bit easier fordjm2011-01-111-2/+2
| | | | portable without resorting to dropping PRIu64 formats everywhere
* use host and not options.hostname, as the latter may have unescapeddjm2011-01-081-2/+2
| | | | substitution characters
* when exiting due to ServerAliveTimeout, mention the hostname that causeddjm2011-01-061-2/+2
| | | | it (useful with backgrounded controlmaster)
* avoid NULL deref on receiving a channel request on an unknown or invaliddjm2010-11-231-2/+2
| | | | channel; report bz#1842 from jchadima AT redhat.com; ok dtucker@
* honour $TMPDIR for client xauth and ssh-agent temporary directories;djm2010-11-211-2/+2
| | | | feedback and ok markus@
* allow ssh and sshd to set arbitrary TOS/DSCP/QoS values instead ofdjm2010-11-131-1/+4
| | | | | | hardcoding lowdelay/throughput. bz#1733 patch from philipp AT redfish-solutions.com; ok markus@ deraadt@
* kill proxy command on fatal() (we already kill it on clean exit);djm2010-10-061-1/+2
| | | | ok markus@
* add a "ControlPersist" option that automatically starts a backgrounddjm2010-07-191-4/+59
| | | | | | | | ssh(1) multiplex master when connecting. This connection can stay alive indefinitely, or can be set to automatically close after a user-specified duration of inactivity. bz#1330 - patch by dwmw2 AT infradead.org, but further hacked on by wmertens AT cisco.com, apb AT cequrux.com, martin-mindrot-bugzilla AT earth.li and myself; "looks ok" markus@
* Add X11ForwardTimeout option to specify timeout for untrusted X11djm2010-06-251-6/+20
| | | | | | | | | | | authentication cookies to avoid fallback in X11 code to fully-trusted implicit authentication using SO_PEERCRED described at: http://lists.x.org/archives/xorg-devel/2010-May/008636.html After the X11ForwardTimeout has expired the client will now refuse incoming X11 channel opens. based on patch from Tavis Ormandy; "nice" markus@
* bz#1698: kill channel when pty allocation requests fail. Fixeddjm2010-04-101-2/+2
| | | | | stuck client if the server refuses pty allocation. ok dtucker@ "think so" markus@
* protocol conformance fix: send language tag when disconnecting normally;djm2010-03-131-1/+2
| | | | spotted by 1.41421 AT gmail.com, ok markus@ deraadt@
* downgrade an error() to a debug() - this particular case can be hit indjm2010-01-281-3/+4
| | | | | normal operation for certain sequences of mux slave vs session closure and is harmless
* rewrite ssh(1) multiplexing code to a more sensible protocol.djm2010-01-261-23/+12
| | | | | | | | | | | | | | | | | | | | | | The new multiplexing code uses channels for the listener and accepted control sockets to make the mux master non-blocking, so no stalls when processing messages from a slave. avoid use of fatal() in mux master protocol parsing so an errant slave process cannot take down a running master. implement requesting of port-forwards over multiplexed sessions. Any port forwards requested by the slave are added to those the master has established. add support for stdio forwarding ("ssh -W host:port ...") in mux slaves. document master/slave mux protocol so that other tools can use it to control a running ssh(1). Note: there are no guarantees that this protocol won't be incompatibly changed (though it is versioned). feedback Salvador Fandino, dtucker@ channel changes ok markus@
* quell tc[gs]etattr warnings when forcing a tty (ssh -tt), since wedjm2010-01-091-10/+13
| | | | usually don't actually have a tty to read/set; bz#1686 ok dtucker@
* fix incorrect exit status when multiplexing and channel ID 0 is recycleddjm2009-11-171-6/+8
| | | | bz#1570 reported by peter.oliver AT eon-is.co.uk; ok dtucker
* client_loop() must detect if the session has been suspended and resumed,andreas2009-10-241-1/+11
| | | | | | and take appropriate action in that case. From Martin Forssen, maf at appgate dot com ok markus@
* only send SSH2_MSG_DISCONNECT if we're in compat20; from dtucker@stevesk2009-07-051-6/+8
| | | | ok deraadt@ markus@
* Keep track of number of bytes read and written. Needed for upcomingandreas2009-05-281-4/+5
| | | | | changes. Most code from Martin Forssen, maf at appgate dot com. ok markus@
* Send SSH2_MSG_DISCONNECT when the client disconnects. From a largerandreas2009-05-271-1/+7
| | | | | change from Martin Forssen, maf at appgate dot com. ok markus@
* Put the globals in packet.c into a struct and don't access it directlyandreas2009-05-251-3/+3
| | | | | from other files. No functional changes. ok markus@ djm@