1 diff -uNr dropbear-2018.76/cli-auth.c dropbear-2018.76.mod/cli-auth.c
2 --- dropbear-2018.76/cli-auth.c 2018-02-27 16:25:10.000000000 +0200
3 +++ dropbear-2018.76.mod/cli-auth.c 2018-04-21 13:44:51.797063206 +0300
9 +// getpass implementation
12 +#include <readline/readline.h>
14 +static char* getpass(const char *prompt) {
15 + struct termios term_old, term_new;
18 + /* Turn echoing off and fail if we can't. */
19 + if (tcgetattr (0, &term_old) != 0) {
23 + term_new = term_old;
24 + term_new.c_lflag &= ~ECHO;
26 + if (tcsetattr (0, TCSAFLUSH, &term_new) != 0) {
30 + /* Read the password. */
31 + char *password = readline(prompt);
33 + /* Restore terminal. */
34 + (void) tcsetattr (0, TCSAFLUSH, &term_old);
40 void cli_authinitialise() {
42 memset(&ses.authstate, 0, sizeof(ses.authstate));