diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | auth2-chall.c | 6 | ||||
-rw-r--r-- | auth2.c | 16 | ||||
-rw-r--r-- | channels.c | 32 | ||||
-rw-r--r-- | channels.h | 30 | ||||
-rw-r--r-- | clientloop.c | 12 | ||||
-rw-r--r-- | dispatch.c | 9 | ||||
-rw-r--r-- | dispatch.h | 6 | ||||
-rw-r--r-- | kex.c | 8 | ||||
-rw-r--r-- | kex.h | 4 | ||||
-rw-r--r-- | serverloop.c | 14 | ||||
-rw-r--r-- | ssh.c | 4 | ||||
-rw-r--r-- | sshconnect2.c | 26 |
13 files changed, 88 insertions, 85 deletions
@@ -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 | ||
76 | 20020121 | 80 | 20020121 |
@@ -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" |
26 | RCSID("$OpenBSD: auth2-chall.c,v 1.12 2001/12/28 12:14:27 markus Exp $"); | 26 | RCSID("$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 | ||
36 | static int auth2_challenge_start(Authctxt *); | 36 | static int auth2_challenge_start(Authctxt *); |
37 | static int send_userauth_info_request(Authctxt *); | 37 | static int send_userauth_info_request(Authctxt *); |
38 | static void input_userauth_info_response(int, int, u_int32_t, void *); | 38 | static void input_userauth_info_response(int, u_int32_t, void *); |
39 | 39 | ||
40 | #ifdef BSD_AUTH | 40 | #ifdef BSD_AUTH |
41 | extern KbdintDevice bsdauth_device; | 41 | extern KbdintDevice bsdauth_device; |
@@ -234,7 +234,7 @@ send_userauth_info_request(Authctxt *authctxt) | |||
234 | } | 234 | } |
235 | 235 | ||
236 | static void | 236 | static void |
237 | input_userauth_info_response(int type, int plen, u_int32_t seq, void *ctxt) | 237 | input_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; |
@@ -23,7 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include "includes.h" | 25 | #include "includes.h" |
26 | RCSID("$OpenBSD: auth2.c,v 1.79 2001/12/28 12:14:27 markus Exp $"); | 26 | RCSID("$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 | ||
72 | static void input_service_request(int, int, u_int32_t, void *); | 72 | static void input_service_request(int, u_int32_t, void *); |
73 | static void input_userauth_request(int, int, u_int32_t, void *); | 73 | static void input_userauth_request(int, u_int32_t, void *); |
74 | static void protocol_error(int, int, u_int32_t, void *); | 74 | static void protocol_error(int, u_int32_t, void *); |
75 | 75 | ||
76 | /* helper */ | 76 | /* helper */ |
77 | static Authmethod *authmethod_lookup(const char *); | 77 | static Authmethod *authmethod_lookup(const char *); |
@@ -130,9 +130,9 @@ do_authentication2(void) | |||
130 | } | 130 | } |
131 | 131 | ||
132 | static void | 132 | static void |
133 | protocol_error(int type, int plen, u_int32_t seq, void *ctxt) | 133 | protocol_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 | ||
142 | static void | 142 | static void |
143 | input_service_request(int type, int plen, u_int32_t seq, void *ctxt) | 143 | input_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 | ||
175 | static void | 175 | static void |
176 | input_userauth_request(int type, int plen, u_int32_t seq, void *ctxt) | 176 | input_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" |
42 | RCSID("$OpenBSD: channels.c,v 1.153 2001/12/28 14:50:54 markus Exp $"); | 42 | RCSID("$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 | ||
1712 | void | 1712 | void |
1713 | channel_input_data(int type, int plen, u_int32_t seq, void *ctxt) | 1713 | channel_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 | ||
1756 | void | 1756 | void |
1757 | channel_input_extended_data(int type, int plen, u_int32_t seq, void *ctxt) | 1757 | channel_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 | ||
1796 | void | 1796 | void |
1797 | channel_input_ieof(int type, int plen, u_int32_t seq, void *ctxt) | 1797 | channel_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 | ||
1817 | void | 1817 | void |
1818 | channel_input_close(int type, int plen, u_int32_t seq, void *ctxt) | 1818 | channel_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 */ |
1855 | void | 1855 | void |
1856 | channel_input_oclose(int type, int plen, u_int32_t seq, void *ctxt) | 1856 | channel_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 | ||
1867 | void | 1867 | void |
1868 | channel_input_close_confirmation(int type, int plen, u_int32_t seq, void *ctxt) | 1868 | channel_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 | ||
1883 | void | 1883 | void |
1884 | channel_input_open_confirmation(int type, int plen, u_int32_t seq, void *ctxt) | 1884 | channel_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 | ||
1930 | void | 1930 | void |
1931 | channel_input_open_failure(int type, int plen, u_int32_t seq, void *ctxt) | 1931 | channel_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 | ||
1961 | void | 1961 | void |
1962 | channel_input_channel_request(int type, int plen, u_int32_t seq, void *ctxt) | 1962 | channel_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 | ||
1986 | void | 1986 | void |
1987 | channel_input_window_adjust(int type, int plen, u_int32_t seq, void *ctxt) | 1987 | channel_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 | ||
2010 | void | 2010 | void |
2011 | channel_input_port_open(int type, int plen, u_int32_t seq, void *ctxt) | 2011 | channel_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 | ||
2617 | void | 2617 | void |
2618 | x11_input_open(int type, int plen, u_int32_t seq, void *ctxt) | 2618 | x11_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) */ |
2664 | void | 2664 | void |
2665 | deny_input_open(int type, int plen, u_int32_t seq, void *ctxt) | 2665 | deny_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 | ||
2875 | void | 2875 | void |
2876 | auth_input_open_request(int type, int plen, u_int32_t seq, void *ctxt) | 2876 | auth_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 | ||
160 | void channel_input_channel_request(int, int, u_int32_t, void *); | 160 | void channel_input_channel_request(int, u_int32_t, void *); |
161 | void channel_input_close(int, int, u_int32_t, void *); | 161 | void channel_input_close(int, u_int32_t, void *); |
162 | void channel_input_close_confirmation(int, int, u_int32_t, void *); | 162 | void channel_input_close_confirmation(int, u_int32_t, void *); |
163 | void channel_input_data(int, int, u_int32_t, void *); | 163 | void channel_input_data(int, u_int32_t, void *); |
164 | void channel_input_extended_data(int, int, u_int32_t, void *); | 164 | void channel_input_extended_data(int, u_int32_t, void *); |
165 | void channel_input_ieof(int, int, u_int32_t, void *); | 165 | void channel_input_ieof(int, u_int32_t, void *); |
166 | void channel_input_oclose(int, int, u_int32_t, void *); | 166 | void channel_input_oclose(int, u_int32_t, void *); |
167 | void channel_input_open_confirmation(int, int, u_int32_t, void *); | 167 | void channel_input_open_confirmation(int, u_int32_t, void *); |
168 | void channel_input_open_failure(int, int, u_int32_t, void *); | 168 | void channel_input_open_failure(int, u_int32_t, void *); |
169 | void channel_input_port_open(int, int, u_int32_t, void *); | 169 | void channel_input_port_open(int, u_int32_t, void *); |
170 | void channel_input_window_adjust(int, int, u_int32_t, void *); | 170 | void 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 | ||
200 | int x11_connect_display(void); | 200 | int x11_connect_display(void); |
201 | int x11_create_display_inet(int, int, int); | 201 | int x11_create_display_inet(int, int, int); |
202 | void x11_input_open(int, int, u_int32_t, void *); | 202 | void x11_input_open(int, u_int32_t, void *); |
203 | void x11_request_forwarding_with_spoofing(int, const char *, const char *); | 203 | void x11_request_forwarding_with_spoofing(int, const char *, const char *); |
204 | void deny_input_open(int, int, u_int32_t, void *); | 204 | void 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); | |||
209 | char *auth_get_socket_name(void); | 209 | char *auth_get_socket_name(void); |
210 | void auth_sock_cleanup_proc(void *); | 210 | void auth_sock_cleanup_proc(void *); |
211 | int auth_input_request_forwarding(struct passwd *); | 211 | int auth_input_request_forwarding(struct passwd *); |
212 | void auth_input_open_request(int, int, u_int32_t, void *); | 212 | void 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" |
62 | RCSID("$OpenBSD: clientloop.c,v 1.93 2001/12/28 12:14:27 markus Exp $"); | 62 | RCSID("$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 | ||
1010 | static void | 1010 | static void |
1011 | client_input_stdout_data(int type, int plen, u_int32_t seq, void *ctxt) | 1011 | client_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 | } |
1020 | static void | 1020 | static void |
1021 | client_input_stderr_data(int type, int plen, u_int32_t seq, void *ctxt) | 1021 | client_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 | } |
1030 | static void | 1030 | static void |
1031 | client_input_exit_status(int type, int plen, u_int32_t seq, void *ctxt) | 1031 | client_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 */ |
1151 | static void | 1151 | static void |
1152 | client_input_channel_open(int type, int plen, u_int32_t seq, void *ctxt) | 1152 | client_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 | } |
1203 | static void | 1203 | static void |
1204 | client_input_channel_req(int type, int plen, u_int32_t seq, void *ctxt) | 1204 | client_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" |
25 | RCSID("$OpenBSD: dispatch.c,v 1.13 2001/12/28 14:50:54 markus Exp $"); | 25 | RCSID("$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 $"); | |||
37 | dispatch_fn *dispatch[DISPATCH_MAX]; | 37 | dispatch_fn *dispatch[DISPATCH_MAX]; |
38 | 38 | ||
39 | void | 39 | void |
40 | dispatch_protocol_error(int type, int plen, u_int32_t seq, void *ctxt) | 40 | dispatch_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 | } |
45 | void | 44 | void |
46 | dispatch_init(dispatch_fn *dflt) | 45 | dispatch_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 | ||
31 | typedef void dispatch_fn(int, int, u_int32_t, void *); | 31 | typedef void dispatch_fn(int, u_int32_t, void *); |
32 | 32 | ||
33 | void dispatch_init(dispatch_fn *); | 33 | void dispatch_init(dispatch_fn *); |
34 | void dispatch_set(int, dispatch_fn *); | 34 | void dispatch_set(int, dispatch_fn *); |
35 | void dispatch_run(int, int *, void *); | 35 | void dispatch_run(int, int *, void *); |
36 | void dispatch_protocol_error(int, int, u_int32_t, void *); | 36 | void dispatch_protocol_error(int, u_int32_t, void *); |
@@ -23,7 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include "includes.h" | 25 | #include "includes.h" |
26 | RCSID("$OpenBSD: kex.c,v 1.40 2001/12/28 14:50:54 markus Exp $"); | 26 | RCSID("$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 | ||
109 | static void | 109 | static void |
110 | kex_protocol_error(int type, int plen, u_int32_t seq, void *ctxt) | 110 | kex_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 | ||
115 | static void | 115 | static void |
@@ -164,7 +164,7 @@ kex_send_kexinit(Kex *kex) | |||
164 | } | 164 | } |
165 | 165 | ||
166 | void | 166 | void |
167 | kex_input_kexinit(int type, int plen, u_int32_t seq, void *ctxt) | 167 | kex_input_kexinit(int type, u_int32_t seq, void *ctxt) |
168 | { | 168 | { |
169 | char *ptr; | 169 | char *ptr; |
170 | int dlen; | 170 | int dlen; |
@@ -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]); | |||
115 | void kex_finish(Kex *); | 115 | void kex_finish(Kex *); |
116 | 116 | ||
117 | void kex_send_kexinit(Kex *); | 117 | void kex_send_kexinit(Kex *); |
118 | void kex_input_kexinit(int, int, u_int32_t, void *); | 118 | void kex_input_kexinit(int, u_int32_t, void *); |
119 | void kex_derive_keys(Kex *, u_char *, BIGNUM *); | 119 | void kex_derive_keys(Kex *, u_char *, BIGNUM *); |
120 | 120 | ||
121 | void kexdh(Kex *); | 121 | void 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" |
38 | RCSID("$OpenBSD: serverloop.c,v 1.92 2001/12/28 14:50:54 markus Exp $"); | 38 | RCSID("$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 | ||
784 | static void | 784 | static void |
785 | server_input_channel_failure(int type, int plen, u_int32_t seq, void *ctxt) | 785 | server_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 | ||
797 | static void | 797 | static void |
798 | server_input_stdin_data(int type, int plen, u_int32_t seq, void *ctxt) | 798 | server_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 | ||
814 | static void | 814 | static void |
815 | server_input_eof(int type, int plen, u_int32_t seq, void *ctxt) | 815 | server_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 | ||
827 | static void | 827 | static void |
828 | server_input_window_size(int type, int plen, u_int32_t seq, void *ctxt) | 828 | server_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 | ||
905 | static void | 905 | static void |
906 | server_input_channel_open(int type, int plen, u_int32_t seq, void *ctxt) | 906 | server_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 | ||
955 | static void | 955 | static void |
956 | server_input_global_request(int type, int plen, u_int32_t seq, void *ctxt) | 956 | server_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; |
@@ -39,7 +39,7 @@ | |||
39 | */ | 39 | */ |
40 | 40 | ||
41 | #include "includes.h" | 41 | #include "includes.h" |
42 | RCSID("$OpenBSD: ssh.c,v 1.156 2001/12/28 14:50:54 markus Exp $"); | 42 | RCSID("$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 | ||
1016 | static void | 1016 | static void |
1017 | client_subsystem_reply(int type, int plen, u_int32_t seq, void *ctxt) | 1017 | client_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" |
26 | RCSID("$OpenBSD: sshconnect2.c,v 1.91 2001/12/28 14:50:54 markus Exp $"); | 26 | RCSID("$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 | ||
177 | void input_userauth_success(int, int, u_int32_t, void *); | 177 | void input_userauth_success(int, u_int32_t, void *); |
178 | void input_userauth_failure(int, int, u_int32_t, void *); | 178 | void input_userauth_failure(int, u_int32_t, void *); |
179 | void input_userauth_banner(int, int, u_int32_t, void *); | 179 | void input_userauth_banner(int, u_int32_t, void *); |
180 | void input_userauth_error(int, int, u_int32_t, void *); | 180 | void input_userauth_error(int, u_int32_t, void *); |
181 | void input_userauth_info_req(int, int, u_int32_t, void *); | 181 | void input_userauth_info_req(int, u_int32_t, void *); |
182 | void input_userauth_pk_ok(int, int, u_int32_t, void *); | 182 | void input_userauth_pk_ok(int, u_int32_t, void *); |
183 | 183 | ||
184 | int userauth_none(Authctxt *); | 184 | int userauth_none(Authctxt *); |
185 | int userauth_pubkey(Authctxt *); | 185 | int userauth_pubkey(Authctxt *); |
@@ -307,13 +307,13 @@ userauth(Authctxt *authctxt, char *authlist) | |||
307 | } | 307 | } |
308 | } | 308 | } |
309 | void | 309 | void |
310 | input_userauth_error(int type, int plen, u_int32_t seq, void *ctxt) | 310 | input_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 | } |
315 | void | 315 | void |
316 | input_userauth_banner(int type, int plen, u_int32_t seq, void *ctxt) | 316 | input_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 | } |
326 | void | 326 | void |
327 | input_userauth_success(int type, int plen, u_int32_t seq, void *ctxt) | 327 | input_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 | } |
337 | void | 337 | void |
338 | input_userauth_failure(int type, int plen, u_int32_t seq, void *ctxt) | 338 | input_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 | } |
358 | void | 358 | void |
359 | input_userauth_pk_ok(int type, int plen, u_int32_t seq, void *ctxt) | 359 | input_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 | */ |
769 | void | 769 | void |
770 | input_userauth_info_req(int type, int plen, u_int32_t seq, void *ctxt) | 770 | input_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; |