mirror of
https://github.com/clearml/dropbear
synced 2025-02-07 13:21:15 +00:00
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.
This commit is contained in:
parent
5f97d0fbbc
commit
93c54fe6f6
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user