summaryrefslogtreecommitdiffhomepage
path: root/cli-auth.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-10-21 22:39:55 +0800
committerMike Frysinger <vapier@gentoo.org>2015-10-21 22:39:55 +0800
commit93c54fe6f61fc7f593b0218739851a8f4345bfdf (patch)
tree55f9ccae218f8193781380cd32c3892ca383a8f6 /cli-auth.c
parent5f97d0fbbca06e9320dada5488d268305bd7ac49 (diff)
avoid getpass when not used
some systems (like android's bionic) do not provide getpass. you can disable ENABLE_CLI_PASSWORD_AUTH & ENABLE_CLI_INTERACT_AUTH to avoid its use (and rely on pubkey auth), but the link still fails because the support file calls getpass. do not define this func if both of those auth methods are not used.
Diffstat (limited to 'cli-auth.c')
-rw-r--r--cli-auth.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/cli-auth.c b/cli-auth.c
index 3f3677a..da0d9d5 100644
--- a/cli-auth.c
+++ b/cli-auth.c
@@ -324,6 +324,7 @@ int cli_auth_try() {
return DROPBEAR_FAILURE;
}
+#if defined(ENABLE_CLI_PASSWORD_AUTH) || defined(ENABLE_CLI_INTERACT_AUTH)
/* A helper for getpass() that exits if the user cancels. The returned
* password is statically allocated by getpass() */
char* getpass_or_cancel(char* prompt)
@@ -347,3 +348,4 @@ char* getpass_or_cancel(char* prompt)
}
return password;
}
+#endif