summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2001-12-05 03:56:40 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2001-12-05 03:56:40 +0000
commit34846e18ad278194cad61532a02fee61ce65b14f (patch)
treea90955128e39af2a4e0113018b9fd16030d356c3
parent22b580431f589fd295d6a9a2e00ec811350de7e0 (diff)
make it compile with more strict prototype checking
-rw-r--r--usr.bin/ssh/auth1.c4
-rw-r--r--usr.bin/ssh/auth2.c4
-rw-r--r--usr.bin/ssh/canohost.c8
-rw-r--r--usr.bin/ssh/channels.c20
-rw-r--r--usr.bin/ssh/deattack.c3
-rw-r--r--usr.bin/ssh/packet.c32
-rw-r--r--usr.bin/ssh/scp.c6
-rw-r--r--usr.bin/ssh/sshconnect2.c26
8 files changed, 52 insertions, 51 deletions
diff --git a/usr.bin/ssh/auth1.c b/usr.bin/ssh/auth1.c
index bb363925555..d7083a2b918 100644
--- a/usr.bin/ssh/auth1.c
+++ b/usr.bin/ssh/auth1.c
@@ -10,7 +10,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: auth1.c,v 1.25 2001/06/26 16:15:23 dugsong Exp $");
+RCSID("$OpenBSD: auth1.c,v 1.26 2001/12/05 03:56:39 itojun Exp $");
#include "xmalloc.h"
#include "rsa.h"
@@ -323,7 +323,7 @@ do_authloop(Authctxt *authctxt)
* been exchanged and encryption is enabled.
*/
void
-do_authentication()
+do_authentication(void)
{
Authctxt *authctxt;
struct passwd *pw;
diff --git a/usr.bin/ssh/auth2.c b/usr.bin/ssh/auth2.c
index c489d1b4aab..079fa141015 100644
--- a/usr.bin/ssh/auth2.c
+++ b/usr.bin/ssh/auth2.c
@@ -23,7 +23,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: auth2.c,v 1.73 2001/11/17 19:14:34 stevesk Exp $");
+RCSID("$OpenBSD: auth2.c,v 1.74 2001/12/05 03:56:39 itojun Exp $");
#include <openssl/evp.h>
@@ -111,7 +111,7 @@ Authmethod authmethods[] = {
*/
void
-do_authentication2()
+do_authentication2(void)
{
Authctxt *authctxt = authctxt_new();
diff --git a/usr.bin/ssh/canohost.c b/usr.bin/ssh/canohost.c
index e5b2b04c2e0..2484ca7d510 100644
--- a/usr.bin/ssh/canohost.c
+++ b/usr.bin/ssh/canohost.c
@@ -12,7 +12,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: canohost.c,v 1.27 2001/06/23 15:12:17 itojun Exp $");
+RCSID("$OpenBSD: canohost.c,v 1.28 2001/12/05 03:56:39 itojun Exp $");
#include "packet.h"
#include "xmalloc.h"
@@ -239,7 +239,7 @@ get_local_name(int socket)
*/
const char *
-get_remote_ipaddr()
+get_remote_ipaddr(void)
{
static char *canonical_host_ip = NULL;
@@ -322,13 +322,13 @@ get_peer_port(int sock)
}
int
-get_remote_port()
+get_remote_port(void)
{
return get_port(0);
}
int
-get_local_port()
+get_local_port(void)
{
return get_port(1);
}
diff --git a/usr.bin/ssh/channels.c b/usr.bin/ssh/channels.c
index f93e4850e13..f9039f2835e 100644
--- a/usr.bin/ssh/channels.c
+++ b/usr.bin/ssh/channels.c
@@ -39,7 +39,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: channels.c,v 1.141 2001/11/29 21:10:51 stevesk Exp $");
+RCSID("$OpenBSD: channels.c,v 1.142 2001/12/05 03:56:39 itojun Exp $");
#include "ssh.h"
#include "ssh1.h"
@@ -361,7 +361,7 @@ channel_free_all(void)
*/
void
-channel_close_all()
+channel_close_all(void)
{
int i;
@@ -402,7 +402,7 @@ channel_stop_listening(void)
*/
int
-channel_not_very_much_buffered_data()
+channel_not_very_much_buffered_data(void)
{
u_int i;
Channel *c;
@@ -432,7 +432,7 @@ channel_not_very_much_buffered_data()
/* Returns true if any channel is still open. */
int
-channel_still_open()
+channel_still_open(void)
{
int i;
Channel *c;
@@ -475,7 +475,7 @@ channel_still_open()
/* Returns the id of an open channel suitable for keepaliving */
int
-channel_find_open()
+channel_find_open(void)
{
int i;
Channel *c;
@@ -520,7 +520,7 @@ channel_find_open()
*/
char *
-channel_open_message()
+channel_open_message(void)
{
Buffer buffer;
Channel *c;
@@ -1601,7 +1601,7 @@ channel_after_select(fd_set * readset, fd_set * writeset)
/* If there is data to send to the connection, enqueue some of it now. */
void
-channel_output_poll()
+channel_output_poll(void)
{
int len, i;
Channel *c;
@@ -2265,7 +2265,7 @@ channel_input_port_forward_request(int is_root, int gateway_ports)
* anyway, and the server has no way to know but to trust the client anyway.
*/
void
-channel_permit_all_opens()
+channel_permit_all_opens(void)
{
if (num_permitted_opens == 0)
all_opens_permitted = 1;
@@ -2746,7 +2746,7 @@ x11_request_forwarding_with_spoofing(int client_session_id,
/* Sends a message to the server to request authentication fd forwarding. */
void
-auth_request_forwarding()
+auth_request_forwarding(void)
{
packet_start(SSH_CMSG_AGENT_REQUEST_FORWARDING);
packet_send();
@@ -2760,7 +2760,7 @@ auth_request_forwarding()
*/
char *
-auth_get_socket_name()
+auth_get_socket_name(void)
{
return auth_sock_name;
}
diff --git a/usr.bin/ssh/deattack.c b/usr.bin/ssh/deattack.c
index 44220491d8c..96a7ebf4cea 100644
--- a/usr.bin/ssh/deattack.c
+++ b/usr.bin/ssh/deattack.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: deattack.c,v 1.15 2001/11/19 19:02:16 mpech Exp $ */
+/* $OpenBSD: deattack.c,v 1.16 2001/12/05 03:56:39 itojun Exp $ */
/*
* Cryptographic attack detector for ssh - source code
@@ -25,6 +25,7 @@
#include "crc32.h"
#include "getput.h"
#include "xmalloc.h"
+#include "deattack.h"
/* SSH Constants */
#define SSH_MAXBLOCKS (32 * 1024)
diff --git a/usr.bin/ssh/packet.c b/usr.bin/ssh/packet.c
index ef4cffa68dc..68abbd1e06b 100644
--- a/usr.bin/ssh/packet.c
+++ b/usr.bin/ssh/packet.c
@@ -37,7 +37,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: packet.c,v 1.72 2001/11/10 13:37:20 markus Exp $");
+RCSID("$OpenBSD: packet.c,v 1.73 2001/12/05 03:56:39 itojun Exp $");
#include "xmalloc.h"
#include "buffer.h"
@@ -147,7 +147,7 @@ packet_set_connection(int fd_in, int fd_out)
/* Returns 1 if remote host is connected via socket, 0 if not. */
int
-packet_connection_is_on_socket()
+packet_connection_is_on_socket(void)
{
struct sockaddr_storage from, to;
socklen_t fromlen, tolen;
@@ -173,7 +173,7 @@ packet_connection_is_on_socket()
/* returns 1 if connection is via ipv4 */
int
-packet_connection_is_ipv4()
+packet_connection_is_ipv4(void)
{
struct sockaddr_storage to;
socklen_t tolen = sizeof(to);
@@ -189,7 +189,7 @@ packet_connection_is_ipv4()
/* Sets the connection into non-blocking mode. */
void
-packet_set_nonblocking()
+packet_set_nonblocking(void)
{
/* Set the socket into non-blocking mode. */
if (fcntl(connection_in, F_SETFL, O_NONBLOCK) < 0)
@@ -204,7 +204,7 @@ packet_set_nonblocking()
/* Returns the socket used for reading. */
int
-packet_get_connection_in()
+packet_get_connection_in(void)
{
return connection_in;
}
@@ -212,7 +212,7 @@ packet_get_connection_in()
/* Returns the descriptor used for writing. */
int
-packet_get_connection_out()
+packet_get_connection_out(void)
{
return connection_out;
}
@@ -220,7 +220,7 @@ packet_get_connection_out()
/* Closes the connection and clears and frees internal data structures. */
void
-packet_close()
+packet_close(void)
{
if (!initialized)
return;
@@ -253,7 +253,7 @@ packet_set_protocol_flags(u_int protocol_flags)
/* Returns the remote protocol flags set earlier by the above function. */
u_int
-packet_get_protocol_flags()
+packet_get_protocol_flags(void)
{
return remote_protocol_flags;
}
@@ -594,7 +594,7 @@ packet_send2(void)
}
void
-packet_send()
+packet_send(void)
{
if (compat20)
packet_send2();
@@ -964,7 +964,7 @@ packet_process_incoming(const char *buf, u_int len)
/* Returns a character from the packet. */
u_int
-packet_get_char()
+packet_get_char(void)
{
char ch;
buffer_get(&incoming_packet, &ch, 1);
@@ -974,7 +974,7 @@ packet_get_char()
/* Returns an integer from the packet data. */
u_int
-packet_get_int()
+packet_get_int(void)
{
return buffer_get_int(&incoming_packet);
}
@@ -1111,7 +1111,7 @@ packet_disconnect(const char *fmt,...)
/* Checks if there is any buffered output, and tries to write some of the output. */
void
-packet_write_poll()
+packet_write_poll(void)
{
int len = buffer_len(&output);
if (len > 0) {
@@ -1132,7 +1132,7 @@ packet_write_poll()
*/
void
-packet_write_wait()
+packet_write_wait(void)
{
fd_set *setp;
@@ -1154,7 +1154,7 @@ packet_write_wait()
/* Returns true if there is buffered data to write to the connection. */
int
-packet_have_data_to_write()
+packet_have_data_to_write(void)
{
return buffer_len(&output) != 0;
}
@@ -1162,7 +1162,7 @@ packet_have_data_to_write()
/* Returns true if there is not too much data to write to the connection. */
int
-packet_not_very_much_data_to_write()
+packet_not_very_much_data_to_write(void)
{
if (interactive_mode)
return buffer_len(&output) < 16384;
@@ -1221,7 +1221,7 @@ packet_set_interactive(int interactive)
/* Returns true if the current connection is interactive. */
int
-packet_is_interactive()
+packet_is_interactive(void)
{
return interactive_mode;
}
diff --git a/usr.bin/ssh/scp.c b/usr.bin/ssh/scp.c
index 999481ecc5c..159e4bb7a60 100644
--- a/usr.bin/ssh/scp.c
+++ b/usr.bin/ssh/scp.c
@@ -75,7 +75,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: scp.c,v 1.85 2001/10/01 08:06:28 markus Exp $");
+RCSID("$OpenBSD: scp.c,v 1.86 2001/12/05 03:56:39 itojun Exp $");
#include "xmalloc.h"
#include "atomicio.h"
@@ -895,7 +895,7 @@ screwup:
}
int
-response()
+response(void)
{
char ch, *cp, resp, rbuf[2048];
@@ -928,7 +928,7 @@ response()
}
void
-usage()
+usage(void)
{
(void) fprintf(stderr,
"usage: scp [-pqrvBC46] [-F config] [-S ssh] [-P port] [-c cipher] [-i identity]\n"
diff --git a/usr.bin/ssh/sshconnect2.c b/usr.bin/ssh/sshconnect2.c
index 310788538a2..bb062939aea 100644
--- a/usr.bin/ssh/sshconnect2.c
+++ b/usr.bin/ssh/sshconnect2.c
@@ -23,7 +23,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: sshconnect2.c,v 1.85 2001/11/07 16:03:17 markus Exp $");
+RCSID("$OpenBSD: sshconnect2.c,v 1.86 2001/12/05 03:56:39 itojun Exp $");
#include <openssl/bn.h>
#include <openssl/md5.h>
@@ -174,20 +174,20 @@ struct Authmethod {
int *batch_flag; /* flag in option struct that disables method */
};
-void input_userauth_success(int type, int plen, void *ctxt);
-void input_userauth_failure(int type, int plen, void *ctxt);
-void input_userauth_banner(int type, int plen, void *ctxt);
-void input_userauth_error(int type, int plen, void *ctxt);
-void input_userauth_info_req(int type, int plen, void *ctxt);
-void input_userauth_pk_ok(int type, int plen, void *ctxt);
+void input_userauth_success(int, int, void *);
+void input_userauth_failure(int, int, void *);
+void input_userauth_banner(int, int, void *);
+void input_userauth_error(int, int, void *);
+void input_userauth_info_req(int, int, void *);
+void input_userauth_pk_ok(int, int, void *);
-int userauth_none(Authctxt *authctxt);
-int userauth_pubkey(Authctxt *authctxt);
-int userauth_passwd(Authctxt *authctxt);
-int userauth_kbdint(Authctxt *authctxt);
-int userauth_hostbased(Authctxt *authctxt);
+int userauth_none(Authctxt *);
+int userauth_pubkey(Authctxt *);
+int userauth_passwd(Authctxt *);
+int userauth_kbdint(Authctxt *);
+int userauth_hostbased(Authctxt *);
-void userauth(Authctxt *authctxt, char *authlist);
+void userauth(Authctxt *, char *);
static int sign_and_send_pubkey(Authctxt *, Key *, sign_cb_fn *);
static void clear_auth_state(Authctxt *);