diff options
32 files changed, 182 insertions, 182 deletions
diff --git a/usr.bin/ssh/auth-chall.c b/usr.bin/ssh/auth-chall.c index b8b0c5d1ed3..b6ec02a3868 100644 --- a/usr.bin/ssh/auth-chall.c +++ b/usr.bin/ssh/auth-chall.c @@ -23,7 +23,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: auth-chall.c,v 1.3 2001/01/21 19:05:41 markus Exp $"); +RCSID("$OpenBSD: auth-chall.c,v 1.4 2001/02/04 15:32:22 stevesk Exp $"); #include "auth.h" @@ -34,7 +34,7 @@ char * get_challenge(Authctxt *authctxt, char *devs) { static char challenge[1024]; - struct skey skey; + struct skey skey; if (skeychallenge(&skey, authctxt->user, challenge) == -1) return NULL; strlcat(challenge, "\nS/Key Password: ", sizeof challenge); diff --git a/usr.bin/ssh/auth.c b/usr.bin/ssh/auth.c index 8455107aca6..e654b89db34 100644 --- a/usr.bin/ssh/auth.c +++ b/usr.bin/ssh/auth.c @@ -23,7 +23,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: auth.c,v 1.15 2001/02/03 10:08:37 markus Exp $"); +RCSID("$OpenBSD: auth.c,v 1.16 2001/02/04 15:32:22 stevesk Exp $"); #include "xmalloc.h" #include "match.h" @@ -115,9 +115,9 @@ allowed_user(struct passwd * pw) Authctxt * authctxt_new(void) { - Authctxt *authctxt = xmalloc(sizeof(*authctxt)); - memset(authctxt, 0, sizeof(*authctxt)); - return authctxt; + Authctxt *authctxt = xmalloc(sizeof(*authctxt)); + memset(authctxt, 0, sizeof(*authctxt)); + return authctxt; } struct passwd * diff --git a/usr.bin/ssh/auth2.c b/usr.bin/ssh/auth2.c index f4daf8a3d3a..a4e84a0e17d 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.35 2001/02/04 13:30:11 stevesk Exp $"); +RCSID("$OpenBSD: auth2.c,v 1.36 2001/02/04 15:32:22 stevesk Exp $"); #include <openssl/evp.h> @@ -189,7 +189,7 @@ input_userauth_request(int type, int plen, void *ctxt) if ((style = strchr(user, ':')) != NULL) *style++ = 0; - if (authctxt->attempt++ == 0) { + if (authctxt->attempt++ == 0) { /* setup auth context */ struct passwd *pw = NULL; setproctitle("%s", user); @@ -275,7 +275,7 @@ done: return; } -void +void userauth_reply(Authctxt *authctxt, int authenticated) { char *methods; @@ -291,7 +291,7 @@ userauth_reply(Authctxt *authctxt, int authenticated) authctxt->success = 1; } else { if (authctxt->failures++ > AUTH_FAIL_MAX) - packet_disconnect(AUTH_FAIL_MSG, authctxt->user); + packet_disconnect(AUTH_FAIL_MSG, authctxt->user); methods = authmethods_get(); packet_start(SSH2_MSG_USERAUTH_FAILURE); packet_put_cstring(methods); diff --git a/usr.bin/ssh/authfd.c b/usr.bin/ssh/authfd.c index 601d5952862..ce3268c96f3 100644 --- a/usr.bin/ssh/authfd.c +++ b/usr.bin/ssh/authfd.c @@ -35,7 +35,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: authfd.c,v 1.34 2001/02/04 13:30:11 stevesk Exp $"); +RCSID("$OpenBSD: authfd.c,v 1.35 2001/02/04 15:32:22 stevesk Exp $"); #include <openssl/evp.h> @@ -553,7 +553,7 @@ ssh_remove_all_identities(AuthenticationConnection *auth, int version) return decode_reply(type); } -int +int decode_reply(int type) { switch (type) { diff --git a/usr.bin/ssh/channels.c b/usr.bin/ssh/channels.c index f3e33b47dbc..bdf363fc48e 100644 --- a/usr.bin/ssh/channels.c +++ b/usr.bin/ssh/channels.c @@ -40,7 +40,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: channels.c,v 1.88 2001/02/01 21:58:08 markus Exp $"); +RCSID("$OpenBSD: channels.c,v 1.89 2001/02/04 15:32:23 stevesk Exp $"); #include <openssl/rsa.h> #include <openssl/dsa.h> @@ -704,7 +704,7 @@ channel_post_connecting(Channel *c, fd_set * readset, fd_set * writeset) int err = 0; int sz = sizeof(err); c->type = SSH_CHANNEL_OPEN; - if (getsockopt(c->sock, SOL_SOCKET, SO_ERROR, (char *)&err, &sz) < 0) { + if (getsockopt(c->sock, SOL_SOCKET, SO_ERROR, (char *)&err, &sz) < 0) { debug("getsockopt SO_ERROR failed"); } else { if (err == 0) { @@ -1561,7 +1561,7 @@ channel_request_forwarding( if (remote_fwd) { host = listen_address; - ctype = SSH_CHANNEL_RPORT_LISTENER; + ctype = SSH_CHANNEL_RPORT_LISTENER; } else { host = host_to_connect; ctype =SSH_CHANNEL_PORT_LISTENER; @@ -1767,14 +1767,14 @@ channel_connect_to(const char *host, u_short host_port) error("connect %.100s port %s: %.100s", ntop, strport, strerror(errno)); close(sock); - continue; /* fail -- try next */ + continue; /* fail -- try next */ } break; /* success */ } freeaddrinfo(aitop); if (!ai) { - error("connect %.100s port %d: failed.", host, host_port); + error("connect %.100s port %d: failed.", host, host_port); return -1; } /* success */ @@ -2455,7 +2455,7 @@ channel_cancel_cleanup(int id) } c->dettach_user = NULL; } -void +void channel_register_filter(int id, channel_filter_fn *fn) { Channel *c = channel_lookup(id); diff --git a/usr.bin/ssh/cipher.c b/usr.bin/ssh/cipher.c index c867216cc67..5350703efbf 100644 --- a/usr.bin/ssh/cipher.c +++ b/usr.bin/ssh/cipher.c @@ -35,7 +35,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: cipher.c,v 1.42 2001/01/21 19:05:46 markus Exp $"); +RCSID("$OpenBSD: cipher.c,v 1.43 2001/02/04 15:32:23 stevesk Exp $"); #include "xmalloc.h" #include "log.h" @@ -266,7 +266,7 @@ cast_setkey(CipherContext *cc, const u_char *key, u_int keylen) void cast_setiv(CipherContext *cc, const u_char *iv, u_int ivlen) { - if (iv == NULL) + if (iv == NULL) fatal("no IV for %s.", cc->cipher->name); memcpy(cc->u.cast.iv, (char *)iv, 8); } @@ -295,7 +295,7 @@ rijndael_setkey(CipherContext *cc, const u_char *key, u_int keylen) void rijndael_setiv(CipherContext *cc, const u_char *iv, u_int ivlen) { - if (iv == NULL) + if (iv == NULL) fatal("no IV for %s.", cc->cipher->name); memcpy((u_char *)cc->u.rijndael.iv, iv, RIJNDAEL_BLOCKSIZE); } @@ -415,7 +415,7 @@ Cipher ciphers[] = { SSH_CIPHER_SSH2, 16, 32, rijndael_setkey, rijndael_setiv, rijndael_cbc_encrypt, rijndael_cbc_decrypt }, - { NULL, SSH_CIPHER_ILLEGAL, 0, 0, NULL, NULL, NULL, NULL } + { NULL, SSH_CIPHER_ILLEGAL, 0, 0, NULL, NULL, NULL, NULL } }; /*--*/ diff --git a/usr.bin/ssh/cli.c b/usr.bin/ssh/cli.c index 943bc104b2c..ec5927d7720 100644 --- a/usr.bin/ssh/cli.c +++ b/usr.bin/ssh/cli.c @@ -1,5 +1,5 @@ #include "includes.h" -RCSID("$OpenBSD: cli.c,v 1.6 2001/01/21 19:05:47 markus Exp $"); +RCSID("$OpenBSD: cli.c,v 1.7 2001/02/04 15:32:23 stevesk Exp $"); #include "xmalloc.h" #include "log.h" @@ -138,11 +138,11 @@ cli_write(char* buf, int size) output = xmalloc(4*size); for (p = output, i = 0; i < size; i++) { - if (buf[i] == '\n') - *p++ = buf[i]; - else - p = vis(p, buf[i], 0, 0); - } + if (buf[i] == '\n') + *p++ = buf[i]; + else + p = vis(p, buf[i], 0, 0); + } len = p - output; for (pos = 0; pos < len; pos += ret) { diff --git a/usr.bin/ssh/dispatch.c b/usr.bin/ssh/dispatch.c index a771094fe65..f0437cdeef5 100644 --- a/usr.bin/ssh/dispatch.c +++ b/usr.bin/ssh/dispatch.c @@ -22,7 +22,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "includes.h" -RCSID("$OpenBSD: dispatch.c,v 1.8 2001/01/28 10:15:34 markus Exp $"); +RCSID("$OpenBSD: dispatch.c,v 1.9 2001/02/04 15:32:23 stevesk Exp $"); #include "ssh1.h" #include "ssh2.h" @@ -72,7 +72,7 @@ dispatch_run(int mode, int *done, void *ctxt) if (type > 0 && type < DISPATCH_MAX && dispatch[type] != NULL) (*dispatch[type])(type, plen, ctxt); else - packet_disconnect("protocol error: rcvd type %d", type); + packet_disconnect("protocol error: rcvd type %d", type); if (done != NULL && *done) return; } diff --git a/usr.bin/ssh/kex.c b/usr.bin/ssh/kex.c index d3099f7085c..754ced8eb70 100644 --- a/usr.bin/ssh/kex.c +++ b/usr.bin/ssh/kex.c @@ -23,7 +23,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: kex.c,v 1.18 2001/01/21 19:05:49 markus Exp $"); +RCSID("$OpenBSD: kex.c,v 1.19 2001/02/04 15:32:23 stevesk Exp $"); #include <openssl/crypto.h> #include <openssl/bio.h> @@ -79,7 +79,7 @@ kex_exchange_kexinit( debug("send KEXINIT"); packet_start(SSH2_MSG_KEXINIT); - packet_put_raw(buffer_ptr(my_kexinit), buffer_len(my_kexinit)); + packet_put_raw(buffer_ptr(my_kexinit), buffer_len(my_kexinit)); packet_send(); packet_write_wait(); debug("done"); @@ -244,7 +244,7 @@ kex_hash( buffer_put_bignum2(&b, client_dh_pub); buffer_put_bignum2(&b, server_dh_pub); buffer_put_bignum2(&b, shared_secret); - + #ifdef DEBUG_KEX buffer_dump(&b); #endif @@ -297,7 +297,7 @@ kex_hash_gex( buffer_put_bignum2(&b, client_dh_pub); buffer_put_bignum2(&b, server_dh_pub); buffer_put_bignum2(&b, shared_secret); - + #ifdef DEBUG_KEX buffer_dump(&b); #endif @@ -366,7 +366,7 @@ get_match(char *client, char *server) c = cp = xstrdup(client); s = sp = xstrdup(server); - for ((p = strsep(&sp, SEP)), i=0; p && *p != '\0'; + for ((p = strsep(&sp, SEP)), i=0; p && *p != '\0'; (p = strsep(&sp, SEP)), i++) { if (i < MAX_PROP) sproposals[i] = p; @@ -375,7 +375,7 @@ get_match(char *client, char *server) } nproposals = i; - for ((p = strsep(&cp, SEP)), i=0; p && *p != '\0'; + for ((p = strsep(&cp, SEP)), i=0; p && *p != '\0'; (p = strsep(&cp, SEP)), i++) { for (j = 0; j < nproposals; j++) { if (strcmp(p, sproposals[j]) == 0) { diff --git a/usr.bin/ssh/kex.h b/usr.bin/ssh/kex.h index f07e3d4d399..d8f37c1a67d 100644 --- a/usr.bin/ssh/kex.h +++ b/usr.bin/ssh/kex.h @@ -1,4 +1,4 @@ -/* $OpenBSD: kex.h,v 1.12 2001/01/29 01:58:16 niklas Exp $ */ +/* $OpenBSD: kex.h,v 1.13 2001/02/04 15:32:24 stevesk Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. @@ -54,7 +54,7 @@ enum kex_exchange { DH_GRP1_SHA1, DH_GEX_SHA1 }; - + typedef struct Kex Kex; typedef struct Mac Mac; typedef struct Comp Comp; diff --git a/usr.bin/ssh/key.c b/usr.bin/ssh/key.c index 8cecce0177f..27910ff0efc 100644 --- a/usr.bin/ssh/key.c +++ b/usr.bin/ssh/key.c @@ -32,7 +32,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "includes.h" -RCSID("$OpenBSD: key.c,v 1.16 2001/01/22 16:55:21 stevesk Exp $"); +RCSID("$OpenBSD: key.c,v 1.17 2001/02/04 15:32:24 stevesk Exp $"); #include <openssl/evp.h> @@ -452,11 +452,11 @@ key_size(Key *k){ RSA * rsa_generate_private_key(u_int bits) { - RSA *private; - private = RSA_generate_key(bits, 35, NULL, NULL); - if (private == NULL) - fatal("rsa_generate_private_key: key generation failed."); - return private; + RSA *private; + private = RSA_generate_key(bits, 35, NULL, NULL); + if (private == NULL) + fatal("rsa_generate_private_key: key generation failed."); + return private; } DSA* @@ -466,9 +466,9 @@ dsa_generate_private_key(u_int bits) if (private == NULL) fatal("dsa_generate_private_key: DSA_generate_parameters failed"); if (!DSA_generate_key(private)) - fatal("dsa_generate_private_key: DSA_generate_key failed."); - if (private == NULL) - fatal("dsa_generate_private_key: NULL."); + fatal("dsa_generate_private_key: DSA_generate_key failed."); + if (private == NULL) + fatal("dsa_generate_private_key: NULL."); return private; } @@ -477,7 +477,7 @@ key_generate(int type, u_int bits) { Key *k = key_new(KEY_UNSPEC); switch (type) { - case KEY_DSA: + case KEY_DSA: k->dsa = dsa_generate_private_key(bits); break; case KEY_RSA: @@ -485,9 +485,9 @@ key_generate(int type, u_int bits) k->rsa = rsa_generate_private_key(bits); break; default: - fatal("key_generate: unknown type %d", type); + fatal("key_generate: unknown type %d", type); } - k->type = type; + k->type = type; return k; } @@ -496,7 +496,7 @@ key_from_private(Key *k) { Key *n = NULL; switch (k->type) { - case KEY_DSA: + case KEY_DSA: n = key_new(k->type); BN_copy(n->dsa->p, k->dsa->p); BN_copy(n->dsa->q, k->dsa->q); @@ -510,7 +510,7 @@ key_from_private(Key *k) BN_copy(n->rsa->e, k->rsa->e); break; default: - fatal("key_from_private: unknown type %d", k->type); + fatal("key_from_private: unknown type %d", k->type); break; } return n; diff --git a/usr.bin/ssh/packet.c b/usr.bin/ssh/packet.c index 1e21d62343f..102a21176c6 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.47 2001/02/04 13:30:12 stevesk Exp $"); +RCSID("$OpenBSD: packet.c,v 1.48 2001/02/04 15:32:24 stevesk Exp $"); #include "xmalloc.h" #include "buffer.h" @@ -988,7 +988,7 @@ packet_read_poll(int *payload_len_ptr) default: return type; break; - } + } } else { switch(type) { case SSH_MSG_IGNORE: @@ -1010,7 +1010,7 @@ packet_read_poll(int *payload_len_ptr) DBG(debug("received packet type %d", type)); return type; break; - } + } } } } diff --git a/usr.bin/ssh/pty.c b/usr.bin/ssh/pty.c index 125f2c705f3..62caff27fd3 100644 --- a/usr.bin/ssh/pty.c +++ b/usr.bin/ssh/pty.c @@ -12,7 +12,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: pty.c,v 1.20 2001/01/21 19:05:53 markus Exp $"); +RCSID("$OpenBSD: pty.c,v 1.21 2001/02/04 15:32:24 stevesk Exp $"); #include <util.h> #include "pty.h" @@ -274,11 +274,11 @@ pty_setowner(struct passwd *pw, const char *ttyname) if (chown(ttyname, pw->pw_uid, gid) < 0) { if (errno == EROFS && st.st_uid == pw->pw_uid) error("chown(%.100s, %d, %d) failed: %.100s", - ttyname, pw->pw_uid, gid, + ttyname, pw->pw_uid, gid, strerror(errno)); else fatal("chown(%.100s, %d, %d) failed: %.100s", - ttyname, pw->pw_uid, gid, + ttyname, pw->pw_uid, gid, strerror(errno)); } } diff --git a/usr.bin/ssh/rijndael.c b/usr.bin/ssh/rijndael.c index ca3b1456891..98ecb55c811 100644 --- a/usr.bin/ssh/rijndael.c +++ b/usr.bin/ssh/rijndael.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rijndael.c,v 1.6 2000/12/09 13:48:31 markus Exp $ */ +/* $OpenBSD: rijndael.c,v 1.7 2001/02/04 15:32:24 stevesk Exp $ */ /* This is an independent implementation of the encryption algorithm: */ /* */ @@ -54,7 +54,7 @@ void gen_tabs __P((void)); #define bswap(x) ((rotl(x, 8) & 0x00ff00ff) | (rotr(x, 8) & 0xff00ff00)) -/* Extract byte from a 32 bit quantity (little endian notation) */ +/* Extract byte from a 32 bit quantity (little endian notation) */ #define byte(x,n) ((u1byte)((x) >> (8 * n))) @@ -89,15 +89,15 @@ u4byte tab_gen = 0; #define f_rn(bo, bi, n, k) \ bo[n] = ft_tab[0][byte(bi[n],0)] ^ \ - ft_tab[1][byte(bi[(n + 1) & 3],1)] ^ \ - ft_tab[2][byte(bi[(n + 2) & 3],2)] ^ \ - ft_tab[3][byte(bi[(n + 3) & 3],3)] ^ *(k + n) + ft_tab[1][byte(bi[(n + 1) & 3],1)] ^ \ + ft_tab[2][byte(bi[(n + 2) & 3],2)] ^ \ + ft_tab[3][byte(bi[(n + 3) & 3],3)] ^ *(k + n) #define i_rn(bo, bi, n, k) \ bo[n] = it_tab[0][byte(bi[n],0)] ^ \ - it_tab[1][byte(bi[(n + 3) & 3],1)] ^ \ - it_tab[2][byte(bi[(n + 2) & 3],2)] ^ \ - it_tab[3][byte(bi[(n + 1) & 3],3)] ^ *(k + n) + it_tab[1][byte(bi[(n + 3) & 3],1)] ^ \ + it_tab[2][byte(bi[(n + 2) & 3],2)] ^ \ + it_tab[3][byte(bi[(n + 1) & 3],3)] ^ *(k + n) #ifdef LARGE_TABLES @@ -109,15 +109,15 @@ u4byte tab_gen = 0; #define f_rl(bo, bi, n, k) \ bo[n] = fl_tab[0][byte(bi[n],0)] ^ \ - fl_tab[1][byte(bi[(n + 1) & 3],1)] ^ \ - fl_tab[2][byte(bi[(n + 2) & 3],2)] ^ \ - fl_tab[3][byte(bi[(n + 3) & 3],3)] ^ *(k + n) + fl_tab[1][byte(bi[(n + 1) & 3],1)] ^ \ + fl_tab[2][byte(bi[(n + 2) & 3],2)] ^ \ + fl_tab[3][byte(bi[(n + 3) & 3],3)] ^ *(k + n) #define i_rl(bo, bi, n, k) \ bo[n] = il_tab[0][byte(bi[n],0)] ^ \ - il_tab[1][byte(bi[(n + 3) & 3],1)] ^ \ - il_tab[2][byte(bi[(n + 2) & 3],2)] ^ \ - il_tab[3][byte(bi[(n + 1) & 3],3)] ^ *(k + n) + il_tab[1][byte(bi[(n + 3) & 3],1)] ^ \ + il_tab[2][byte(bi[(n + 2) & 3],2)] ^ \ + il_tab[3][byte(bi[(n + 1) & 3],3)] ^ *(k + n) #else @@ -129,15 +129,15 @@ u4byte tab_gen = 0; #define f_rl(bo, bi, n, k) \ bo[n] = (u4byte)sbx_tab[byte(bi[n],0)] ^ \ - rotl(((u4byte)sbx_tab[byte(bi[(n + 1) & 3],1)]), 8) ^ \ - rotl(((u4byte)sbx_tab[byte(bi[(n + 2) & 3],2)]), 16) ^ \ - rotl(((u4byte)sbx_tab[byte(bi[(n + 3) & 3],3)]), 24) ^ *(k + n) + rotl(((u4byte)sbx_tab[byte(bi[(n + 1) & 3],1)]), 8) ^ \ + rotl(((u4byte)sbx_tab[byte(bi[(n + 2) & 3],2)]), 16) ^ \ + rotl(((u4byte)sbx_tab[byte(bi[(n + 3) & 3],3)]), 24) ^ *(k + n) #define i_rl(bo, bi, n, k) \ bo[n] = (u4byte)isb_tab[byte(bi[n],0)] ^ \ - rotl(((u4byte)isb_tab[byte(bi[(n + 3) & 3],1)]), 8) ^ \ - rotl(((u4byte)isb_tab[byte(bi[(n + 2) & 3],2)]), 16) ^ \ - rotl(((u4byte)isb_tab[byte(bi[(n + 1) & 3],3)]), 24) ^ *(k + n) + rotl(((u4byte)isb_tab[byte(bi[(n + 3) & 3],1)]), 8) ^ \ + rotl(((u4byte)isb_tab[byte(bi[(n + 2) & 3],2)]), 16) ^ \ + rotl(((u4byte)isb_tab[byte(bi[(n + 1) & 3],3)]), 24) ^ *(k + n) #endif @@ -160,7 +160,7 @@ gen_tabs(void) log_tab[1] = 0; p = 1; for(i = 0; i < 10; ++i) { - rco_tab[i] = p; + rco_tab[i] = p; p = (p << 1) ^ (p & 0x80 ? 0x1b : 0); } @@ -172,19 +172,19 @@ gen_tabs(void) /* least significant end of a byte. */ for(i = 0; i < 256; ++i) { - p = (i ? pow_tab[255 - log_tab[i]] : 0); q = p; - q = (q >> 7) | (q << 1); p ^= q; - q = (q >> 7) | (q << 1); p ^= q; - q = (q >> 7) | (q << 1); p ^= q; - q = (q >> 7) | (q << 1); p ^= q ^ 0x63; + p = (i ? pow_tab[255 - log_tab[i]] : 0); q = p; + q = (q >> 7) | (q << 1); p ^= q; + q = (q >> 7) | (q << 1); p ^= q; + q = (q >> 7) | (q << 1); p ^= q; + q = (q >> 7) | (q << 1); p ^= q ^ 0x63; sbx_tab[i] = (u1byte)p; isb_tab[p] = (u1byte)i; } for(i = 0; i < 256; ++i) { - p = sbx_tab[i]; + p = sbx_tab[i]; + +#ifdef LARGE_TABLES -#ifdef LARGE_TABLES - t = p; fl_tab[0][i] = t; fl_tab[1][i] = rotl(t, 8); fl_tab[2][i] = rotl(t, 16); @@ -194,30 +194,30 @@ gen_tabs(void) ((u4byte)p << 8) | ((u4byte)p << 16) | ((u4byte)ff_mult(3, p) << 24); - + ft_tab[0][i] = t; ft_tab[1][i] = rotl(t, 8); ft_tab[2][i] = rotl(t, 16); ft_tab[3][i] = rotl(t, 24); - p = isb_tab[i]; + p = isb_tab[i]; -#ifdef LARGE_TABLES - - t = p; il_tab[0][i] = t; - il_tab[1][i] = rotl(t, 8); - il_tab[2][i] = rotl(t, 16); +#ifdef LARGE_TABLES + + t = p; il_tab[0][i] = t; + il_tab[1][i] = rotl(t, 8); + il_tab[2][i] = rotl(t, 16); il_tab[3][i] = rotl(t, 24); -#endif +#endif t = ((u4byte)ff_mult(14, p)) | ((u4byte)ff_mult( 9, p) << 8) | ((u4byte)ff_mult(13, p) << 16) | ((u4byte)ff_mult(11, p) << 24); - - it_tab[0][i] = t; - it_tab[1][i] = rotl(t, 8); - it_tab[2][i] = rotl(t, 16); - it_tab[3][i] = rotl(t, 24); + + it_tab[0][i] = t; + it_tab[1][i] = rotl(t, 8); + it_tab[2][i] = rotl(t, 16); + it_tab[3][i] = rotl(t, 24); } tab_gen = 1; @@ -232,8 +232,8 @@ gen_tabs(void) t = w ^ (x); \ (y) = u ^ v ^ w; \ (y) ^= rotr(u ^ t, 8) ^ \ - rotr(v ^ t, 16) ^ \ - rotr(t,24) + rotr(v ^ t, 16) ^ \ + rotr(t,24) /* initialise the key schedule from the user supplied key */ @@ -271,7 +271,7 @@ gen_tabs(void) rijndael_ctx * rijndael_set_key(rijndael_ctx *ctx, const u4byte *in_key, const u4byte key_len, int encrypt) -{ +{ u4byte i, t, u, v, w; u4byte *e_key = ctx->e_key; u4byte *d_key = ctx->d_key; @@ -285,23 +285,23 @@ rijndael_set_key(rijndael_ctx *ctx, const u4byte *in_key, const u4byte key_len, e_key[0] = io_swap(in_key[0]); e_key[1] = io_swap(in_key[1]); e_key[2] = io_swap(in_key[2]); e_key[3] = io_swap(in_key[3]); - + switch(ctx->k_len) { - case 4: t = e_key[3]; - for(i = 0; i < 10; ++i) + case 4: t = e_key[3]; + for(i = 0; i < 10; ++i) loop4(i); - break; + break; - case 6: e_key[4] = io_swap(in_key[4]); t = e_key[5] = io_swap(in_key[5]); - for(i = 0; i < 8; ++i) + case 6: e_key[4] = io_swap(in_key[4]); t = e_key[5] = io_swap(in_key[5]); + for(i = 0; i < 8; ++i) loop6(i); - break; + break; - case 8: e_key[4] = io_swap(in_key[4]); e_key[5] = io_swap(in_key[5]); - e_key[6] = io_swap(in_key[6]); t = e_key[7] = io_swap(in_key[7]); - for(i = 0; i < 7; ++i) + case 8: e_key[4] = io_swap(in_key[4]); e_key[5] = io_swap(in_key[5]); + e_key[6] = io_swap(in_key[6]); t = e_key[7] = io_swap(in_key[7]); + for(i = 0; i < 7; ++i) loop8(i); - break; + break; } if (!encrypt) { @@ -333,7 +333,7 @@ rijndael_set_key(rijndael_ctx *ctx, const u4byte *in_key, const u4byte key_len, void rijndael_encrypt(rijndael_ctx *ctx, const u4byte *in_blk, u4byte *out_blk) -{ +{ u4byte k_len = ctx->k_len; u4byte *e_key = ctx->e_key; u4byte b0[4], b1[4], *kp; @@ -380,7 +380,7 @@ rijndael_encrypt(rijndael_ctx *ctx, const u4byte *in_blk, u4byte *out_blk) void rijndael_decrypt(rijndael_ctx *ctx, const u4byte *in_blk, u4byte *out_blk) -{ +{ u4byte b0[4], b1[4], *kp; u4byte k_len = ctx->k_len; u4byte *e_key = ctx->e_key; diff --git a/usr.bin/ssh/rsa.c b/usr.bin/ssh/rsa.c index 1005246077b..62655314952 100644 --- a/usr.bin/ssh/rsa.c +++ b/usr.bin/ssh/rsa.c @@ -8,7 +8,7 @@ * software must be clearly marked as such, and if the derived work is * incompatible with the protocol description in the RFC file, it must be * called by a name other than "ssh" or "Secure Shell". - * + * * * Copyright (c) 1999 Niels Provos. All rights reserved. * @@ -60,7 +60,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: rsa.c,v 1.20 2001/01/29 19:47:30 markus Exp $"); +RCSID("$OpenBSD: rsa.c,v 1.21 2001/02/04 15:32:24 stevesk Exp $"); #include "rsa.h" #include "log.h" diff --git a/usr.bin/ssh/scp.c b/usr.bin/ssh/scp.c index 4180cdade85..7a7fbb2a83c 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.51 2001/01/21 19:05:55 markus Exp $"); +RCSID("$OpenBSD: scp.c,v 1.52 2001/02/04 15:32:24 stevesk Exp $"); #include "xmalloc.h" #include "atomicio.h" @@ -292,7 +292,7 @@ main(argc, argv) remin = STDIN_FILENO; remout = STDOUT_FILENO; - if (fflag) { + if (fflag) { /* Follow "protocol", send data. */ (void) response(); source(argc, argv); diff --git a/usr.bin/ssh/servconf.c b/usr.bin/ssh/servconf.c index 5fa41e028e9..59687e16d9b 100644 --- a/usr.bin/ssh/servconf.c +++ b/usr.bin/ssh/servconf.c @@ -10,7 +10,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: servconf.c,v 1.64 2001/02/03 10:08:37 markus Exp $"); +RCSID("$OpenBSD: servconf.c,v 1.65 2001/02/04 15:32:24 stevesk Exp $"); #ifdef KRB4 #include <krb.h> @@ -222,7 +222,7 @@ static struct { { "port", sPort }, { "hostkey", sHostKeyFile }, { "hostdsakey", sHostKeyFile }, /* alias */ - { "pidfile", sPidFile }, + { "pidfile", sPidFile }, { "serverkeybits", sServerKeyBits }, { "logingracetime", sLoginGraceTime }, { "keyregenerationinterval", sKeyRegenerationTime }, @@ -560,7 +560,7 @@ parse_flag: case sXAuthLocation: charptr = &options->xauth_location; goto parse_filename; - + case sStrictModes: intptr = &options->strict_modes; goto parse_flag; @@ -716,14 +716,14 @@ parse_flag: case sBanner: charptr = &options->banner; goto parse_filename; - + default: fprintf(stderr, "%s line %d: Missing handler for opcode %s (%d)\n", filename, linenum, arg, opcode); exit(1); } if ((arg = strdelim(&cp)) != NULL && *arg != '\0') { - fprintf(stderr, + fprintf(stderr, "%s line %d: garbage at end of line; \"%.200s\".\n", filename, linenum, arg); exit(1); diff --git a/usr.bin/ssh/serverloop.c b/usr.bin/ssh/serverloop.c index db994316f50..a5dd1bcc960 100644 --- a/usr.bin/ssh/serverloop.c +++ b/usr.bin/ssh/serverloop.c @@ -35,7 +35,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: serverloop.c,v 1.44 2001/01/31 20:37:23 markus Exp $"); +RCSID("$OpenBSD: serverloop.c,v 1.45 2001/02/04 15:32:25 stevesk Exp $"); #include "xmalloc.h" #include "packet.h" @@ -162,7 +162,7 @@ make_packets_from_stdout_data() } else { /* Keep the packets at reasonable size. */ if (len > packet_get_maxsize()) - len = packet_get_maxsize(); + len = packet_get_maxsize(); } packet_start(SSH_SMSG_STDOUT_DATA); packet_put_string(buffer_ptr(&stdout_buffer), len); @@ -830,7 +830,7 @@ server_input_channel_open(int type, int plen, void *ctxt) xfree(ctype); } -void +void server_input_global_request(int type, int plen, void *ctxt) { char *rtype; @@ -840,7 +840,7 @@ server_input_global_request(int type, int plen, void *ctxt) rtype = packet_get_string(NULL); want_reply = packet_get_char(); debug("server_input_global_request: rtype %s want_reply %d", rtype, want_reply); - + if (strcmp(rtype, "tcpip-forward") == 0) { struct passwd *pw; char *listen_address; diff --git a/usr.bin/ssh/session.c b/usr.bin/ssh/session.c index a32b151a1ba..ade4f1ed30f 100644 --- a/usr.bin/ssh/session.c +++ b/usr.bin/ssh/session.c @@ -33,7 +33,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: session.c,v 1.52 2001/02/03 10:08:37 markus Exp $"); +RCSID("$OpenBSD: session.c,v 1.53 2001/02/04 15:32:25 stevesk Exp $"); #include "ssh.h" #include "ssh1.h" @@ -114,7 +114,7 @@ extern int startup_pipe; static char *xauthfile; /* original command from peer. */ -char *original_command = NULL; +char *original_command = NULL; /* data */ #define MAX_SESSIONS 10 @@ -830,7 +830,7 @@ do_child(const char *command, struct passwd * pw, const char *term, (LOGIN_SETALL & ~LOGIN_SETPATH)) < 0) { perror("unable to set user context"); exit(1); - + } #else if (setlogin(pw->pw_name) < 0) @@ -1059,7 +1059,7 @@ do_child(const char *command, struct passwd * pw, const char *term, if (f) { fprintf(f, "add %s %s %s\n", display, auth_proto, auth_data); - if (screen != NULL) + if (screen != NULL) fprintf(f, "add %.*s/unix%s %s %s\n", (int)(screen-display), display, screen, auth_proto, auth_data); diff --git a/usr.bin/ssh/sftp-client.c b/usr.bin/ssh/sftp-client.c index 6291a9f73a9..e4282384147 100644 --- a/usr.bin/ssh/sftp-client.c +++ b/usr.bin/ssh/sftp-client.c @@ -29,7 +29,7 @@ /* XXX: copy between two remote sites */ #include "includes.h" -RCSID("$OpenBSD: sftp-client.c,v 1.2 2001/02/04 15:23:08 deraadt Exp $"); +RCSID("$OpenBSD: sftp-client.c,v 1.3 2001/02/04 15:32:25 stevesk Exp $"); #include "ssh.h" #include "buffer.h" @@ -222,7 +222,7 @@ do_init(int fd_in, int fd_out) get_msg(fd_in, &msg); - /* Expecting a VERSION reply */ + /* Expecting a VERSION reply */ if ((type = buffer_get_char(&msg)) != SSH2_FXP_VERSION) { error("Invalid packet back from SSH2_FXP_INIT (type %d)", type); diff --git a/usr.bin/ssh/sftp-int.c b/usr.bin/ssh/sftp-int.c index d13be209ef3..3d68bec5255 100644 --- a/usr.bin/ssh/sftp-int.c +++ b/usr.bin/ssh/sftp-int.c @@ -27,7 +27,7 @@ /* XXX: recursive operations */ #include "includes.h" -RCSID("$OpenBSD: sftp-int.c,v 1.2 2001/02/04 15:17:00 markus Exp $"); +RCSID("$OpenBSD: sftp-int.c,v 1.3 2001/02/04 15:32:25 stevesk Exp $"); #include "buffer.h" #include "xmalloc.h" @@ -130,10 +130,10 @@ local_do_shell(const char *args) int ret, status; char *shell; pid_t pid; - + if (!*args) args = NULL; - + if ((shell = getenv("SHELL")) == NULL) shell = _PATH_BSHELL; @@ -149,7 +149,7 @@ local_do_shell(const char *args) debug3("Executing %s", shell); ret = execl(shell, shell, NULL); } - fprintf(stderr, "Couldn't execute \"%s\": %s\n", shell, + fprintf(stderr, "Couldn't execute \"%s\": %s\n", shell, strerror(errno)); _exit(1); } @@ -161,7 +161,7 @@ local_do_shell(const char *args) error("Shell exited with status %d", WEXITSTATUS(status)); } -void +void local_do_ls(const char *args) { if (!args || !*args) @@ -367,7 +367,7 @@ parse_args(const char **cpp, int *pflag, unsigned long *n_arg, if (get_pathname(&cp, path1)) return(-1); if (*path1 == NULL) { - error("You must specify a path after a %s command.", + error("You must specify a path after a %s command.", cmd); return(-1); } @@ -403,7 +403,7 @@ parse_args(const char **cpp, int *pflag, unsigned long *n_arg, if (get_pathname(&cp, path1)) return(-1); if (*path1 == NULL) { - error("You must specify a path after a %s command.", + error("You must specify a path after a %s command.", cmd); return(-1); } diff --git a/usr.bin/ssh/sftp-server.c b/usr.bin/ssh/sftp-server.c index 8be14f46bd8..3428b1c5bec 100644 --- a/usr.bin/ssh/sftp-server.c +++ b/usr.bin/ssh/sftp-server.c @@ -22,7 +22,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "includes.h" -RCSID("$OpenBSD: sftp-server.c,v 1.16 2001/02/04 15:23:08 deraadt Exp $"); +RCSID("$OpenBSD: sftp-server.c,v 1.17 2001/02/04 15:32:25 stevesk Exp $"); #include "buffer.h" #include "bufaux.h" @@ -201,7 +201,7 @@ handle_to_dir(int handle) int handle_to_fd(int handle) { - if (handle_is_ok(handle, HANDLE_FILE)) + if (handle_is_ok(handle, HANDLE_FILE)) return handles[handle].fd; return -1; } @@ -602,7 +602,7 @@ process_opendir(void) id = get_int(); path = get_string(NULL); TRACE("opendir id %d path %s", id, path); - dirp = opendir(path); + dirp = opendir(path); if (dirp == NULL) { status = errno_to_portable(errno); } else { @@ -613,7 +613,7 @@ process_opendir(void) send_handle(id, handle); status = SSH2_FX_OK; } - + } if (status != SSH2_FX_OK) send_status(id, status); @@ -917,7 +917,7 @@ main(int ac, char **av) handle_init(); #ifdef DEBUG_SFTP_SERVER - log_init("sftp-server", SYSLOG_LEVEL_DEBUG1, SYSLOG_FACILITY_AUTH, 0); + log_init("sftp-server", SYSLOG_LEVEL_DEBUG1, SYSLOG_FACILITY_AUTH, 0); #endif in = dup(STDIN_FILENO); diff --git a/usr.bin/ssh/sftp.c b/usr.bin/ssh/sftp.c index 0dca12d8507..27873d034a5 100644 --- a/usr.bin/ssh/sftp.c +++ b/usr.bin/ssh/sftp.c @@ -24,7 +24,7 @@ #include "includes.h" -RCSID("$OpenBSD: sftp.c,v 1.1 2001/02/04 11:11:54 djm Exp $"); +RCSID("$OpenBSD: sftp.c,v 1.2 2001/02/04 15:32:25 stevesk Exp $"); /* XXX: commandline mode */ /* XXX: copy between two remote hosts (commandline) */ @@ -125,14 +125,14 @@ make_ssh_args(char *add_arg) return(args); } -void +void usage(void) { fprintf(stderr, "usage: sftp [-vC] [-osshopt=value] [user@]host\n"); exit(1); } -int +int main(int argc, char **argv) { int in, out, i, debug_level, compress_flag; diff --git a/usr.bin/ssh/ssh-add.c b/usr.bin/ssh/ssh-add.c index 693055a0efb..bb6b667a778 100644 --- a/usr.bin/ssh/ssh-add.c +++ b/usr.bin/ssh/ssh-add.c @@ -35,7 +35,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh-add.c,v 1.27 2001/01/21 19:05:56 markus Exp $"); +RCSID("$OpenBSD: ssh-add.c,v 1.28 2001/02/04 15:32:25 stevesk Exp $"); #include <openssl/evp.h> @@ -244,7 +244,7 @@ main(int argc, char **argv) int i; int deleting = 0; - SSLeay_add_all_algorithms(); + SSLeay_add_all_algorithms(); /* At first, get a connection to the authentication agent. */ ac = ssh_get_authentication_connection(); diff --git a/usr.bin/ssh/ssh-dss.c b/usr.bin/ssh/ssh-dss.c index 2366c211790..11513e678db 100644 --- a/usr.bin/ssh/ssh-dss.c +++ b/usr.bin/ssh/ssh-dss.c @@ -23,7 +23,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh-dss.c,v 1.4 2001/01/21 19:05:57 markus Exp $"); +RCSID("$OpenBSD: ssh-dss.c,v 1.5 2001/02/04 15:32:25 stevesk Exp $"); #include <openssl/bn.h> #include <openssl/evp.h> @@ -185,7 +185,7 @@ ssh_dss_verify( memset(sigblob, 0, len); xfree(sigblob); } - + /* sha1 the data */ dlen = evp_md->md_size; digest = xmalloc(dlen); diff --git a/usr.bin/ssh/ssh-keygen.c b/usr.bin/ssh/ssh-keygen.c index d6bb3a0d9f6..fe23d7cbec5 100644 --- a/usr.bin/ssh/ssh-keygen.c +++ b/usr.bin/ssh/ssh-keygen.c @@ -12,7 +12,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh-keygen.c,v 1.41 2001/01/21 19:05:57 markus Exp $"); +RCSID("$OpenBSD: ssh-keygen.c,v 1.42 2001/02/04 15:32:26 stevesk Exp $"); #include <openssl/evp.h> #include <openssl/pem.h> @@ -124,7 +124,7 @@ try_load_key(char *filename, Key *k) #define SSH_COM_PUBLIC_BEGIN "---- BEGIN SSH2 PUBLIC KEY ----" #define SSH_COM_PUBLIC_END "---- END SSH2 PUBLIC KEY ----" #define SSH_COM_PRIVATE_BEGIN "---- BEGIN SSH2 ENCRYPTED PRIVATE KEY ----" -#define SSH_COM_PRIVATE_KEY_MAGIC 0x3f6ff9eb +#define SSH_COM_PRIVATE_KEY_MAGIC 0x3f6ff9eb void do_convert_to_ssh2(struct passwd *pw) diff --git a/usr.bin/ssh/ssh-keyscan.c b/usr.bin/ssh/ssh-keyscan.c index 6387c5ded4f..96785af5040 100644 --- a/usr.bin/ssh/ssh-keyscan.c +++ b/usr.bin/ssh/ssh-keyscan.c @@ -8,7 +8,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh-keyscan.c,v 1.11 2001/01/21 19:05:57 markus Exp $"); +RCSID("$OpenBSD: ssh-keyscan.c,v 1.12 2001/02/04 15:32:26 stevesk Exp $"); #include <sys/queue.h> #include <errno.h> @@ -489,7 +489,7 @@ conloop(void) c = tq.tqh_first; while (c && (c->c_tv.tv_sec < now.tv_sec || - (c->c_tv.tv_sec == now.tv_sec && c->c_tv.tv_usec < now.tv_usec))) { + (c->c_tv.tv_sec == now.tv_sec && c->c_tv.tv_usec < now.tv_usec))) { int s = c->c_fd; c = c->c_link.tqe_next; conrecycle(s); diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c index 37185f0dae0..606e78d4b50 100644 --- a/usr.bin/ssh/ssh.c +++ b/usr.bin/ssh/ssh.c @@ -39,7 +39,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh.c,v 1.87 2001/02/04 15:14:14 deraadt Exp $"); +RCSID("$OpenBSD: ssh.c,v 1.88 2001/02/04 15:32:26 stevesk Exp $"); #include <openssl/evp.h> #include <openssl/err.h> @@ -148,7 +148,7 @@ usage() #ifdef AFS fprintf(stderr, " -k Disable Kerberos ticket and AFS token forwarding.\n"); #endif /* AFS */ - fprintf(stderr, " -X Enable X11 connection forwarding.\n"); + fprintf(stderr, " -X Enable X11 connection forwarding.\n"); fprintf(stderr, " -x Disable X11 connection forwarding.\n"); fprintf(stderr, " -i file Identity for RSA authentication (default: ~/.ssh/identity).\n"); fprintf(stderr, " -t Tty; allocate a tty even if command is given.\n"); @@ -1010,7 +1010,7 @@ ssh_session2(void) /* XXX should be pre-session */ ssh_init_forwarding(); - + /* If requested, let ssh continue in the background. */ if (fork_after_authentication_flag) if (daemon(1, 1) < 0) diff --git a/usr.bin/ssh/sshconnect.c b/usr.bin/ssh/sshconnect.c index 482ed3b94f9..17064326302 100644 --- a/usr.bin/ssh/sshconnect.c +++ b/usr.bin/ssh/sshconnect.c @@ -13,7 +13,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: sshconnect.c,v 1.92 2001/01/30 22:48:52 djm Exp $"); +RCSID("$OpenBSD: sshconnect.c,v 1.93 2001/02/04 15:32:26 stevesk Exp $"); #include <openssl/bn.h> @@ -324,7 +324,7 @@ ssh_exchange_identification() int remote_major, remote_minor, i, mismatch; int connection_in = packet_get_connection_in(); int connection_out = packet_get_connection_out(); - int minor1 = PROTOCOL_MINOR_1; + int minor1 = PROTOCOL_MINOR_1; /* Read other side\'s version identification. */ for (;;) { @@ -680,7 +680,7 @@ check_host_key(char *host, struct sockaddr *hostaddr, Key *host_key, error("X11 forwarding is disabled to avoid trojan horses."); options.forward_x11 = 0; } - if (options.num_local_forwards > 0 || options.num_remote_forwards > 0) { + if (options.num_local_forwards > 0 || options.num_remote_forwards > 0) { error("Port forwarding is disabled to avoid trojan horses."); options.num_local_forwards = options.num_remote_forwards = 0; } diff --git a/usr.bin/ssh/sshconnect2.c b/usr.bin/ssh/sshconnect2.c index 06547e0934d..8614b0b5b84 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.40 2001/01/31 20:48:08 markus Exp $"); +RCSID("$OpenBSD: sshconnect2.c,v 1.41 2001/02/04 15:32:26 stevesk Exp $"); #include <openssl/bn.h> #include <openssl/md5.h> @@ -145,7 +145,7 @@ ssh_kex2(char *host, struct sockaddr *hostaddr) /* diffie-hellman-group1-sha1 */ void -ssh_dh1_client(Kex *kex, char *host, struct sockaddr *hostaddr, +ssh_dh1_client(Kex *kex, char *host, struct sockaddr *hostaddr, Buffer *client_kexinit, Buffer *server_kexinit) { #ifdef DEBUG_KEXDH @@ -281,7 +281,7 @@ ssh_dh1_client(Kex *kex, char *host, struct sockaddr *hostaddr, int dh_estimate(int bits) { - + if (bits < 64) return (512); /* O(2**63) */ if (bits < 128) @@ -416,7 +416,7 @@ ssh_dhgex_client(Kex *kex, char *host, struct sockaddr *hostaddr, buffer_ptr(client_kexinit), buffer_len(client_kexinit), buffer_ptr(server_kexinit), buffer_len(server_kexinit), server_host_key_blob, sbloblen, - nbits, dh->p, dh->g, + nbits, dh->p, dh->g, dh->pub_key, dh_server_pub, shared_secret @@ -607,7 +607,7 @@ input_userauth_failure(int type, int plen, void *ctxt) for (;;) { method = authmethod_get(authlist); if (method == NULL) - fatal("Unable to find an authentication method"); + fatal("Unable to find an authentication method"); authctxt->method = method; if (method->userauth(authctxt) != 0) { debug2("we sent a %s packet, wait for reply", method->name); @@ -616,7 +616,7 @@ input_userauth_failure(int type, int plen, void *ctxt) debug2("we did not send a packet, disable method"); method->enabled = NULL; } - } + } xfree(authlist); } @@ -682,7 +682,7 @@ sign_and_send_pubkey(Authctxt *authctxt, Key *k, sign_cb_fn *sign_callback) buffer_init(&b); if (datafellows & SSH_OLD_SESSIONID) { buffer_append(&b, session_id2, session_id2_len); - skip = session_id2_len; + skip = session_id2_len; } else { buffer_put_string(&b, session_id2, session_id2_len); skip = buffer_len(&b); @@ -698,7 +698,7 @@ sign_and_send_pubkey(Authctxt *authctxt, Key *k, sign_cb_fn *sign_callback) } else { buffer_put_cstring(&b, authctxt->method->name); buffer_put_char(&b, have_sig); - buffer_put_cstring(&b, key_ssh_name(k)); + buffer_put_cstring(&b, key_ssh_name(k)); } buffer_put_string(&b, blob, bloblen); @@ -721,7 +721,7 @@ sign_and_send_pubkey(Authctxt *authctxt, Key *k, sign_cb_fn *sign_callback) buffer_put_cstring(&b, authctxt->method->name); buffer_put_char(&b, have_sig); if (!(datafellows & SSH_BUG_PKAUTH)) - buffer_put_cstring(&b, key_ssh_name(k)); + buffer_put_cstring(&b, key_ssh_name(k)); buffer_put_string(&b, blob, bloblen); } xfree(blob); @@ -1010,14 +1010,14 @@ authmethod_lookup(const char *name) * use a built-in default list. If the server sends a nil list after * previously sending a valid list, continue using the list originally * sent. - */ + */ Authmethod * authmethod_get(char *authlist) { char *name = NULL, *authname_old; Authmethod *method = NULL; - + /* Use a suitable default if we're passed a nil list. */ if (authlist == NULL || strlen(authlist) == 0) authlist = def_authlist; diff --git a/usr.bin/ssh/sshd.c b/usr.bin/ssh/sshd.c index 5cc4ac849b0..76ea97bf2b5 100644 --- a/usr.bin/ssh/sshd.c +++ b/usr.bin/ssh/sshd.c @@ -40,7 +40,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: sshd.c,v 1.160 2001/02/04 15:14:15 deraadt Exp $"); +RCSID("$OpenBSD: sshd.c,v 1.161 2001/02/04 15:32:27 stevesk Exp $"); #include <openssl/dh.h> #include <openssl/bn.h> @@ -420,7 +420,7 @@ destroy_sensitive_data(void) key_free(sensitive_data.server_key); sensitive_data.server_key = NULL; } - for(i = 0; i < options.num_host_key_files; i++) { + for(i = 0; i < options.num_host_key_files; i++) { if (sensitive_data.host_keys[i]) { key_free(sensitive_data.host_keys[i]); sensitive_data.host_keys[i] = NULL; @@ -965,7 +965,7 @@ main(int ac, char **av) startups++; break; } - + /* * Got connection. Fork a child to handle it, unless * we are in debugging mode. @@ -1483,7 +1483,7 @@ ssh_dh1_server(Kex *kex, Buffer *client_kexinit, Buffer *server_kexinit) fprintf(stderr, "\npub= "); BN_print_fp(stderr, dh->pub_key); fprintf(stderr, "\n"); - DHparams_print_fp(stderr, dh); + DHparams_print_fp(stderr, dh); #endif if (!dh_pub_is_valid(dh, dh_client_pub)) packet_disconnect("bad client public DH value"); @@ -1626,7 +1626,7 @@ ssh_dhgex_server(Kex *kex, Buffer *client_kexinit, Buffer *server_kexinit) fprintf(stderr, "\npub= "); BN_print_fp(stderr, dh->pub_key); fprintf(stderr, "\n"); - DHparams_print_fp(stderr, dh); + DHparams_print_fp(stderr, dh); #endif if (!dh_pub_is_valid(dh, dh_client_pub)) packet_disconnect("bad client public DH value"); diff --git a/usr.bin/ssh/xmalloc.c b/usr.bin/ssh/xmalloc.c index 819eaf57a86..1a471889a34 100644 --- a/usr.bin/ssh/xmalloc.c +++ b/usr.bin/ssh/xmalloc.c @@ -4,7 +4,7 @@ * All rights reserved * Versions of malloc and friends that check their results, and never return * failure (they call fatal if they encounter an error). - * + * * As far as I am concerned, the code I have written for this software * can be used freely for any purpose. Any derived versions of this * software must be clearly marked as such, and if the derived work is @@ -13,7 +13,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: xmalloc.c,v 1.10 2001/01/28 20:53:21 stevesk Exp $"); +RCSID("$OpenBSD: xmalloc.c,v 1.11 2001/02/04 15:32:27 stevesk Exp $"); #include "xmalloc.h" #include "log.h" |