mirror of
https://github.com/sheumann/hush.git
synced 2024-12-22 14:30:31 +00:00
Flush input when prompting for a password (bug 373).
This commit is contained in:
parent
a75c180e53
commit
e422af6bcb
@ -44,6 +44,7 @@ char *bb_askpass(int timeout, const char * prompt)
|
|||||||
static char passwd[PWD_BUFFER_SIZE];
|
static char passwd[PWD_BUFFER_SIZE];
|
||||||
|
|
||||||
tcgetattr(STDIN_FILENO, &old);
|
tcgetattr(STDIN_FILENO, &old);
|
||||||
|
tcflush(STDIN_FILENO, TCIFLUSH);
|
||||||
|
|
||||||
size = sizeof(passwd);
|
size = sizeof(passwd);
|
||||||
ret = passwd;
|
ret = passwd;
|
||||||
|
Loading…
Reference in New Issue
Block a user