]> andersk Git - openssh.git/blobdiff - sshd.c
One way to massive patch. <sigh> It compiles and works under Linux..
[openssh.git] / sshd.c
diff --git a/sshd.c b/sshd.c
index b5d66acdb7a90d16dc556e033f8a1894e940ca45..e10e530f52044e6377a3e160657363ccfb431b2f 100644 (file)
--- a/sshd.c
+++ b/sshd.c
@@ -40,7 +40,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: sshd.c,v 1.139 2000/12/15 17:30:14 provos Exp $");
+RCSID("$OpenBSD: sshd.c,v 1.142 2000/12/20 19:37:22 markus Exp $");
 
 #include "xmalloc.h"
 #include "rsa.h"
@@ -162,18 +162,18 @@ int key_used = 0;
 int received_sighup = 0;
 
 /* session identifier, used by RSA-auth */
-unsigned char session_id[16];
+u_char session_id[16];
 
 /* same for ssh2 */
-unsigned char *session_id2 = NULL;
+u_char *session_id2 = NULL;
 int session_id2_len = 0;
 
 /* record remote hostname or ip */
-unsigned int utmp_len = MAXHOSTNAMELEN;
+u_int utmp_len = MAXHOSTNAMELEN;
 
 /* Prototypes for various functions defined later in this file. */
-void do_ssh1_kex();
-void do_ssh2_kex();
+void do_ssh1_kex(void);
+void do_ssh2_kex(void);
 
 void ssh_dh1_server(Kex *, Buffer *_kexinit, Buffer *);
 void ssh_dhgex_server(Kex *, Buffer *_kexinit, Buffer *);
@@ -692,6 +692,8 @@ main(int ac, char **av)
 
        /* load private host keys */
        sensitive_data.host_keys = xmalloc(options.num_host_key_files*sizeof(Key*));
+       for(i = 0; i < options.num_host_key_files; i++)
+               sensitive_data.host_keys[i] = NULL;
        sensitive_data.server_key = NULL;
        sensitive_data.ssh1_host_key = NULL;
        sensitive_data.have_ssh1_key = 0;
@@ -882,7 +884,7 @@ main(int ac, char **av)
                         */
                        f = fopen(options.pid_file, "wb");
                        if (f) {
-                               fprintf(f, "%u\n", (unsigned int) getpid());
+                               fprintf(f, "%u\n", (u_int) getpid());
                                fclose(f);
                        }
                }
@@ -1172,14 +1174,14 @@ main(int ac, char **av)
  * SSH1 key exchange
  */
 void
-do_ssh1_kex()
+do_ssh1_kex(void)
 {
        int i, len;
        int plen, slen;
        BIGNUM *session_key_int;
-       unsigned char session_key[SSH_SESSION_KEY_LENGTH];
-       unsigned char cookie[8];
-       unsigned int cipher_type, auth_mask, protocol_flags;
+       u_char session_key[SSH_SESSION_KEY_LENGTH];
+       u_char cookie[8];
+       u_int cipher_type, auth_mask, protocol_flags;
        u_int32_t rand = 0;
 
        /*
@@ -1363,7 +1365,7 @@ do_ssh1_kex()
  * SSH2 key exchange: diffie-hellman-group1-sha1
  */
 void
-do_ssh2_kex()
+do_ssh2_kex(void)
 {
        Buffer *server_kexinit;
        Buffer *client_kexinit;
@@ -1436,12 +1438,12 @@ ssh_dh1_server(Kex *kex, Buffer *client_kexinit, Buffer *server_kexinit)
 #endif
        int payload_len, dlen;
        int slen;
-       unsigned char *signature = NULL;
-       unsigned char *server_host_key_blob = NULL;
-       unsigned int sbloblen;
-       unsigned int klen, kout;
-       unsigned char *kbuf;
-       unsigned char *hash;
+       u_char *signature = NULL;
+       u_char *server_host_key_blob = NULL;
+       u_int sbloblen;
+       u_int klen, kout;
+       u_char *kbuf;
+       u_char *hash;
        BIGNUM *shared_secret = 0;
        DH *dh;
        BIGNUM *dh_client_pub = 0;
@@ -1565,12 +1567,12 @@ ssh_dhgex_server(Kex *kex, Buffer *client_kexinit, Buffer *server_kexinit)
 #endif
        int payload_len, dlen;
        int slen, nbits;
-       unsigned char *signature = NULL;
-       unsigned char *server_host_key_blob = NULL;
-       unsigned int sbloblen;
-       unsigned int klen, kout;
-       unsigned char *kbuf;
-       unsigned char *hash;
+       u_char *signature = NULL;
+       u_char *server_host_key_blob = NULL;
+       u_int sbloblen;
+       u_int klen, kout;
+       u_char *kbuf;
+       u_char *hash;
        BIGNUM *shared_secret = 0;
        DH *dh;
        BIGNUM *dh_client_pub = 0;
This page took 0.046934 seconds and 4 git commands to generate.