]> andersk Git - openssh.git/commitdiff
- deraadt@cvs.openbsd.org 2005/03/10 22:01:05
authordtucker <dtucker>
Mon, 14 Mar 2005 12:08:12 +0000 (12:08 +0000)
committerdtucker <dtucker>
Mon, 14 Mar 2005 12:08:12 +0000 (12:08 +0000)
     [misc.c ssh-keygen.c servconf.c clientloop.c auth-options.c ssh-add.c
     monitor.c sftp-client.c bufaux.h hostfile.c ssh.c sshconnect.c channels.c
     readconf.c bufaux.c sftp.c]
     spacing

17 files changed:
ChangeLog
auth-options.c
bufaux.c
bufaux.h
channels.c
clientloop.c
hostfile.c
misc.c
monitor.c
readconf.c
servconf.c
sftp-client.c
sftp.c
ssh-add.c
ssh-keygen.c
ssh.c
sshconnect.c

index 22eb47d85df77e29d8fde38def22fbbb945371ce..cca3f7620cd18a7ff84e8c1f0bad79f469e1c138 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,11 @@
      [readconf.c]
      Check listen addresses for null, prevents xfree from dying during
      ClearAllForwardings (bz #996).  From  Craig Leres, ok markus@
+   - deraadt@cvs.openbsd.org 2005/03/10 22:01:05
+     [misc.c ssh-keygen.c servconf.c clientloop.c auth-options.c ssh-add.c
+     monitor.c sftp-client.c bufaux.h hostfile.c ssh.c sshconnect.c channels.c
+     readconf.c bufaux.c sftp.c]
+     spacing
 
 20050313
  - (dtucker) [contrib/cygwin/ssh-host-config] Makes the query for the
index 04d12d66e48cb359405a58cd04558f2681bc5729..829c37f1d9fdc1a19a2f77017741e10939aae2dd 100644 (file)
@@ -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: "
index 4ea6af1b658aa431b4c6bf7740c6fd9794bfd1f9..5dbf2b770a80f9a7d0245751f39bcaef66b2e2a3 100644 (file)
--- a/bufaux.c
+++ b/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);
index e30911ddc17617415ac9ec75a33dcbb8a90870cf..f5efaed3edd7473d0e6e95eeacc6e0398f73edff 100644 (file)
--- a/bufaux.h
+++ b/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 *);
index 1be213bce21ad2e69d08ed838ec2d2f07d3c55f4..4bd9af8e67e9f1c7467bb7559964d1258e036c1d 100644 (file)
@@ -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"
@@ -1018,7 +1018,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;
@@ -2199,11 +2199,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:
@@ -2317,7 +2317,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 &&
@@ -2629,7 +2629,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)
index 1e250883f1821a0366982953ce2d7eca9b795513..1591215bdabfcf889e98d9ba701338d63c42aa02 100644 (file)
@@ -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);
index 2e1c8bcd0c4ccf4d28cd5b5c8ac5dc7f60be4bc5..bf2a31c9bab3e710c2f4a9272181f16a96e037e1 100644 (file)
@@ -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/misc.c b/misc.c
index 2e366f81b270055cd99a291cfa9795f6d59fa898..7adbcea1c19a4a35e286b7f05f5f7b12368c9d9e 100644 (file)
--- a/misc.c
+++ b/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"
@@ -303,13 +303,13 @@ hpdelim(char **cp)
        case '\0':
                *cp = NULL;     /* no more fields*/
                break;
-       
+
        case ':':
        case '/':
                *s = '\0';      /* terminate */
                *cp = s + 1;
                break;
-       
+
        default:
                return NULL;
        }
@@ -391,7 +391,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 */
                }
        }
index 301e150b3a21867b72ee863084df81e3e7c4dfe9..4dc11a2750fc09da366c2c4dc4a69a32a26acbed 100644 (file)
--- a/monitor.c
+++ b/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>
 
@@ -976,7 +976,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);
index f35fe564740ad1bc3d2ccbcdb43e36ba2fe21b98..8ace1bbd454233996e96d48ca4aff7677e329d9c 100644 (file)
@@ -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"
@@ -301,7 +301,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';
index 2d1a0c3627feae31cda1d208ece71f07082d8941..96ad18084c1b0c2d6a5897dae56d2b239b38ef01 100644 (file)
@@ -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"
@@ -1001,7 +1001,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++;
index d894a11f20ce06ca345f0401e596c13dddb8bc31..92df427515f93955c25f188e49e4f6a9bd006874 100644 (file)
@@ -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 "openbsd-compat/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))
                        ;
@@ -1109,7 +1109,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/sftp.c b/sftp.c
index f8553ed82104fd03454d6fab921452a298ed72b7..16a6cf0c62f345204898f0d2aac786989dee051e 100644 (file)
--- a/sftp.c
+++ b/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 $");
 
 #ifdef USE_LIBEDIT
 #include <histedit.h>
@@ -357,7 +357,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;
index 06a52464e034e9e797ff379a77512c099e62d79b..a796647a76434c0fb05618e0bd8f643c6bd18dcc 100644 (file)
--- a/ssh-add.c
+++ b/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>
 
@@ -389,7 +389,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)
@@ -402,7 +402,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;
                }
index a9931d4d846ad5cfce652dbc8498f72a5f6dd65f..b38e9c9c44b713b6116c71eb0234686a453872ad 100644 (file)
@@ -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/ssh.c b/ssh.c
index 9acec30828d6f2cc1109892999171442303e0f8d..1f025c78428fd874319ca2ce21332bb69afd7fb2 100644 (file)
--- a/ssh.c
+++ b/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>
@@ -856,8 +856,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,
@@ -1343,7 +1343,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:
index 49190560df7581e5631b30a480cf6ee441c41863..07703cf770914ac71c57c7d8e1a3d95a8d742c9d 100644 (file)
@@ -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>
 
@@ -247,13 +247,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;
This page took 0.089526 seconds and 5 git commands to generate.