summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/ssh.c
diff options
context:
space:
mode:
authordjm <djm@openbsd.org>2017-03-08 12:07:47 +0000
committerdjm <djm@openbsd.org>2017-03-08 12:07:47 +0000
commit6c0d9406cadc79c584ce6e9f0ba319fbc866216e (patch)
treeb8b21c3ed516c70764a980b4ffeeba6af6b3ffe5 /usr.bin/ssh/ssh.c
parentDo not clear IFF_UP, even in the error path, clearing IFF_RUNNING (diff)
downloadwireguard-openbsd-6c0d9406cadc79c584ce6e9f0ba319fbc866216e.tar.xz
wireguard-openbsd-6c0d9406cadc79c584ce6e9f0ba319fbc866216e.zip
quote [host]:port in generated ProxyJump commandline; the [ / ]
characters can confuse some shells (e.g. zsh). Reported by Lauri Tirkkonen via bugs@
Diffstat (limited to 'usr.bin/ssh/ssh.c')
-rw-r--r--usr.bin/ssh/ssh.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c
index 029edc4272d..84e664a0f03 100644
--- a/usr.bin/ssh/ssh.c
+++ b/usr.bin/ssh/ssh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh.c,v 1.449 2017/02/17 02:04:15 djm Exp $ */
+/* $OpenBSD: ssh.c,v 1.450 2017/03/08 12:07:47 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1072,7 +1072,7 @@ main(int ac, char **av)
options.proxy_use_fdpass = 0;
snprintf(port_s, sizeof(port_s), "%d", options.jump_port);
xasprintf(&options.proxy_command,
- "ssh%s%s%s%s%s%s%s%s%s%.*s -W [%%h]:%%p %s",
+ "ssh%s%s%s%s%s%s%s%s%s%.*s -W '[%%h]:%%p' %s",
/* Optional "-l user" argument if jump_user set */
options.jump_user == NULL ? "" : " -l ",
options.jump_user == NULL ? "" : options.jump_user,