]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: highly polished whitespace, mostly fixing spaces-for-tab
authordjm@openbsd.org <djm@openbsd.org>
Sat, 3 Apr 2021 06:18:40 +0000 (06:18 +0000)
committerDamien Miller <djm@mindrot.org>
Sat, 3 Apr 2021 06:23:02 +0000 (17:23 +1100)
and bad indentation on continuation lines. Prompted by GHPR#185

OpenBSD-Commit-ID: e5c81f0cbdcc6144df1ce468ec1bac366d8ad6e9

40 files changed:
addrmatch.c
auth-krb5.c
auth-options.c
auth.c
auth2-pubkey.c
auth2.c
channels.c
channels.h
cipher.c
dh.c
kex.c
kexgen.c
log.c
misc.c
misc.h
mux.c
packet.c
readconf.c
scp.c
servconf.c
servconf.h
serverloop.c
session.c
sftp-client.c
sftp-server.c
sftp.c
srclimit.c
ssh-add.c
ssh-agent.c
ssh-keygen.c
ssh-sk-client.c
ssh_api.c
sshconnect.c
sshconnect2.c
sshd.c
sshkey-xmss.c
sshkey-xmss.h
sshkey.c
utf8.h
xmalloc.h

index 3215c653d36a9a115cb7dc8f0b7b0aa49c9a4cf4..b0dc096804db02315aa88f3d3275a9cfa9c61b31 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: addrmatch.c,v 1.16 2021/01/09 11:58:50 dtucker Exp $ */
+/*     $OpenBSD: addrmatch.c,v 1.17 2021/04/03 06:18:40 djm Exp $ */
 
 /*
  * Copyright (c) 2004-2008 Damien Miller <djm@mindrot.org>
@@ -76,7 +76,7 @@ addr_match_list(const char *addr, const char *_list)
                        break;
                } else if (r == 0) {
                        if (addr != NULL && addr_netmatch(&try_addr,
-                           &match_addr, masklen) == 0) {
+                           &match_addr, masklen) == 0) {
  foundit:
                                if (neg) {
                                        ret = -1;
index 3096f1c8ea4d5f24842b943cd1d209441f476503..bc17b6d445f8007c5afa500463cc6a247d905a48 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: auth-krb5.c,v 1.23 2018/07/09 21:35:50 markus Exp $ */
+/* $OpenBSD: auth-krb5.c,v 1.24 2021/04/03 06:18:40 djm Exp $ */
 /*
  *    Kerberos v5 authentication and ticket-passing routines.
  *
@@ -99,7 +99,7 @@ auth_krb5_password(Authctxt *authctxt, const char *password)
 #ifdef HEIMDAL
 # ifdef HAVE_KRB5_CC_NEW_UNIQUE
        problem = krb5_cc_new_unique(authctxt->krb5_ctx,
-            krb5_mcc_ops.prefix, NULL, &ccache);
+           krb5_mcc_ops.prefix, NULL, &ccache);
 # else
        problem = krb5_cc_gen_new(authctxt->krb5_ctx, &krb5_mcc_ops, &ccache);
 # endif
@@ -123,7 +123,7 @@ auth_krb5_password(Authctxt *authctxt, const char *password)
 
 # ifdef HAVE_KRB5_CC_NEW_UNIQUE
        problem = krb5_cc_new_unique(authctxt->krb5_ctx,
-            krb5_fcc_ops.prefix, NULL, &authctxt->krb5_fwd_ccache);
+           krb5_fcc_ops.prefix, NULL, &authctxt->krb5_fwd_ccache);
 # else
        problem = krb5_cc_gen_new(authctxt->krb5_ctx, &krb5_fcc_ops,
            &authctxt->krb5_fwd_ccache);
index 55b2e9b4cf1c9dc513622994012861da9147aa2a..f68c629dd2c2836c80636d9abbcdf3a2eadc8fff 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: auth-options.c,v 1.94 2020/10/18 11:32:01 djm Exp $ */
+/* $OpenBSD: auth-options.c,v 1.95 2021/04/03 06:18:40 djm Exp $ */
 /*
  * Copyright (c) 2018 Damien Miller <djm@mindrot.org>
  *
@@ -810,7 +810,7 @@ sshauthopt_serialise(const struct sshauthopt *opts, struct sshbuf *m,
            (r = serialise_nullable_string(m,
            untrusted ? NULL : opts->required_from_host_cert)) != 0 ||
            (r = serialise_nullable_string(m,
-            untrusted ? NULL : opts->required_from_host_keys)) != 0)
+           untrusted ? NULL : opts->required_from_host_keys)) != 0)
                return r;
 
        /* Array options */
diff --git a/auth.c b/auth.c
index a0e3cd6fe481fa3aba0a39f5e5b56298ffaad0c2..b560eed14b1d6845123e0b0f352f9618eb0446fe 100644 (file)
--- a/auth.c
+++ b/auth.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: auth.c,v 1.151 2020/12/22 00:12:22 djm Exp $ */
+/* $OpenBSD: auth.c,v 1.152 2021/04/03 06:18:40 djm Exp $ */
 /*
  * Copyright (c) 2000 Markus Friedl.  All rights reserved.
  *
@@ -514,7 +514,7 @@ auth_openfile(const char *file, struct passwd *pw, int strict_modes,
        if ((fd = open(file, O_RDONLY|O_NONBLOCK)) == -1) {
                if (log_missing || errno != ENOENT)
                        debug("Could not open %s '%s': %s", file_type, file,
-                          strerror(errno));
+                           strerror(errno));
                return NULL;
        }
 
index 411d2d885144b5b4e72e9cd8d0ce5178e33e90f7..721c1d9bd750cb883c47d706d35483a21a3a7863 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: auth2-pubkey.c,v 1.106 2021/01/27 10:05:28 djm Exp $ */
+/* $OpenBSD: auth2-pubkey.c,v 1.107 2021/04/03 06:18:40 djm Exp $ */
 /*
  * Copyright (c) 2000 Markus Friedl.  All rights reserved.
  *
@@ -674,7 +674,8 @@ check_authkey_line(struct ssh *ssh, struct passwd *pw, struct sshkey *key,
                goto fail_reason;
        }
        if (sshkey_cert_check_authority(key, 0, 0, 0,
-          keyopts->cert_principals == NULL ? pw->pw_name : NULL, &reason) != 0)
+           keyopts->cert_principals == NULL ? pw->pw_name : NULL,
+           &reason) != 0)
                goto fail_reason;
 
        verbose("Accepted certificate ID \"%s\" (serial %llu) "
@@ -785,7 +786,7 @@ user_cert_trusted_ca(struct ssh *ssh, struct passwd *pw, struct sshkey *key,
                found_principal = 1;
        /* If principals file or command is specified, then require a match */
        use_authorized_principals = principals_file != NULL ||
-            options.authorized_principals_command != NULL;
+           options.authorized_principals_command != NULL;
        if (!found_principal && use_authorized_principals) {
                reason = "Certificate does not contain an authorized principal";
                goto fail_reason;
diff --git a/auth2.c b/auth2.c
index 3c8a67bbc5955d3832b898c97ddb1955909bade4..84d0ed16e7e2e211036b24bce1b2038d78089160 100644 (file)
--- a/auth2.c
+++ b/auth2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: auth2.c,v 1.160 2021/01/27 10:05:28 djm Exp $ */
+/* $OpenBSD: auth2.c,v 1.161 2021/04/03 06:18:40 djm Exp $ */
 /*
  * Copyright (c) 2000 Markus Friedl.  All rights reserved.
  *
@@ -228,7 +228,7 @@ user_specific_delay(const char *user)
        double delay;
 
        (void)snprintf(b, sizeof b, "%llu%s",
-            (unsigned long long)options.timing_secret, user);
+           (unsigned long long)options.timing_secret, user);
        if (ssh_digest_memory(SSH_DIGEST_SHA512, b, strlen(b), hash, len) != 0)
                fatal_f("ssh_digest_memory");
        /* 0-4.2 ms of delay */
@@ -703,7 +703,7 @@ void
 auth2_record_info(Authctxt *authctxt, const char *fmt, ...)
 {
        va_list ap;
-        int i;
+       int i;
 
        free(authctxt->auth_method_info);
        authctxt->auth_method_info = NULL;
index b60d56c48bb89f2e622417eb4b6af1e381546e78..2f402253954c3fa757862b5be8b7357a898c5305 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: channels.c,v 1.405 2021/02/15 20:43:15 markus Exp $ */
+/* $OpenBSD: channels.c,v 1.406 2021/04/03 06:18:40 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -2299,7 +2299,7 @@ channel_handler_init(struct ssh_channels *sc)
        chan_fn **pre, **post;
 
        if ((pre = calloc(SSH_CHANNEL_MAX_TYPE, sizeof(*pre))) == NULL ||
-          (post = calloc(SSH_CHANNEL_MAX_TYPE, sizeof(*post))) == NULL)
+           (post = calloc(SSH_CHANNEL_MAX_TYPE, sizeof(*post))) == NULL)
                fatal_f("allocation failed");
 
        pre[SSH_CHANNEL_OPEN] =                 &channel_pre_open;
@@ -2699,7 +2699,7 @@ channel_proxy_downstream(struct ssh *ssh, Channel *downstream)
                        goto out;
                }
                c = channel_new(ssh, "mux proxy", SSH_CHANNEL_MUX_PROXY,
-                  -1, -1, -1, 0, 0, 0, ctype, 1);
+                   -1, -1, -1, 0, 0, 0, ctype, 1);
                c->mux_ctx = downstream;        /* point to mux client */
                c->mux_downstream_id = id;      /* original downstream id */
                if ((r = sshbuf_put_cstring(modified, ctype)) != 0 ||
@@ -2726,7 +2726,7 @@ channel_proxy_downstream(struct ssh *ssh, Channel *downstream)
                        goto out;
                }
                c = channel_new(ssh, "mux proxy", SSH_CHANNEL_MUX_PROXY,
-                  -1, -1, -1, 0, 0, 0, "mux-down-connect", 1);
+                   -1, -1, -1, 0, 0, 0, "mux-down-connect", 1);
                c->mux_ctx = downstream;        /* point to mux client */
                c->mux_downstream_id = id;
                c->remote_id = remote_id;
index 191a87da7173826b74583fdb4d08a676844ae627..378d987c6c048c174d54d876dbd89e4946bba2c7 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: channels.h,v 1.136 2021/04/03 05:54:14 djm Exp $ */
+/* $OpenBSD: channels.h,v 1.137 2021/04/03 06:18:40 djm Exp $ */
 
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -289,7 +289,7 @@ int  channel_input_status_confirm(int, u_int32_t, struct ssh *);
 /* file descriptor handling (read/write) */
 
 void    channel_prepare_select(struct ssh *, fd_set **, fd_set **, int *,
-            u_int*, time_t*);
+           u_int*, time_t*);
 void     channel_after_select(struct ssh *, fd_set *, fd_set *);
 void     channel_output_poll(struct ssh *);
 
index 639511cfdb1edd1ea2c8c49af217ec62840a0d13..38d5bee7fbe10e40b0e1bda14743932559470778 100644 (file)
--- a/cipher.c
+++ b/cipher.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cipher.c,v 1.118 2020/12/21 11:09:32 dtucker Exp $ */
+/* $OpenBSD: cipher.c,v 1.119 2021/04/03 06:18:40 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -495,9 +495,9 @@ cipher_get_keyiv(struct sshcipher_ctx *cc, u_char *iv, size_t len)
        if (cipher_authlen(c)) {
                if (!EVP_CIPHER_CTX_ctrl(cc->evp, EVP_CTRL_GCM_IV_GEN,
                   len, iv))
-                      return SSH_ERR_LIBCRYPTO_ERROR;
+                       return SSH_ERR_LIBCRYPTO_ERROR;
        } else if (!EVP_CIPHER_CTX_get_iv(cc->evp, iv, len))
-              return SSH_ERR_LIBCRYPTO_ERROR;
+               return SSH_ERR_LIBCRYPTO_ERROR;
 #endif
        return 0;
 }
diff --git a/dh.c b/dh.c
index 82590f68881a582da06ebbcf42276f2822c300ea..ce2eb4725e65ca29d17994645dcb664928db5b12 100644 (file)
--- a/dh.c
+++ b/dh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dh.c,v 1.73 2021/03/12 04:08:19 dtucker Exp $ */
+/* $OpenBSD: dh.c,v 1.74 2021/04/03 06:18:40 djm Exp $ */
 /*
  * Copyright (c) 2000 Niels Provos.  All rights reserved.
  *
@@ -274,7 +274,7 @@ dh_pub_is_valid(const DH *dh, const BIGNUM *dh_pub)
         */
        if (bits_set < 4) {
                logit("invalid public DH value (%d/%d)",
-                  bits_set, BN_num_bits(dh_p));
+                   bits_set, BN_num_bits(dh_p));
                return 0;
        }
        return 1;
diff --git a/kex.c b/kex.c
index 30425ab8ab9b56c8508488e96017797e5cc715d7..709a0ec63aa01099bc76114deb4582ac1f07c81a 100644 (file)
--- a/kex.c
+++ b/kex.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kex.c,v 1.167 2021/01/31 22:55:29 djm Exp $ */
+/* $OpenBSD: kex.c,v 1.168 2021/04/03 06:18:40 djm Exp $ */
 /*
  * Copyright (c) 2000, 2001 Markus Friedl.  All rights reserved.
  *
@@ -1188,7 +1188,7 @@ kex_exchange_identification(struct ssh *ssh, int timeout_ms,
        if (version_addendum != NULL && *version_addendum == '\0')
                version_addendum = NULL;
        if ((r = sshbuf_putf(our_version, "SSH-%d.%d-%.100s%s%s\r\n",
-          PROTOCOL_MAJOR_2, PROTOCOL_MINOR_2, SSH_VERSION,
+           PROTOCOL_MAJOR_2, PROTOCOL_MINOR_2, SSH_VERSION,
            version_addendum == NULL ? "" : " ",
            version_addendum == NULL ? "" : version_addendum)) != 0) {
                oerrno = errno;
index 35b83ccfb0f3955a436c97f125558144d90ef280..bde28053ddf1e58f0978d0e2c704f3764315c62f 100644 (file)
--- a/kexgen.c
+++ b/kexgen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kexgen.c,v 1.6 2021/01/31 22:55:29 djm Exp $ */
+/* $OpenBSD: kexgen.c,v 1.7 2021/04/03 06:18:40 djm Exp $ */
 /*
  * Copyright (c) 2019 Markus Friedl.  All rights reserved.
  *
@@ -322,7 +322,7 @@ input_kex_gen_init(int type, u_int32_t seq, struct ssh *ssh)
 
        /* sign H */
        if ((r = kex->sign(ssh, server_host_private, server_host_public,
-            &signature, &slen, hash, hashlen, kex->hostkey_alg)) != 0)
+           &signature, &slen, hash, hashlen, kex->hostkey_alg)) != 0)
                goto out;
 
        /* send server hostkey, ECDH pubkey 'Q_S' and signed H */
diff --git a/log.c b/log.c
index 4d786c2cf63bca4e2951e9df98e6fd1b580ae933..36ab284d6ff6901766d0868c2e5a2704fe4cda3e 100644 (file)
--- a/log.c
+++ b/log.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: log.c,v 1.56 2020/12/04 02:25:13 djm Exp $ */
+/* $OpenBSD: log.c,v 1.57 2021/04/03 06:18:40 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -318,7 +318,7 @@ log_redirect_stderr_to(const char *logfile)
 
        if ((fd = open(logfile, O_WRONLY|O_CREAT|O_APPEND, 0600)) == -1) {
                fprintf(stderr, "Couldn't open logfile %s: %s\n", logfile,
-                    strerror(errno));
+                   strerror(errno));
                exit(1);
        }
        log_stderr_fd = fd;
diff --git a/misc.c b/misc.c
index e209454422d3be7016d92c985068593283c295bb..b0ece2442cc7de1b4dcf7b0b8265b6944f1b978a 100644 (file)
--- a/misc.c
+++ b/misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: misc.c,v 1.163 2021/04/03 05:21:46 djm Exp $ */
+/* $OpenBSD: misc.c,v 1.164 2021/04/03 06:18:40 djm Exp $ */
 /*
  * Copyright (c) 2000 Markus Friedl.  All rights reserved.
  * Copyright (c) 2005-2020 Damien Miller.  All rights reserved.
@@ -1195,7 +1195,7 @@ vdollar_percent_expand(int *parseerror, int dollar, int percent,
                        string += 2;  /* skip over '${' */
                        if ((varend = strchr(string, '}')) == NULL) {
                                error_f("environment variable '%s' missing "
-                                  "closing '}'", string);
+                                   "closing '}'", string);
                                goto out;
                        }
                        len = varend - string;
diff --git a/misc.h b/misc.h
index e8239ace73edffe44ad78abaec090fc3e72ddc47..58914bd7f128716fa495c8c765e89858e84b9ae4 100644 (file)
--- a/misc.h
+++ b/misc.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: misc.h,v 1.94 2021/03/03 08:42:52 djm Exp $ */
+/* $OpenBSD: misc.h,v 1.95 2021/04/03 06:18:40 djm Exp $ */
 
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -117,9 +117,9 @@ struct arglist {
        u_int   nalloc;
 };
 void    addargs(arglist *, char *, ...)
-            __attribute__((format(printf, 2, 3)));
+           __attribute__((format(printf, 2, 3)));
 void    replacearg(arglist *, u_int, char *, ...)
-            __attribute__((format(printf, 3, 4)));
+           __attribute__((format(printf, 3, 4)));
 void    freeargs(arglist *);
 
 int     tun_open(int, int, char **);
@@ -174,7 +174,7 @@ const char *iptos2str(int);
 void mktemp_proto(char *, size_t);
 
 void    child_set_env(char ***envp, u_int *envsizep, const char *name,
-            const char *value);
+           const char *value);
 
 int     argv_split(const char *, int *, char ***);
 char   *argv_assemble(int, char **argv);
@@ -182,9 +182,9 @@ int  exited_cleanly(pid_t, const char *, const char *, int);
 
 struct stat;
 int     safe_path(const char *, struct stat *, const char *, uid_t,
-            char *, size_t);
+           char *, size_t);
 int     safe_path_fd(int, const char *, struct passwd *,
-            char *err, size_t errlen);
+           char *err, size_t errlen);
 
 /* authorized_key-style options parsing helpers */
 int    opt_flag(const char *opt, int allow_negate, const char **optsp);
diff --git a/mux.c b/mux.c
index d0f066a77d623117d0aa72efb8df8c173a97fb02..faf4ef1e92a714f4e880553458e9606a43d490ed 100644 (file)
--- a/mux.c
+++ b/mux.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mux.c,v 1.86 2020/10/29 02:52:43 djm Exp $ */
+/* $OpenBSD: mux.c,v 1.87 2021/04/03 06:18:40 djm Exp $ */
 /*
  * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org>
  *
@@ -554,7 +554,7 @@ format_forward(u_int ftype, struct Forward *fwd)
                xasprintf(&ret, "dynamic forward %.200s:%d -> *",
                    (fwd->listen_host == NULL) ?
                    (options.fwd_opts.gateway_ports ? "*" : "LOCALHOST") :
-                    fwd->listen_host, fwd->listen_port);
+                   fwd->listen_host, fwd->listen_port);
                break;
        case MUX_FWD_REMOTE:
                xasprintf(&ret, "remote forward %.200s:%d -> %.200s:%d",
@@ -649,7 +649,7 @@ mux_confirm_remote_forward(struct ssh *ssh, int type, u_int32_t seq, void *ctxt)
                            rfwd->allocated_port)) != 0)
                                fatal_fr(r, "reply");
                        channel_update_permission(ssh, rfwd->handle,
-                          rfwd->allocated_port);
+                           rfwd->allocated_port);
                } else {
                        reply_ok(out, fctx->rid);
                }
@@ -664,7 +664,7 @@ mux_confirm_remote_forward(struct ssh *ssh, int type, u_int32_t seq, void *ctxt)
                        xasprintf(&failmsg, "remote port forwarding failed for "
                            "listen port %d", rfwd->listen_port);
 
-                debug2_f("clearing registered forwarding for listen %d, "
+               debug2_f("clearing registered forwarding for listen %d, "
                    "connect %s:%d", rfwd->listen_port,
                    rfwd->connect_path ? rfwd->connect_path :
                    rfwd->connect_host, rfwd->connect_port);
@@ -2278,7 +2278,7 @@ muxclient(const char *path)
        if (strlcpy(addr.sun_path, path,
            sizeof(addr.sun_path)) >= sizeof(addr.sun_path))
                fatal("ControlPath too long ('%s' >= %u bytes)", path,
-                    (unsigned int)sizeof(addr.sun_path));
+                   (unsigned int)sizeof(addr.sun_path));
 
        if ((sock = socket(PF_UNIX, SOCK_STREAM, 0)) == -1)
                fatal_f("socket(): %s", strerror(errno));
index 4bd8b4ec9e05468032adcc8a06f9876b4fab8e94..85784ac57702f2b6d493e894d268a607e6cb5e91 100644 (file)
--- a/packet.c
+++ b/packet.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: packet.c,v 1.299 2021/01/27 10:05:28 djm Exp $ */
+/* $OpenBSD: packet.c,v 1.300 2021/04/03 06:18:40 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -684,7 +684,7 @@ static int
 ssh_packet_init_compression(struct ssh *ssh)
 {
        if (!ssh->state->compression_buffer &&
-          ((ssh->state->compression_buffer = sshbuf_new()) == NULL))
+           ((ssh->state->compression_buffer = sshbuf_new()) == NULL))
                return SSH_ERR_ALLOC_FAIL;
        return 0;
 }
@@ -886,11 +886,11 @@ ssh_set_newkeys(struct ssh *ssh, int mode)
        }
        if (state->newkeys[mode] != NULL) {
                debug_f("rekeying %s, input %llu bytes %llu blocks, "
-                  "output %llu bytes %llu blocks", dir,
-                  (unsigned long long)state->p_read.bytes,
-                  (unsigned long long)state->p_read.blocks,
-                  (unsigned long long)state->p_send.bytes,
-                  (unsigned long long)state->p_send.blocks);
+                   "output %llu bytes %llu blocks", dir,
+                   (unsigned long long)state->p_read.bytes,
+                   (unsigned long long)state->p_read.blocks,
+                   (unsigned long long)state->p_send.bytes,
+                   (unsigned long long)state->p_send.blocks);
                kex_free_newkeys(state->newkeys[mode]);
                state->newkeys[mode] = NULL;
        }
@@ -925,7 +925,7 @@ ssh_set_newkeys(struct ssh *ssh, int mode)
           explicit_bzero(mac->key, mac->key_len); */
        if ((comp->type == COMP_ZLIB ||
            (comp->type == COMP_DELAYED &&
-            state->after_authentication)) && comp->enabled == 0) {
+           state->after_authentication)) && comp->enabled == 0) {
                if ((r = ssh_packet_init_compression(ssh)) < 0)
                        return r;
                if (mode == MODE_OUT) {
index 724974b708f92848066ccc1067382bac57d0fd1a..0f27652b48b884ddb4d574da45ae7ec10fd9fc64 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: readconf.c,v 1.352 2021/02/24 01:18:08 dtucker Exp $ */
+/* $OpenBSD: readconf.c,v 1.353 2021/04/03 06:18:40 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -676,7 +676,7 @@ match_cfg_line(Options *options, char **condition, struct passwd *pw,
                        snprintf(uidstr, sizeof(uidstr), "%llu",
                            (unsigned long long)pw->pw_uid);
                        conn_hash_hex = ssh_connection_hash(thishost, host,
-                          portstr, ruser);
+                           portstr, ruser);
                        keyalias = options->host_key_alias ?
                            options->host_key_alias : host;
 
@@ -1026,7 +1026,7 @@ parse_time:
  parse_multistate:
                arg = strdelim(&s);
                if ((value = parse_multistate_value(arg, filename, linenum,
-                    multistate_ptr)) == -1) {
+                   multistate_ptr)) == -1) {
                        error("%s line %d: unsupported option \"%s\".",
                            filename, linenum, arg);
                        return -1;
@@ -1994,7 +1994,7 @@ parse_pubkey_algos:
                arg = strdelim(&s);
                arg2 = strdelim(&s);
                value = parse_multistate_value(arg, filename, linenum,
-                    multistate_yesnoaskconfirm);
+                   multistate_yesnoaskconfirm);
                value2 = 0; /* unlimited lifespan by default */
                if (value == 3 && arg2 != NULL) {
                        /* allow "AddKeysToAgent confirm 5m" */
diff --git a/scp.c b/scp.c
index 59b0a36a13784a936d2a193d02e850a244c838d5..d23f34c1755bcabf5c5d939c34de95984fee316c 100644 (file)
--- a/scp.c
+++ b/scp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scp.c,v 1.213 2020/10/18 11:32:01 djm Exp $ */
+/* $OpenBSD: scp.c,v 1.214 2021/04/03 06:18:40 djm Exp $ */
 /*
  * scp - secure remote copy.  This is basically patched BSD rcp which
  * uses ssh to do the data transfer (instead of using rcmd).
@@ -630,7 +630,7 @@ do_times(int fd, int verb, const struct stat *sb)
 
 static int
 parse_scp_uri(const char *uri, char **userp, char **hostp, int *portp,
-     char **pathp)
+    char **pathp)
 {
        int r;
 
@@ -1423,8 +1423,7 @@ sink(int argc, char **argv, const char *src)
                                if (pflag)
                                        (void) chmod(np, mode);
                        } else {
-                               /* Handle copying from a read-only
-                                  directory */
+                               /* Handle copying from a read-only directory */
                                mod_flag = 1;
                                if (mkdir(np, mode | S_IRWXU) == -1)
                                        goto bad;
index 4cc936ddca1981404021403f1bef4c0aa38116ab..4d1910feb432dce9d03544665a9c7eed44384c5a 100644 (file)
@@ -1,5 +1,5 @@
 
-/* $OpenBSD: servconf.c,v 1.378 2021/03/12 04:08:19 dtucker Exp $ */
+/* $OpenBSD: servconf.c,v 1.379 2021/04/03 06:18:40 djm Exp $ */
 /*
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
  *                    All rights reserved
@@ -2117,7 +2117,7 @@ process_server_config_line_depth(ServerOptions *options, char *line,
        case sMatch:
                if (cmdline)
                        fatal("Match directive not supported as a command-line "
-                          "option");
+                           "option");
                value = match_cfg_line(&cp, linenum,
                    (*inc_flags & SSHCFG_NEVERMATCH ? NULL : connectinfo));
                if (value < 0)
@@ -2454,7 +2454,7 @@ load_server_config(const char *filename, struct sshbuf *conf)
        sshbuf_reset(conf);
        /* grow buffer, so realloc is avoided for large config files */
        if (fstat(fileno(f), &st) == 0 && st.st_size > 0 &&
-            (r = sshbuf_allocate(conf, st.st_size)) != 0)
+           (r = sshbuf_allocate(conf, st.st_size)) != 0)
                fatal_fr(r, "allocate");
        while (getline(&line, &linesize, f) != -1) {
                lineno++;
@@ -2507,12 +2507,12 @@ int parse_server_match_testspec(struct connection_info *ci, char *spec)
                        ci->lport = a2port(p + 6);
                        if (ci->lport == -1) {
                                fprintf(stderr, "Invalid port '%s' in test mode"
-                                  " specification %s\n", p+6, p);
+                                   " specification %s\n", p+6, p);
                                return -1;
                        }
                } else {
                        fprintf(stderr, "Invalid test mode specification %s\n",
-                          p);
+                           p);
                        return -1;
                }
        }
@@ -2918,9 +2918,9 @@ dump_config(ServerOptions *o)
        dump_cfg_strarray_oneline(sAuthorizedKeysFile, o->num_authkeys_files,
            o->authorized_keys_files);
        dump_cfg_strarray(sHostKeyFile, o->num_host_key_files,
-            o->host_key_files);
+           o->host_key_files);
        dump_cfg_strarray(sHostCertificate, o->num_host_cert_files,
-            o->host_cert_files);
+           o->host_cert_files);
        dump_cfg_strarray(sAllowUsers, o->num_allow_users, o->allow_users);
        dump_cfg_strarray(sDenyUsers, o->num_deny_users, o->deny_users);
        dump_cfg_strarray(sAllowGroups, o->num_allow_groups, o->allow_groups);
index 7ad9d6ae46f5a85a25f77b47c2ac364578c4509b..f7cdac22a54b658c7be99c2fc71f1176fff6f7d6 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: servconf.h,v 1.153 2021/04/03 05:54:14 djm Exp $ */
+/* $OpenBSD: servconf.h,v 1.154 2021/04/03 06:18:40 djm Exp $ */
 
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -294,13 +294,13 @@ struct connection_info *get_connection_info(struct ssh *, int, int);
 void    initialize_server_options(ServerOptions *);
 void    fill_default_server_options(ServerOptions *);
 int     process_server_config_line(ServerOptions *, char *, const char *, int,
-            int *, struct connection_info *, struct include_list *includes);
+           int *, struct connection_info *, struct include_list *includes);
 void    process_permitopen(struct ssh *ssh, ServerOptions *options);
 void    load_server_config(const char *, struct sshbuf *);
 void    parse_server_config(ServerOptions *, const char *, struct sshbuf *,
-            struct include_list *includes, struct connection_info *);
+           struct include_list *includes, struct connection_info *);
 void    parse_server_match_config(ServerOptions *,
-            struct include_list *includes, struct connection_info *);
+           struct include_list *includes, struct connection_info *);
 int     parse_server_match_testspec(struct connection_info *, char *);
 int     server_match_spec_complete(struct connection_info *);
 void    copy_set_server_options(ServerOptions *, ServerOptions *, int);
index 306658cbcc21e9ac3506a3c9bc0447b8b2147323..6691797185555d1d4b0e01e25b4fb173299f2eae 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: serverloop.c,v 1.225 2021/01/27 10:05:28 djm Exp $ */
+/* $OpenBSD: serverloop.c,v 1.226 2021/04/03 06:18:41 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -838,7 +838,7 @@ server_input_global_request(int type, u_int32_t seq, struct ssh *ssh)
                    options.disable_forwarding ||
                    (!want_reply && fwd.listen_port == 0) ||
                    (fwd.listen_port != 0 &&
-                    !bind_permitted(fwd.listen_port, pw->pw_uid))) {
+                   !bind_permitted(fwd.listen_port, pw->pw_uid))) {
                        success = 0;
                        ssh_packet_send_debug(ssh, "Server has disabled port forwarding.");
                } else {
index 4b155f913f2c0e4ece8ae0ee99a21a7c0faef75b..c02f7d25e5e33b490e01c7ade733a02f40ce822d 100644 (file)
--- a/session.c
+++ b/session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: session.c,v 1.327 2020/12/14 03:13:12 djm Exp $ */
+/* $OpenBSD: session.c,v 1.328 2021/04/03 06:18:41 djm Exp $ */
 /*
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
  *                    All rights reserved
@@ -1388,7 +1388,7 @@ do_setusercontext(struct passwd *pw)
 
                if (!in_chroot && options.chroot_directory != NULL &&
                    strcasecmp(options.chroot_directory, "none") != 0) {
-                        tmp = tilde_expand_filename(options.chroot_directory,
+                       tmp = tilde_expand_filename(options.chroot_directory,
                            pw->pw_uid);
                        snprintf(uidstr, sizeof(uidstr), "%llu",
                            (unsigned long long)pw->pw_uid);
index c76032c82abf4d9cc60797cdc97db85cdb8d7452..cadaee6bdaa2b2848567a8017fe0a11a04cc78c2 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: sftp-client.c,v 1.141 2021/03/31 22:16:34 djm Exp $ */
+/* $OpenBSD: sftp-client.c,v 1.142 2021/04/03 06:18:41 djm Exp $ */
 /*
  * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
  *
@@ -515,7 +515,8 @@ do_init(int fd_in, int fd_out, u_int transfer_buflen, u_int num_requests,
                        ret->num_requests =
                            MINIMUM(DEFAULT_NUM_REQUESTS, limits.open_handles);
                        debug("Server handle limit %llu; using %u",
-                             (unsigned long long)limits.open_handles, ret->num_requests);
+                           (unsigned long long)limits.open_handles,
+                           ret->num_requests);
                }
        }
 
@@ -577,7 +578,7 @@ do_limits(struct sftp_conn *conn, struct sftp_limits *limits)
                fatal("ID mismatch (%u != %u)", msg_id, id);
        if (type != SSH2_FXP_EXTENDED_REPLY) {
                fatal("Expected SSH2_FXP_EXTENDED_REPLY(%u) packet, got %u",
-                     SSH2_FXP_EXTENDED_REPLY, type);
+                   SSH2_FXP_EXTENDED_REPLY, type);
        }
 
        memset(limits, 0, sizeof(*limits));
@@ -1036,7 +1037,7 @@ do_hardlink(struct sftp_conn *conn, const char *oldpath, const char *newpath)
                fatal_fr(r, "compose");
        send_msg(conn, msg);
        debug3("Sent message hardlink@openssh.com \"%s\" -> \"%s\"",
-              oldpath, newpath);
+           oldpath, newpath);
        sshbuf_free(msg);
 
        status = get_status(conn, id);
@@ -1753,7 +1754,7 @@ do_upload(struct sftp_conn *conn, const char *local_path,
 
                if ((off_t)c->size >= sb.st_size) {
                        error("destination file bigger or same size as "
-                             "source file");
+                           "source file");
                        close(local_fd);
                        return -1;
                }
index 2add175b1467a45decd2941b64e11483109b8119..cce52dbc2f118c3a840f30711cc4c832c3b8de14 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: sftp-server.c,v 1.126 2021/04/03 05:28:43 djm Exp $ */
+/* $OpenBSD: sftp-server.c,v 1.127 2021/04/03 06:18:41 djm Exp $ */
 /*
  * Copyright (c) 2000-2004 Markus Friedl.  All rights reserved.
  *
@@ -151,7 +151,7 @@ static const struct sftp_handler handlers[] = {
 /* SSH2_FXP_EXTENDED submessages */
 static const struct sftp_handler extended_handlers[] = {
        { "posix-rename", "posix-rename@openssh.com", 0,
-          process_extended_posix_rename, 1 },
+           process_extended_posix_rename, 1 },
        { "statvfs", "statvfs@openssh.com", 0, process_extended_statvfs, 0 },
        { "fstatvfs", "fstatvfs@openssh.com", 0, process_extended_fstatvfs, 0 },
        { "hardlink", "hardlink@openssh.com", 0, process_extended_hardlink, 1 },
@@ -1376,7 +1376,7 @@ process_extended_statvfs(u_int32_t id)
                send_status(id, errno_to_portable(errno));
        else
                send_statvfs(id, &st);
-        free(path);
+       free(path);
 }
 
 static void
diff --git a/sftp.c b/sftp.c
index b9804b56678bf5faedc26d45cfb1fc90a570f8ce..37b0ec39988a8c41e4468733c0b4ba6e00fa7ffc 100644 (file)
--- a/sftp.c
+++ b/sftp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sftp.c,v 1.207 2021/03/31 22:16:34 djm Exp $ */
+/* $OpenBSD: sftp.c,v 1.208 2021/04/03 06:18:41 djm Exp $ */
 /*
  * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
  *
@@ -741,7 +741,7 @@ process_put(struct sftp_conn *conn, const char *src, const char *dst,
                }
                free(tmp);
 
-                resume |= global_aflag;
+               resume |= global_aflag;
                if (!quiet && resume)
                        mprintf("Resuming upload of %s to %s\n",
                            g.gl_pathv[i], abs_dst);
index e2446f13130a017e3ac4cebccbc865d29f4bb68b..5014ed79f2965abc071c48e1b0f1f084e4766df7 100644 (file)
@@ -102,7 +102,7 @@ srclimit_check_allow(int sock, int id)
                return 1;
        }
        debug3("%s: new unauthenticated connection from %s/%d, at %d of %d",
-            __func__, xas, bits, count, max_persource);
+           __func__, xas, bits, count, max_persource);
 
        if (first_unused == max_children) { /* no free slot found */
                debug3("%s: no free slot", __func__);
index 7edb9f9a7be9a8ed0d53e10139ccc77527b04172..92192fcfa23cb82c5fbf1407681c38293f04f1dc 100644 (file)
--- a/ssh-add.c
+++ b/ssh-add.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-add.c,v 1.159 2021/01/11 02:12:58 dtucker Exp $ */
+/* $OpenBSD: ssh-add.c,v 1.160 2021/04/03 06:18:41 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -336,10 +336,10 @@ add_file(int agent_fd, const char *filename, int key_only, int qflag,
                        fprintf(stderr, "Skipping update: ");
                        if (left == minleft) {
                                fprintf(stderr,
-                                  "required signatures left (%d).\n", left);
+                                   "required signatures left (%d).\n", left);
                        } else {
                                fprintf(stderr,
-                                  "more signatures left (%d) than"
+                                   "more signatures left (%d) than"
                                    " required (%d).\n", left, minleft);
                        }
                        ssh_free_identitylist(idlist);
index 58fe6ddf75262de76a64d20c9557391a8796a5cc..48a47d45a91b12438c61f2f9013c51934b097d2a 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-agent.c,v 1.277 2021/02/12 03:14:18 djm Exp $ */
+/* $OpenBSD: ssh-agent.c,v 1.278 2021/04/03 06:18:41 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -259,8 +259,8 @@ process_request_identities(SocketEntry *e)
            (r = sshbuf_put_u32(msg, idtab->nentries)) != 0)
                fatal_fr(r, "compose");
        TAILQ_FOREACH(id, &idtab->idlist, next) {
-               if ((r = sshkey_puts_opts(id->key, msg, SSHKEY_SERIALIZE_INFO))
-                    != 0 ||
+               if ((r = sshkey_puts_opts(id->key, msg,
+                   SSHKEY_SERIALIZE_INFO)) != 0 ||
                    (r = sshbuf_put_cstring(msg, id->comment)) != 0) {
                        error_fr(r, "compose key/comment");
                        continue;
@@ -1285,7 +1285,7 @@ prepare_poll(struct pollfd **pfdp, size_t *npfdp, int *timeoutp, u_int maxfds)
                        if ((r = sshbuf_check_reserve(sockets[i].input,
                            AGENT_RBUF_LEN)) == 0 &&
                            (r = sshbuf_check_reserve(sockets[i].output,
-                            AGENT_MAX_LEN)) == 0)
+                           AGENT_MAX_LEN)) == 0)
                                pfd[j].events = POLLIN;
                        else if (r != SSH_ERR_NO_BUFFER_SPACE)
                                fatal_fr(r, "reserve");
index a442dc8e8841432d201a551c2622ddaa857ebd63..027c6db6bd4abbf91c14aa21f5e4814da50f83ba 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-keygen.c,v 1.428 2021/03/12 03:43:40 djm Exp $ */
+/* $OpenBSD: ssh-keygen.c,v 1.429 2021/04/03 06:18:41 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -2009,7 +2009,7 @@ add_cert_option(char *opt)
                        fatal("Invalid source-address list");
                certflags_src_addr = xstrdup(val);
        } else if (strncasecmp(opt, "extension:", 10) == 0 ||
-                  (iscrit = (strncasecmp(opt, "critical:", 9) == 0))) {
+                   (iscrit = (strncasecmp(opt, "critical:", 9) == 0))) {
                val = xstrdup(strchr(opt, ':') + 1);
                if ((cp = strchr(val, '=')) != NULL)
                        *cp++ = '\0';
@@ -2729,12 +2729,12 @@ done:
                                fatal_f("sshkey_fingerprint failed");
                        if (principal == NULL) {
                                printf("Good \"%s\" signature with %s key %s\n",
-                                      sig_namespace, sshkey_type(sign_key), fp);
+                                   sig_namespace, sshkey_type(sign_key), fp);
 
                        } else {
                                printf("Good \"%s\" signature for %s with %s key %s\n",
-                                      sig_namespace, principal,
-                                      sshkey_type(sign_key), fp);
+                                   sig_namespace, principal,
+                                   sshkey_type(sign_key), fp);
                        }
                } else {
                        printf("Could not verify signature.\n");
@@ -3371,12 +3371,12 @@ main(int argc, char **argv)
                if (strncmp(sign_op, "find-principals", 15) == 0) {
                        if (ca_key_path == NULL) {
                                error("Too few arguments for find-principals:"
-                                     "missing signature file");
+                                   "missing signature file");
                                exit(1);
                        }
                        if (!have_identity) {
                                error("Too few arguments for find-principals:"
-                                     "missing allowed keys file");
+                                   "missing allowed keys file");
                                exit(1);
                        }
                        return sig_find_principals(ca_key_path, identity_file);
@@ -3397,7 +3397,7 @@ main(int argc, char **argv)
                } else if (strncmp(sign_op, "check-novalidate", 16) == 0) {
                        if (ca_key_path == NULL) {
                                error("Too few arguments for check-novalidate: "
-                                     "missing signature file");
+                                   "missing signature file");
                                exit(1);
                        }
                        return sig_verify(ca_key_path, cert_principals,
index 3102a2c999340398fd56dd4b798e889a2cd0d171..e932590094a2b7186986586dd53958676e906625 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-sk-client.c,v 1.8 2020/10/18 11:32:02 djm Exp $ */
+/* $OpenBSD: ssh-sk-client.c,v 1.9 2021/04/03 06:18:41 djm Exp $ */
 /*
  * Copyright (c) 2019 Google LLC
  *
@@ -157,9 +157,9 @@ client_converse(struct sshbuf *msg, struct sshbuf **respp, u_int type)
        /* Request preamble: type, log_on_stderr, log_level */
        ll = log_level_get();
        if ((r = sshbuf_put_u32(req, type)) != 0 ||
-          (r = sshbuf_put_u8(req, log_is_on_stderr() != 0)) != 0 ||
-          (r = sshbuf_put_u32(req, ll < 0 ? 0 : ll)) != 0 ||
-          (r = sshbuf_putb(req, msg)) != 0) {
+           (r = sshbuf_put_u8(req, log_is_on_stderr() != 0)) != 0 ||
+           (r = sshbuf_put_u32(req, ll < 0 ? 0 : ll)) != 0 ||
+           (r = sshbuf_putb(req, msg)) != 0) {
                error_fr(r, "compose");
                goto out;
        }
index bceff0f0c5ae58be8581ee632a8290684b73d1e2..d3c6617616bdecbaf2c14858f32922298fe10893 100644 (file)
--- a/ssh_api.c
+++ b/ssh_api.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh_api.c,v 1.26 2021/01/27 10:05:28 djm Exp $ */
+/* $OpenBSD: ssh_api.c,v 1.27 2021/04/03 06:18:41 djm Exp $ */
 /*
  * Copyright (c) 2012 Markus Friedl.  All rights reserved.
  *
@@ -81,7 +81,7 @@ mm_choose_dh(int min, int nbits, int max)
 int
 ssh_init(struct ssh **sshp, int is_server, struct kex_params *kex_params)
 {
-        char *myproposal[PROPOSAL_MAX] = { KEX_CLIENT };
+       char *myproposal[PROPOSAL_MAX] = { KEX_CLIENT };
        struct ssh *ssh;
        char **proposal;
        static int called;
@@ -361,7 +361,7 @@ _ssh_read_banner(struct ssh *ssh, struct sshbuf *banner)
                if (ssh->kex->server || ++n > SSH_MAX_PRE_BANNER_LINES) {
   bad:
                        if ((r = sshbuf_put(ssh_packet_get_output(ssh),
-                          mismatch, strlen(mismatch))) != 0)
+                           mismatch, strlen(mismatch))) != 0)
                                return r;
                        return SSH_ERR_NO_PROTOCOL_VERSION;
                }
index 6eb5fbae0d8d6ae2d5d0880870f19ad8a23de9f9..47f0b1c93abf3cfb4cbcce893b862de4be1a1b98 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshconnect.c,v 1.351 2021/03/03 21:40:16 sthen Exp $ */
+/* $OpenBSD: sshconnect.c,v 1.352 2021/04/03 06:18:41 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -91,7 +91,7 @@ expand_proxy_command(const char *proxy_command, const char *user,
 {
        char *tmp, *ret, strport[NI_MAXSERV];
        const char *keyalias = options.host_key_alias ?
-            options.host_key_alias : host_arg;
+           options.host_key_alias : host_arg;
 
        snprintf(strport, sizeof strport, "%d", port);
        xasprintf(&tmp, "exec %s", proxy_command);
@@ -243,8 +243,10 @@ ssh_proxy_connect(struct ssh *ssh, const char *host, const char *host_arg,
                argv[2] = command_string;
                argv[3] = NULL;
 
-               /* Execute the proxy command.  Note that we gave up any
-                  extra privileges above. */
+               /*
+                * Execute the proxy command.  Note that we gave up any
+                * extra privileges above.
+                */
                ssh_signal(SIGPIPE, SIG_DFL);
                execv(argv[0], argv);
                perror(argv[0]);
@@ -394,14 +396,14 @@ ssh_create_socket(struct addrinfo *ai)
 #ifdef HAVE_IFADDRS_H
                if ((r = getifaddrs(&ifaddrs)) != 0) {
                        error("getifaddrs: %s: %s", options.bind_interface,
-                             strerror(errno));
+                           strerror(errno));
                        goto fail;
                }
                bindaddrlen = sizeof(bindaddr);
                if (check_ifaddrs(options.bind_interface, ai->ai_family,
                    ifaddrs, &bindaddr, &bindaddrlen) != 0) {
                        logit("getifaddrs: %s: no suitable addresses",
-                             options.bind_interface);
+                           options.bind_interface);
                        goto fail;
                }
 #else
@@ -865,7 +867,7 @@ load_hostkeys_command(struct hostkeys *hostkeys, const char *command_template,
        /* Turn the command into an argument vector */
        if (argv_split(command_template, &ac, &av) != 0) {
                error("%s \"%s\" contains invalid quotes", tag,
-                  command_template);
+                   command_template);
                goto out;
        }
        if (ac == 0) {
index 059c9480db6a28c4266c1e14584f4b8702e7673e..a53ab95dbb2f2938f2dcd75176b7659c32b5ab50 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshconnect2.c,v 1.346 2021/01/27 10:05:28 djm Exp $ */
+/* $OpenBSD: sshconnect2.c,v 1.347 2021/04/03 06:18:41 djm Exp $ */
 /*
  * Copyright (c) 2000 Markus Friedl.  All rights reserved.
  * Copyright (c) 2008 Damien Miller.  All rights reserved.
@@ -671,7 +671,7 @@ format_identity(Identity *id)
        const char *note = "";
 
        if (id->key != NULL) {
-            fp = sshkey_fingerprint(id->key, options.fingerprint_hash,
+               fp = sshkey_fingerprint(id->key, options.fingerprint_hash,
                    SSH_FP_DEFAULT);
        }
        if (id->key) {
@@ -1242,7 +1242,7 @@ identity_sign(struct identity *id, u_char **sigp, size_t *lenp,
                        return SSH_ERR_KEY_NOT_FOUND;
                if (id->key != NULL && !sshkey_equal_public(prv, id->key)) {
                        error_f("private key %s contents do not match public",
-                          id->filename);
+                           id->filename);
                        r = SSH_ERR_KEY_NOT_FOUND;
                        goto out;
                }
diff --git a/sshd.c b/sshd.c
index 32dd4dd4db8a91c42b7f7ba1cc449ea578262431..5aa04d0507c0cf4ffee6354a4e38d757f2250b50 100644 (file)
--- a/sshd.c
+++ b/sshd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshd.c,v 1.571 2021/03/12 04:08:19 dtucker Exp $ */
+/* $OpenBSD: sshd.c,v 1.572 2021/04/03 06:18:41 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1702,7 +1702,7 @@ main(int ac, char **av)
         */
        if (test_flag < 2 && connection_info != NULL)
                fatal("Config test connection parameter (-C) provided without "
-                  "test mode (-T)");
+                   "test mode (-T)");
 
        /* Fetch our configuration */
        if ((cfg = sshbuf_new()) == NULL)
@@ -2016,8 +2016,10 @@ main(int ac, char **av)
        /* Reinitialize the log (because of the fork above). */
        log_init(__progname, options.log_level, options.log_facility, log_stderr);
 
-       /* Chdir to the root directory so that the current disk can be
-          unmounted if desired. */
+       /*
+        * Chdir to the root directory so that the current disk can be
+        * unmounted if desired.
+        */
        if (chdir("/") == -1)
                error("chdir(\"/\"): %s", strerror(errno));
 
index 018b7da1a6ca7c7370dad94b9a18a47f7aba4de3..f5235ef2fbd8acc8f145b4b6865af2f356f5ca3c 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshkey-xmss.c,v 1.10 2021/03/06 20:36:31 millert Exp $ */
+/* $OpenBSD: sshkey-xmss.c,v 1.11 2021/04/03 06:18:41 djm Exp $ */
 /*
  * Copyright (c) 2017 Markus Friedl.  All rights reserved.
  *
@@ -590,7 +590,7 @@ sshkey_xmss_update_state(const struct sshkey *k, int printerror)
                goto done;
        } else if (idx != state->idx + 1) {
                PRINT("more than one signature happened: idx %u state %u",
-                     idx, state->idx);
+                   idx, state->idx);
                goto done;
        }
        state->idx = idx;
index bf52d293c3a429072c65ff841740d678e75fc1fc..32a12be620b115a7f2b73a517d7f3c8e18734a8e 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshkey-xmss.h,v 1.2 2020/10/19 22:49:23 dtucker Exp $ */
+/* $OpenBSD: sshkey-xmss.h,v 1.3 2021/04/03 06:18:41 djm Exp $ */
 /*
  * Copyright (c) 2017 Markus Friedl.  All rights reserved.
  *
 #ifndef SSHKEY_XMSS_H
 #define SSHKEY_XMSS_H
 
-#define XMSS_SHA2_256_W16_H10_NAME "XMSS_SHA2-256_W16_H10"
-#define XMSS_SHA2_256_W16_H16_NAME "XMSS_SHA2-256_W16_H16"
-#define XMSS_SHA2_256_W16_H20_NAME "XMSS_SHA2-256_W16_H20"
-#define XMSS_DEFAULT_NAME         XMSS_SHA2_256_W16_H10_NAME
+#define XMSS_SHA2_256_W16_H10_NAME     "XMSS_SHA2-256_W16_H10"
+#define XMSS_SHA2_256_W16_H16_NAME     "XMSS_SHA2-256_W16_H16"
+#define XMSS_SHA2_256_W16_H20_NAME     "XMSS_SHA2-256_W16_H20"
+#define XMSS_DEFAULT_NAME              XMSS_SHA2_256_W16_H10_NAME
 
 size_t  sshkey_xmss_pklen(const struct sshkey *);
 size_t  sshkey_xmss_sklen(const struct sshkey *);
@@ -37,7 +37,7 @@ void   sshkey_xmss_free_state(struct sshkey *);
 int     sshkey_xmss_generate_private_key(struct sshkey *, u_int);
 int     sshkey_xmss_serialize_state(const struct sshkey *, struct sshbuf *);
 int     sshkey_xmss_serialize_state_opt(const struct sshkey *, struct sshbuf *,
-            enum sshkey_serialize_rep);
+           enum sshkey_serialize_rep);
 int     sshkey_xmss_serialize_pk_info(const struct sshkey *, struct sshbuf *,
            enum sshkey_serialize_rep);
 int     sshkey_xmss_deserialize_state(struct sshkey *, struct sshbuf *);
index b25c59a208ec80b702660fd5c46a5edd9a0a6880..10ef9369dc276e4574c1ca52220c5cf4b34eecd6 100644 (file)
--- a/sshkey.c
+++ b/sshkey.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshkey.c,v 1.115 2021/02/02 22:36:46 djm Exp $ */
+/* $OpenBSD: sshkey.c,v 1.116 2021/04/03 06:18:41 djm Exp $ */
 /*
  * Copyright (c) 2000, 2001 Markus Friedl.  All rights reserved.
  * Copyright (c) 2008 Alexander von Gernler.  All rights reserved.
@@ -150,7 +150,7 @@ static const struct keytype keytypes[] = {
            KEY_ECDSA_CERT, NID_secp384r1, 1, 0 },
 #  ifdef OPENSSL_HAS_NISTP521
        { "ecdsa-sha2-nistp521-cert-v01@openssh.com", "ECDSA-CERT", NULL,
-          KEY_ECDSA_CERT, NID_secp521r1, 1, 0 },
+           KEY_ECDSA_CERT, NID_secp521r1, 1, 0 },
 #  endif /* OPENSSL_HAS_NISTP521 */
        { "sk-ecdsa-sha2-nistp256-cert-v01@openssh.com", "ECDSA-SK-CERT", NULL,
            KEY_ECDSA_SK_CERT, NID_X9_62_prime256v1, 1, 0 },
@@ -2035,7 +2035,7 @@ sshkey_shield_private(struct sshkey *k)
        if (sshkey_is_shielded(k) && (r = sshkey_unshield_private(k)) != 0)
                goto out;
        if ((r = sshkey_private_serialize_opt(k, prvbuf,
-            SSHKEY_SERIALIZE_SHIELD)) != 0)
+           SSHKEY_SERIALIZE_SHIELD)) != 0)
                goto out;
        /* pad to cipher blocksize */
        i = 0;
@@ -3681,7 +3681,7 @@ sshkey_private_deserialize(struct sshbuf *buf, struct sshkey **kp)
        if ((expect_sk_application != NULL && (k->sk_application == NULL ||
            strcmp(expect_sk_application, k->sk_application) != 0)) ||
            (expect_ed25519_pk != NULL && (k->ed25519_pk == NULL ||
-            memcmp(expect_ed25519_pk, k->ed25519_pk, ED25519_PK_SZ) != 0))) {
+           memcmp(expect_ed25519_pk, k->ed25519_pk, ED25519_PK_SZ) != 0))) {
                r = SSH_ERR_KEY_CERT_MISMATCH;
                goto out;
        }
@@ -3959,7 +3959,7 @@ sshkey_private_to_blob2(struct sshkey *prv, struct sshbuf *blob,
 
        /* append private key and comment*/
        if ((r = sshkey_private_serialize_opt(prv, encrypted,
-            SSHKEY_SERIALIZE_FULL)) != 0 ||
+           SSHKEY_SERIALIZE_FULL)) != 0 ||
            (r = sshbuf_put_cstring(encrypted, comment)) != 0)
                goto out;
 
@@ -4598,12 +4598,12 @@ sshkey_parse_private_pem_fileblob(struct sshbuf *blob, int type,
        clear_libcrypto_errors();
        if ((pk = PEM_read_bio_PrivateKey(bio, NULL, pem_passphrase_cb,
            (char *)passphrase)) == NULL) {
-              /*
-               * libcrypto may return various ASN.1 errors when attempting
-               * to parse a key with an incorrect passphrase.
-               * Treat all format errors as "incorrect passphrase" if a
-               * passphrase was supplied.
-               */
+               /*
+                * libcrypto may return various ASN.1 errors when attempting
+                * to parse a key with an incorrect passphrase.
+                * Treat all format errors as "incorrect passphrase" if a
+                * passphrase was supplied.
+                */
                if (passphrase != NULL && *passphrase != '\0')
                        r = SSH_ERR_KEY_WRONG_PASSPHRASE;
                else
diff --git a/utf8.h b/utf8.h
index 9d6d9a32cd8ade9e86004d90fffce65572a5d014..09941d47180a7ae06d0ef4c76040fcc7f51786ad 100644 (file)
--- a/utf8.h
+++ b/utf8.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: utf8.h,v 1.3 2020/05/01 06:28:52 djm Exp $ */
+/* $OpenBSD: utf8.h,v 1.4 2021/04/03 06:18:41 djm Exp $ */
 /*
  * Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
  *
 
 int     vasnmprintf(char **, size_t, int *, const char *, va_list);
 int     mprintf(const char *, ...)
-            __attribute__((format(printf, 1, 2)));
+           __attribute__((format(printf, 1, 2)));
 int     fmprintf(FILE *, const char *, ...)
-            __attribute__((format(printf, 2, 3)));
+           __attribute__((format(printf, 2, 3)));
 int     vfmprintf(FILE *, const char *, va_list);
 int     snmprintf(char *, size_t, int *, const char *, ...)
-            __attribute__((format(printf, 4, 5)));
+           __attribute__((format(printf, 4, 5)));
 int     asmprintf(char **, size_t, int *, const char *, ...)
-            __attribute__((format(printf, 4, 5)));
+           __attribute__((format(printf, 4, 5)));
 void    msetlocale(void);
index abaf7ada2c6c508d2c86854fec01c31c90ca30fc..a6b8d23bde8e1879f5a8d74e06c67f6a2a4a3d9b 100644 (file)
--- a/xmalloc.h
+++ b/xmalloc.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: xmalloc.h,v 1.19 2019/11/12 22:32:48 djm Exp $ */
+/* $OpenBSD: xmalloc.h,v 1.20 2021/04/03 06:18:41 djm Exp $ */
 
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -22,7 +22,6 @@ void  *xreallocarray(void *, size_t, size_t);
 void   *xrecallocarray(void *, size_t, size_t, size_t);
 char   *xstrdup(const char *);
 int     xasprintf(char **, const char *, ...)
-                __attribute__((__format__ (printf, 2, 3)))
-                __attribute__((__nonnull__ (2)));
+    __attribute__((__format__ (printf, 2, 3))) __attribute__((__nonnull__ (2)));
 int     xvasprintf(char **, const char *, va_list)
-               __attribute__((__nonnull__ (2)));
+    __attribute__((__nonnull__ (2)));