forked from PowerShell/openssh-portable
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
upstream: highly polished whitespace, mostly fixing spaces-for-tab
and bad indentation on continuation lines. Prompted by GHPR#185 OpenBSD-Commit-ID: e5c81f0cbdcc6144df1ce468ec1bac366d8ad6e9
- Loading branch information
Showing
40 changed files
with
155 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <[email protected]> | ||
|
@@ -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; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <[email protected]> | ||
* | ||
|
@@ -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 */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <[email protected]> | ||
* Copyright (c) 1995 Tatu Ylonen <[email protected]>, 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; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <[email protected]> | ||
|
@@ -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 *); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <[email protected]> | ||
* Copyright (c) 1995 Tatu Ylonen <[email protected]>, 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; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <[email protected]> | ||
* Copyright (c) 1995 Tatu Ylonen <[email protected]>, 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; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <[email protected]> | ||
|
@@ -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,17 +174,17 @@ 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); | ||
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); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <[email protected]> | ||
* | ||
|
@@ -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)); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <[email protected]> | ||
* Copyright (c) 1995 Tatu Ylonen <[email protected]>, 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) { | ||
|
Oops, something went wrong.