diff cli-auth.c @ 1156:a8f4dade70e5

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.
author Mike Frysinger <vapier@gentoo.org>
date Wed, 21 Oct 2015 22:39:55 +0800
parents aaf576b27a10
children c6346c63281b
line wrap: on
line diff
--- a/cli-auth.c	Wed Oct 21 22:39:31 2015 +0800
+++ b/cli-auth.c	Wed Oct 21 22:39:55 2015 +0800
@@ -324,6 +324,7 @@
 	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 @@
 	}
 	return password;
 }
+#endif