diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2000-11-29 18:41:13 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2000-11-29 18:41:13 +0000 |
commit | de99db3360cabbfb666d95591837813b4aec3b9d (patch) | |
tree | 66575612237bd825ed9ec19fc8094cd06914bddd /lib | |
parent | 60e344af263917e070197a26ab40c37b779e41e7 (diff) |
Don't print an extra newline after reading passphrase if echo was not
turned off since we already printed one from the user.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/gen/readpassphrase.c | 4 |
1 files 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 <ctype.h> @@ -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); } |