summaryrefslogtreecommitdiff
path: root/libpam_misc
diff options
context:
space:
mode:
authorTomas Mraz <tm@t8m.info>2005-04-08 15:08:16 +0000
committerTomas Mraz <tm@t8m.info>2005-04-08 15:08:16 +0000
commite1f17d96a0a058d5bb777cc05975ae39f9461174 (patch)
tree765ad482fb85a9bd120e50485306147286437a19 /libpam_misc
parentb484271729ebfc86cee8ec7386e0ac11b111c188 (diff)
downloadlinux-pam-git-e1f17d96a0a058d5bb777cc05975ae39f9461174.tar.gz
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
Diffstat (limited to 'libpam_misc')
-rw-r--r--libpam_misc/misc_conv.c4
1 files changed, 2 insertions, 2 deletions
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;