# HG changeset patch # User Matt Johnston # Date 1433339132 -28800 # Node ID ad14e2e711901352ca6194933d94124927277bea # Parent 2265d7ebfdeb4ef8925b5c85d58b629a0dcdfdb0 Fix building when ENABLE_CLI_PUBKEY_AUTH is unset diff -r 2265d7ebfdeb -r ad14e2e71190 cli-runopts.c --- a/cli-runopts.c Fri May 29 23:19:11 2015 +0800 +++ b/cli-runopts.c Wed Jun 03 21:45:32 2015 +0800 @@ -447,7 +447,7 @@ } #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 @@ 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 , terminator. */ ret = m_malloc(len); total = 0; @@ -524,6 +527,7 @@ 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 @@ 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)