diff options
author | Matt Johnston <matt@ucc.asn.au> | 2009-06-08 14:44:23 +0000 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2009-06-08 14:44:23 +0000 |
commit | fe03c39241b103202d7e12eb49a338ad6e24db48 (patch) | |
tree | 7d0860574c19d1870c8205c4c95d8a58c7cbd65a | |
parent | 6e78eca7c8c24b456e84faa4f695a05b5e59212d (diff) |
Wrap proxycmd function in ENABLE_CLI_PROXYCMD #ifdef
--HG--
extra : convert_revision : 6d6160b277bfc7c2db6888a2ac91ac618cef6de3
-rw-r--r-- | cli-runopts.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/cli-runopts.c b/cli-runopts.c index 9c10fc3..986f830 100644 --- a/cli-runopts.c +++ b/cli-runopts.c @@ -90,6 +90,10 @@ static void printhelp() { } +/* Note that options that affect the transport or auth layers (such as -i or + * -W) should also be passed through to a multi-hop child proxycmd, in + * parse_multihop_hostname(). */ + void cli_getopts(int argc, char ** argv) { unsigned int i, j; @@ -469,9 +473,9 @@ static void parse_multihop_hostname(const char* orighostarg, const char* argv0) if (cli_opts.remoteport == NULL) { cli_opts.remoteport = "22"; } - cmd_len = strlen(remainder) + cmd_len = strlen(argv0) + strlen(remainder) + strlen(cli_opts.remotehost) + strlen(cli_opts.remoteport) - + strlen(argv0) + 30; + + 30; cli_opts.proxycmd = m_malloc(cmd_len); snprintf(cli_opts.proxycmd, cmd_len, "%s -B %s:%s %s", argv0, cli_opts.remotehost, cli_opts.remoteport, remainder); |