diff options
author | Rob Landley <rob@landley.net> | 2005-12-12 07:02:15 +0000 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2005-12-12 07:02:15 +0000 |
commit | e422af6bcb15a92b7eba3da5b5cf1bcc8c0b5f5c (patch) | |
tree | ad7641253fcdbbf74c534d35b227ac5ea347a733 /libbb | |
parent | a75c180e538bb8adc0bb280c61dd933fd8d3e56d (diff) |
Flush input when prompting for a password (bug 373).
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/bb_askpass.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libbb/bb_askpass.c b/libbb/bb_askpass.c index 1ae1520d9..42ccd66d3 100644 --- a/libbb/bb_askpass.c +++ b/libbb/bb_askpass.c @@ -44,6 +44,7 @@ char *bb_askpass(int timeout, const char * prompt) static char passwd[PWD_BUFFER_SIZE]; tcgetattr(STDIN_FILENO, &old); + tcflush(STDIN_FILENO, TCIFLUSH); size = sizeof(passwd); ret = passwd; |