diff options
author | Damien Miller <djm@mindrot.org> | 2001-12-21 15:00:19 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2001-12-21 15:00:19 +1100 |
commit | 278f907a2d6d00d6f52a11bf9577648aadbf0994 (patch) | |
tree | 50f885a7fd73b813754e3b675e810dc01ba78b78 | |
parent | e737856350287104a12f5a97c81fad1f7bcd7096 (diff) |
- djm@cvs.openbsd.org 2001/12/20 22:50:24
[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@
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | auth2-chall.c | 6 | ||||
-rw-r--r-- | auth2.c | 16 | ||||
-rw-r--r-- | channels.c | 30 | ||||
-rw-r--r-- | channels.h | 30 | ||||
-rw-r--r-- | clientloop.c | 12 | ||||
-rw-r--r-- | dispatch.c | 14 | ||||
-rw-r--r-- | dispatch.h | 6 | ||||
-rw-r--r-- | kex.c | 6 | ||||
-rw-r--r-- | kex.h | 4 | ||||
-rw-r--r-- | packet.c | 28 | ||||
-rw-r--r-- | packet.h | 4 | ||||
-rw-r--r-- | serverloop.c | 14 | ||||
-rw-r--r-- | ssh.c | 4 | ||||
-rw-r--r-- | sshconnect2.c | 26 |
15 files changed, 117 insertions, 92 deletions
@@ -51,6 +51,13 @@ | |||
51 | [channels.c channels.h session.c] | 51 | [channels.c channels.h session.c] |
52 | setup x11 listen socket for just one connect if the client requests so. | 52 | setup x11 listen socket for just one connect if the client requests so. |
53 | (v2 only, but the openssh client does not support this feature). | 53 | (v2 only, but the openssh client does not support this feature). |
54 | - djm@cvs.openbsd.org 2001/12/20 22:50:24 | ||
55 | [auth2.c auth2-chall.c channels.c channels.h clientloop.c dispatch.c] | ||
56 | [dispatch.h kex.c kex.h packet.c packet.h serverloop.c ssh.c] | ||
57 | [sshconnect2.c] | ||
58 | Conformance fix: we should send failing packet sequence number when | ||
59 | responding with a SSH_MSG_UNIMPLEMENTED message. Spotted by | ||
60 | yakk@yakk.dot.net; ok markus@ | ||
54 | 61 | ||
55 | 20011219 | 62 | 20011219 |
56 | - (stevesk) OpenBSD CVS sync X11 localhost display | 63 | - (stevesk) OpenBSD CVS sync X11 localhost display |
@@ -7079,4 +7086,4 @@ | |||
7079 | - Wrote replacements for strlcpy and mkdtemp | 7086 | - Wrote replacements for strlcpy and mkdtemp |
7080 | - Released 1.0pre1 | 7087 | - Released 1.0pre1 |
7081 | 7088 | ||
7082 | $Id: ChangeLog,v 1.1704 2001/12/21 03:58:35 djm Exp $ | 7089 | $Id: ChangeLog,v 1.1705 2001/12/21 04:00:19 djm Exp $ |
diff --git a/auth2-chall.c b/auth2-chall.c index 8ad1efcd6..8679f632f 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.10 2001/12/19 07:18:56 deraadt Exp $"); | 26 | RCSID("$OpenBSD: auth2-chall.c,v 1.11 2001/12/20 22:50:24 djm 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.10 2001/12/19 07:18:56 deraadt 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, void *); | 38 | static void input_userauth_info_response(int, 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, void *ctxt) | 237 | input_userauth_info_response(int type, int plen, 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.77 2001/12/19 07:18:56 deraadt Exp $"); | 26 | RCSID("$OpenBSD: auth2.c,v 1.78 2001/12/20 22:50:24 djm 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, void *); | 72 | static void input_service_request(int, int, u_int32_t, void *); |
73 | static void input_userauth_request(int, int, void *); | 73 | static void input_userauth_request(int, int, u_int32_t, void *); |
74 | static void protocol_error(int, int, void *); | 74 | static void protocol_error(int, 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,17 +130,17 @@ do_authentication2(void) | |||
130 | } | 130 | } |
131 | 131 | ||
132 | static void | 132 | static void |
133 | protocol_error(int type, int plen, void *ctxt) | 133 | protocol_error(int type, int plen, 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 plen %d", type, plen); |
136 | packet_start(SSH2_MSG_UNIMPLEMENTED); | 136 | packet_start(SSH2_MSG_UNIMPLEMENTED); |
137 | packet_put_int(0); | 137 | packet_put_int(seq); |
138 | packet_send(); | 138 | packet_send(); |
139 | packet_write_wait(); | 139 | packet_write_wait(); |
140 | } | 140 | } |
141 | 141 | ||
142 | static void | 142 | static void |
143 | input_service_request(int type, int plen, void *ctxt) | 143 | input_service_request(int type, int plen, 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, void *ctxt) | |||
173 | } | 173 | } |
174 | 174 | ||
175 | static void | 175 | static void |
176 | input_userauth_request(int type, int plen, void *ctxt) | 176 | input_userauth_request(int type, int plen, 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 340b10646..cc2613a88 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.149 2001/12/20 16:37:29 markus Exp $"); | 42 | RCSID("$OpenBSD: channels.c,v 1.150 2001/12/20 22:50:24 djm 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, void *ctxt) | 1713 | channel_input_data(int type, int plen, u_int32_t seq, void *ctxt) |
1714 | { | 1714 | { |
1715 | int id; | 1715 | int id; |
1716 | char *data; | 1716 | char *data; |
@@ -1756,7 +1756,7 @@ channel_input_data(int type, int plen, void *ctxt) | |||
1756 | } | 1756 | } |
1757 | 1757 | ||
1758 | void | 1758 | void |
1759 | channel_input_extended_data(int type, int plen, void *ctxt) | 1759 | channel_input_extended_data(int type, int plen, u_int32_t seq, void *ctxt) |
1760 | { | 1760 | { |
1761 | int id; | 1761 | int id; |
1762 | int tcode; | 1762 | int tcode; |
@@ -1796,7 +1796,7 @@ channel_input_extended_data(int type, int plen, void *ctxt) | |||
1796 | } | 1796 | } |
1797 | 1797 | ||
1798 | void | 1798 | void |
1799 | channel_input_ieof(int type, int plen, void *ctxt) | 1799 | channel_input_ieof(int type, int plen, u_int32_t seq, void *ctxt) |
1800 | { | 1800 | { |
1801 | int id; | 1801 | int id; |
1802 | Channel *c; | 1802 | Channel *c; |
@@ -1818,7 +1818,7 @@ channel_input_ieof(int type, int plen, void *ctxt) | |||
1818 | } | 1818 | } |
1819 | 1819 | ||
1820 | void | 1820 | void |
1821 | channel_input_close(int type, int plen, void *ctxt) | 1821 | channel_input_close(int type, int plen, u_int32_t seq, void *ctxt) |
1822 | { | 1822 | { |
1823 | int id; | 1823 | int id; |
1824 | Channel *c; | 1824 | Channel *c; |
@@ -1857,7 +1857,7 @@ channel_input_close(int type, int plen, void *ctxt) | |||
1857 | 1857 | ||
1858 | /* proto version 1.5 overloads CLOSE_CONFIRMATION with OCLOSE */ | 1858 | /* proto version 1.5 overloads CLOSE_CONFIRMATION with OCLOSE */ |
1859 | void | 1859 | void |
1860 | channel_input_oclose(int type, int plen, void *ctxt) | 1860 | channel_input_oclose(int type, int plen, u_int32_t seq, void *ctxt) |
1861 | { | 1861 | { |
1862 | int id = packet_get_int(); | 1862 | int id = packet_get_int(); |
1863 | Channel *c = channel_lookup(id); | 1863 | Channel *c = channel_lookup(id); |
@@ -1868,7 +1868,7 @@ channel_input_oclose(int type, int plen, void *ctxt) | |||
1868 | } | 1868 | } |
1869 | 1869 | ||
1870 | void | 1870 | void |
1871 | channel_input_close_confirmation(int type, int plen, void *ctxt) | 1871 | channel_input_close_confirmation(int type, int plen, u_int32_t seq, void *ctxt) |
1872 | { | 1872 | { |
1873 | int id = packet_get_int(); | 1873 | int id = packet_get_int(); |
1874 | Channel *c = channel_lookup(id); | 1874 | Channel *c = channel_lookup(id); |
@@ -1884,7 +1884,7 @@ channel_input_close_confirmation(int type, int plen, void *ctxt) | |||
1884 | } | 1884 | } |
1885 | 1885 | ||
1886 | void | 1886 | void |
1887 | channel_input_open_confirmation(int type, int plen, void *ctxt) | 1887 | channel_input_open_confirmation(int type, int plen, u_int32_t seq, void *ctxt) |
1888 | { | 1888 | { |
1889 | int id, remote_id; | 1889 | int id, remote_id; |
1890 | Channel *c; | 1890 | Channel *c; |
@@ -1934,7 +1934,7 @@ reason2txt(int reason) | |||
1934 | } | 1934 | } |
1935 | 1935 | ||
1936 | void | 1936 | void |
1937 | channel_input_open_failure(int type, int plen, void *ctxt) | 1937 | channel_input_open_failure(int type, int plen, u_int32_t seq, void *ctxt) |
1938 | { | 1938 | { |
1939 | int id, reason; | 1939 | int id, reason; |
1940 | char *msg = NULL, *lang = NULL; | 1940 | char *msg = NULL, *lang = NULL; |
@@ -1968,7 +1968,7 @@ channel_input_open_failure(int type, int plen, void *ctxt) | |||
1968 | } | 1968 | } |
1969 | 1969 | ||
1970 | void | 1970 | void |
1971 | channel_input_channel_request(int type, int plen, void *ctxt) | 1971 | channel_input_channel_request(int type, int plen, u_int32_t seq, void *ctxt) |
1972 | { | 1972 | { |
1973 | int id; | 1973 | int id; |
1974 | Channel *c; | 1974 | Channel *c; |
@@ -1993,7 +1993,7 @@ channel_input_channel_request(int type, int plen, void *ctxt) | |||
1993 | } | 1993 | } |
1994 | 1994 | ||
1995 | void | 1995 | void |
1996 | channel_input_window_adjust(int type, int plen, void *ctxt) | 1996 | channel_input_window_adjust(int type, int plen, u_int32_t seq, void *ctxt) |
1997 | { | 1997 | { |
1998 | Channel *c; | 1998 | Channel *c; |
1999 | int id, adjust; | 1999 | int id, adjust; |
@@ -2017,7 +2017,7 @@ channel_input_window_adjust(int type, int plen, void *ctxt) | |||
2017 | } | 2017 | } |
2018 | 2018 | ||
2019 | void | 2019 | void |
2020 | channel_input_port_open(int type, int plen, void *ctxt) | 2020 | channel_input_port_open(int type, int plen, u_int32_t seq, void *ctxt) |
2021 | { | 2021 | { |
2022 | Channel *c = NULL; | 2022 | Channel *c = NULL; |
2023 | u_short host_port; | 2023 | u_short host_port; |
@@ -2624,7 +2624,7 @@ x11_connect_display(void) | |||
2624 | */ | 2624 | */ |
2625 | 2625 | ||
2626 | void | 2626 | void |
2627 | x11_input_open(int type, int plen, void *ctxt) | 2627 | x11_input_open(int type, int plen, u_int32_t seq, void *ctxt) |
2628 | { | 2628 | { |
2629 | Channel *c = NULL; | 2629 | Channel *c = NULL; |
2630 | int remote_id, sock = 0; | 2630 | int remote_id, sock = 0; |
@@ -2671,7 +2671,7 @@ x11_input_open(int type, int plen, void *ctxt) | |||
2671 | 2671 | ||
2672 | /* dummy protocol handler that denies SSH-1 requests (agent/x11) */ | 2672 | /* dummy protocol handler that denies SSH-1 requests (agent/x11) */ |
2673 | void | 2673 | void |
2674 | deny_input_open(int type, int plen, void *ctxt) | 2674 | deny_input_open(int type, int plen, u_int32_t seq, void *ctxt) |
2675 | { | 2675 | { |
2676 | int rchan = packet_get_int(); | 2676 | int rchan = packet_get_int(); |
2677 | switch (type) { | 2677 | switch (type) { |
@@ -2882,7 +2882,7 @@ auth_input_request_forwarding(struct passwd * pw) | |||
2882 | /* This is called to process an SSH_SMSG_AGENT_OPEN message. */ | 2882 | /* This is called to process an SSH_SMSG_AGENT_OPEN message. */ |
2883 | 2883 | ||
2884 | void | 2884 | void |
2885 | auth_input_open_request(int type, int plen, void *ctxt) | 2885 | auth_input_open_request(int type, int plen, u_int32_t seq, void *ctxt) |
2886 | { | 2886 | { |
2887 | Channel *c = NULL; | 2887 | Channel *c = NULL; |
2888 | int remote_id, sock; | 2888 | int remote_id, sock; |
diff --git a/channels.h b/channels.h index e994aaeb6..c54b23e67 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.54 2001/12/20 16:37:29 markus Exp $"); */ | 35 | /* RCSID("$OpenBSD: channels.h,v 1.55 2001/12/20 22:50:24 djm 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, void *); | 160 | void channel_input_channel_request(int, int, u_int32_t, void *); |
161 | void channel_input_close(int, int, void *); | 161 | void channel_input_close(int, int, u_int32_t, void *); |
162 | void channel_input_close_confirmation(int, int, void *); | 162 | void channel_input_close_confirmation(int, int, u_int32_t, void *); |
163 | void channel_input_data(int, int, void *); | 163 | void channel_input_data(int, int, u_int32_t, void *); |
164 | void channel_input_extended_data(int, int, void *); | 164 | void channel_input_extended_data(int, int, u_int32_t, void *); |
165 | void channel_input_ieof(int, int, void *); | 165 | void channel_input_ieof(int, int, u_int32_t, void *); |
166 | void channel_input_oclose(int, int, void *); | 166 | void channel_input_oclose(int, int, u_int32_t, void *); |
167 | void channel_input_open_confirmation(int, int, void *); | 167 | void channel_input_open_confirmation(int, int, u_int32_t, void *); |
168 | void channel_input_open_failure(int, int, void *); | 168 | void channel_input_open_failure(int, int, u_int32_t, void *); |
169 | void channel_input_port_open(int, int, void *); | 169 | void channel_input_port_open(int, int, u_int32_t, void *); |
170 | void channel_input_window_adjust(int, int, void *); | 170 | void channel_input_window_adjust(int, 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, void *); | 202 | void x11_input_open(int, 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, void *); | 204 | void deny_input_open(int, 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, void *); | 212 | void auth_input_open_request(int, int, u_int32_t, void *); |
213 | 213 | ||
214 | /* channel close */ | 214 | /* channel close */ |
215 | 215 | ||
diff --git a/clientloop.c b/clientloop.c index 84484604d..9e4f247c6 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.90 2001/12/19 07:18:56 deraadt Exp $"); | 62 | RCSID("$OpenBSD: clientloop.c,v 1.91 2001/12/20 22:50:24 djm 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, void *ctxt) | 1011 | client_input_stdout_data(int type, int plen, 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, 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, void *ctxt) | 1021 | client_input_stderr_data(int type, int plen, 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, 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, void *ctxt) | 1031 | client_input_exit_status(int type, int plen, u_int32_t seq, void *ctxt) |
1032 | { | 1032 | { |
1033 | packet_integrity_check(plen, 4, type); | 1033 | packet_integrity_check(plen, 4, type); |
1034 | exit_status = packet_get_int(); | 1034 | exit_status = packet_get_int(); |
@@ -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, void *ctxt) | 1152 | client_input_channel_open(int type, int plen, 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, 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, void *ctxt) | 1204 | client_input_channel_req(int type, int plen, 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 64873d53a..036c0aaa5 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.11 2001/06/10 11:29:20 markus Exp $"); | 25 | RCSID("$OpenBSD: dispatch.c,v 1.12 2001/12/20 22:50:24 djm Exp $"); |
26 | 26 | ||
27 | #include "ssh1.h" | 27 | #include "ssh1.h" |
28 | #include "ssh2.h" | 28 | #include "ssh2.h" |
@@ -37,9 +37,10 @@ RCSID("$OpenBSD: dispatch.c,v 1.11 2001/06/10 11:29:20 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, void *ctxt) | 40 | dispatch_protocol_error(int type, int plen, u_int32_t seq, void *ctxt) |
41 | { | 41 | { |
42 | fatal("dispatch_protocol_error: type %d plen %d", type, plen); | 42 | fatal("dispatch_protocol_error: type %d seq %u plen %d", type, |
43 | seq, plen); | ||
43 | } | 44 | } |
44 | void | 45 | void |
45 | dispatch_init(dispatch_fn *dflt) | 46 | dispatch_init(dispatch_fn *dflt) |
@@ -59,16 +60,17 @@ dispatch_run(int mode, int *done, void *ctxt) | |||
59 | for (;;) { | 60 | for (;;) { |
60 | int plen; | 61 | int plen; |
61 | int type; | 62 | int type; |
63 | u_int32_t seqnr; | ||
62 | 64 | ||
63 | if (mode == DISPATCH_BLOCK) { | 65 | if (mode == DISPATCH_BLOCK) { |
64 | type = packet_read(&plen); | 66 | type = packet_read_seqnr(&plen, &seqnr); |
65 | } else { | 67 | } else { |
66 | type = packet_read_poll(&plen); | 68 | type = packet_read_poll_seqnr(&plen, &seqnr); |
67 | if (type == SSH_MSG_NONE) | 69 | if (type == SSH_MSG_NONE) |
68 | return; | 70 | return; |
69 | } | 71 | } |
70 | if (type > 0 && type < DISPATCH_MAX && dispatch[type] != NULL) | 72 | if (type > 0 && type < DISPATCH_MAX && dispatch[type] != NULL) |
71 | (*dispatch[type])(type, plen, ctxt); | 73 | (*dispatch[type])(type, plen, seqnr, ctxt); |
72 | else | 74 | else |
73 | packet_disconnect("protocol error: rcvd type %d", type); | 75 | packet_disconnect("protocol error: rcvd type %d", type); |
74 | if (done != NULL && *done) | 76 | if (done != NULL && *done) |
diff --git a/dispatch.h b/dispatch.h index 7b94032af..127ec1067 100644 --- a/dispatch.h +++ b/dispatch.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: dispatch.h,v 1.6 2001/06/26 17:27:23 markus Exp $ */ | 1 | /* $OpenBSD: dispatch.h,v 1.7 2001/12/20 22:50:24 djm 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, void *); | 31 | typedef void dispatch_fn(int, 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, void *); | 36 | void dispatch_protocol_error(int, 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.37 2001/12/05 10:06:12 deraadt Exp $"); | 26 | RCSID("$OpenBSD: kex.c,v 1.38 2001/12/20 22:50:24 djm Exp $"); |
27 | 27 | ||
28 | #include <openssl/crypto.h> | 28 | #include <openssl/crypto.h> |
29 | 29 | ||
@@ -107,7 +107,7 @@ kex_prop_free(char **proposal) | |||
107 | } | 107 | } |
108 | 108 | ||
109 | static void | 109 | static void |
110 | kex_protocol_error(int type, int plen, void *ctxt) | 110 | kex_protocol_error(int type, int plen, 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 plen %d", type, plen); |
113 | } | 113 | } |
@@ -166,7 +166,7 @@ kex_send_kexinit(Kex *kex) | |||
166 | } | 166 | } |
167 | 167 | ||
168 | void | 168 | void |
169 | kex_input_kexinit(int type, int plen, void *ctxt) | 169 | kex_input_kexinit(int type, int plen, u_int32_t seq, void *ctxt) |
170 | { | 170 | { |
171 | char *ptr; | 171 | char *ptr; |
172 | int dlen; | 172 | int dlen; |
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: kex.h,v 1.26 2001/06/26 17:27:23 markus Exp $ */ | 1 | /* $OpenBSD: kex.h,v 1.27 2001/12/20 22:50:24 djm 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, void *); | 118 | void kex_input_kexinit(int, 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 *); |
@@ -37,7 +37,7 @@ | |||
37 | */ | 37 | */ |
38 | 38 | ||
39 | #include "includes.h" | 39 | #include "includes.h" |
40 | RCSID("$OpenBSD: packet.c,v 1.76 2001/12/19 17:16:13 stevesk Exp $"); | 40 | RCSID("$OpenBSD: packet.c,v 1.77 2001/12/20 22:50:24 djm Exp $"); |
41 | 41 | ||
42 | #include "xmalloc.h" | 42 | #include "xmalloc.h" |
43 | #include "buffer.h" | 43 | #include "buffer.h" |
@@ -610,7 +610,7 @@ packet_send(void) | |||
610 | */ | 610 | */ |
611 | 611 | ||
612 | int | 612 | int |
613 | packet_read(int *payload_len_ptr) | 613 | packet_read_seqnr(int *payload_len_ptr, u_int32_t *seqnr_p) |
614 | { | 614 | { |
615 | int type, len; | 615 | int type, len; |
616 | fd_set *setp; | 616 | fd_set *setp; |
@@ -626,7 +626,7 @@ packet_read(int *payload_len_ptr) | |||
626 | /* Stay in the loop until we have received a complete packet. */ | 626 | /* Stay in the loop until we have received a complete packet. */ |
627 | for (;;) { | 627 | for (;;) { |
628 | /* Try to read a packet from the buffer. */ | 628 | /* Try to read a packet from the buffer. */ |
629 | type = packet_read_poll(payload_len_ptr); | 629 | type = packet_read_poll_seqnr(payload_len_ptr, seqnr_p); |
630 | if (!compat20 && ( | 630 | if (!compat20 && ( |
631 | type == SSH_SMSG_SUCCESS | 631 | type == SSH_SMSG_SUCCESS |
632 | || type == SSH_SMSG_FAILURE | 632 | || type == SSH_SMSG_FAILURE |
@@ -665,6 +665,12 @@ packet_read(int *payload_len_ptr) | |||
665 | /* NOTREACHED */ | 665 | /* NOTREACHED */ |
666 | } | 666 | } |
667 | 667 | ||
668 | int | ||
669 | packet_read(int *payload_len_ptr) | ||
670 | { | ||
671 | return packet_read_seqnr(payload_len_ptr, NULL); | ||
672 | } | ||
673 | |||
668 | /* | 674 | /* |
669 | * Waits until a packet has been received, verifies that its type matches | 675 | * Waits until a packet has been received, verifies that its type matches |
670 | * that given, and gives a fatal error and exits if there is a mismatch. | 676 | * that given, and gives a fatal error and exits if there is a mismatch. |
@@ -753,7 +759,7 @@ packet_read_poll1(int *payload_len_ptr) | |||
753 | 759 | ||
754 | /* Test check bytes. */ | 760 | /* Test check bytes. */ |
755 | if (len != buffer_len(&incoming_packet)) | 761 | if (len != buffer_len(&incoming_packet)) |
756 | packet_disconnect("packet_read_poll: len %d != buffer_len %d.", | 762 | packet_disconnect("packet_read_poll1: len %d != buffer_len %d.", |
757 | len, buffer_len(&incoming_packet)); | 763 | len, buffer_len(&incoming_packet)); |
758 | 764 | ||
759 | ucp = (u_char *) buffer_ptr(&incoming_packet) + len - 4; | 765 | ucp = (u_char *) buffer_ptr(&incoming_packet) + len - 4; |
@@ -775,7 +781,7 @@ packet_read_poll1(int *payload_len_ptr) | |||
775 | } | 781 | } |
776 | 782 | ||
777 | static int | 783 | static int |
778 | packet_read_poll2(int *payload_len_ptr) | 784 | packet_read_poll2(int *payload_len_ptr, u_int32_t *seqnr_p) |
779 | { | 785 | { |
780 | static u_int32_t seqnr = 0; | 786 | static u_int32_t seqnr = 0; |
781 | static u_int packet_length = 0; | 787 | static u_int packet_length = 0; |
@@ -848,6 +854,8 @@ packet_read_poll2(int *payload_len_ptr) | |||
848 | DBG(debug("MAC #%d ok", seqnr)); | 854 | DBG(debug("MAC #%d ok", seqnr)); |
849 | buffer_consume(&input, mac->mac_len); | 855 | buffer_consume(&input, mac->mac_len); |
850 | } | 856 | } |
857 | if (seqnr_p != NULL) | ||
858 | *seqnr_p = seqnr; | ||
851 | if (++seqnr == 0) | 859 | if (++seqnr == 0) |
852 | log("incoming seqnr wraps around"); | 860 | log("incoming seqnr wraps around"); |
853 | 861 | ||
@@ -890,7 +898,7 @@ packet_read_poll2(int *payload_len_ptr) | |||
890 | } | 898 | } |
891 | 899 | ||
892 | int | 900 | int |
893 | packet_read_poll(int *payload_len_ptr) | 901 | packet_read_poll_seqnr(int *payload_len_ptr, u_int32_t *seqnr_p) |
894 | { | 902 | { |
895 | int reason; | 903 | int reason; |
896 | u_char type; | 904 | u_char type; |
@@ -898,7 +906,7 @@ packet_read_poll(int *payload_len_ptr) | |||
898 | 906 | ||
899 | for (;;) { | 907 | for (;;) { |
900 | if (compat20) { | 908 | if (compat20) { |
901 | type = packet_read_poll2(payload_len_ptr); | 909 | type = packet_read_poll2(payload_len_ptr, seqnr_p); |
902 | if (type) | 910 | if (type) |
903 | DBG(debug("received packet type %d", type)); | 911 | DBG(debug("received packet type %d", type)); |
904 | switch (type) { | 912 | switch (type) { |
@@ -951,6 +959,12 @@ packet_read_poll(int *payload_len_ptr) | |||
951 | } | 959 | } |
952 | } | 960 | } |
953 | 961 | ||
962 | int | ||
963 | packet_read_poll(int *payload_len_ptr) | ||
964 | { | ||
965 | return packet_read_poll_seqnr(payload_len_ptr, NULL); | ||
966 | } | ||
967 | |||
954 | /* | 968 | /* |
955 | * Buffers the given amount of input characters. This is intended to be used | 969 | * Buffers the given amount of input characters. This is intended to be used |
956 | * together with packet_read_poll. | 970 | * together with packet_read_poll. |
@@ -11,7 +11,7 @@ | |||
11 | * called by a name other than "ssh" or "Secure Shell". | 11 | * called by a name other than "ssh" or "Secure Shell". |
12 | */ | 12 | */ |
13 | 13 | ||
14 | /* RCSID("$OpenBSD: packet.h,v 1.27 2001/12/19 17:16:13 stevesk Exp $"); */ | 14 | /* RCSID("$OpenBSD: packet.h,v 1.28 2001/12/20 22:50:24 djm Exp $"); */ |
15 | 15 | ||
16 | #ifndef PACKET_H | 16 | #ifndef PACKET_H |
17 | #define PACKET_H | 17 | #define PACKET_H |
@@ -44,6 +44,8 @@ int packet_read(int *payload_len_ptr); | |||
44 | void packet_read_expect(int *payload_len_ptr, int type); | 44 | void packet_read_expect(int *payload_len_ptr, int type); |
45 | int packet_read_poll(int *packet_len_ptr); | 45 | int packet_read_poll(int *packet_len_ptr); |
46 | void packet_process_incoming(const char *buf, u_int len); | 46 | void packet_process_incoming(const char *buf, u_int len); |
47 | int packet_read_seqnr(int *payload_len_ptr, u_int32_t *seqnr_p); | ||
48 | int packet_read_poll_seqnr(int *packet_len_ptr, u_int32_t *seqnr_p); | ||
47 | 49 | ||
48 | u_int packet_get_char(void); | 50 | u_int packet_get_char(void); |
49 | u_int packet_get_int(void); | 51 | u_int packet_get_int(void); |
diff --git a/serverloop.c b/serverloop.c index c876dc0ca..0754fe76f 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.87 2001/12/19 16:09:39 markus Exp $"); | 38 | RCSID("$OpenBSD: serverloop.c,v 1.88 2001/12/20 22:50:24 djm Exp $"); |
39 | 39 | ||
40 | #include "xmalloc.h" | 40 | #include "xmalloc.h" |
41 | #include "packet.h" | 41 | #include "packet.h" |
@@ -791,7 +791,7 @@ server_loop2(Authctxt *authctxt) | |||
791 | } | 791 | } |
792 | 792 | ||
793 | static void | 793 | static void |
794 | server_input_channel_failure(int type, int plen, void *ctxt) | 794 | server_input_channel_failure(int type, int plen, u_int32_t seq, void *ctxt) |
795 | { | 795 | { |
796 | debug("Got CHANNEL_FAILURE for keepalive"); | 796 | debug("Got CHANNEL_FAILURE for keepalive"); |
797 | /* | 797 | /* |
@@ -804,7 +804,7 @@ server_input_channel_failure(int type, int plen, void *ctxt) | |||
804 | 804 | ||
805 | 805 | ||
806 | static void | 806 | static void |
807 | server_input_stdin_data(int type, int plen, void *ctxt) | 807 | server_input_stdin_data(int type, int plen, u_int32_t seq, void *ctxt) |
808 | { | 808 | { |
809 | char *data; | 809 | char *data; |
810 | u_int data_len; | 810 | u_int data_len; |
@@ -821,7 +821,7 @@ server_input_stdin_data(int type, int plen, void *ctxt) | |||
821 | } | 821 | } |
822 | 822 | ||
823 | static void | 823 | static void |
824 | server_input_eof(int type, int plen, void *ctxt) | 824 | server_input_eof(int type, int plen, u_int32_t seq, void *ctxt) |
825 | { | 825 | { |
826 | /* | 826 | /* |
827 | * Eof from the client. The stdin descriptor to the | 827 | * Eof from the client. The stdin descriptor to the |
@@ -834,7 +834,7 @@ server_input_eof(int type, int plen, void *ctxt) | |||
834 | } | 834 | } |
835 | 835 | ||
836 | static void | 836 | static void |
837 | server_input_window_size(int type, int plen, void *ctxt) | 837 | server_input_window_size(int type, int plen, u_int32_t seq, void *ctxt) |
838 | { | 838 | { |
839 | int row = packet_get_int(); | 839 | int row = packet_get_int(); |
840 | int col = packet_get_int(); | 840 | int col = packet_get_int(); |
@@ -912,7 +912,7 @@ server_request_session(char *ctype) | |||
912 | } | 912 | } |
913 | 913 | ||
914 | static void | 914 | static void |
915 | server_input_channel_open(int type, int plen, void *ctxt) | 915 | server_input_channel_open(int type, int plen, u_int32_t seq, void *ctxt) |
916 | { | 916 | { |
917 | Channel *c = NULL; | 917 | Channel *c = NULL; |
918 | char *ctype; | 918 | char *ctype; |
@@ -962,7 +962,7 @@ server_input_channel_open(int type, int plen, void *ctxt) | |||
962 | } | 962 | } |
963 | 963 | ||
964 | static void | 964 | static void |
965 | server_input_global_request(int type, int plen, void *ctxt) | 965 | server_input_global_request(int type, int plen, u_int32_t seq, void *ctxt) |
966 | { | 966 | { |
967 | char *rtype; | 967 | char *rtype; |
968 | int want_reply; | 968 | 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.152 2001/12/19 17:16:13 stevesk Exp $"); | 42 | RCSID("$OpenBSD: ssh.c,v 1.153 2001/12/20 22:50:24 djm Exp $"); |
43 | 43 | ||
44 | #include <openssl/evp.h> | 44 | #include <openssl/evp.h> |
45 | #include <openssl/err.h> | 45 | #include <openssl/err.h> |
@@ -1015,7 +1015,7 @@ ssh_session(void) | |||
1015 | } | 1015 | } |
1016 | 1016 | ||
1017 | static void | 1017 | static void |
1018 | client_subsystem_reply(int type, int plen, void *ctxt) | 1018 | client_subsystem_reply(int type, int plen, u_int32_t seq, void *ctxt) |
1019 | { | 1019 | { |
1020 | int id, len; | 1020 | int id, len; |
1021 | 1021 | ||
diff --git a/sshconnect2.c b/sshconnect2.c index 8689da087..d7143cd18 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.88 2001/12/19 07:18:56 deraadt Exp $"); | 26 | RCSID("$OpenBSD: sshconnect2.c,v 1.89 2001/12/20 22:50:24 djm 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, void *); | 177 | void input_userauth_success(int, int, u_int32_t, void *); |
178 | void input_userauth_failure(int, int, void *); | 178 | void input_userauth_failure(int, int, u_int32_t, void *); |
179 | void input_userauth_banner(int, int, void *); | 179 | void input_userauth_banner(int, int, u_int32_t, void *); |
180 | void input_userauth_error(int, int, void *); | 180 | void input_userauth_error(int, int, u_int32_t, void *); |
181 | void input_userauth_info_req(int, int, void *); | 181 | void input_userauth_info_req(int, int, u_int32_t, void *); |
182 | void input_userauth_pk_ok(int, int, void *); | 182 | void input_userauth_pk_ok(int, 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 *); |
@@ -308,13 +308,13 @@ userauth(Authctxt *authctxt, char *authlist) | |||
308 | } | 308 | } |
309 | } | 309 | } |
310 | void | 310 | void |
311 | input_userauth_error(int type, int plen, void *ctxt) | 311 | input_userauth_error(int type, int plen, u_int32_t seq, void *ctxt) |
312 | { | 312 | { |
313 | fatal("input_userauth_error: bad message during authentication: " | 313 | fatal("input_userauth_error: bad message during authentication: " |
314 | "type %d", type); | 314 | "type %d", type); |
315 | } | 315 | } |
316 | void | 316 | void |
317 | input_userauth_banner(int type, int plen, void *ctxt) | 317 | input_userauth_banner(int type, int plen, u_int32_t seq, void *ctxt) |
318 | { | 318 | { |
319 | char *msg, *lang; | 319 | char *msg, *lang; |
320 | debug3("input_userauth_banner"); | 320 | debug3("input_userauth_banner"); |
@@ -325,7 +325,7 @@ input_userauth_banner(int type, int plen, void *ctxt) | |||
325 | xfree(lang); | 325 | xfree(lang); |
326 | } | 326 | } |
327 | void | 327 | void |
328 | input_userauth_success(int type, int plen, void *ctxt) | 328 | input_userauth_success(int type, int plen, u_int32_t seq, void *ctxt) |
329 | { | 329 | { |
330 | Authctxt *authctxt = ctxt; | 330 | Authctxt *authctxt = ctxt; |
331 | if (authctxt == NULL) | 331 | if (authctxt == NULL) |
@@ -336,7 +336,7 @@ input_userauth_success(int type, int plen, void *ctxt) | |||
336 | authctxt->success = 1; /* break out */ | 336 | authctxt->success = 1; /* break out */ |
337 | } | 337 | } |
338 | void | 338 | void |
339 | input_userauth_failure(int type, int plen, void *ctxt) | 339 | input_userauth_failure(int type, int plen, u_int32_t seq, void *ctxt) |
340 | { | 340 | { |
341 | Authctxt *authctxt = ctxt; | 341 | Authctxt *authctxt = ctxt; |
342 | char *authlist = NULL; | 342 | char *authlist = NULL; |
@@ -357,7 +357,7 @@ input_userauth_failure(int type, int plen, void *ctxt) | |||
357 | userauth(authctxt, authlist); | 357 | userauth(authctxt, authlist); |
358 | } | 358 | } |
359 | void | 359 | void |
360 | input_userauth_pk_ok(int type, int plen, void *ctxt) | 360 | input_userauth_pk_ok(int type, int plen, u_int32_t seq, void *ctxt) |
361 | { | 361 | { |
362 | Authctxt *authctxt = ctxt; | 362 | Authctxt *authctxt = ctxt; |
363 | Key *key = NULL; | 363 | Key *key = NULL; |
@@ -768,7 +768,7 @@ userauth_kbdint(Authctxt *authctxt) | |||
768 | * parse INFO_REQUEST, prompt user and send INFO_RESPONSE | 768 | * parse INFO_REQUEST, prompt user and send INFO_RESPONSE |
769 | */ | 769 | */ |
770 | void | 770 | void |
771 | input_userauth_info_req(int type, int plen, void *ctxt) | 771 | input_userauth_info_req(int type, int plen, u_int32_t seq, void *ctxt) |
772 | { | 772 | { |
773 | Authctxt *authctxt = ctxt; | 773 | Authctxt *authctxt = ctxt; |
774 | char *name, *inst, *lang, *prompt, *response; | 774 | char *name, *inst, *lang, *prompt, *response; |