summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--auth2-chall.c6
-rw-r--r--auth2.c16
-rw-r--r--channels.c32
-rw-r--r--channels.h30
-rw-r--r--clientloop.c12
-rw-r--r--dispatch.c9
-rw-r--r--dispatch.h6
-rw-r--r--kex.c8
-rw-r--r--kex.h4
-rw-r--r--serverloop.c14
-rw-r--r--ssh.c4
-rw-r--r--sshconnect2.c26
13 files changed, 88 insertions, 85 deletions
diff --git a/ChangeLog b/ChangeLog
index ae6625e8c..ee310fc80 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -71,6 +71,10 @@
71 [packet.c packet.h serverloop.c session.c ssh.c sshconnect1.c] 71 [packet.c packet.h serverloop.c session.c ssh.c sshconnect1.c]
72 [sshconnect2.c sshd.c] 72 [sshconnect2.c sshd.c]
73 packet_read* no longer return the packet length, since it's not used. 73 packet_read* no longer return the packet length, since it's not used.
74 - markus@cvs.openbsd.org 2001/12/28 15:06:00
75 [auth2.c auth2-chall.c channels.c channels.h clientloop.c dispatch.c]
76 [dispatch.h kex.c kex.h serverloop.c ssh.c sshconnect2.c]
77 remove plen from the dispatch fn. it's no longer used.
74 78
75 79
7620020121 8020020121
@@ -7219,4 +7223,4 @@
7219 - Wrote replacements for strlcpy and mkdtemp 7223 - Wrote replacements for strlcpy and mkdtemp
7220 - Released 1.0pre1 7224 - Released 1.0pre1
7221 7225
7222$Id: ChangeLog,v 1.1743 2002/01/22 12:16:32 djm Exp $ 7226$Id: ChangeLog,v 1.1744 2002/01/22 12:17:30 djm Exp $
diff --git a/auth2-chall.c b/auth2-chall.c
index 4211b0f64..d9268cb50 100644
--- a/auth2-chall.c
+++ b/auth2-chall.c
@@ -23,7 +23,7 @@
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */ 24 */
25#include "includes.h" 25#include "includes.h"
26RCSID("$OpenBSD: auth2-chall.c,v 1.12 2001/12/28 12:14:27 markus Exp $"); 26RCSID("$OpenBSD: auth2-chall.c,v 1.13 2001/12/28 15:06:00 markus Exp $");
27 27
28#include "ssh2.h" 28#include "ssh2.h"
29#include "auth.h" 29#include "auth.h"
@@ -35,7 +35,7 @@ RCSID("$OpenBSD: auth2-chall.c,v 1.12 2001/12/28 12:14:27 markus Exp $");
35 35
36static int auth2_challenge_start(Authctxt *); 36static int auth2_challenge_start(Authctxt *);
37static int send_userauth_info_request(Authctxt *); 37static int send_userauth_info_request(Authctxt *);
38static void input_userauth_info_response(int, int, u_int32_t, void *); 38static void input_userauth_info_response(int, u_int32_t, void *);
39 39
40#ifdef BSD_AUTH 40#ifdef BSD_AUTH
41extern KbdintDevice bsdauth_device; 41extern KbdintDevice bsdauth_device;
@@ -234,7 +234,7 @@ send_userauth_info_request(Authctxt *authctxt)
234} 234}
235 235
236static void 236static void
237input_userauth_info_response(int type, int plen, u_int32_t seq, void *ctxt) 237input_userauth_info_response(int type, u_int32_t seq, void *ctxt)
238{ 238{
239 Authctxt *authctxt = ctxt; 239 Authctxt *authctxt = ctxt;
240 KbdintAuthctxt *kbdintctxt; 240 KbdintAuthctxt *kbdintctxt;
diff --git a/auth2.c b/auth2.c
index 1ad905f18..e48bed7c1 100644
--- a/auth2.c
+++ b/auth2.c
@@ -23,7 +23,7 @@
23 */ 23 */
24 24
25#include "includes.h" 25#include "includes.h"
26RCSID("$OpenBSD: auth2.c,v 1.79 2001/12/28 12:14:27 markus Exp $"); 26RCSID("$OpenBSD: auth2.c,v 1.80 2001/12/28 15:06:00 markus Exp $");
27 27
28#include <openssl/evp.h> 28#include <openssl/evp.h>
29 29
@@ -69,9 +69,9 @@ struct Authmethod {
69 69
70/* protocol */ 70/* protocol */
71 71
72static void input_service_request(int, int, u_int32_t, void *); 72static void input_service_request(int, u_int32_t, void *);
73static void input_userauth_request(int, int, u_int32_t, void *); 73static void input_userauth_request(int, u_int32_t, void *);
74static void protocol_error(int, int, u_int32_t, void *); 74static void protocol_error(int, u_int32_t, void *);
75 75
76/* helper */ 76/* helper */
77static Authmethod *authmethod_lookup(const char *); 77static Authmethod *authmethod_lookup(const char *);
@@ -130,9 +130,9 @@ do_authentication2(void)
130} 130}
131 131
132static void 132static void
133protocol_error(int type, int plen, u_int32_t seq, void *ctxt) 133protocol_error(int type, u_int32_t seq, void *ctxt)
134{ 134{
135 log("auth: protocol error: type %d plen %d", type, plen); 135 log("auth: protocol error: type %d", type);
136 packet_start(SSH2_MSG_UNIMPLEMENTED); 136 packet_start(SSH2_MSG_UNIMPLEMENTED);
137 packet_put_int(seq); 137 packet_put_int(seq);
138 packet_send(); 138 packet_send();
@@ -140,7 +140,7 @@ protocol_error(int type, int plen, u_int32_t seq, void *ctxt)
140} 140}
141 141
142static void 142static void
143input_service_request(int type, int plen, u_int32_t seq, void *ctxt) 143input_service_request(int type, u_int32_t seq, void *ctxt)
144{ 144{
145 Authctxt *authctxt = ctxt; 145 Authctxt *authctxt = ctxt;
146 u_int len; 146 u_int len;
@@ -173,7 +173,7 @@ input_service_request(int type, int plen, u_int32_t seq, void *ctxt)
173} 173}
174 174
175static void 175static void
176input_userauth_request(int type, int plen, u_int32_t seq, void *ctxt) 176input_userauth_request(int type, u_int32_t seq, void *ctxt)
177{ 177{
178 Authctxt *authctxt = ctxt; 178 Authctxt *authctxt = ctxt;
179 Authmethod *m = NULL; 179 Authmethod *m = NULL;
diff --git a/channels.c b/channels.c
index fd1b124ee..7c0997c5d 100644
--- a/channels.c
+++ b/channels.c
@@ -39,7 +39,7 @@
39 */ 39 */
40 40
41#include "includes.h" 41#include "includes.h"
42RCSID("$OpenBSD: channels.c,v 1.153 2001/12/28 14:50:54 markus Exp $"); 42RCSID("$OpenBSD: channels.c,v 1.154 2001/12/28 15:06:00 markus Exp $");
43 43
44#include "ssh.h" 44#include "ssh.h"
45#include "ssh1.h" 45#include "ssh1.h"
@@ -1710,7 +1710,7 @@ channel_output_poll(void)
1710/* -- protocol input */ 1710/* -- protocol input */
1711 1711
1712void 1712void
1713channel_input_data(int type, int plen, u_int32_t seq, void *ctxt) 1713channel_input_data(int type, u_int32_t seq, void *ctxt)
1714{ 1714{
1715 int id; 1715 int id;
1716 char *data; 1716 char *data;
@@ -1754,7 +1754,7 @@ channel_input_data(int type, int plen, u_int32_t seq, void *ctxt)
1754} 1754}
1755 1755
1756void 1756void
1757channel_input_extended_data(int type, int plen, u_int32_t seq, void *ctxt) 1757channel_input_extended_data(int type, u_int32_t seq, void *ctxt)
1758{ 1758{
1759 int id; 1759 int id;
1760 int tcode; 1760 int tcode;
@@ -1794,7 +1794,7 @@ channel_input_extended_data(int type, int plen, u_int32_t seq, void *ctxt)
1794} 1794}
1795 1795
1796void 1796void
1797channel_input_ieof(int type, int plen, u_int32_t seq, void *ctxt) 1797channel_input_ieof(int type, u_int32_t seq, void *ctxt)
1798{ 1798{
1799 int id; 1799 int id;
1800 Channel *c; 1800 Channel *c;
@@ -1815,7 +1815,7 @@ channel_input_ieof(int type, int plen, u_int32_t seq, void *ctxt)
1815} 1815}
1816 1816
1817void 1817void
1818channel_input_close(int type, int plen, u_int32_t seq, void *ctxt) 1818channel_input_close(int type, u_int32_t seq, void *ctxt)
1819{ 1819{
1820 int id; 1820 int id;
1821 Channel *c; 1821 Channel *c;
@@ -1853,7 +1853,7 @@ channel_input_close(int type, int plen, u_int32_t seq, void *ctxt)
1853 1853
1854/* proto version 1.5 overloads CLOSE_CONFIRMATION with OCLOSE */ 1854/* proto version 1.5 overloads CLOSE_CONFIRMATION with OCLOSE */
1855void 1855void
1856channel_input_oclose(int type, int plen, u_int32_t seq, void *ctxt) 1856channel_input_oclose(int type, u_int32_t seq, void *ctxt)
1857{ 1857{
1858 int id = packet_get_int(); 1858 int id = packet_get_int();
1859 Channel *c = channel_lookup(id); 1859 Channel *c = channel_lookup(id);
@@ -1865,7 +1865,7 @@ channel_input_oclose(int type, int plen, u_int32_t seq, void *ctxt)
1865} 1865}
1866 1866
1867void 1867void
1868channel_input_close_confirmation(int type, int plen, u_int32_t seq, void *ctxt) 1868channel_input_close_confirmation(int type, u_int32_t seq, void *ctxt)
1869{ 1869{
1870 int id = packet_get_int(); 1870 int id = packet_get_int();
1871 Channel *c = channel_lookup(id); 1871 Channel *c = channel_lookup(id);
@@ -1881,7 +1881,7 @@ channel_input_close_confirmation(int type, int plen, u_int32_t seq, void *ctxt)
1881} 1881}
1882 1882
1883void 1883void
1884channel_input_open_confirmation(int type, int plen, u_int32_t seq, void *ctxt) 1884channel_input_open_confirmation(int type, u_int32_t seq, void *ctxt)
1885{ 1885{
1886 int id, remote_id; 1886 int id, remote_id;
1887 Channel *c; 1887 Channel *c;
@@ -1928,7 +1928,7 @@ reason2txt(int reason)
1928} 1928}
1929 1929
1930void 1930void
1931channel_input_open_failure(int type, int plen, u_int32_t seq, void *ctxt) 1931channel_input_open_failure(int type, u_int32_t seq, void *ctxt)
1932{ 1932{
1933 int id, reason; 1933 int id, reason;
1934 char *msg = NULL, *lang = NULL; 1934 char *msg = NULL, *lang = NULL;
@@ -1959,7 +1959,7 @@ channel_input_open_failure(int type, int plen, u_int32_t seq, void *ctxt)
1959} 1959}
1960 1960
1961void 1961void
1962channel_input_channel_request(int type, int plen, u_int32_t seq, void *ctxt) 1962channel_input_channel_request(int type, u_int32_t seq, void *ctxt)
1963{ 1963{
1964 int id; 1964 int id;
1965 Channel *c; 1965 Channel *c;
@@ -1984,7 +1984,7 @@ channel_input_channel_request(int type, int plen, u_int32_t seq, void *ctxt)
1984} 1984}
1985 1985
1986void 1986void
1987channel_input_window_adjust(int type, int plen, u_int32_t seq, void *ctxt) 1987channel_input_window_adjust(int type, u_int32_t seq, void *ctxt)
1988{ 1988{
1989 Channel *c; 1989 Channel *c;
1990 int id, adjust; 1990 int id, adjust;
@@ -2008,7 +2008,7 @@ channel_input_window_adjust(int type, int plen, u_int32_t seq, void *ctxt)
2008} 2008}
2009 2009
2010void 2010void
2011channel_input_port_open(int type, int plen, u_int32_t seq, void *ctxt) 2011channel_input_port_open(int type, u_int32_t seq, void *ctxt)
2012{ 2012{
2013 Channel *c = NULL; 2013 Channel *c = NULL;
2014 u_short host_port; 2014 u_short host_port;
@@ -2615,7 +2615,7 @@ x11_connect_display(void)
2615 */ 2615 */
2616 2616
2617void 2617void
2618x11_input_open(int type, int plen, u_int32_t seq, void *ctxt) 2618x11_input_open(int type, u_int32_t seq, void *ctxt)
2619{ 2619{
2620 Channel *c = NULL; 2620 Channel *c = NULL;
2621 int remote_id, sock = 0; 2621 int remote_id, sock = 0;
@@ -2662,7 +2662,7 @@ x11_input_open(int type, int plen, u_int32_t seq, void *ctxt)
2662 2662
2663/* dummy protocol handler that denies SSH-1 requests (agent/x11) */ 2663/* dummy protocol handler that denies SSH-1 requests (agent/x11) */
2664void 2664void
2665deny_input_open(int type, int plen, u_int32_t seq, void *ctxt) 2665deny_input_open(int type, u_int32_t seq, void *ctxt)
2666{ 2666{
2667 int rchan = packet_get_int(); 2667 int rchan = packet_get_int();
2668 switch (type) { 2668 switch (type) {
@@ -2673,7 +2673,7 @@ deny_input_open(int type, int plen, u_int32_t seq, void *ctxt)
2673 error("Warning: ssh server tried X11 forwarding."); 2673 error("Warning: ssh server tried X11 forwarding.");
2674 break; 2674 break;
2675 default: 2675 default:
2676 error("deny_input_open: type %d plen %d", type, plen); 2676 error("deny_input_open: type %d", type);
2677 break; 2677 break;
2678 } 2678 }
2679 error("Warning: this is probably a break in attempt by a malicious server."); 2679 error("Warning: this is probably a break in attempt by a malicious server.");
@@ -2873,7 +2873,7 @@ auth_input_request_forwarding(struct passwd * pw)
2873/* This is called to process an SSH_SMSG_AGENT_OPEN message. */ 2873/* This is called to process an SSH_SMSG_AGENT_OPEN message. */
2874 2874
2875void 2875void
2876auth_input_open_request(int type, int plen, u_int32_t seq, void *ctxt) 2876auth_input_open_request(int type, u_int32_t seq, void *ctxt)
2877{ 2877{
2878 Channel *c = NULL; 2878 Channel *c = NULL;
2879 int remote_id, sock; 2879 int remote_id, sock;
diff --git a/channels.h b/channels.h
index c54b23e67..40142c509 100644
--- a/channels.h
+++ b/channels.h
@@ -32,7 +32,7 @@
32 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 32 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
33 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 */ 34 */
35/* RCSID("$OpenBSD: channels.h,v 1.55 2001/12/20 22:50:24 djm Exp $"); */ 35/* RCSID("$OpenBSD: channels.h,v 1.56 2001/12/28 15:06:00 markus Exp $"); */
36 36
37#ifndef CHANNEL_H 37#ifndef CHANNEL_H
38#define CHANNEL_H 38#define CHANNEL_H
@@ -157,17 +157,17 @@ int channel_close_fd(int *);
157 157
158/* protocol handler */ 158/* protocol handler */
159 159
160void channel_input_channel_request(int, int, u_int32_t, void *); 160void channel_input_channel_request(int, u_int32_t, void *);
161void channel_input_close(int, int, u_int32_t, void *); 161void channel_input_close(int, u_int32_t, void *);
162void channel_input_close_confirmation(int, int, u_int32_t, void *); 162void channel_input_close_confirmation(int, u_int32_t, void *);
163void channel_input_data(int, int, u_int32_t, void *); 163void channel_input_data(int, u_int32_t, void *);
164void channel_input_extended_data(int, int, u_int32_t, void *); 164void channel_input_extended_data(int, u_int32_t, void *);
165void channel_input_ieof(int, int, u_int32_t, void *); 165void channel_input_ieof(int, u_int32_t, void *);
166void channel_input_oclose(int, int, u_int32_t, void *); 166void channel_input_oclose(int, u_int32_t, void *);
167void channel_input_open_confirmation(int, int, u_int32_t, void *); 167void channel_input_open_confirmation(int, u_int32_t, void *);
168void channel_input_open_failure(int, int, u_int32_t, void *); 168void channel_input_open_failure(int, u_int32_t, void *);
169void channel_input_port_open(int, int, u_int32_t, void *); 169void channel_input_port_open(int, u_int32_t, void *);
170void channel_input_window_adjust(int, int, u_int32_t, void *); 170void channel_input_window_adjust(int, u_int32_t, void *);
171 171
172/* file descriptor handling (read/write) */ 172/* file descriptor handling (read/write) */
173 173
@@ -199,9 +199,9 @@ channel_request_forwarding(const char *, u_short, const char *, u_short, int,
199 199
200int x11_connect_display(void); 200int x11_connect_display(void);
201int x11_create_display_inet(int, int, int); 201int x11_create_display_inet(int, int, int);
202void x11_input_open(int, int, u_int32_t, void *); 202void x11_input_open(int, u_int32_t, void *);
203void x11_request_forwarding_with_spoofing(int, const char *, const char *); 203void x11_request_forwarding_with_spoofing(int, const char *, const char *);
204void deny_input_open(int, int, u_int32_t, void *); 204void deny_input_open(int, u_int32_t, void *);
205 205
206/* agent forwarding */ 206/* agent forwarding */
207 207
@@ -209,7 +209,7 @@ void auth_request_forwarding(void);
209char *auth_get_socket_name(void); 209char *auth_get_socket_name(void);
210void auth_sock_cleanup_proc(void *); 210void auth_sock_cleanup_proc(void *);
211int auth_input_request_forwarding(struct passwd *); 211int auth_input_request_forwarding(struct passwd *);
212void auth_input_open_request(int, int, u_int32_t, void *); 212void auth_input_open_request(int, u_int32_t, void *);
213 213
214/* channel close */ 214/* channel close */
215 215
diff --git a/clientloop.c b/clientloop.c
index 3231b212e..e66b60cf5 100644
--- a/clientloop.c
+++ b/clientloop.c
@@ -59,7 +59,7 @@
59 */ 59 */
60 60
61#include "includes.h" 61#include "includes.h"
62RCSID("$OpenBSD: clientloop.c,v 1.93 2001/12/28 12:14:27 markus Exp $"); 62RCSID("$OpenBSD: clientloop.c,v 1.94 2001/12/28 15:06:00 markus Exp $");
63 63
64#include "ssh.h" 64#include "ssh.h"
65#include "ssh1.h" 65#include "ssh1.h"
@@ -1008,7 +1008,7 @@ client_loop(int have_pty, int escape_char_arg, int ssh2_chan_id)
1008/*********/ 1008/*********/
1009 1009
1010static void 1010static void
1011client_input_stdout_data(int type, int plen, u_int32_t seq, void *ctxt) 1011client_input_stdout_data(int type, u_int32_t seq, void *ctxt)
1012{ 1012{
1013 u_int data_len; 1013 u_int data_len;
1014 char *data = packet_get_string(&data_len); 1014 char *data = packet_get_string(&data_len);
@@ -1018,7 +1018,7 @@ client_input_stdout_data(int type, int plen, u_int32_t seq, void *ctxt)
1018 xfree(data); 1018 xfree(data);
1019} 1019}
1020static void 1020static void
1021client_input_stderr_data(int type, int plen, u_int32_t seq, void *ctxt) 1021client_input_stderr_data(int type, u_int32_t seq, void *ctxt)
1022{ 1022{
1023 u_int data_len; 1023 u_int data_len;
1024 char *data = packet_get_string(&data_len); 1024 char *data = packet_get_string(&data_len);
@@ -1028,7 +1028,7 @@ client_input_stderr_data(int type, int plen, u_int32_t seq, void *ctxt)
1028 xfree(data); 1028 xfree(data);
1029} 1029}
1030static void 1030static void
1031client_input_exit_status(int type, int plen, u_int32_t seq, void *ctxt) 1031client_input_exit_status(int type, u_int32_t seq, void *ctxt)
1032{ 1032{
1033 exit_status = packet_get_int(); 1033 exit_status = packet_get_int();
1034 packet_check_eom(); 1034 packet_check_eom();
@@ -1149,7 +1149,7 @@ client_request_agent(const char *request_type, int rchan)
1149 1149
1150/* XXXX move to generic input handler */ 1150/* XXXX move to generic input handler */
1151static void 1151static void
1152client_input_channel_open(int type, int plen, u_int32_t seq, void *ctxt) 1152client_input_channel_open(int type, u_int32_t seq, void *ctxt)
1153{ 1153{
1154 Channel *c = NULL; 1154 Channel *c = NULL;
1155 char *ctype; 1155 char *ctype;
@@ -1201,7 +1201,7 @@ client_input_channel_open(int type, int plen, u_int32_t seq, void *ctxt)
1201 xfree(ctype); 1201 xfree(ctype);
1202} 1202}
1203static void 1203static void
1204client_input_channel_req(int type, int plen, u_int32_t seq, void *ctxt) 1204client_input_channel_req(int type, u_int32_t seq, void *ctxt)
1205{ 1205{
1206 Channel *c = NULL; 1206 Channel *c = NULL;
1207 int id, reply, success = 0; 1207 int id, reply, success = 0;
diff --git a/dispatch.c b/dispatch.c
index 871fa24d2..157c25cbb 100644
--- a/dispatch.c
+++ b/dispatch.c
@@ -22,7 +22,7 @@
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 */ 23 */
24#include "includes.h" 24#include "includes.h"
25RCSID("$OpenBSD: dispatch.c,v 1.13 2001/12/28 14:50:54 markus Exp $"); 25RCSID("$OpenBSD: dispatch.c,v 1.14 2001/12/28 15:06:00 markus Exp $");
26 26
27#include "ssh1.h" 27#include "ssh1.h"
28#include "ssh2.h" 28#include "ssh2.h"
@@ -37,10 +37,9 @@ RCSID("$OpenBSD: dispatch.c,v 1.13 2001/12/28 14:50:54 markus Exp $");
37dispatch_fn *dispatch[DISPATCH_MAX]; 37dispatch_fn *dispatch[DISPATCH_MAX];
38 38
39void 39void
40dispatch_protocol_error(int type, int plen, u_int32_t seq, void *ctxt) 40dispatch_protocol_error(int type, u_int32_t seq, void *ctxt)
41{ 41{
42 fatal("dispatch_protocol_error: type %d seq %u plen %d", type, 42 fatal("dispatch_protocol_error: type %d seq %u", type, seq);
43 seq, plen);
44} 43}
45void 44void
46dispatch_init(dispatch_fn *dflt) 45dispatch_init(dispatch_fn *dflt)
@@ -69,7 +68,7 @@ dispatch_run(int mode, int *done, void *ctxt)
69 return; 68 return;
70 } 69 }
71 if (type > 0 && type < DISPATCH_MAX && dispatch[type] != NULL) 70 if (type > 0 && type < DISPATCH_MAX && dispatch[type] != NULL)
72 (*dispatch[type])(type, 1234, seqnr, ctxt); 71 (*dispatch[type])(type, seqnr, ctxt);
73 else 72 else
74 packet_disconnect("protocol error: rcvd type %d", type); 73 packet_disconnect("protocol error: rcvd type %d", type);
75 if (done != NULL && *done) 74 if (done != NULL && *done)
diff --git a/dispatch.h b/dispatch.h
index 127ec1067..78786b3ff 100644
--- a/dispatch.h
+++ b/dispatch.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: dispatch.h,v 1.7 2001/12/20 22:50:24 djm Exp $ */ 1/* $OpenBSD: dispatch.h,v 1.8 2001/12/28 15:06:00 markus Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2000 Markus Friedl. All rights reserved. 4 * Copyright (c) 2000 Markus Friedl. All rights reserved.
@@ -28,9 +28,9 @@ enum {
28 DISPATCH_NONBLOCK 28 DISPATCH_NONBLOCK
29}; 29};
30 30
31typedef void dispatch_fn(int, int, u_int32_t, void *); 31typedef void dispatch_fn(int, u_int32_t, void *);
32 32
33void dispatch_init(dispatch_fn *); 33void dispatch_init(dispatch_fn *);
34void dispatch_set(int, dispatch_fn *); 34void dispatch_set(int, dispatch_fn *);
35void dispatch_run(int, int *, void *); 35void dispatch_run(int, int *, void *);
36void dispatch_protocol_error(int, int, u_int32_t, void *); 36void dispatch_protocol_error(int, u_int32_t, void *);
diff --git a/kex.c b/kex.c
index 139a509c2..255cc7431 100644
--- a/kex.c
+++ b/kex.c
@@ -23,7 +23,7 @@
23 */ 23 */
24 24
25#include "includes.h" 25#include "includes.h"
26RCSID("$OpenBSD: kex.c,v 1.40 2001/12/28 14:50:54 markus Exp $"); 26RCSID("$OpenBSD: kex.c,v 1.41 2001/12/28 15:06:00 markus Exp $");
27 27
28#include <openssl/crypto.h> 28#include <openssl/crypto.h>
29 29
@@ -107,9 +107,9 @@ kex_prop_free(char **proposal)
107} 107}
108 108
109static void 109static void
110kex_protocol_error(int type, int plen, u_int32_t seq, void *ctxt) 110kex_protocol_error(int type, u_int32_t seq, void *ctxt)
111{ 111{
112 error("Hm, kex protocol error: type %d plen %d", type, plen); 112 error("Hm, kex protocol error: type %d seq %u", type, seq);
113} 113}
114 114
115static void 115static void
@@ -164,7 +164,7 @@ kex_send_kexinit(Kex *kex)
164} 164}
165 165
166void 166void
167kex_input_kexinit(int type, int plen, u_int32_t seq, void *ctxt) 167kex_input_kexinit(int type, u_int32_t seq, void *ctxt)
168{ 168{
169 char *ptr; 169 char *ptr;
170 int dlen; 170 int dlen;
diff --git a/kex.h b/kex.h
index ba650ea05..7bd6bc215 100644
--- a/kex.h
+++ b/kex.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: kex.h,v 1.27 2001/12/20 22:50:24 djm Exp $ */ 1/* $OpenBSD: kex.h,v 1.28 2001/12/28 15:06:00 markus Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. 4 * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
@@ -115,7 +115,7 @@ Kex *kex_setup(char *[PROPOSAL_MAX]);
115void kex_finish(Kex *); 115void kex_finish(Kex *);
116 116
117void kex_send_kexinit(Kex *); 117void kex_send_kexinit(Kex *);
118void kex_input_kexinit(int, int, u_int32_t, void *); 118void kex_input_kexinit(int, u_int32_t, void *);
119void kex_derive_keys(Kex *, u_char *, BIGNUM *); 119void kex_derive_keys(Kex *, u_char *, BIGNUM *);
120 120
121void kexdh(Kex *); 121void kexdh(Kex *);
diff --git a/serverloop.c b/serverloop.c
index d2f8d3d61..0c75b05c9 100644
--- a/serverloop.c
+++ b/serverloop.c
@@ -35,7 +35,7 @@
35 */ 35 */
36 36
37#include "includes.h" 37#include "includes.h"
38RCSID("$OpenBSD: serverloop.c,v 1.92 2001/12/28 14:50:54 markus Exp $"); 38RCSID("$OpenBSD: serverloop.c,v 1.93 2001/12/28 15:06:00 markus Exp $");
39 39
40#include "xmalloc.h" 40#include "xmalloc.h"
41#include "packet.h" 41#include "packet.h"
@@ -782,7 +782,7 @@ server_loop2(Authctxt *authctxt)
782} 782}
783 783
784static void 784static void
785server_input_channel_failure(int type, int plen, u_int32_t seq, void *ctxt) 785server_input_channel_failure(int type, u_int32_t seq, void *ctxt)
786{ 786{
787 debug("Got CHANNEL_FAILURE for keepalive"); 787 debug("Got CHANNEL_FAILURE for keepalive");
788 /* 788 /*
@@ -795,7 +795,7 @@ server_input_channel_failure(int type, int plen, u_int32_t seq, void *ctxt)
795 795
796 796
797static void 797static void
798server_input_stdin_data(int type, int plen, u_int32_t seq, void *ctxt) 798server_input_stdin_data(int type, u_int32_t seq, void *ctxt)
799{ 799{
800 char *data; 800 char *data;
801 u_int data_len; 801 u_int data_len;
@@ -812,7 +812,7 @@ server_input_stdin_data(int type, int plen, u_int32_t seq, void *ctxt)
812} 812}
813 813
814static void 814static void
815server_input_eof(int type, int plen, u_int32_t seq, void *ctxt) 815server_input_eof(int type, u_int32_t seq, void *ctxt)
816{ 816{
817 /* 817 /*
818 * Eof from the client. The stdin descriptor to the 818 * Eof from the client. The stdin descriptor to the
@@ -825,7 +825,7 @@ server_input_eof(int type, int plen, u_int32_t seq, void *ctxt)
825} 825}
826 826
827static void 827static void
828server_input_window_size(int type, int plen, u_int32_t seq, void *ctxt) 828server_input_window_size(int type, u_int32_t seq, void *ctxt)
829{ 829{
830 int row = packet_get_int(); 830 int row = packet_get_int();
831 int col = packet_get_int(); 831 int col = packet_get_int();
@@ -903,7 +903,7 @@ server_request_session(char *ctype)
903} 903}
904 904
905static void 905static void
906server_input_channel_open(int type, int plen, u_int32_t seq, void *ctxt) 906server_input_channel_open(int type, u_int32_t seq, void *ctxt)
907{ 907{
908 Channel *c = NULL; 908 Channel *c = NULL;
909 char *ctype; 909 char *ctype;
@@ -953,7 +953,7 @@ server_input_channel_open(int type, int plen, u_int32_t seq, void *ctxt)
953} 953}
954 954
955static void 955static void
956server_input_global_request(int type, int plen, u_int32_t seq, void *ctxt) 956server_input_global_request(int type, u_int32_t seq, void *ctxt)
957{ 957{
958 char *rtype; 958 char *rtype;
959 int want_reply; 959 int want_reply;
diff --git a/ssh.c b/ssh.c
index 6cf9f9b7a..e4db59bcc 100644
--- a/ssh.c
+++ b/ssh.c
@@ -39,7 +39,7 @@
39 */ 39 */
40 40
41#include "includes.h" 41#include "includes.h"
42RCSID("$OpenBSD: ssh.c,v 1.156 2001/12/28 14:50:54 markus Exp $"); 42RCSID("$OpenBSD: ssh.c,v 1.157 2001/12/28 15:06:00 markus Exp $");
43 43
44#include <openssl/evp.h> 44#include <openssl/evp.h>
45#include <openssl/err.h> 45#include <openssl/err.h>
@@ -1014,7 +1014,7 @@ ssh_session(void)
1014} 1014}
1015 1015
1016static void 1016static void
1017client_subsystem_reply(int type, int plen, u_int32_t seq, void *ctxt) 1017client_subsystem_reply(int type, u_int32_t seq, void *ctxt)
1018{ 1018{
1019 int id, len; 1019 int id, len;
1020 1020
diff --git a/sshconnect2.c b/sshconnect2.c
index cfc7b60d5..a565f73cc 100644
--- a/sshconnect2.c
+++ b/sshconnect2.c
@@ -23,7 +23,7 @@
23 */ 23 */
24 24
25#include "includes.h" 25#include "includes.h"
26RCSID("$OpenBSD: sshconnect2.c,v 1.91 2001/12/28 14:50:54 markus Exp $"); 26RCSID("$OpenBSD: sshconnect2.c,v 1.92 2001/12/28 15:06:00 markus Exp $");
27 27
28#include <openssl/bn.h> 28#include <openssl/bn.h>
29#include <openssl/md5.h> 29#include <openssl/md5.h>
@@ -174,12 +174,12 @@ struct Authmethod {
174 int *batch_flag; /* flag in option struct that disables method */ 174 int *batch_flag; /* flag in option struct that disables method */
175}; 175};
176 176
177void input_userauth_success(int, int, u_int32_t, void *); 177void input_userauth_success(int, u_int32_t, void *);
178void input_userauth_failure(int, int, u_int32_t, void *); 178void input_userauth_failure(int, u_int32_t, void *);
179void input_userauth_banner(int, int, u_int32_t, void *); 179void input_userauth_banner(int, u_int32_t, void *);
180void input_userauth_error(int, int, u_int32_t, void *); 180void input_userauth_error(int, u_int32_t, void *);
181void input_userauth_info_req(int, int, u_int32_t, void *); 181void input_userauth_info_req(int, u_int32_t, void *);
182void input_userauth_pk_ok(int, int, u_int32_t, void *); 182void input_userauth_pk_ok(int, u_int32_t, void *);
183 183
184int userauth_none(Authctxt *); 184int userauth_none(Authctxt *);
185int userauth_pubkey(Authctxt *); 185int userauth_pubkey(Authctxt *);
@@ -307,13 +307,13 @@ userauth(Authctxt *authctxt, char *authlist)
307 } 307 }
308} 308}
309void 309void
310input_userauth_error(int type, int plen, u_int32_t seq, void *ctxt) 310input_userauth_error(int type, u_int32_t seq, void *ctxt)
311{ 311{
312 fatal("input_userauth_error: bad message during authentication: " 312 fatal("input_userauth_error: bad message during authentication: "
313 "type %d", type); 313 "type %d", type);
314} 314}
315void 315void
316input_userauth_banner(int type, int plen, u_int32_t seq, void *ctxt) 316input_userauth_banner(int type, u_int32_t seq, void *ctxt)
317{ 317{
318 char *msg, *lang; 318 char *msg, *lang;
319 debug3("input_userauth_banner"); 319 debug3("input_userauth_banner");
@@ -324,7 +324,7 @@ input_userauth_banner(int type, int plen, u_int32_t seq, void *ctxt)
324 xfree(lang); 324 xfree(lang);
325} 325}
326void 326void
327input_userauth_success(int type, int plen, u_int32_t seq, void *ctxt) 327input_userauth_success(int type, u_int32_t seq, void *ctxt)
328{ 328{
329 Authctxt *authctxt = ctxt; 329 Authctxt *authctxt = ctxt;
330 if (authctxt == NULL) 330 if (authctxt == NULL)
@@ -335,7 +335,7 @@ input_userauth_success(int type, int plen, u_int32_t seq, void *ctxt)
335 authctxt->success = 1; /* break out */ 335 authctxt->success = 1; /* break out */
336} 336}
337void 337void
338input_userauth_failure(int type, int plen, u_int32_t seq, void *ctxt) 338input_userauth_failure(int type, u_int32_t seq, void *ctxt)
339{ 339{
340 Authctxt *authctxt = ctxt; 340 Authctxt *authctxt = ctxt;
341 char *authlist = NULL; 341 char *authlist = NULL;
@@ -356,7 +356,7 @@ input_userauth_failure(int type, int plen, u_int32_t seq, void *ctxt)
356 userauth(authctxt, authlist); 356 userauth(authctxt, authlist);
357} 357}
358void 358void
359input_userauth_pk_ok(int type, int plen, u_int32_t seq, void *ctxt) 359input_userauth_pk_ok(int type, u_int32_t seq, void *ctxt)
360{ 360{
361 Authctxt *authctxt = ctxt; 361 Authctxt *authctxt = ctxt;
362 Key *key = NULL; 362 Key *key = NULL;
@@ -767,7 +767,7 @@ userauth_kbdint(Authctxt *authctxt)
767 * parse INFO_REQUEST, prompt user and send INFO_RESPONSE 767 * parse INFO_REQUEST, prompt user and send INFO_RESPONSE
768 */ 768 */
769void 769void
770input_userauth_info_req(int type, int plen, u_int32_t seq, void *ctxt) 770input_userauth_info_req(int type, u_int32_t seq, void *ctxt)
771{ 771{
772 Authctxt *authctxt = ctxt; 772 Authctxt *authctxt = ctxt;
773 char *name, *inst, *lang, *prompt, *response; 773 char *name, *inst, *lang, *prompt, *response;