summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley2005-12-12 07:02:15 +0000
committerRob Landley2005-12-12 07:02:15 +0000
commite422af6bcb15a92b7eba3da5b5cf1bcc8c0b5f5c (patch)
treead7641253fcdbbf74c534d35b227ac5ea347a733
parenta75c180e538bb8adc0bb280c61dd933fd8d3e56d (diff)
downloadbusybox-e422af6bcb15a92b7eba3da5b5cf1bcc8c0b5f5c.zip
busybox-e422af6bcb15a92b7eba3da5b5cf1bcc8c0b5f5c.tar.gz
Flush input when prompting for a password (bug 373).
-rw-r--r--libbb/bb_askpass.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libbb/bb_askpass.c b/libbb/bb_askpass.c
index 1ae1520..42ccd66 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;