From 56a11ce131b936e1709641001f84ca58f606ab83 Mon Sep 17 00:00:00 2001 From: Assar Westerlund Date: Mon, 20 Oct 1997 03:50:09 +0000 Subject: [PATCH] (krb5_prompter_posix): implement the case of unhidden prompts. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@3649 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/krb5/prompter_posix.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/krb5/prompter_posix.c b/lib/krb5/prompter_posix.c index e2226aee0..9bd96a433 100644 --- a/lib/krb5/prompter_posix.c +++ b/lib/krb5/prompter_posix.c @@ -59,7 +59,16 @@ krb5_prompter_posix (krb5_context context, 0)) return 1; } else { - abort (); + char *s = prompts[i].reply->data; + + fputs (prompts[i].prompt, stdout); + fflush (stdout); + if(fgets(prompts[i].reply->data, + prompts[i].reply->length, + stdin) == NULL) + return 1; + if(s[strlen(s) - 1] == '\n') + s[strlen(s) - 1] = '\0'; } } return 0;