summaryrefslogtreecommitdiff
path: root/channels.h
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2010-03-31 10:46:28 +0100
committerColin Watson <cjwatson@debian.org>2010-03-31 10:46:28 +0100
commitefd3d4522636ae029488c2e9730b60c88e257d2e (patch)
tree31e02ac3f16090ce8c53448677356b2b7f423683 /channels.h
parentbbec4db36d464ea1d464a707625125f9fd5c7b5e (diff)
parentd1a87e462e1db89f19cd960588d0c6b287cb5ccc (diff)
* New upstream release (LP: #535029).
- After a transition period of about 10 years, this release disables SSH protocol 1 by default. Clients and servers that need to use the legacy protocol must explicitly enable it in ssh_config / sshd_config or on the command-line. - Remove the libsectok/OpenSC-based smartcard code and add support for PKCS#11 tokens. This support is enabled by default in the Debian packaging, since it now doesn't involve additional library dependencies (closes: #231472, LP: #16918). - Add support for certificate authentication of users and hosts using a new, minimal OpenSSH certificate format (closes: #482806). - Added a 'netcat mode' to ssh(1): "ssh -W host:port ...". - Add the ability to revoke keys in sshd(8) and ssh(1). (For the Debian package, this overlaps with the key blacklisting facility added in openssh 1:4.7p1-9, but with different file formats and slightly different scopes; for the moment, I've roughly merged the two.) - Various multiplexing improvements, including support for requesting port-forwardings via the multiplex protocol (closes: #360151). - Allow setting an explicit umask on the sftp-server(8) commandline to override whatever default the user has (closes: #496843). - Many sftp client improvements, including tab-completion, more options, and recursive transfer support for get/put (LP: #33378). The old mget/mput commands never worked properly and have been removed (closes: #270399, #428082). - Do not prompt for a passphrase if we fail to open a keyfile, and log the reason why the open failed to debug (closes: #431538). - Prevent sftp from crashing when given a "-" without a command. Also, allow whitespace to follow a "-" (closes: #531561).
Diffstat (limited to 'channels.h')
-rw-r--r--channels.h23
1 files changed, 19 insertions, 4 deletions
diff --git a/channels.h b/channels.h
index 1488ed7e5..cc71885f4 100644
--- a/channels.h
+++ b/channels.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: channels.h,v 1.98 2009/02/12 03:00:56 djm Exp $ */ 1/* $OpenBSD: channels.h,v 1.103 2010/01/26 01:28:35 djm Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -53,7 +53,9 @@
53#define SSH_CHANNEL_CONNECTING 12 53#define SSH_CHANNEL_CONNECTING 12
54#define SSH_CHANNEL_DYNAMIC 13 54#define SSH_CHANNEL_DYNAMIC 13
55#define SSH_CHANNEL_ZOMBIE 14 /* Almost dead. */ 55#define SSH_CHANNEL_ZOMBIE 14 /* Almost dead. */
56#define SSH_CHANNEL_MAX_TYPE 15 56#define SSH_CHANNEL_MUX_LISTENER 15 /* Listener for mux conn. */
57#define SSH_CHANNEL_MUX_CLIENT 16 /* Conn. to mux slave */
58#define SSH_CHANNEL_MAX_TYPE 17
57 59
58struct Channel; 60struct Channel;
59typedef struct Channel Channel; 61typedef struct Channel Channel;
@@ -81,6 +83,9 @@ struct channel_connect {
81 struct addrinfo *ai, *aitop; 83 struct addrinfo *ai, *aitop;
82}; 84};
83 85
86/* Callbacks for mux channels back into client-specific code */
87typedef int mux_callback_fn(struct Channel *);
88
84struct Channel { 89struct Channel {
85 int type; /* channel type/state */ 90 int type; /* channel type/state */
86 int self; /* my own channel identifier */ 91 int self; /* my own channel identifier */
@@ -92,12 +97,16 @@ struct Channel {
92 int wfd; /* write fd */ 97 int wfd; /* write fd */
93 int efd; /* extended fd */ 98 int efd; /* extended fd */
94 int sock; /* sock fd */ 99 int sock; /* sock fd */
95 int ctl_fd; /* control fd (client sharing) */ 100 int ctl_chan; /* control channel (multiplexed connections) */
96 int isatty; /* rfd is a tty */ 101 int isatty; /* rfd is a tty */
97 int wfd_isatty; /* wfd is a tty */ 102 int wfd_isatty; /* wfd is a tty */
98 int client_tty; /* (client) TTY has been requested */ 103 int client_tty; /* (client) TTY has been requested */
99 int force_drain; /* force close on iEOF */ 104 int force_drain; /* force close on iEOF */
100 int delayed; /* fdset hack */ 105 int delayed; /* post-select handlers for newly created
106 * channels are delayed until the first call
107 * to a matching pre-select handler.
108 * this way post-select handlers are not
109 * accidenly called if a FD gets reused */
101 Buffer input; /* data read from socket, to be sent over 110 Buffer input; /* data read from socket, to be sent over
102 * encrypted connection */ 111 * encrypted connection */
103 Buffer output; /* data received over encrypted connection for 112 Buffer output; /* data received over encrypted connection for
@@ -138,6 +147,10 @@ struct Channel {
138 147
139 /* non-blocking connect */ 148 /* non-blocking connect */
140 struct channel_connect connect_ctx; 149 struct channel_connect connect_ctx;
150
151 /* multiplexing protocol hook, called for each packet received */
152 mux_callback_fn *mux_rcb;
153 void *mux_ctx;
141}; 154};
142 155
143#define CHAN_EXTENDED_IGNORE 0 156#define CHAN_EXTENDED_IGNORE 0
@@ -168,6 +181,7 @@ struct Channel {
168#define CHAN_CLOSE_RCVD 0x02 181#define CHAN_CLOSE_RCVD 0x02
169#define CHAN_EOF_SENT 0x04 182#define CHAN_EOF_SENT 0x04
170#define CHAN_EOF_RCVD 0x08 183#define CHAN_EOF_RCVD 0x08
184#define CHAN_LOCAL 0x10
171 185
172#define CHAN_RBUF 16*1024 186#define CHAN_RBUF 16*1024
173 187
@@ -239,6 +253,7 @@ void channel_clear_adm_permitted_opens(void);
239void channel_print_adm_permitted_opens(void); 253void channel_print_adm_permitted_opens(void);
240int channel_input_port_forward_request(int, int); 254int channel_input_port_forward_request(int, int);
241Channel *channel_connect_to(const char *, u_short, char *, char *); 255Channel *channel_connect_to(const char *, u_short, char *, char *);
256Channel *channel_connect_stdio_fwd(const char*, u_short, int, int);
242Channel *channel_connect_by_listen_address(u_short, char *, char *); 257Channel *channel_connect_by_listen_address(u_short, char *, char *);
243int channel_request_remote_forwarding(const char *, u_short, 258int channel_request_remote_forwarding(const char *, u_short,
244 const char *, u_short); 259 const char *, u_short);