diff options
author | Matt Johnston <matt@ucc.asn.au> | 2015-06-03 21:45:32 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2015-06-03 21:45:32 +0800 |
commit | 91df741926323203725c2f0e812834865c7b2aba (patch) | |
tree | 8ba2046bcd1e2d231a8cc4094532deba344d175e /cli-runopts.c | |
parent | 2a431cab0358debfbffec28f0ed3fb2ac3c3a1b4 (diff) |
Fix building when ENABLE_CLI_PUBKEY_AUTH is unset
Diffstat (limited to 'cli-runopts.c')
-rw-r--r-- | cli-runopts.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cli-runopts.c b/cli-runopts.c index 467776b..5bd4c55 100644 --- a/cli-runopts.c +++ b/cli-runopts.c @@ -447,7 +447,7 @@ void cli_getopts(int argc, char ** argv) { } #endif -#ifdef DROPBEAR_DEFAULT_CLI_AUTHKEY +#if defined(DROPBEAR_DEFAULT_CLI_AUTHKEY) && defined(ENABLE_CLI_PUBKEY_AUTH) { char *expand_path = expand_tilde(DROPBEAR_DEFAULT_CLI_AUTHKEY); loadidentityfile(expand_path, 0); @@ -498,11 +498,14 @@ multihop_passthrough_args() { m_list_elem *iter; /* Fill out -i, -y, -W options that make sense for all * the intermediate processes */ +#ifdef ENABLE_CLI_PUBKEY_AUTH for (iter = cli_opts.privkeys->first; iter; iter = iter->next) { sign_key * key = (sign_key*)iter->item; len += 3 + strlen(key->filename); } +#endif /* ENABLE_CLI_PUBKEY_AUTH */ + len += 30; /* space for -W <size>, terminator. */ ret = m_malloc(len); total = 0; @@ -524,6 +527,7 @@ multihop_passthrough_args() { total += written; } +#ifdef ENABLE_CLI_PUBKEY_AUTH for (iter = cli_opts.privkeys->first; iter; iter = iter->next) { sign_key * key = (sign_key*)iter->item; @@ -532,6 +536,7 @@ multihop_passthrough_args() { dropbear_assert((unsigned int)written < size); total += written; } +#endif /* ENABLE_CLI_PUBKEY_AUTH */ /* if args were passed, total will be not zero, and it will have a space at the end, so remove that */ if (total > 0) |