summaryrefslogtreecommitdiff
path: root/clientloop.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2022-06-03 04:30:46 +0000
committerDamien Miller <djm@mindrot.org>2022-06-03 14:33:18 +1000
commit22e1a3a71ad6d108ff0c5f07f93c3fcbd30f8b40 (patch)
tree51a3beeb61487d6449266b91203118595ab376f0 /clientloop.c
parent38ed6c57e9e592c08e020fa6e82b45b4e1040970 (diff)
downloadopenssh-git-22e1a3a71ad6d108ff0c5f07f93c3fcbd30f8b40.tar.gz
upstream: Make SetEnv directives first-match-wins in both
sshd_config and sshd_config; previously if the same name was reused then the last would win (which is the opposite to how the config is supposed to work). While there, make the ssh_config parsing more like sshd_config. bz3438, ok dtucker OpenBSD-Commit-ID: 797909c1e0262c0d00e09280459d7ab00f18273b
Diffstat (limited to 'clientloop.c')
-rw-r--r--clientloop.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/clientloop.c b/clientloop.c
index 1d80683c..0050f3eb 100644
--- a/clientloop.c
+++ b/clientloop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clientloop.c,v 1.379 2022/04/20 04:19:11 djm Exp $ */
+/* $OpenBSD: clientloop.c,v 1.380 2022/06/03 04:30:46 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -2467,7 +2467,8 @@ client_session2_setup(struct ssh *ssh, int id, int want_tty, int want_subsystem,
const char *term, struct termios *tiop, int in_fd, struct sshbuf *cmd,
char **env)
{
- int i, j, matched, len, r;
+ size_t i, j, len;
+ int matched, r;
char *name, *val;
Channel *c = NULL;
@@ -2550,13 +2551,13 @@ client_session2_setup(struct ssh *ssh, int id, int want_tty, int want_subsystem,
len = 900;
if (want_subsystem) {
debug("Sending subsystem: %.*s",
- len, (const u_char*)sshbuf_ptr(cmd));
+ (int)len, (const u_char*)sshbuf_ptr(cmd));
channel_request_start(ssh, id, "subsystem", 1);
client_expect_confirm(ssh, id, "subsystem",
CONFIRM_CLOSE);
} else {
debug("Sending command: %.*s",
- len, (const u_char*)sshbuf_ptr(cmd));
+ (int)len, (const u_char*)sshbuf_ptr(cmd));
channel_request_start(ssh, id, "exec", 1);
client_expect_confirm(ssh, id, "exec", CONFIRM_CLOSE);
}