From de99db3360cabbfb666d95591837813b4aec3b9d Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Wed, 29 Nov 2000 18:41:13 +0000 Subject: Don't print an extra newline after reading passphrase if echo was not turned off since we already printed one from the user. --- lib/libc/gen/readpassphrase.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libc/gen/readpassphrase.c b/lib/libc/gen/readpassphrase.c index 8804dd4e8ad..c77758e85ee 100644 --- a/lib/libc/gen/readpassphrase.c +++ b/lib/libc/gen/readpassphrase.c @@ -26,7 +26,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: readpassphrase.c,v 1.1 2000/11/21 00:48:37 millert Exp $"; +static char rcsid[] = "$OpenBSD: readpassphrase.c,v 1.2 2000/11/29 18:41:12 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include @@ -107,8 +107,8 @@ readpassphrase(prompt, buf, bufsiz, flags) } } *p = '\0'; - (void)write(output, "\n", 1); if (echo) { + (void)write(output, "\n", 1); term.c_lflag |= ECHO; (void)tcsetattr(input, TCSAFLUSH|TCSASOFT, &term); } -- cgit v1.2.3