diff options
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/ssh/auth-options.c | 6 | ||||
-rw-r--r-- | usr.bin/ssh/bufaux.c | 4 | ||||
-rw-r--r-- | usr.bin/ssh/bufaux.h | 4 | ||||
-rw-r--r-- | usr.bin/ssh/channels.c | 18 | ||||
-rw-r--r-- | usr.bin/ssh/clientloop.c | 4 | ||||
-rw-r--r-- | usr.bin/ssh/hostfile.c | 8 | ||||
-rw-r--r-- | usr.bin/ssh/misc.c | 8 | ||||
-rw-r--r-- | usr.bin/ssh/monitor.c | 4 | ||||
-rw-r--r-- | usr.bin/ssh/readconf.c | 4 | ||||
-rw-r--r-- | usr.bin/ssh/servconf.c | 4 | ||||
-rw-r--r-- | usr.bin/ssh/sftp-client.c | 6 | ||||
-rw-r--r-- | usr.bin/ssh/sftp.c | 4 | ||||
-rw-r--r-- | usr.bin/ssh/ssh-add.c | 6 | ||||
-rw-r--r-- | usr.bin/ssh/ssh-keygen.c | 4 | ||||
-rw-r--r-- | usr.bin/ssh/ssh.c | 8 | ||||
-rw-r--r-- | usr.bin/ssh/sshconnect.c | 6 |
16 files changed, 49 insertions, 49 deletions
diff --git a/usr.bin/ssh/auth-options.c b/usr.bin/ssh/auth-options.c index 04d12d66e48..829c37f1d9f 100644 --- a/usr.bin/ssh/auth-options.c +++ b/usr.bin/ssh/auth-options.c @@ -10,7 +10,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: auth-options.c,v 1.29 2005/03/01 10:09:52 djm Exp $"); +RCSID("$OpenBSD: auth-options.c,v 1.30 2005/03/10 22:01:05 deraadt Exp $"); #include "xmalloc.h" #include "match.h" @@ -255,8 +255,8 @@ auth_parse_options(struct passwd *pw, char *opts, char *file, u_long linenum) xfree(patterns); goto bad_option; } - host = cleanhostname(host); - if (p == NULL || (port = a2port(p)) == 0) { + host = cleanhostname(host); + if (p == NULL || (port = a2port(p)) == 0) { debug("%.100s, line %lu: Bad permitopen port " "<%.100s>", file, linenum, p ? p : ""); auth_debug_add("%.100s, line %lu: " diff --git a/usr.bin/ssh/bufaux.c b/usr.bin/ssh/bufaux.c index 4ea6af1b658..5dbf2b770a8 100644 --- a/usr.bin/ssh/bufaux.c +++ b/usr.bin/ssh/bufaux.c @@ -37,7 +37,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: bufaux.c,v 1.34 2004/12/06 16:00:43 markus Exp $"); +RCSID("$OpenBSD: bufaux.c,v 1.35 2005/03/10 22:01:05 deraadt Exp $"); #include <openssl/bn.h> #include "bufaux.h" @@ -179,7 +179,7 @@ buffer_get_bignum2_ret(Buffer *buffer, BIGNUM *value) { u_int len; u_char *bin; - + if ((bin = buffer_get_string_ret(buffer, &len)) == NULL) { error("buffer_get_bignum2_ret: invalid bignum"); return (-1); diff --git a/usr.bin/ssh/bufaux.h b/usr.bin/ssh/bufaux.h index e30911ddc17..f5efaed3edd 100644 --- a/usr.bin/ssh/bufaux.h +++ b/usr.bin/ssh/bufaux.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bufaux.h,v 1.20 2004/10/29 23:56:17 djm Exp $ */ +/* $OpenBSD: bufaux.h,v 1.21 2005/03/10 22:01:05 deraadt Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> @@ -40,7 +40,7 @@ void buffer_put_string(Buffer *, const void *, u_int); void buffer_put_cstring(Buffer *, const char *); #define buffer_skip_string(b) \ - do { u_int l = buffer_get_int(b); buffer_consume(b, l); } while(0) + do { u_int l = buffer_get_int(b); buffer_consume(b, l); } while (0) int buffer_put_bignum_ret(Buffer *, const BIGNUM *); int buffer_get_bignum_ret(Buffer *, BIGNUM *); diff --git a/usr.bin/ssh/channels.c b/usr.bin/ssh/channels.c index 6ec06186165..54b951e0d9d 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.212 2005/03/01 10:09:52 djm Exp $"); +RCSID("$OpenBSD: channels.c,v 1.213 2005/03/10 22:01:05 deraadt Exp $"); #include "ssh.h" #include "ssh1.h" @@ -1017,7 +1017,7 @@ channel_decode_socks5(Channel *c, fd_set * readset, fd_set * writeset) debug2("channel %d: only socks5 connect supported", c->self); return -1; } - switch(s5_req.atyp){ + switch (s5_req.atyp){ case SSH_SOCKS5_IPV4: addrlen = 4; af = AF_INET; @@ -2193,11 +2193,11 @@ channel_setup_fwd_listener(int type, const char *listen_addr, u_short listen_por /* * Determine whether or not a port forward listens to loopback, - * specified address or wildcard. On the client, a specified bind - * address will always override gateway_ports. On the server, a - * gateway_ports of 1 (``yes'') will override the client's - * specification and force a wildcard bind, whereas a value of 2 - * (``clientspecified'') will bind to whatever address the client + * specified address or wildcard. On the client, a specified bind + * address will always override gateway_ports. On the server, a + * gateway_ports of 1 (``yes'') will override the client's + * specification and force a wildcard bind, whereas a value of 2 + * (``clientspecified'') will bind to whatever address the client * asked for. * * Special-case listen_addrs are: @@ -2307,7 +2307,7 @@ channel_cancel_rport_listener(const char *host, u_short port) u_int i; int found = 0; - for(i = 0; i < channels_alloc; i++) { + for (i = 0; i < channels_alloc; i++) { Channel *c = channels[i]; if (c != NULL && c->type == SSH_CHANNEL_RPORT_LISTENER && @@ -2617,7 +2617,7 @@ channel_send_window_changes(void) struct winsize ws; for (i = 0; i < channels_alloc; i++) { - if (channels[i] == NULL || !channels[i]->client_tty || + if (channels[i] == NULL || !channels[i]->client_tty || channels[i]->type != SSH_CHANNEL_OPEN) continue; if (ioctl(channels[i]->rfd, TIOCGWINSZ, &ws) < 0) diff --git a/usr.bin/ssh/clientloop.c b/usr.bin/ssh/clientloop.c index 1e250883f18..1591215bdab 100644 --- a/usr.bin/ssh/clientloop.c +++ b/usr.bin/ssh/clientloop.c @@ -59,7 +59,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: clientloop.c,v 1.135 2005/03/01 10:09:52 djm Exp $"); +RCSID("$OpenBSD: clientloop.c,v 1.136 2005/03/10 22:01:05 deraadt Exp $"); #include "ssh.h" #include "ssh1.h" @@ -627,7 +627,7 @@ client_process_control(fd_set * readset) "to %s? ", host); if (allowed) quit_pending = 1; - /* FALLTHROUGH */ + /* FALLTHROUGH */ case SSHMUX_COMMAND_ALIVE_CHECK: /* Reply for SSHMUX_COMMAND_TERMINATE and ALIVE_CHECK */ buffer_clear(&m); diff --git a/usr.bin/ssh/hostfile.c b/usr.bin/ssh/hostfile.c index 2e1c8bcd0c4..bf2a31c9bab 100644 --- a/usr.bin/ssh/hostfile.c +++ b/usr.bin/ssh/hostfile.c @@ -36,7 +36,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: hostfile.c,v 1.33 2005/03/01 10:40:26 djm Exp $"); +RCSID("$OpenBSD: hostfile.c,v 1.34 2005/03/10 22:01:05 deraadt Exp $"); #include <resolv.h> #include <openssl/hmac.h> @@ -92,7 +92,7 @@ extract_salt(const char *s, u_int l, char *salt, size_t salt_len) salt_len, ret); return (-1); } - + return (0); } @@ -123,7 +123,7 @@ host_hash(const char *host, const char *name_from_hostfile, u_int src_len) HMAC_Final(&mac_ctx, result, NULL); HMAC_cleanup(&mac_ctx); - if (__b64_ntop(salt, len, uu_salt, sizeof(uu_salt)) == -1 || + if (__b64_ntop(salt, len, uu_salt, sizeof(uu_salt)) == -1 || __b64_ntop(result, len, uu_result, sizeof(uu_result)) == -1) fatal("host_hash: __b64_ntop failed"); @@ -310,7 +310,7 @@ lookup_key_in_hostfile_by_type(const char *filename, const char *host, */ int -add_host_to_hostfile(const char *filename, const char *host, const Key *key, +add_host_to_hostfile(const char *filename, const char *host, const Key *key, int store_hash) { FILE *f; diff --git a/usr.bin/ssh/misc.c b/usr.bin/ssh/misc.c index 70ac5eb4edc..3d3af188288 100644 --- a/usr.bin/ssh/misc.c +++ b/usr.bin/ssh/misc.c @@ -23,7 +23,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: misc.c,v 1.28 2005/03/01 10:09:52 djm Exp $"); +RCSID("$OpenBSD: misc.c,v 1.29 2005/03/10 22:01:05 deraadt Exp $"); #include "misc.h" #include "log.h" @@ -297,13 +297,13 @@ hpdelim(char **cp) case '\0': *cp = NULL; /* no more fields*/ break; - + case ':': case '/': *s = '\0'; /* terminate */ *cp = s + 1; break; - + default: return NULL; } @@ -385,7 +385,7 @@ read_keyfile_line(FILE *f, const char *filename, char *buf, size_t bufsz, debug("%s: %s line %lu exceeds size limit", __func__, filename, *lineno); /* discard remainder of line */ - while(fgetc(f) != '\n' && !feof(f)) + while (fgetc(f) != '\n' && !feof(f)) ; /* nothing */ } } diff --git a/usr.bin/ssh/monitor.c b/usr.bin/ssh/monitor.c index 1c3c21fca55..1e201ffa469 100644 --- a/usr.bin/ssh/monitor.c +++ b/usr.bin/ssh/monitor.c @@ -25,7 +25,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: monitor.c,v 1.62 2005/01/30 11:18:08 dtucker Exp $"); +RCSID("$OpenBSD: monitor.c,v 1.63 2005/03/10 22:01:05 deraadt Exp $"); #include <openssl/dh.h> @@ -772,7 +772,7 @@ mm_answer_keyallowed(int sock, Buffer *m) debug3("%s: key_from_blob: %p", __func__, key); if (key != NULL && authctxt->valid) { - switch(type) { + switch (type) { case MM_USERKEY: allowed = options.pubkey_authentication && user_key_allowed(authctxt->pw, key); diff --git a/usr.bin/ssh/readconf.c b/usr.bin/ssh/readconf.c index 9e7f9ef91bf..414d69c3668 100644 --- a/usr.bin/ssh/readconf.c +++ b/usr.bin/ssh/readconf.c @@ -12,7 +12,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: readconf.c,v 1.138 2005/03/10 10:15:02 dtucker Exp $"); +RCSID("$OpenBSD: readconf.c,v 1.139 2005/03/10 22:01:05 deraadt Exp $"); #include "ssh.h" #include "xmalloc.h" @@ -299,7 +299,7 @@ process_config_line(Options *options, const char *host, Forward fwd; /* Strip trailing whitespace */ - for(len = strlen(line) - 1; len > 0; len--) { + for (len = strlen(line) - 1; len > 0; len--) { if (strchr(WHITESPACE, line[len]) == NULL) break; line[len] = '\0'; diff --git a/usr.bin/ssh/servconf.c b/usr.bin/ssh/servconf.c index 8264441c012..0e40efc4e48 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.139 2005/03/01 10:09:52 djm Exp $"); +RCSID("$OpenBSD: servconf.c,v 1.140 2005/03/10 22:01:05 deraadt Exp $"); #include "ssh.h" #include "log.h" @@ -960,7 +960,7 @@ parse_server_config(ServerOptions *options, const char *filename, Buffer *conf) obuf = cbuf = xstrdup(buffer_ptr(conf)); linenum = 1; - while((cp = strsep(&cbuf, "\n")) != NULL) { + while ((cp = strsep(&cbuf, "\n")) != NULL) { if (process_server_config_line(options, cp, filename, linenum++) != 0) bad_options++; diff --git a/usr.bin/ssh/sftp-client.c b/usr.bin/ssh/sftp-client.c index 261c2e9a737..7a54744b601 100644 --- a/usr.bin/ssh/sftp-client.c +++ b/usr.bin/ssh/sftp-client.c @@ -20,7 +20,7 @@ /* XXX: copy between two remote sites */ #include "includes.h" -RCSID("$OpenBSD: sftp-client.c,v 1.52 2004/11/25 22:22:14 markus Exp $"); +RCSID("$OpenBSD: sftp-client.c,v 1.53 2005/03/10 22:01:05 deraadt Exp $"); #include <sys/queue.h> @@ -856,7 +856,7 @@ do_download(struct sftp_conn *conn, char *remote_path, char *local_path, debug3("Received reply T:%u I:%u R:%d", type, id, max_req); /* Find the request in our queue */ - for(req = TAILQ_FIRST(&requests); + for (req = TAILQ_FIRST(&requests); req != NULL && req->id != id; req = TAILQ_NEXT(req, tq)) ; @@ -1105,7 +1105,7 @@ do_upload(struct sftp_conn *conn, char *local_path, char *remote_path, debug3("SSH2_FXP_STATUS %d", status); /* Find the request in our queue */ - for(ack = TAILQ_FIRST(&acks); + for (ack = TAILQ_FIRST(&acks); ack != NULL && ack->id != r_id; ack = TAILQ_NEXT(ack, tq)) ; diff --git a/usr.bin/ssh/sftp.c b/usr.bin/ssh/sftp.c index 910625d3c85..2fdb05f8fcb 100644 --- a/usr.bin/ssh/sftp.c +++ b/usr.bin/ssh/sftp.c @@ -16,7 +16,7 @@ #include "includes.h" -RCSID("$OpenBSD: sftp.c,v 1.62 2005/02/20 22:59:06 djm Exp $"); +RCSID("$OpenBSD: sftp.c,v 1.63 2005/03/10 22:01:05 deraadt Exp $"); #include <glob.h> #include <histedit.h> @@ -352,7 +352,7 @@ parse_ls_flags(const char **cpp, int *lflag) /* Check for flags */ if (cp++[0] == '-') { - for(; strchr(WHITESPACE, *cp) == NULL; cp++) { + for (; strchr(WHITESPACE, *cp) == NULL; cp++) { switch (*cp) { case 'l': *lflag &= ~VIEW_FLAGS; diff --git a/usr.bin/ssh/ssh-add.c b/usr.bin/ssh/ssh-add.c index 48e4f61ba8c..5dbd3cd723d 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.70 2004/05/08 00:21:31 djm Exp $"); +RCSID("$OpenBSD: ssh-add.c,v 1.71 2005/03/10 22:01:06 deraadt Exp $"); #include <openssl/evp.h> @@ -385,7 +385,7 @@ main(int argc, char **argv) goto done; } - for(i = 0; default_files[i]; i++) { + for (i = 0; default_files[i]; i++) { snprintf(buf, sizeof(buf), "%s/%s", pw->pw_dir, default_files[i]); if (stat(buf, &st) < 0) @@ -398,7 +398,7 @@ main(int argc, char **argv) if (count == 0) ret = 1; } else { - for(i = 0; i < argc; i++) { + for (i = 0; i < argc; i++) { if (do_file(ac, deleting, argv[i]) == -1) ret = 1; } diff --git a/usr.bin/ssh/ssh-keygen.c b/usr.bin/ssh/ssh-keygen.c index 2a7af708cb3..901b0f4e1a1 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.120 2005/03/02 01:27:41 djm Exp $"); +RCSID("$OpenBSD: ssh-keygen.c,v 1.121 2005/03/10 22:01:06 deraadt Exp $"); #include <openssl/evp.h> #include <openssl/pem.h> @@ -684,7 +684,7 @@ do_known_hosts(struct passwd *pw, const char *name) if (delete_host && !c) print_host(out, cp, public, 0); } else if (hash_hosts) { - for(cp2 = strsep(&cp, ","); + for (cp2 = strsep(&cp, ","); cp2 != NULL && *cp2 != '\0'; cp2 = strsep(&cp, ",")) { if (strcspn(cp2, "*?!") != strlen(cp2)) diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c index 5d4741b0daa..b79efe3532f 100644 --- a/usr.bin/ssh/ssh.c +++ b/usr.bin/ssh/ssh.c @@ -40,7 +40,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh.c,v 1.233 2005/03/01 17:22:06 jmc Exp $"); +RCSID("$OpenBSD: ssh.c,v 1.234 2005/03/10 22:01:06 deraadt Exp $"); #include <openssl/evp.h> #include <openssl/err.h> @@ -845,8 +845,8 @@ ssh_init_forwarding(void) for (i = 0; i < options.num_local_forwards; i++) { debug("Local connections to %.200s:%d forwarded to remote " "address %.200s:%d", - (options.local_forwards[i].listen_host == NULL) ? - (options.gateway_ports ? "*" : "LOCALHOST") : + (options.local_forwards[i].listen_host == NULL) ? + (options.gateway_ports ? "*" : "LOCALHOST") : options.local_forwards[i].listen_host, options.local_forwards[i].listen_port, options.local_forwards[i].connect_host, @@ -1331,7 +1331,7 @@ control_client(const char *path) switch (mux_command) { case SSHMUX_COMMAND_ALIVE_CHECK: - fprintf(stderr, "Master running (pid=%d)\r\n", + fprintf(stderr, "Master running (pid=%d)\r\n", control_server_pid); exit(0); case SSHMUX_COMMAND_TERMINATE: diff --git a/usr.bin/ssh/sshconnect.c b/usr.bin/ssh/sshconnect.c index 518423cb693..c58b278bd90 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.161 2005/03/02 01:00:06 djm Exp $"); +RCSID("$OpenBSD: sshconnect.c,v 1.162 2005/03/10 22:01:06 deraadt Exp $"); #include <openssl/bn.h> @@ -243,13 +243,13 @@ timeout_connect(int sockfd, const struct sockaddr *serv_addr, tv.tv_sec = timeout; tv.tv_usec = 0; - for(;;) { + for (;;) { rc = select(sockfd + 1, NULL, fdset, NULL, &tv); if (rc != -1 || errno != EINTR) break; } - switch(rc) { + switch (rc) { case 0: /* Timed out */ errno = ETIMEDOUT; |