From 13ca0adf2070a42ce7a54e44bd739f4b24914ed0 Mon Sep 17 00:00:00 2001 From: Tom Yu Date: Mon, 5 Feb 2001 22:01:23 +0000 Subject: [PATCH] * prompter.c (krb5_prompter_posix): Fix up terminal modes if we're interrupted. [reported by Booker Bense] git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12993 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/os/ChangeLog | 5 +++++ src/lib/krb5/os/prompter.c | 12 ++++++++++++ 2 files changed, 17 insertions(+) diff --git a/src/lib/krb5/os/ChangeLog b/src/lib/krb5/os/ChangeLog index d041fb64e..92b42a6b2 100644 --- a/src/lib/krb5/os/ChangeLog +++ b/src/lib/krb5/os/ChangeLog @@ -1,3 +1,8 @@ +2001-02-05 Tom Yu + + * prompter.c (krb5_prompter_posix): Fix up terminal modes if we're + interrupted. [reported by Booker Bense] + 2000-12-18 Ken Raeburn * Makefile.in (LCLINT, LCLINTOPTS): New variables. diff --git a/src/lib/krb5/os/prompter.c b/src/lib/krb5/os/prompter.c index d61c0b582..2078d1e63 100644 --- a/src/lib/krb5/os/prompter.c +++ b/src/lib/krb5/os/prompter.c @@ -117,6 +117,18 @@ krb5_prompter_posix(krb5_context context, cleanup: (void) signal(SIGINT, ointrfunc); +#ifndef ECHO_PASSWORD + if (i < num_prompts) { + if (prompts[i].hidden) { + (void)putchar('\n'); + if (isatty(fd) == 1) { + if ((tcsetattr(fd, TCSANOW, &save_control) == -1 + && errcode == 0)) + return errno; + } + } + } +#endif return(errcode); } #else /* MSDOS */ -- 2.26.2