summaryrefslogtreecommitdiff
path: root/channels.h
Commit message (Collapse)AuthorAgeFilesLines
* - djm@cvs.openbsd.org 2009/02/12 03:00:56Damien Miller2009-02-141-2/+2
| | | | | | | | [canohost.c canohost.h channels.c channels.h clientloop.c readconf.c] [readconf.h serverloop.c ssh.c] support remote port forwarding with a zero listen port (-R0:...) to dyamically allocate a listen port at runtime (this is actually specified in rfc4254); bz#1003 ok markus@
* - djm@cvs.openbsd.org 2009/01/22 09:46:01Damien Miller2009-01-281-4/+2
| | | | | | [channels.c channels.h session.c] make Channel->path an allocated string, saving a few bytes here and there and fixing bz#1380 in the process; ok markus@
* - djm@cvs.openbsd.org 2008/06/15 20:06:26Damien Miller2008-06-161-2/+2
| | | | | | | | [channels.c channels.h session.c] don't call isatty() on a pty master, instead pass a flag down to channel_set_fds() indicating that te fds refer to a tty. Fixes a hang on exit on Solaris (bz#1463) in portable but is actually a generic bug; ok dtucker deraadt markus
* - djm@cvs.openbsd.org 2008/06/12 15:19:17Darren Tucker2008-06-131-2/+4
| | | | | | [clientloop.h channels.h clientloop.c channels.c mux.c] The multiplexing escape char handler commit last night introduced a small memory leak per session; plug it.
* - djm@cvs.openbsd.org 2008/06/12 03:40:52Darren Tucker2008-06-131-2/+3
| | | | | | | | | | | | [clientloop.h mux.c channels.c clientloop.c channels.h] Enable ~ escapes for multiplex slave sessions; give each channel 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@
* - dtucker@cvs.openbsd.org 2008/06/10 04:50:25Darren Tucker2008-06-101-1/+2
| | | | | | | | [sshd.c channels.h channels.c log.c servconf.c log.h servconf.h sshd.8] Add extended test mode (-T) and connection parameters for test mode (-C). -T causes sshd to write its effective configuration to stdout and exit. -C causes any relevant Match rules to be applied before output. The combination allows tesing of the parser and config files. ok deraadt djm
* - markus@cvs.openbsd.org 2008/05/09 16:21:13Damien Miller2008-05-191-1/+2
| | | | | | | | | [channels.h clientloop.c nchan.c serverloop.c] unbreak 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@
* - djm@cvs.openbsd.org 2008/05/09 04:55:56Damien Miller2008-05-191-5/+16
| | | | | | | | | | | [channels.c channels.h clientloop.c serverloop.c] Try additional addresses when connecting to a port forward destination 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@
* - djm@cvs.openbsd.org 2008/05/08 12:02:23Damien Miller2008-05-191-5/+21
| | | | | | | | | | | | | | | [auth-options.c auth1.c channels.c channels.h clientloop.c gss-serv.c] [monitor.c monitor_wrap.c nchan.c servconf.c serverloop.c session.c] [ssh.c sshd.c] Implement a channel success/failure status confirmation callback 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)
* - markus@cvs.openbsd.org 2007/06/11 09:14:00Darren Tucker2007-06-121-3/+3
| | | | | [channels.h] increase default channel windows; ok djm
* - deraadt@cvs.openbsd.org 2006/08/03 03:34:42Damien Miller2006-08-051-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [OVERVIEW atomicio.c atomicio.h auth-bsdauth.c auth-chall.c auth-krb5.c] [auth-options.c auth-options.h auth-passwd.c auth-rh-rsa.c auth-rhosts.c] [auth-rsa.c auth-skey.c auth.c auth.h auth1.c auth2-chall.c auth2-gss.c] [auth2-hostbased.c auth2-kbdint.c auth2-none.c auth2-passwd.c ] [auth2-pubkey.c auth2.c authfd.c authfd.h authfile.c bufaux.c bufbn.c] [buffer.c buffer.h canohost.c channels.c channels.h cipher-3des1.c] [cipher-bf1.c cipher-ctr.c cipher.c cleanup.c clientloop.c compat.c] [compress.c deattack.c dh.c dispatch.c dns.c dns.h fatal.c groupaccess.c] [groupaccess.h gss-genr.c gss-serv-krb5.c gss-serv.c hostfile.c kex.c] [kex.h kexdh.c kexdhc.c kexdhs.c kexgex.c kexgexc.c kexgexs.c key.c] [key.h log.c log.h mac.c match.c md-sha256.c misc.c misc.h moduli.c] [monitor.c monitor_fdpass.c monitor_mm.c monitor_mm.h monitor_wrap.c] [monitor_wrap.h msg.c nchan.c packet.c progressmeter.c readconf.c] [readconf.h readpass.c rsa.c scard.c scard.h scp.c servconf.c servconf.h] [serverloop.c session.c session.h sftp-client.c sftp-common.c] [sftp-common.h sftp-glob.c sftp-server.c sftp.c ssh-add.c ssh-agent.c] [ssh-dss.c ssh-gss.h ssh-keygen.c ssh-keyscan.c ssh-keysign.c ssh-rsa.c] [ssh.c ssh.h sshconnect.c sshconnect.h sshconnect1.c sshconnect2.c] [sshd.c sshlogin.c sshlogin.h sshpty.c sshpty.h sshtty.c ttymodes.c] [uidswap.c uidswap.h uuencode.c uuencode.h xmalloc.c xmalloc.h] [loginrec.c loginrec.h openbsd-compat/port-aix.c openbsd-compat/port-tun.h] almost entirely get rid of the culture of ".h files that include .h files" ok djm, sort of ok stevesk makes the pain stop in one easy step NB. portable commit contains everything *except* removing includes.h, as that will take a fair bit more work as we move headers that are required for portability workarounds to defines.h. (also, this step wasn't "easy")
* - dtucker@cvs.openbsd.org 2006/07/21 12:43:36Damien Miller2006-07-241-2/+2
| | | | | | | [channels.c channels.h servconf.c servconf.h sshd_config.5] Make PermitOpen take a list of permitted ports and act more like most other keywords (ie the first match is the effective setting). This also makes it easier to override a previously set PermitOpen. ok djm@
* - dtucker@cvs.openbsd.org 2006/07/17 12:06:00Damien Miller2006-07-241-1/+3
| | | | | | | | | | | | | [channels.c channels.h servconf.c sshd_config.5] Add PermitOpen directive to sshd_config which is equivalent to the "permitopen" key option. Allows server admin to allow TCP port forwarding only two specific host/port pairs. Useful when combined with Match. If permitopen is used in both sshd_config and a key option, both must allow a given connection before it will be permitted. Note that users can still use external forwarders such as netcat, so to be those must be controlled too for the limits to be effective. Feedback & ok djm@, man page corrections & ok jmc@.
* - markus@cvs.openbsd.org 2006/07/11 18:50:48Darren Tucker2006-07-121-3/+3
| | | | | | | | [clientloop.c ssh.1 ssh.c channels.c ssh_config.5 readconf.h session.c channels.h readconf.c] add ExitOnForwardFailure: terminate the connection if ssh(1) cannot set up all requested dynamic, local, and remote port forwardings. ok djm, dtucker, stevesk, jmc
* - djm@cvs.openbsd.org 2006/03/25 22:22:43Damien Miller2006-03-261-1/+1
| | | | | | | | | | | | | | [atomicio.h auth-options.h auth.h auth2-gss.c authfd.h authfile.h] [bufaux.h buffer.h canohost.h channels.h cipher.h clientloop.h] [compat.h compress.h crc32.c crc32.h deattack.h dh.h dispatch.h] [dns.c dns.h getput.h groupaccess.h gss-genr.c gss-serv-krb5.c] [gss-serv.c hostfile.h includes.h kex.h key.h log.h mac.h match.h] [misc.h monitor.h monitor_fdpass.h monitor_mm.h monitor_wrap.h msg.h] [myproposal.h packet.h pathnames.h progressmeter.h readconf.h rsa.h] [scard.h servconf.h serverloop.h session.h sftp-common.h sftp.h] [ssh-gss.h ssh.h ssh1.h ssh2.h sshconnect.h sshlogin.h sshpty.h] [ttymodes.h uidswap.h uuencode.h xmalloc.h] standardise spacing in $OpenBSD$ tags; requested by deraadt@
* - reyk@cvs.openbsd.org 2005/12/30 15:56:37Damien Miller2005-12-311-4/+8
| | | | | | [channels.c channels.h clientloop.c] add channel output filter interface. ok djm@, suggested by markus@
* - markus@cvs.openbsd.org 2005/12/12 13:46:18Damien Miller2005-12-131-1/+2
| | | | | | [channels.c channels.h session.c] make sure protocol messages for internal channels are ignored. allow adjust messages for non-open channels; with and ok djm@
* - reyk@cvs.openbsd.org 2005/12/06 22:38:28Damien Miller2005-12-131-1/+3
| | | | | | | | | | | | | | | | | [auth-options.c auth-options.h channels.c channels.h clientloop.c] [misc.c misc.h readconf.c readconf.h scp.c servconf.c servconf.h] [serverloop.c sftp.c ssh.1 ssh.c ssh_config ssh_config.5 sshconnect.c] [sshconnect.h sshd.8 sshd_config sshd_config.5] Add support for tun(4) forwarding over OpenSSH, based on an idea and initial channel code bits by markus@. This is a simple and easy way to use OpenSSH for ad hoc virtual private network connections, e.g. administrative tunnels or secure wireless access. It's based on a new ssh channel and works similar to the existing TCP forwarding support, except that it depends on the tun(4) network interface on both ends of the connection for layer 2 or layer 3 tunneling. This diff also adds support for LocalCommand in the ssh(1) client. ok djm@, markus@, jmc@ (manpages), tested and discussed with others
* - djm@cvs.openbsd.org 2005/10/10 10:23:08Damien Miller2005-11-051-3/+4
| | | | | | | [channels.c channels.h clientloop.c serverloop.c session.c] fix regression I introduced in 4.2: X11 forwardings initiated after a session has exited (e.g. "(sleep 5; xterm) &") would not start. bz #1086 reported by t8m AT centrum.cz; ok markus@ dtucker@
* - (djm) [auth-pam.c sftp.c] spaces vs. tabs at start of lineDamien Miller2005-07-171-2/+2
| | | | | | | | | | | - djm@cvs.openbsd.org 2005/07/17 06:49:04 [channels.c channels.h session.c session.h] Fix a number of X11 forwarding channel leaks: 1. Refuse multiple X11 forwarding requests on the same session 2. Clean up all listeners after a single_connection X11 forward, not just the one that made the single connection 3. Destroy X11 listeners when the session owning them goes away testing and ok dtucker@
* - markus@cvs.openbsd.org 2005/07/08 09:41:33Darren Tucker2005-07-141-2/+2
| | | | | | | | | | [channels.h] race when efd gets closed while there is still buffered data: change CHANNEL_EFD_OUTPUT_ACTIVE() 1) c->efd must always be valid AND 2a) no EOF has been seen OR 2b) there is buffered data report, initial fix and testing Chuck Cranor
* - (djm) OpenBSD CVS SyncDamien Miller2005-06-171-2/+3
| | | | | | | - djm@cvs.openbsd.org 2005/06/16 03:38:36 [channels.c channels.h clientloop.c clientloop.h ssh.c] move x11_get_proto from ssh.c to clientloop.c, to make muliplexed xfwd easier later; ok deraadt@
* - djm@cvs.openbsd.org 2005/03/01 10:09:52Damien Miller2005-03-011-4/+6
| | | | | | | | | | [auth-options.c channels.c channels.h clientloop.c compat.c compat.h] [misc.c misc.h readconf.c readconf.h servconf.c ssh.1 ssh.c ssh_config.5] [sshd_config.5] bz#413: allow optional specification of bind address for port forwardings. Patch originally by Dan Astorian, but worked on by several people Adds GatewayPorts=clientspecified option on server to allow remote forwards to bind to client-specified ports.
* - djm@cvs.openbsd.org 2004/10/29 21:47:15Darren Tucker2004-11-051-1/+2
| | | | | | | | [channels.c channels.h clientloop.c] fix some window size change bugs for multiplexed connections: windows sizes were not being updated if they had changed after ~^Z suspends and SIGWINCH was not being processed unless the first connection had requested a tty; ok markus
* - avsm@cvs.openbsd.org 2004/08/11 21:43:05Darren Tucker2004-08-131-2/+2
| | | | | [channels.c channels.h clientloop.c misc.c misc.h serverloop.c ssh-agent.c] some signed/unsigned int comparison cleanups; markus@ ok
* - djm@cvs.openbsd.org 2004/06/13 15:03:02Damien Miller2004-06-151-2/+5
| | | | | | | [channels.c channels.h clientloop.c clientloop.h includes.h readconf.c] [readconf.h scp.1 sftp.1 ssh.1 ssh.c ssh_config.5] implement session multiplexing in the client (the server has supported this since 2.0); ok markus@
* - djm@cvs.openbsd.org 2004/05/21 11:33:11Darren Tucker2004-05-241-1/+3
| | | | | | | [channels.c channels.h clientloop.c serverloop.c ssh.1] bz #756: add support for the cancel-tcpip-forward request for the server and the client (through the ~C commandline). reported by z3p AT twistedmatrix.com; ok markus@
* - markus@cvs.openbsd.org 2003/09/23 20:41:11Darren Tucker2003-10-021-2/+1
| | | | | [channels.c channels.h clientloop.c] move client only agent code to clientloop.c
* - (bal) AIX tty data limiting patch fix by leigh@solinno.co.ukBen Lindstrom2002-07-221-0/+1
|
* - markus@cvs.openbsd.org 2002/06/24 14:33:27Ben Lindstrom2002-06-251-8/+8
| | | | | [channels.c channels.h clientloop.c serverloop.c] move channel counter to u_int
* - deraadt@cvs.openbsd.org 2002/06/23 21:06:41Ben Lindstrom2002-06-231-2/+2
| | | | | | | [channels.c channels.h session.c session.h] display, screen, row, col, xpixel, ypixel are u_int; markus ok - (bal) Also fixed IPADDR_IN_DISPLAY case where display, screen, row, col, xpixel are u_int.
* - markus@cvs.openbsd.org 2002/06/10 22:28:41Ben Lindstrom2002-06-111-4/+1
| | | | | | [channels.c channels.h session.c] move creation of agent socket to session.c; no need for uidswapping in channel.c.
* - markus@cvs.openbsd.org 2002/03/26 22:50:39Ben Lindstrom2002-03-271-2/+2
| | | | | [channels.h] CHANNEL_EFD_OUTPUT_ACTIVE is false for CHAN_CLOSE_RCVD, too
* - markus@cvs.openbsd.org 2002/03/25 21:13:51Ben Lindstrom2002-03-261-1/+13
| | | | | | [channels.c channels.h compat.c compat.h nchan.c] don't send stderr data after EOF, accept this from older known (broken) sshd servers only, fixes http://bugzilla.mindrot.org/show_bug.cgi?id=179
* - stevesk@cvs.openbsd.org 2002/03/04 17:27:39Ben Lindstrom2002-03-051-1/+2
| | | | | | | | | | | [auth-krb5.c auth-options.h auth.h authfd.h authfile.h bufaux.h buffer.h channels.h cipher.h compat.h compress.h crc32.h deattack.c getput.h groupaccess.c misc.c mpaux.h packet.h readconf.h rsa.h scard.h servconf.h ssh-agent.c ssh.h ssh2.h sshpty.h sshtty.c ttymodes.h uuencode.c xmalloc.h] $OpenBSD$ and RCSID() cleanup: don't use RCSID() in .h files; add missing RCSID() to .c files and remove dup /*$OpenBSD$*/ from .c files. ok markus@
* - markus@cvs.openbsd.org 2002/02/14 23:28:00Damien Miller2002-02-191-8/+8
| | | | | | [channels.h session.c ssh.c] increase the SSH v2 window size to 4 packets. comsumes a little bit more memory for slow receivers but increases througput.
* - markus@cvs.openbsd.org 2002/02/05 14:32:55Damien Miller2002-02-081-2/+1
| | | | | [channels.c channels.h ssh.c] merge channel_request() into channel_request_start()
* - markus@cvs.openbsd.org 2002/02/03 17:58:21Damien Miller2002-02-051-5/+3
| | | | | | | [channels.c channels.h ssh.c] generic callbacks are not really used, remove and add a callback for msg of type SSH2_MSG_CHANNEL_OPEN_CONFIRMATION ok djm@
* - markus@cvs.openbsd.org 2002/02/03 17:55:55Damien Miller2002-02-051-2/+1
| | | | | [channels.c channels.h] remove unused channel_input_channel_request
* - markus@cvs.openbsd.org 2002/01/16 13:17:51Damien Miller2002-01-221-5/+3
| | | | | [channels.c channels.h serverloop.c ssh.c] wrapper for channel_setup_fwd_listener
* - markus@cvs.openbsd.org 2002/01/14 13:57:03Damien Miller2002-01-221-2/+2
| | | | | [channels.h nchan.c] (c) 2002
* - markus@cvs.openbsd.org 2002/01/14 13:55:55Damien Miller2002-01-221-12/+8
| | | | | [channels.c channels.h nchan.c] remove function pointers for events, remove chan_init*; ok provos@
* - markus@cvs.openbsd.org 2002/01/13 21:31:20Damien Miller2002-01-221-11/+11
| | | | | | [channels.h nchan.c] add chan_set_[io]state(), order states, state is now an u_int, simplifies debugging messages; ok provos@
* - markus@cvs.openbsd.org 2001/12/28 15:06:00Damien Miller2002-01-221-15/+15
| | | | | [auth2.c auth2-chall.c channels.c channels.h clientloop.c dispatch.c dispatch.h kex.c kex.h serverloop.c ssh.c sshconnect2.c] remove plen from the dispatch fn. it's no longer used.
* - djm@cvs.openbsd.org 2001/12/20 22:50:24Damien Miller2001-12-211-15/+15
| | | | | | | | | [auth2.c auth2-chall.c channels.c channels.h clientloop.c dispatch.c] [dispatch.h kex.c kex.h packet.c packet.h serverloop.c ssh.c] [sshconnect2.c] Conformance fix: we should send failing packet sequence number when responding with a SSH_MSG_UNIMPLEMENTED message. Spotted by yakk@yakk.dot.net; ok markus@
* - markus@cvs.openbsd.org 2001/12/20 16:37:29Damien Miller2001-12-211-3/+3
| | | | | | [channels.c channels.h session.c] setup x11 listen socket for just one connect if the client requests so. (v2 only, but the openssh client does not support this feature).
* - (stevesk) OpenBSD CVS sync X11 localhost displayKevin Steves2001-12-191-2/+2
| | | | | | | | | | | | | | | | - stevesk@cvs.openbsd.org 2001/11/29 14:10:51 [channels.h channels.c session.c] sshd X11 fake server will now listen on localhost by default: $ echo $DISPLAY localhost:12.0 $ netstat -an|grep 6012 tcp 0 0 127.0.0.1.6012 *.* LISTEN tcp6 0 0 ::1.6012 *.* LISTEN sshd_config gatewayports=yes can be used to revert back to the old behavior. will control this with another option later. ok markus@ - stevesk@cvs.openbsd.org 2001/12/19 08:43:11 [includes.h session.c] handle utsname.nodename case for FamilyLocal X authorization; ok markus@
* - stevesk@cvs.openbsd.org 2001/11/29 19:06:39Ben Lindstrom2001-12-061-2/+1
| | | | | [channels.h] remove dead function prototype; ok markus@
* - markus@cvs.openbsd.org 2001/11/07 22:53:21Damien Miller2001-11-121-2/+2
| | | | | [channels.h] crank c->path to 256 so they can hold a full hostname; dwd@bell-labs.com
* - (djm) OpenBSD CVS SyncDamien Miller2001-10-121-2/+2
| | | | | | | | | | - markus@cvs.openbsd.org 2001/10/10 22:18:47 [channels.c channels.h clientloop.c nchan.c serverloop.c] [session.c session.h] try to keep channels open until an exit-status message is sent. 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 ?