diff options
-rw-r--r-- | CHANGELOG | 2 | ||||
-rw-r--r-- | libpam_misc/misc_conv.c | 4 |
2 files changed, 4 insertions, 2 deletions
@@ -65,6 +65,8 @@ BerliOS Bugs are marked with (BerliOS #XXXX). * pam_tally: test for NULL data before dereferencing them (t8m) * pam_unix: fix regression introduced in 0.78 - both NIS and local password should be changed if possible (t8m) +* misc_conv: flush input first then print the prompt - fixes problem + with expect scripts (t8m) 0.79: Thu Mar 31 16:48:45 CEST 2005 * pam_tally: added audit option (toady) diff --git a/libpam_misc/misc_conv.c b/libpam_misc/misc_conv.c index 56c65c0f..9bee5884 100644 --- a/libpam_misc/misc_conv.c +++ b/libpam_misc/misc_conv.c @@ -170,12 +170,12 @@ static int read_string(int echo, const char *prompt, char **retstr) /* reading the line */ while (delay >= 0) { - - fprintf(stderr, "%s", prompt); /* this may, or may not set echo off -- drop pending input */ if (have_term) (void) tcsetattr(STDIN_FILENO, TCSAFLUSH, &term_tmp); + fprintf(stderr, "%s", prompt); + if ( delay > 0 && set_alarm(delay, &old_sig) ) { D(("<failed to set alarm>")); break; |