aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--loginutils/login.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/loginutils/login.c b/loginutils/login.c
index ef27c3b4a..c1e0c7699 100644
--- a/loginutils/login.c
+++ b/loginutils/login.c
@@ -305,6 +305,10 @@ int login_main(int argc, char **argv)
305 openlog(applet_name, LOG_PID | LOG_CONS | LOG_NOWAIT, LOG_AUTH); 305 openlog(applet_name, LOG_PID | LOG_CONS | LOG_NOWAIT, LOG_AUTH);
306 306
307 while (1) { 307 while (1) {
308
309 /* flush away any type-ahead (as getty does) */
310 (void) ioctl(0, TCFLSH, TCIFLUSH);
311
308 if (!username[0]) 312 if (!username[0])
309 get_username_or_die(username, sizeof(username)); 313 get_username_or_die(username, sizeof(username));
310 314