diff options
author | djm@openbsd.org <djm@openbsd.org> | 2017-03-08 12:07:47 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2017-03-08 23:08:39 +1100 |
commit | 8fb15311a011517eb2394bb95a467c209b8b336c (patch) | |
tree | e5f5beda28b0ff8dddd3e4c0c45bbd721677d6a8 | |
parent | 18501151cf272a15b5f2c5e777f2e0933633c513 (diff) |
upstream commit
quote [host]:port in generated ProxyJump commandline; the
[ / ] characters can confuse some shells (e.g. zsh). Reported by Lauri
Tirkkonen via bugs@
Upstream-ID: 65cdd161460e1351c3d778e974c1c2a4fa4bc182
-rw-r--r-- | ssh.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssh.c,v 1.449 2017/02/17 02:04:15 djm Exp $ */ | 1 | /* $OpenBSD: ssh.c,v 1.450 2017/03/08 12:07:47 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -1103,7 +1103,7 @@ main(int ac, char **av) | |||
1103 | options.proxy_use_fdpass = 0; | 1103 | options.proxy_use_fdpass = 0; |
1104 | snprintf(port_s, sizeof(port_s), "%d", options.jump_port); | 1104 | snprintf(port_s, sizeof(port_s), "%d", options.jump_port); |
1105 | xasprintf(&options.proxy_command, | 1105 | xasprintf(&options.proxy_command, |
1106 | "ssh%s%s%s%s%s%s%s%s%s%.*s -W [%%h]:%%p %s", | 1106 | "ssh%s%s%s%s%s%s%s%s%s%.*s -W '[%%h]:%%p' %s", |
1107 | /* Optional "-l user" argument if jump_user set */ | 1107 | /* Optional "-l user" argument if jump_user set */ |
1108 | options.jump_user == NULL ? "" : " -l ", | 1108 | options.jump_user == NULL ? "" : " -l ", |
1109 | options.jump_user == NULL ? "" : options.jump_user, | 1109 | options.jump_user == NULL ? "" : options.jump_user, |