summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--auth1.c4
-rw-r--r--auth2.c4
-rw-r--r--canohost.c8
-rw-r--r--channels.c20
-rw-r--r--deattack.c3
-rw-r--r--packet.c32
-rw-r--r--scp.c6
-rw-r--r--sshconnect2.c26
9 files changed, 57 insertions, 52 deletions
diff --git a/ChangeLog b/ChangeLog
index 6903ce284..7d2766c01 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
5720011126 6120011126
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 $
diff --git a/auth1.c b/auth1.c
index 1fbfad90a..0e5e2e557 100644
--- a/auth1.c
+++ b/auth1.c
@@ -10,7 +10,7 @@
10 */ 10 */
11 11
12#include "includes.h" 12#include "includes.h"
13RCSID("$OpenBSD: auth1.c,v 1.25 2001/06/26 16:15:23 dugsong Exp $"); 13RCSID("$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 */
362void 362void
363do_authentication() 363do_authentication(void)
364{ 364{
365 Authctxt *authctxt; 365 Authctxt *authctxt;
366 struct passwd *pw; 366 struct passwd *pw;
diff --git a/auth2.c b/auth2.c
index 14d212520..3cfba7a6a 100644
--- a/auth2.c
+++ b/auth2.c
@@ -23,7 +23,7 @@
23 */ 23 */
24 24
25#include "includes.h" 25#include "includes.h"
26RCSID("$OpenBSD: auth2.c,v 1.73 2001/11/17 19:14:34 stevesk Exp $"); 26RCSID("$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
113void 113void
114do_authentication2() 114do_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"
15RCSID("$OpenBSD: canohost.c,v 1.27 2001/06/23 15:12:17 itojun Exp $"); 15RCSID("$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
263const char * 263const char *
264get_remote_ipaddr() 264get_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
346int 346int
347get_remote_port() 347get_remote_port(void)
348{ 348{
349 return get_port(0); 349 return get_port(0);
350} 350}
351 351
352int 352int
353get_local_port() 353get_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"
42RCSID("$OpenBSD: channels.c,v 1.140 2001/10/10 22:18:47 markus Exp $"); 42RCSID("$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
363void 363void
364channel_close_all() 364channel_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
404int 404int
405channel_not_very_much_buffered_data() 405channel_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
434int 434int
435channel_still_open() 435channel_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
477int 477int
478channel_find_open() 478channel_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
522char * 522char *
523channel_open_message() 523channel_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
1603void 1603void
1604channel_output_poll() 1604channel_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 */
2273void 2273void
2274channel_permit_all_opens() 2274channel_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
2813void 2813void
2814auth_request_forwarding() 2814auth_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
2827char * 2827char *
2828auth_get_socket_name() 2828auth_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)
diff --git a/packet.c b/packet.c
index 7b94169a3..441f87ac0 100644
--- a/packet.c
+++ b/packet.c
@@ -37,7 +37,7 @@
37 */ 37 */
38 38
39#include "includes.h" 39#include "includes.h"
40RCSID("$OpenBSD: packet.c,v 1.72 2001/11/10 13:37:20 markus Exp $"); 40RCSID("$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
149int 149int
150packet_connection_is_on_socket() 150packet_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
175int 175int
176packet_connection_is_ipv4() 176packet_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
191void 191void
192packet_set_nonblocking() 192packet_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
206int 206int
207packet_get_connection_in() 207packet_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
214int 214int
215packet_get_connection_out() 215packet_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
222void 222void
223packet_close() 223packet_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
255u_int 255u_int
256packet_get_protocol_flags() 256packet_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
596void 596void
597packet_send() 597packet_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
966u_int 966u_int
967packet_get_char() 967packet_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
976u_int 976u_int
977packet_get_int() 977packet_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
1113void 1113void
1114packet_write_poll() 1114packet_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
1134void 1134void
1135packet_write_wait() 1135packet_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
1156int 1156int
1157packet_have_data_to_write() 1157packet_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
1164int 1164int
1165packet_not_very_much_data_to_write() 1165packet_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
1229int 1229int
1230packet_is_interactive() 1230packet_is_interactive(void)
1231{ 1231{
1232 return interactive_mode; 1232 return interactive_mode;
1233} 1233}
diff --git a/scp.c b/scp.c
index fb4d3096c..d285f9f55 100644
--- a/scp.c
+++ b/scp.c
@@ -75,7 +75,7 @@
75 */ 75 */
76 76
77#include "includes.h" 77#include "includes.h"
78RCSID("$OpenBSD: scp.c,v 1.85 2001/10/01 08:06:28 markus Exp $"); 78RCSID("$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
932int 932int
933response() 933response(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
965void 965void
966usage() 966usage(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"
26RCSID("$OpenBSD: sshconnect2.c,v 1.85 2001/11/07 16:03:17 markus Exp $"); 26RCSID("$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
177void input_userauth_success(int type, int plen, void *ctxt); 177void input_userauth_success(int, int, void *);
178void input_userauth_failure(int type, int plen, void *ctxt); 178void input_userauth_failure(int, int, void *);
179void input_userauth_banner(int type, int plen, void *ctxt); 179void input_userauth_banner(int, int, void *);
180void input_userauth_error(int type, int plen, void *ctxt); 180void input_userauth_error(int, int, void *);
181void input_userauth_info_req(int type, int plen, void *ctxt); 181void input_userauth_info_req(int, int, void *);
182void input_userauth_pk_ok(int type, int plen, void *ctxt); 182void input_userauth_pk_ok(int, int, void *);
183 183
184int userauth_none(Authctxt *authctxt); 184int userauth_none(Authctxt *);
185int userauth_pubkey(Authctxt *authctxt); 185int userauth_pubkey(Authctxt *);
186int userauth_passwd(Authctxt *authctxt); 186int userauth_passwd(Authctxt *);
187int userauth_kbdint(Authctxt *authctxt); 187int userauth_kbdint(Authctxt *);
188int userauth_hostbased(Authctxt *authctxt); 188int userauth_hostbased(Authctxt *);
189 189
190void userauth(Authctxt *authctxt, char *authlist); 190void userauth(Authctxt *, char *);
191 191
192static int sign_and_send_pubkey(Authctxt *, Key *, sign_cb_fn *); 192static int sign_and_send_pubkey(Authctxt *, Key *, sign_cb_fn *);
193static void clear_auth_state(Authctxt *); 193static void clear_auth_state(Authctxt *);