summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/nchan.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* rewrite ssh(1) multiplexing code to a more sensible protocol.djm2010-01-261-6/+15
| | | | | | | | | | | | | | | | | | | | | | 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@
* add space to some log/debug messages for readability; ok djm@ markus@stevesk2008-11-071-5/+5
|
* only send eow and no-more-sessions requests to openssh 5 and newer;markus2008-09-111-1/+3
| | | | fixes interop problems with broken ssh v2 implementations; ok djm@
* only send eow@openssh.com notifications for session channels; ok! markus@djm2008-06-301-2/+3
|
* unbreakmarkus2008-05-091-1/+29
| | | | | | | 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@
* Implement a channel success/failure status confirmation callbackdjm2008-05-081-1/+2
| | | | | | | | | | | | | 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)
* almost entirely get rid of the culture of ".h files that include .h files"deraadt2006-08-031-3/+2
| | | | | ok djm, sort of ok stevesk makes the pain stop in one easy step
* move #include <string.h> out of includes.hstevesk2006-07-221-1/+2
|
* move #include <errno.h> out of includes.h; ok markus@stevesk2006-07-111-1/+3
|
* move #include <sys/socket.h> out of includes.hstevesk2006-07-081-1/+4
|
* Put $OpenBSD$ tags back (as comments) to replace the RCSID()s thatdjm2006-03-251-0/+1
| | | | Theo nuked - our scripts to sync -portable need them in the files
* RCSID() can diederaadt2006-03-191-1/+0
|
* spacesderaadt2004-07-111-8/+8
|
* make ssh -Wshadow clean, no functional changesavsm2004-06-211-3/+3
| | | | markus@ ok
* be less chatty; debug -> debug2, cleanup; ok henning@markus2003-08-291-23/+23
|
* rename log() into logit() to avoid name conflict. markus ok, from netbsditojun2003-04-081-3/+3
|
* KNF done automatically while reading....deraadt2002-06-191-2/+2
|
* use tab not spaces (|unexpand)markus2002-06-091-3/+3
|
* don't send stderr data after EOF, accept this from older known (broken)markus2002-03-251-33/+27
| | | | sshd servers only, fixes http://bugzilla.mindrot.org/show_bug.cgi?id=179
* cleanup channels faster if the are empty and we are in drain-state; ok deraadt@markus2002-01-211-1/+4
|
* (c) 2002markus2002-01-141-2/+2
|
* remove function pointers for events, remove chan_init*; ok provos@markus2002-01-141-56/+32
|
* remove duplicated code; ok provos@markus2002-01-141-4/+1
|
* correct fn names for ssh2, do not switch from closed to closed; ok provos@markus2002-01-141-6/+7
|
* merge chan_[io]buf_empty[12]; ok provos@markus2002-01-141-37/+13
|
* chan_send_oclose1() no longer calls chan_shutdown_write(); ok provos@markus2002-01-141-2/+4
|
* add chan_set_[io]state(), order states, state is now an u_int,markus2002-01-131-40/+43
| | | | simplifies debugging messages; ok provos@
* more unused code (with channels.c:1.156)markus2002-01-101-24/+1
|
* remove dead code (skip drain)markus2002-01-101-7/+1
|
* replace buffer_consume(b, buffer_len(b)) with buffer_clear(b); ok provos@markus2002-01-091-3/+3
|
* basic KNF done while i was looking for something elsederaadt2001-12-191-5/+5
|
* try to keep channels open until an exit-status message is sent.markus2001-10-101-3/+12
| | | | | | don't kill the login shells if the shells stdin/out/err is closed. this should now work: ssh -2n localhost 'exec > /dev/null 2>&1; sleep 10; exit 5'; echo ?
* keep track of both maxfd and the size of the malloc'ed fdsets.markus2001-07-171-5/+3
| | | | update maxfd if maxfd gets closed.
* update copyright for 2001markus2001-06-251-2/+2
|
* more strict prototypes. raise warning level in Makefile.inc. markus ok'editojun2001-06-231-7/+7
| | | | TODO; cleanup headers
* undo the .c file split, just merge the header and keep the cvs historymarkus2001-05-311-0/+547
|
* channel layer cleanup: merge header files and split .c filesmarkus2001-05-301-508/+0
|
* undo broken channel fix and try a different one. theremarkus2001-05-281-3/+7
| | | | should be still some select errors...
* more select() error fixes (don't set rfd/wfd to -1).markus2001-05-161-3/+1
|
* move to Channel **channels (instead of Channel *channels), fixes realloc problems.markus2001-05-041-1/+9
| | | | | channel_new now returns a Channel *, favour Channel * over channel id. remove old channel_allocate interface.
* make sure remote stderr does not get truncated.markus2001-02-281-26/+31
| | | | remove closed fd's from the select mask.
* split ssh.h and try to cleanup the #include mess. remove unnecessary #includes.markus2001-01-211-6/+4
| | | | rename util.[ch] -> misc.[ch]
* move ssh1 definitions to ssh1.h, pathnames to pathnames.hmarkus2001-01-191-1/+2
|
* agent forwarding and -R for ssh2, based on work from jhuuskon@messi.uku.fimarkus2000-11-061-1/+5
|
* cleanup copyright notices on all files. I have attempted to be accurate withderaadt2000-09-071-6/+1
| | | | | | | the details. everything is now under Tatu's licence (which I copied from his readme), and/or the core-sdi bsd-ish thing for deattack, or various openbsd developers under a 2-term bsd licence. We're not changing any rules, just being accurate.
* OpenBSD tagmarkus2000-06-201-1/+1
|
* no drain if ibuf_empty, fixes x11fwd problems; tests by fries@markus2000-05-081-1/+5
|
* fix close for non-open ssh1 channelsmarkus2000-05-031-1/+20
|
* use c-style commentsmarkus2000-05-021-2/+2
|
* whitespace cleanupmarkus2000-04-141-3/+3
|