summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/clientloop.c
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2022-06-03 04:30:48 +0000
committerDamien Miller <djm@cvs.openbsd.org>2022-06-03 04:30:48 +0000
commit547d116666458b99b29e173f3fd3e03a6ea60f9c (patch)
tree3eb4b343c409e8529e66de3832c08cb20f8e3d2a /usr.bin/ssh/clientloop.c
parent33bef49546c608c5a85f893e93fb00dc86843c04 (diff)
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
Diffstat (limited to 'usr.bin/ssh/clientloop.c')
-rw-r--r--usr.bin/ssh/clientloop.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/ssh/clientloop.c b/usr.bin/ssh/clientloop.c
index 8807d230621..af5c676b627 100644
--- a/usr.bin/ssh/clientloop.c
+++ b/usr.bin/ssh/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
@@ -2452,7 +2452,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;
@@ -2535,13 +2536,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);
}