Relevant BUGIDs: Red Hat bz #150537

Purpose of commit: bugfix

Commit summary:
---------------
misc_conv: flush input first then print the prompt - fixes problem
with expect scripts
This commit is contained in:
Tomas Mraz 2005-04-08 15:08:16 +00:00
parent b484271729
commit e1f17d96a0
2 changed files with 4 additions and 2 deletions

View File

@ -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)

View File

@ -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;