Skip to content

Commit 31d8d23

Browse files
committedApr 3, 2021
upstream: highly polished whitespace, mostly fixing spaces-for-tab
and bad indentation on continuation lines. Prompted by GHPR#185 OpenBSD-Commit-ID: e5c81f0cbdcc6144df1ce468ec1bac366d8ad6e9
1 parent 34afde5 commit 31d8d23

40 files changed

+155
-151
lines changed
 

‎addrmatch.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $OpenBSD: addrmatch.c,v 1.16 2021/01/09 11:58:50 dtucker Exp $ */
1+
/* $OpenBSD: addrmatch.c,v 1.17 2021/04/03 06:18:40 djm Exp $ */
22

33
/*
44
* Copyright (c) 2004-2008 Damien Miller <djm@mindrot.org>
@@ -76,7 +76,7 @@ addr_match_list(const char *addr, const char *_list)
7676
break;
7777
} else if (r == 0) {
7878
if (addr != NULL && addr_netmatch(&try_addr,
79-
&match_addr, masklen) == 0) {
79+
&match_addr, masklen) == 0) {
8080
foundit:
8181
if (neg) {
8282
ret = -1;

‎auth-krb5.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $OpenBSD: auth-krb5.c,v 1.23 2018/07/09 21:35:50 markus Exp $ */
1+
/* $OpenBSD: auth-krb5.c,v 1.24 2021/04/03 06:18:40 djm Exp $ */
22
/*
33
* Kerberos v5 authentication and ticket-passing routines.
44
*
@@ -99,7 +99,7 @@ auth_krb5_password(Authctxt *authctxt, const char *password)
9999
#ifdef HEIMDAL
100100
# ifdef HAVE_KRB5_CC_NEW_UNIQUE
101101
problem = krb5_cc_new_unique(authctxt->krb5_ctx,
102-
krb5_mcc_ops.prefix, NULL, &ccache);
102+
krb5_mcc_ops.prefix, NULL, &ccache);
103103
# else
104104
problem = krb5_cc_gen_new(authctxt->krb5_ctx, &krb5_mcc_ops, &ccache);
105105
# endif
@@ -123,7 +123,7 @@ auth_krb5_password(Authctxt *authctxt, const char *password)
123123

124124
# ifdef HAVE_KRB5_CC_NEW_UNIQUE
125125
problem = krb5_cc_new_unique(authctxt->krb5_ctx,
126-
krb5_fcc_ops.prefix, NULL, &authctxt->krb5_fwd_ccache);
126+
krb5_fcc_ops.prefix, NULL, &authctxt->krb5_fwd_ccache);
127127
# else
128128
problem = krb5_cc_gen_new(authctxt->krb5_ctx, &krb5_fcc_ops,
129129
&authctxt->krb5_fwd_ccache);

‎auth-options.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $OpenBSD: auth-options.c,v 1.94 2020/10/18 11:32:01 djm Exp $ */
1+
/* $OpenBSD: auth-options.c,v 1.95 2021/04/03 06:18:40 djm Exp $ */
22
/*
33
* Copyright (c) 2018 Damien Miller <djm@mindrot.org>
44
*
@@ -810,7 +810,7 @@ sshauthopt_serialise(const struct sshauthopt *opts, struct sshbuf *m,
810810
(r = serialise_nullable_string(m,
811811
untrusted ? NULL : opts->required_from_host_cert)) != 0 ||
812812
(r = serialise_nullable_string(m,
813-
untrusted ? NULL : opts->required_from_host_keys)) != 0)
813+
untrusted ? NULL : opts->required_from_host_keys)) != 0)
814814
return r;
815815

816816
/* Array options */

‎auth.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $OpenBSD: auth.c,v 1.151 2020/12/22 00:12:22 djm Exp $ */
1+
/* $OpenBSD: auth.c,v 1.152 2021/04/03 06:18:40 djm Exp $ */
22
/*
33
* Copyright (c) 2000 Markus Friedl. All rights reserved.
44
*
@@ -514,7 +514,7 @@ auth_openfile(const char *file, struct passwd *pw, int strict_modes,
514514
if ((fd = open(file, O_RDONLY|O_NONBLOCK)) == -1) {
515515
if (log_missing || errno != ENOENT)
516516
debug("Could not open %s '%s': %s", file_type, file,
517-
strerror(errno));
517+
strerror(errno));
518518
return NULL;
519519
}
520520

‎auth2-pubkey.c

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $OpenBSD: auth2-pubkey.c,v 1.106 2021/01/27 10:05:28 djm Exp $ */
1+
/* $OpenBSD: auth2-pubkey.c,v 1.107 2021/04/03 06:18:40 djm Exp $ */
22
/*
33
* Copyright (c) 2000 Markus Friedl. All rights reserved.
44
*
@@ -674,7 +674,8 @@ check_authkey_line(struct ssh *ssh, struct passwd *pw, struct sshkey *key,
674674
goto fail_reason;
675675
}
676676
if (sshkey_cert_check_authority(key, 0, 0, 0,
677-
keyopts->cert_principals == NULL ? pw->pw_name : NULL, &reason) != 0)
677+
keyopts->cert_principals == NULL ? pw->pw_name : NULL,
678+
&reason) != 0)
678679
goto fail_reason;
679680

680681
verbose("Accepted certificate ID \"%s\" (serial %llu) "
@@ -785,7 +786,7 @@ user_cert_trusted_ca(struct ssh *ssh, struct passwd *pw, struct sshkey *key,
785786
found_principal = 1;
786787
/* If principals file or command is specified, then require a match */
787788
use_authorized_principals = principals_file != NULL ||
788-
options.authorized_principals_command != NULL;
789+
options.authorized_principals_command != NULL;
789790
if (!found_principal && use_authorized_principals) {
790791
reason = "Certificate does not contain an authorized principal";
791792
goto fail_reason;

‎auth2.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $OpenBSD: auth2.c,v 1.160 2021/01/27 10:05:28 djm Exp $ */
1+
/* $OpenBSD: auth2.c,v 1.161 2021/04/03 06:18:40 djm Exp $ */
22
/*
33
* Copyright (c) 2000 Markus Friedl. All rights reserved.
44
*
@@ -228,7 +228,7 @@ user_specific_delay(const char *user)
228228
double delay;
229229

230230
(void)snprintf(b, sizeof b, "%llu%s",
231-
(unsigned long long)options.timing_secret, user);
231+
(unsigned long long)options.timing_secret, user);
232232
if (ssh_digest_memory(SSH_DIGEST_SHA512, b, strlen(b), hash, len) != 0)
233233
fatal_f("ssh_digest_memory");
234234
/* 0-4.2 ms of delay */
@@ -703,7 +703,7 @@ void
703703
auth2_record_info(Authctxt *authctxt, const char *fmt, ...)
704704
{
705705
va_list ap;
706-
int i;
706+
int i;
707707

708708
free(authctxt->auth_method_info);
709709
authctxt->auth_method_info = NULL;

‎channels.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $OpenBSD: channels.c,v 1.405 2021/02/15 20:43:15 markus Exp $ */
1+
/* $OpenBSD: channels.c,v 1.406 2021/04/03 06:18:40 djm Exp $ */
22
/*
33
* Author: Tatu Ylonen <ylo@cs.hut.fi>
44
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -2299,7 +2299,7 @@ channel_handler_init(struct ssh_channels *sc)
22992299
chan_fn **pre, **post;
23002300

23012301
if ((pre = calloc(SSH_CHANNEL_MAX_TYPE, sizeof(*pre))) == NULL ||
2302-
(post = calloc(SSH_CHANNEL_MAX_TYPE, sizeof(*post))) == NULL)
2302+
(post = calloc(SSH_CHANNEL_MAX_TYPE, sizeof(*post))) == NULL)
23032303
fatal_f("allocation failed");
23042304

23052305
pre[SSH_CHANNEL_OPEN] = &channel_pre_open;
@@ -2699,7 +2699,7 @@ channel_proxy_downstream(struct ssh *ssh, Channel *downstream)
26992699
goto out;
27002700
}
27012701
c = channel_new(ssh, "mux proxy", SSH_CHANNEL_MUX_PROXY,
2702-
-1, -1, -1, 0, 0, 0, ctype, 1);
2702+
-1, -1, -1, 0, 0, 0, ctype, 1);
27032703
c->mux_ctx = downstream; /* point to mux client */
27042704
c->mux_downstream_id = id; /* original downstream id */
27052705
if ((r = sshbuf_put_cstring(modified, ctype)) != 0 ||
@@ -2726,7 +2726,7 @@ channel_proxy_downstream(struct ssh *ssh, Channel *downstream)
27262726
goto out;
27272727
}
27282728
c = channel_new(ssh, "mux proxy", SSH_CHANNEL_MUX_PROXY,
2729-
-1, -1, -1, 0, 0, 0, "mux-down-connect", 1);
2729+
-1, -1, -1, 0, 0, 0, "mux-down-connect", 1);
27302730
c->mux_ctx = downstream; /* point to mux client */
27312731
c->mux_downstream_id = id;
27322732
c->remote_id = remote_id;

‎channels.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $OpenBSD: channels.h,v 1.136 2021/04/03 05:54:14 djm Exp $ */
1+
/* $OpenBSD: channels.h,v 1.137 2021/04/03 06:18:40 djm Exp $ */
22

33
/*
44
* Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -289,7 +289,7 @@ int channel_input_status_confirm(int, u_int32_t, struct ssh *);
289289
/* file descriptor handling (read/write) */
290290

291291
void channel_prepare_select(struct ssh *, fd_set **, fd_set **, int *,
292-
u_int*, time_t*);
292+
u_int*, time_t*);
293293
void channel_after_select(struct ssh *, fd_set *, fd_set *);
294294
void channel_output_poll(struct ssh *);
295295

‎cipher.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $OpenBSD: cipher.c,v 1.118 2020/12/21 11:09:32 dtucker Exp $ */
1+
/* $OpenBSD: cipher.c,v 1.119 2021/04/03 06:18:40 djm Exp $ */
22
/*
33
* Author: Tatu Ylonen <ylo@cs.hut.fi>
44
* 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)
495495
if (cipher_authlen(c)) {
496496
if (!EVP_CIPHER_CTX_ctrl(cc->evp, EVP_CTRL_GCM_IV_GEN,
497497
len, iv))
498-
return SSH_ERR_LIBCRYPTO_ERROR;
498+
return SSH_ERR_LIBCRYPTO_ERROR;
499499
} else if (!EVP_CIPHER_CTX_get_iv(cc->evp, iv, len))
500-
return SSH_ERR_LIBCRYPTO_ERROR;
500+
return SSH_ERR_LIBCRYPTO_ERROR;
501501
#endif
502502
return 0;
503503
}

‎dh.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $OpenBSD: dh.c,v 1.73 2021/03/12 04:08:19 dtucker Exp $ */
1+
/* $OpenBSD: dh.c,v 1.74 2021/04/03 06:18:40 djm Exp $ */
22
/*
33
* Copyright (c) 2000 Niels Provos. All rights reserved.
44
*
@@ -274,7 +274,7 @@ dh_pub_is_valid(const DH *dh, const BIGNUM *dh_pub)
274274
*/
275275
if (bits_set < 4) {
276276
logit("invalid public DH value (%d/%d)",
277-
bits_set, BN_num_bits(dh_p));
277+
bits_set, BN_num_bits(dh_p));
278278
return 0;
279279
}
280280
return 1;

‎kex.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $OpenBSD: kex.c,v 1.167 2021/01/31 22:55:29 djm Exp $ */
1+
/* $OpenBSD: kex.c,v 1.168 2021/04/03 06:18:40 djm Exp $ */
22
/*
33
* Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
44
*
@@ -1188,7 +1188,7 @@ kex_exchange_identification(struct ssh *ssh, int timeout_ms,
11881188
if (version_addendum != NULL && *version_addendum == '\0')
11891189
version_addendum = NULL;
11901190
if ((r = sshbuf_putf(our_version, "SSH-%d.%d-%.100s%s%s\r\n",
1191-
PROTOCOL_MAJOR_2, PROTOCOL_MINOR_2, SSH_VERSION,
1191+
PROTOCOL_MAJOR_2, PROTOCOL_MINOR_2, SSH_VERSION,
11921192
version_addendum == NULL ? "" : " ",
11931193
version_addendum == NULL ? "" : version_addendum)) != 0) {
11941194
oerrno = errno;

‎kexgen.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $OpenBSD: kexgen.c,v 1.6 2021/01/31 22:55:29 djm Exp $ */
1+
/* $OpenBSD: kexgen.c,v 1.7 2021/04/03 06:18:40 djm Exp $ */
22
/*
33
* Copyright (c) 2019 Markus Friedl. All rights reserved.
44
*
@@ -322,7 +322,7 @@ input_kex_gen_init(int type, u_int32_t seq, struct ssh *ssh)
322322

323323
/* sign H */
324324
if ((r = kex->sign(ssh, server_host_private, server_host_public,
325-
&signature, &slen, hash, hashlen, kex->hostkey_alg)) != 0)
325+
&signature, &slen, hash, hashlen, kex->hostkey_alg)) != 0)
326326
goto out;
327327

328328
/* send server hostkey, ECDH pubkey 'Q_S' and signed H */

‎log.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $OpenBSD: log.c,v 1.56 2020/12/04 02:25:13 djm Exp $ */
1+
/* $OpenBSD: log.c,v 1.57 2021/04/03 06:18:40 djm Exp $ */
22
/*
33
* Author: Tatu Ylonen <ylo@cs.hut.fi>
44
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -318,7 +318,7 @@ log_redirect_stderr_to(const char *logfile)
318318

319319
if ((fd = open(logfile, O_WRONLY|O_CREAT|O_APPEND, 0600)) == -1) {
320320
fprintf(stderr, "Couldn't open logfile %s: %s\n", logfile,
321-
strerror(errno));
321+
strerror(errno));
322322
exit(1);
323323
}
324324
log_stderr_fd = fd;

‎misc.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $OpenBSD: misc.c,v 1.163 2021/04/03 05:21:46 djm Exp $ */
1+
/* $OpenBSD: misc.c,v 1.164 2021/04/03 06:18:40 djm Exp $ */
22
/*
33
* Copyright (c) 2000 Markus Friedl. All rights reserved.
44
* Copyright (c) 2005-2020 Damien Miller. All rights reserved.
@@ -1195,7 +1195,7 @@ vdollar_percent_expand(int *parseerror, int dollar, int percent,
11951195
string += 2; /* skip over '${' */
11961196
if ((varend = strchr(string, '}')) == NULL) {
11971197
error_f("environment variable '%s' missing "
1198-
"closing '}'", string);
1198+
"closing '}'", string);
11991199
goto out;
12001200
}
12011201
len = varend - string;

‎misc.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $OpenBSD: misc.h,v 1.94 2021/03/03 08:42:52 djm Exp $ */
1+
/* $OpenBSD: misc.h,v 1.95 2021/04/03 06:18:40 djm Exp $ */
22

33
/*
44
* Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -117,9 +117,9 @@ struct arglist {
117117
u_int nalloc;
118118
};
119119
void addargs(arglist *, char *, ...)
120-
__attribute__((format(printf, 2, 3)));
120+
__attribute__((format(printf, 2, 3)));
121121
void replacearg(arglist *, u_int, char *, ...)
122-
__attribute__((format(printf, 3, 4)));
122+
__attribute__((format(printf, 3, 4)));
123123
void freeargs(arglist *);
124124

125125
int tun_open(int, int, char **);
@@ -174,17 +174,17 @@ const char *iptos2str(int);
174174
void mktemp_proto(char *, size_t);
175175

176176
void child_set_env(char ***envp, u_int *envsizep, const char *name,
177-
const char *value);
177+
const char *value);
178178

179179
int argv_split(const char *, int *, char ***);
180180
char *argv_assemble(int, char **argv);
181181
int exited_cleanly(pid_t, const char *, const char *, int);
182182

183183
struct stat;
184184
int safe_path(const char *, struct stat *, const char *, uid_t,
185-
char *, size_t);
185+
char *, size_t);
186186
int safe_path_fd(int, const char *, struct passwd *,
187-
char *err, size_t errlen);
187+
char *err, size_t errlen);
188188

189189
/* authorized_key-style options parsing helpers */
190190
int opt_flag(const char *opt, int allow_negate, const char **optsp);

‎mux.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $OpenBSD: mux.c,v 1.86 2020/10/29 02:52:43 djm Exp $ */
1+
/* $OpenBSD: mux.c,v 1.87 2021/04/03 06:18:40 djm Exp $ */
22
/*
33
* Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org>
44
*
@@ -554,7 +554,7 @@ format_forward(u_int ftype, struct Forward *fwd)
554554
xasprintf(&ret, "dynamic forward %.200s:%d -> *",
555555
(fwd->listen_host == NULL) ?
556556
(options.fwd_opts.gateway_ports ? "*" : "LOCALHOST") :
557-
fwd->listen_host, fwd->listen_port);
557+
fwd->listen_host, fwd->listen_port);
558558
break;
559559
case MUX_FWD_REMOTE:
560560
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)
649649
rfwd->allocated_port)) != 0)
650650
fatal_fr(r, "reply");
651651
channel_update_permission(ssh, rfwd->handle,
652-
rfwd->allocated_port);
652+
rfwd->allocated_port);
653653
} else {
654654
reply_ok(out, fctx->rid);
655655
}
@@ -664,7 +664,7 @@ mux_confirm_remote_forward(struct ssh *ssh, int type, u_int32_t seq, void *ctxt)
664664
xasprintf(&failmsg, "remote port forwarding failed for "
665665
"listen port %d", rfwd->listen_port);
666666

667-
debug2_f("clearing registered forwarding for listen %d, "
667+
debug2_f("clearing registered forwarding for listen %d, "
668668
"connect %s:%d", rfwd->listen_port,
669669
rfwd->connect_path ? rfwd->connect_path :
670670
rfwd->connect_host, rfwd->connect_port);
@@ -2278,7 +2278,7 @@ muxclient(const char *path)
22782278
if (strlcpy(addr.sun_path, path,
22792279
sizeof(addr.sun_path)) >= sizeof(addr.sun_path))
22802280
fatal("ControlPath too long ('%s' >= %u bytes)", path,
2281-
(unsigned int)sizeof(addr.sun_path));
2281+
(unsigned int)sizeof(addr.sun_path));
22822282

22832283
if ((sock = socket(PF_UNIX, SOCK_STREAM, 0)) == -1)
22842284
fatal_f("socket(): %s", strerror(errno));

‎packet.c

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $OpenBSD: packet.c,v 1.299 2021/01/27 10:05:28 djm Exp $ */
1+
/* $OpenBSD: packet.c,v 1.300 2021/04/03 06:18:40 djm Exp $ */
22
/*
33
* Author: Tatu Ylonen <ylo@cs.hut.fi>
44
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -684,7 +684,7 @@ static int
684684
ssh_packet_init_compression(struct ssh *ssh)
685685
{
686686
if (!ssh->state->compression_buffer &&
687-
((ssh->state->compression_buffer = sshbuf_new()) == NULL))
687+
((ssh->state->compression_buffer = sshbuf_new()) == NULL))
688688
return SSH_ERR_ALLOC_FAIL;
689689
return 0;
690690
}
@@ -886,11 +886,11 @@ ssh_set_newkeys(struct ssh *ssh, int mode)
886886
}
887887
if (state->newkeys[mode] != NULL) {
888888
debug_f("rekeying %s, input %llu bytes %llu blocks, "
889-
"output %llu bytes %llu blocks", dir,
890-
(unsigned long long)state->p_read.bytes,
891-
(unsigned long long)state->p_read.blocks,
892-
(unsigned long long)state->p_send.bytes,
893-
(unsigned long long)state->p_send.blocks);
889+
"output %llu bytes %llu blocks", dir,
890+
(unsigned long long)state->p_read.bytes,
891+
(unsigned long long)state->p_read.blocks,
892+
(unsigned long long)state->p_send.bytes,
893+
(unsigned long long)state->p_send.blocks);
894894
kex_free_newkeys(state->newkeys[mode]);
895895
state->newkeys[mode] = NULL;
896896
}
@@ -925,7 +925,7 @@ ssh_set_newkeys(struct ssh *ssh, int mode)
925925
explicit_bzero(mac->key, mac->key_len); */
926926
if ((comp->type == COMP_ZLIB ||
927927
(comp->type == COMP_DELAYED &&
928-
state->after_authentication)) && comp->enabled == 0) {
928+
state->after_authentication)) && comp->enabled == 0) {
929929
if ((r = ssh_packet_init_compression(ssh)) < 0)
930930
return r;
931931
if (mode == MODE_OUT) {

0 commit comments

Comments
 (0)
Please sign in to comment.