diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | auth1.c | 4 | ||||
-rw-r--r-- | auth2.c | 4 | ||||
-rw-r--r-- | canohost.c | 8 | ||||
-rw-r--r-- | channels.c | 20 | ||||
-rw-r--r-- | deattack.c | 3 | ||||
-rw-r--r-- | packet.c | 32 | ||||
-rw-r--r-- | scp.c | 6 | ||||
-rw-r--r-- | sshconnect2.c | 26 |
9 files changed, 57 insertions, 52 deletions
@@ -53,6 +53,10 @@ | |||
53 | - itojun@cvs.openbsd.org 2001/12/05 03:50:01 | 53 | - itojun@cvs.openbsd.org 2001/12/05 03:50:01 |
54 | [clientloop.c serverloop.c sshd.c] | 54 | [clientloop.c serverloop.c sshd.c] |
55 | deal with LP64 printf issue with sig_atomic_t. from thorpej | 55 | deal with LP64 printf issue with sig_atomic_t. from thorpej |
56 | - itojun@cvs.openbsd.org 2001/12/05 03:56:39 | ||
57 | [auth1.c auth2.c canohost.c channels.c deattack.c packet.c scp.c | ||
58 | sshconnect2.c] | ||
59 | make it compile with more strict prototype checking | ||
56 | 60 | ||
57 | 20011126 | 61 | 20011126 |
58 | - (tim) [contrib/cygwin/README, openbsd-compat/bsd-cygwin_util.c, | 62 | - (tim) [contrib/cygwin/README, openbsd-compat/bsd-cygwin_util.c, |
@@ -6975,4 +6979,4 @@ | |||
6975 | - Wrote replacements for strlcpy and mkdtemp | 6979 | - Wrote replacements for strlcpy and mkdtemp |
6976 | - Released 1.0pre1 | 6980 | - Released 1.0pre1 |
6977 | 6981 | ||
6978 | $Id: ChangeLog,v 1.1682 2001/12/06 17:52:16 mouring Exp $ | 6982 | $Id: ChangeLog,v 1.1683 2001/12/06 17:55:26 mouring Exp $ |
@@ -10,7 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include "includes.h" | 12 | #include "includes.h" |
13 | RCSID("$OpenBSD: auth1.c,v 1.25 2001/06/26 16:15:23 dugsong Exp $"); | 13 | RCSID("$OpenBSD: auth1.c,v 1.26 2001/12/05 03:56:39 itojun Exp $"); |
14 | 14 | ||
15 | #include "xmalloc.h" | 15 | #include "xmalloc.h" |
16 | #include "rsa.h" | 16 | #include "rsa.h" |
@@ -360,7 +360,7 @@ do_authloop(Authctxt *authctxt) | |||
360 | * been exchanged and encryption is enabled. | 360 | * been exchanged and encryption is enabled. |
361 | */ | 361 | */ |
362 | void | 362 | void |
363 | do_authentication() | 363 | do_authentication(void) |
364 | { | 364 | { |
365 | Authctxt *authctxt; | 365 | Authctxt *authctxt; |
366 | struct passwd *pw; | 366 | struct passwd *pw; |
@@ -23,7 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include "includes.h" | 25 | #include "includes.h" |
26 | RCSID("$OpenBSD: auth2.c,v 1.73 2001/11/17 19:14:34 stevesk Exp $"); | 26 | RCSID("$OpenBSD: auth2.c,v 1.74 2001/12/05 03:56:39 itojun Exp $"); |
27 | 27 | ||
28 | #include <openssl/evp.h> | 28 | #include <openssl/evp.h> |
29 | 29 | ||
@@ -111,7 +111,7 @@ Authmethod authmethods[] = { | |||
111 | */ | 111 | */ |
112 | 112 | ||
113 | void | 113 | void |
114 | do_authentication2() | 114 | do_authentication2(void) |
115 | { | 115 | { |
116 | Authctxt *authctxt = authctxt_new(); | 116 | Authctxt *authctxt = authctxt_new(); |
117 | 117 | ||
diff --git a/canohost.c b/canohost.c index 6e6a04505..015a328e8 100644 --- a/canohost.c +++ b/canohost.c | |||
@@ -12,7 +12,7 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include "includes.h" | 14 | #include "includes.h" |
15 | RCSID("$OpenBSD: canohost.c,v 1.27 2001/06/23 15:12:17 itojun Exp $"); | 15 | RCSID("$OpenBSD: canohost.c,v 1.28 2001/12/05 03:56:39 itojun Exp $"); |
16 | 16 | ||
17 | #include "packet.h" | 17 | #include "packet.h" |
18 | #include "xmalloc.h" | 18 | #include "xmalloc.h" |
@@ -261,7 +261,7 @@ get_local_name(int socket) | |||
261 | */ | 261 | */ |
262 | 262 | ||
263 | const char * | 263 | const char * |
264 | get_remote_ipaddr() | 264 | get_remote_ipaddr(void) |
265 | { | 265 | { |
266 | static char *canonical_host_ip = NULL; | 266 | static char *canonical_host_ip = NULL; |
267 | 267 | ||
@@ -344,13 +344,13 @@ get_peer_port(int sock) | |||
344 | } | 344 | } |
345 | 345 | ||
346 | int | 346 | int |
347 | get_remote_port() | 347 | get_remote_port(void) |
348 | { | 348 | { |
349 | return get_port(0); | 349 | return get_port(0); |
350 | } | 350 | } |
351 | 351 | ||
352 | int | 352 | int |
353 | get_local_port() | 353 | get_local_port(void) |
354 | { | 354 | { |
355 | return get_port(1); | 355 | return get_port(1); |
356 | } | 356 | } |
diff --git a/channels.c b/channels.c index 62fd73d74..da6fc0008 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.140 2001/10/10 22:18:47 markus Exp $"); | 42 | RCSID("$OpenBSD: channels.c,v 1.142 2001/12/05 03:56:39 itojun Exp $"); |
43 | 43 | ||
44 | #include "ssh.h" | 44 | #include "ssh.h" |
45 | #include "ssh1.h" | 45 | #include "ssh1.h" |
@@ -361,7 +361,7 @@ channel_free_all(void) | |||
361 | */ | 361 | */ |
362 | 362 | ||
363 | void | 363 | void |
364 | channel_close_all() | 364 | channel_close_all(void) |
365 | { | 365 | { |
366 | int i; | 366 | int i; |
367 | 367 | ||
@@ -402,7 +402,7 @@ channel_stop_listening(void) | |||
402 | */ | 402 | */ |
403 | 403 | ||
404 | int | 404 | int |
405 | channel_not_very_much_buffered_data() | 405 | channel_not_very_much_buffered_data(void) |
406 | { | 406 | { |
407 | u_int i; | 407 | u_int i; |
408 | Channel *c; | 408 | Channel *c; |
@@ -432,7 +432,7 @@ channel_not_very_much_buffered_data() | |||
432 | /* Returns true if any channel is still open. */ | 432 | /* Returns true if any channel is still open. */ |
433 | 433 | ||
434 | int | 434 | int |
435 | channel_still_open() | 435 | channel_still_open(void) |
436 | { | 436 | { |
437 | int i; | 437 | int i; |
438 | Channel *c; | 438 | Channel *c; |
@@ -475,7 +475,7 @@ channel_still_open() | |||
475 | /* Returns the id of an open channel suitable for keepaliving */ | 475 | /* Returns the id of an open channel suitable for keepaliving */ |
476 | 476 | ||
477 | int | 477 | int |
478 | channel_find_open() | 478 | channel_find_open(void) |
479 | { | 479 | { |
480 | int i; | 480 | int i; |
481 | Channel *c; | 481 | Channel *c; |
@@ -520,7 +520,7 @@ channel_find_open() | |||
520 | */ | 520 | */ |
521 | 521 | ||
522 | char * | 522 | char * |
523 | channel_open_message() | 523 | channel_open_message(void) |
524 | { | 524 | { |
525 | Buffer buffer; | 525 | Buffer buffer; |
526 | Channel *c; | 526 | Channel *c; |
@@ -1601,7 +1601,7 @@ channel_after_select(fd_set * readset, fd_set * writeset) | |||
1601 | /* If there is data to send to the connection, enqueue some of it now. */ | 1601 | /* If there is data to send to the connection, enqueue some of it now. */ |
1602 | 1602 | ||
1603 | void | 1603 | void |
1604 | channel_output_poll() | 1604 | channel_output_poll(void) |
1605 | { | 1605 | { |
1606 | int len, i; | 1606 | int len, i; |
1607 | Channel *c; | 1607 | Channel *c; |
@@ -2271,7 +2271,7 @@ channel_input_port_forward_request(int is_root, int gateway_ports) | |||
2271 | * anyway, and the server has no way to know but to trust the client anyway. | 2271 | * anyway, and the server has no way to know but to trust the client anyway. |
2272 | */ | 2272 | */ |
2273 | void | 2273 | void |
2274 | channel_permit_all_opens() | 2274 | channel_permit_all_opens(void) |
2275 | { | 2275 | { |
2276 | if (num_permitted_opens == 0) | 2276 | if (num_permitted_opens == 0) |
2277 | all_opens_permitted = 1; | 2277 | all_opens_permitted = 1; |
@@ -2811,7 +2811,7 @@ x11_request_forwarding_with_spoofing(int client_session_id, | |||
2811 | /* Sends a message to the server to request authentication fd forwarding. */ | 2811 | /* Sends a message to the server to request authentication fd forwarding. */ |
2812 | 2812 | ||
2813 | void | 2813 | void |
2814 | auth_request_forwarding() | 2814 | auth_request_forwarding(void) |
2815 | { | 2815 | { |
2816 | packet_start(SSH_CMSG_AGENT_REQUEST_FORWARDING); | 2816 | packet_start(SSH_CMSG_AGENT_REQUEST_FORWARDING); |
2817 | packet_send(); | 2817 | packet_send(); |
@@ -2825,7 +2825,7 @@ auth_request_forwarding() | |||
2825 | */ | 2825 | */ |
2826 | 2826 | ||
2827 | char * | 2827 | char * |
2828 | auth_get_socket_name() | 2828 | auth_get_socket_name(void) |
2829 | { | 2829 | { |
2830 | return auth_sock_name; | 2830 | return auth_sock_name; |
2831 | } | 2831 | } |
diff --git a/deattack.c b/deattack.c index 44220491d..96a7ebf4c 100644 --- a/deattack.c +++ b/deattack.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: deattack.c,v 1.15 2001/11/19 19:02:16 mpech Exp $ */ | 1 | /* $OpenBSD: deattack.c,v 1.16 2001/12/05 03:56:39 itojun Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Cryptographic attack detector for ssh - source code | 4 | * Cryptographic attack detector for ssh - source code |
@@ -25,6 +25,7 @@ | |||
25 | #include "crc32.h" | 25 | #include "crc32.h" |
26 | #include "getput.h" | 26 | #include "getput.h" |
27 | #include "xmalloc.h" | 27 | #include "xmalloc.h" |
28 | #include "deattack.h" | ||
28 | 29 | ||
29 | /* SSH Constants */ | 30 | /* SSH Constants */ |
30 | #define SSH_MAXBLOCKS (32 * 1024) | 31 | #define SSH_MAXBLOCKS (32 * 1024) |
@@ -37,7 +37,7 @@ | |||
37 | */ | 37 | */ |
38 | 38 | ||
39 | #include "includes.h" | 39 | #include "includes.h" |
40 | RCSID("$OpenBSD: packet.c,v 1.72 2001/11/10 13:37:20 markus Exp $"); | 40 | RCSID("$OpenBSD: packet.c,v 1.73 2001/12/05 03:56:39 itojun Exp $"); |
41 | 41 | ||
42 | #include "xmalloc.h" | 42 | #include "xmalloc.h" |
43 | #include "buffer.h" | 43 | #include "buffer.h" |
@@ -147,7 +147,7 @@ packet_set_connection(int fd_in, int fd_out) | |||
147 | /* Returns 1 if remote host is connected via socket, 0 if not. */ | 147 | /* Returns 1 if remote host is connected via socket, 0 if not. */ |
148 | 148 | ||
149 | int | 149 | int |
150 | packet_connection_is_on_socket() | 150 | packet_connection_is_on_socket(void) |
151 | { | 151 | { |
152 | struct sockaddr_storage from, to; | 152 | struct sockaddr_storage from, to; |
153 | socklen_t fromlen, tolen; | 153 | socklen_t fromlen, tolen; |
@@ -173,7 +173,7 @@ packet_connection_is_on_socket() | |||
173 | /* returns 1 if connection is via ipv4 */ | 173 | /* returns 1 if connection is via ipv4 */ |
174 | 174 | ||
175 | int | 175 | int |
176 | packet_connection_is_ipv4() | 176 | packet_connection_is_ipv4(void) |
177 | { | 177 | { |
178 | struct sockaddr_storage to; | 178 | struct sockaddr_storage to; |
179 | socklen_t tolen = sizeof(to); | 179 | socklen_t tolen = sizeof(to); |
@@ -189,7 +189,7 @@ packet_connection_is_ipv4() | |||
189 | /* Sets the connection into non-blocking mode. */ | 189 | /* Sets the connection into non-blocking mode. */ |
190 | 190 | ||
191 | void | 191 | void |
192 | packet_set_nonblocking() | 192 | packet_set_nonblocking(void) |
193 | { | 193 | { |
194 | /* Set the socket into non-blocking mode. */ | 194 | /* Set the socket into non-blocking mode. */ |
195 | if (fcntl(connection_in, F_SETFL, O_NONBLOCK) < 0) | 195 | if (fcntl(connection_in, F_SETFL, O_NONBLOCK) < 0) |
@@ -204,7 +204,7 @@ packet_set_nonblocking() | |||
204 | /* Returns the socket used for reading. */ | 204 | /* Returns the socket used for reading. */ |
205 | 205 | ||
206 | int | 206 | int |
207 | packet_get_connection_in() | 207 | packet_get_connection_in(void) |
208 | { | 208 | { |
209 | return connection_in; | 209 | return connection_in; |
210 | } | 210 | } |
@@ -212,7 +212,7 @@ packet_get_connection_in() | |||
212 | /* Returns the descriptor used for writing. */ | 212 | /* Returns the descriptor used for writing. */ |
213 | 213 | ||
214 | int | 214 | int |
215 | packet_get_connection_out() | 215 | packet_get_connection_out(void) |
216 | { | 216 | { |
217 | return connection_out; | 217 | return connection_out; |
218 | } | 218 | } |
@@ -220,7 +220,7 @@ packet_get_connection_out() | |||
220 | /* Closes the connection and clears and frees internal data structures. */ | 220 | /* Closes the connection and clears and frees internal data structures. */ |
221 | 221 | ||
222 | void | 222 | void |
223 | packet_close() | 223 | packet_close(void) |
224 | { | 224 | { |
225 | if (!initialized) | 225 | if (!initialized) |
226 | return; | 226 | return; |
@@ -253,7 +253,7 @@ packet_set_protocol_flags(u_int protocol_flags) | |||
253 | /* Returns the remote protocol flags set earlier by the above function. */ | 253 | /* Returns the remote protocol flags set earlier by the above function. */ |
254 | 254 | ||
255 | u_int | 255 | u_int |
256 | packet_get_protocol_flags() | 256 | packet_get_protocol_flags(void) |
257 | { | 257 | { |
258 | return remote_protocol_flags; | 258 | return remote_protocol_flags; |
259 | } | 259 | } |
@@ -594,7 +594,7 @@ packet_send2(void) | |||
594 | } | 594 | } |
595 | 595 | ||
596 | void | 596 | void |
597 | packet_send() | 597 | packet_send(void) |
598 | { | 598 | { |
599 | if (compat20) | 599 | if (compat20) |
600 | packet_send2(); | 600 | packet_send2(); |
@@ -964,7 +964,7 @@ packet_process_incoming(const char *buf, u_int len) | |||
964 | /* Returns a character from the packet. */ | 964 | /* Returns a character from the packet. */ |
965 | 965 | ||
966 | u_int | 966 | u_int |
967 | packet_get_char() | 967 | packet_get_char(void) |
968 | { | 968 | { |
969 | char ch; | 969 | char ch; |
970 | buffer_get(&incoming_packet, &ch, 1); | 970 | buffer_get(&incoming_packet, &ch, 1); |
@@ -974,7 +974,7 @@ packet_get_char() | |||
974 | /* Returns an integer from the packet data. */ | 974 | /* Returns an integer from the packet data. */ |
975 | 975 | ||
976 | u_int | 976 | u_int |
977 | packet_get_int() | 977 | packet_get_int(void) |
978 | { | 978 | { |
979 | return buffer_get_int(&incoming_packet); | 979 | return buffer_get_int(&incoming_packet); |
980 | } | 980 | } |
@@ -1111,7 +1111,7 @@ packet_disconnect(const char *fmt,...) | |||
1111 | /* Checks if there is any buffered output, and tries to write some of the output. */ | 1111 | /* Checks if there is any buffered output, and tries to write some of the output. */ |
1112 | 1112 | ||
1113 | void | 1113 | void |
1114 | packet_write_poll() | 1114 | packet_write_poll(void) |
1115 | { | 1115 | { |
1116 | int len = buffer_len(&output); | 1116 | int len = buffer_len(&output); |
1117 | if (len > 0) { | 1117 | if (len > 0) { |
@@ -1132,7 +1132,7 @@ packet_write_poll() | |||
1132 | */ | 1132 | */ |
1133 | 1133 | ||
1134 | void | 1134 | void |
1135 | packet_write_wait() | 1135 | packet_write_wait(void) |
1136 | { | 1136 | { |
1137 | fd_set *setp; | 1137 | fd_set *setp; |
1138 | 1138 | ||
@@ -1154,7 +1154,7 @@ packet_write_wait() | |||
1154 | /* Returns true if there is buffered data to write to the connection. */ | 1154 | /* Returns true if there is buffered data to write to the connection. */ |
1155 | 1155 | ||
1156 | int | 1156 | int |
1157 | packet_have_data_to_write() | 1157 | packet_have_data_to_write(void) |
1158 | { | 1158 | { |
1159 | return buffer_len(&output) != 0; | 1159 | return buffer_len(&output) != 0; |
1160 | } | 1160 | } |
@@ -1162,7 +1162,7 @@ packet_have_data_to_write() | |||
1162 | /* Returns true if there is not too much data to write to the connection. */ | 1162 | /* Returns true if there is not too much data to write to the connection. */ |
1163 | 1163 | ||
1164 | int | 1164 | int |
1165 | packet_not_very_much_data_to_write() | 1165 | packet_not_very_much_data_to_write(void) |
1166 | { | 1166 | { |
1167 | if (interactive_mode) | 1167 | if (interactive_mode) |
1168 | return buffer_len(&output) < 16384; | 1168 | return buffer_len(&output) < 16384; |
@@ -1227,7 +1227,7 @@ packet_set_interactive(int interactive) | |||
1227 | /* Returns true if the current connection is interactive. */ | 1227 | /* Returns true if the current connection is interactive. */ |
1228 | 1228 | ||
1229 | int | 1229 | int |
1230 | packet_is_interactive() | 1230 | packet_is_interactive(void) |
1231 | { | 1231 | { |
1232 | return interactive_mode; | 1232 | return interactive_mode; |
1233 | } | 1233 | } |
@@ -75,7 +75,7 @@ | |||
75 | */ | 75 | */ |
76 | 76 | ||
77 | #include "includes.h" | 77 | #include "includes.h" |
78 | RCSID("$OpenBSD: scp.c,v 1.85 2001/10/01 08:06:28 markus Exp $"); | 78 | RCSID("$OpenBSD: scp.c,v 1.86 2001/12/05 03:56:39 itojun Exp $"); |
79 | 79 | ||
80 | #include "xmalloc.h" | 80 | #include "xmalloc.h" |
81 | #include "atomicio.h" | 81 | #include "atomicio.h" |
@@ -930,7 +930,7 @@ screwup: | |||
930 | } | 930 | } |
931 | 931 | ||
932 | int | 932 | int |
933 | response() | 933 | response(void) |
934 | { | 934 | { |
935 | char ch, *cp, resp, rbuf[2048]; | 935 | char ch, *cp, resp, rbuf[2048]; |
936 | 936 | ||
@@ -963,7 +963,7 @@ response() | |||
963 | } | 963 | } |
964 | 964 | ||
965 | void | 965 | void |
966 | usage() | 966 | usage(void) |
967 | { | 967 | { |
968 | (void) fprintf(stderr, | 968 | (void) fprintf(stderr, |
969 | "usage: scp [-pqrvBC46] [-F config] [-S ssh] [-P port] [-c cipher] [-i identity]\n" | 969 | "usage: scp [-pqrvBC46] [-F config] [-S ssh] [-P port] [-c cipher] [-i identity]\n" |
diff --git a/sshconnect2.c b/sshconnect2.c index 310788538..bb062939a 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.85 2001/11/07 16:03:17 markus Exp $"); | 26 | RCSID("$OpenBSD: sshconnect2.c,v 1.86 2001/12/05 03:56:39 itojun Exp $"); |
27 | 27 | ||
28 | #include <openssl/bn.h> | 28 | #include <openssl/bn.h> |
29 | #include <openssl/md5.h> | 29 | #include <openssl/md5.h> |
@@ -174,20 +174,20 @@ 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 type, int plen, void *ctxt); | 177 | void input_userauth_success(int, int, void *); |
178 | void input_userauth_failure(int type, int plen, void *ctxt); | 178 | void input_userauth_failure(int, int, void *); |
179 | void input_userauth_banner(int type, int plen, void *ctxt); | 179 | void input_userauth_banner(int, int, void *); |
180 | void input_userauth_error(int type, int plen, void *ctxt); | 180 | void input_userauth_error(int, int, void *); |
181 | void input_userauth_info_req(int type, int plen, void *ctxt); | 181 | void input_userauth_info_req(int, int, void *); |
182 | void input_userauth_pk_ok(int type, int plen, void *ctxt); | 182 | void input_userauth_pk_ok(int, int, void *); |
183 | 183 | ||
184 | int userauth_none(Authctxt *authctxt); | 184 | int userauth_none(Authctxt *); |
185 | int userauth_pubkey(Authctxt *authctxt); | 185 | int userauth_pubkey(Authctxt *); |
186 | int userauth_passwd(Authctxt *authctxt); | 186 | int userauth_passwd(Authctxt *); |
187 | int userauth_kbdint(Authctxt *authctxt); | 187 | int userauth_kbdint(Authctxt *); |
188 | int userauth_hostbased(Authctxt *authctxt); | 188 | int userauth_hostbased(Authctxt *); |
189 | 189 | ||
190 | void userauth(Authctxt *authctxt, char *authlist); | 190 | void userauth(Authctxt *, char *); |
191 | 191 | ||
192 | static int sign_and_send_pubkey(Authctxt *, Key *, sign_cb_fn *); | 192 | static int sign_and_send_pubkey(Authctxt *, Key *, sign_cb_fn *); |
193 | static void clear_auth_state(Authctxt *); | 193 | static void clear_auth_state(Authctxt *); |