mirror of
https://github.com/openssh/openssh-portable.git
synced 2026-11-06 05:16:43 +00:00
another readpassphrase() fix from OpenBSD libc
revision 1.32 date: 2026/10/15 16:40:50; author: millert; state: Exp; lines: +2 -2; commitid: PeYLMhPn3x9iWE37; Don't print newline after reading password if interrupted by signal. Avoids an extra newline when the user presses ^C or ^\ at the password prompt. OK deraadt@
This commit is contained in:
1 file changed
+2
-2
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: readpassphrase.c,v 1.31 2026/10/15 05:55:06 djm Exp $ */
|
||||
/* $OpenBSD: readpassphrase.c,v 1.32 2026/10/15 16:40:50 millert Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2000-2002, 2007, 2010
|
||||
@@ -162,7 +162,7 @@ restart:
|
||||
}
|
||||
*p = '\0';
|
||||
save_errno = errno;
|
||||
if (!(term.c_lflag & ECHO))
|
||||
if (!(term.c_lflag & ECHO) && !(nr == -1 && errno == EINTR))
|
||||
(void)write(output, "\n", 1);
|
||||
|
||||
/* Restore old terminal settings and signals. */
|
||||
|
||||
Reference in new issue
Block a user