Module Name:    src
Committed By:   christos
Date:           Mon Jun 16 16:29:30 UTC 2014

Modified Files:
        src/lib/libc/gen: getpass.c

Log Message:
Recognize CR as end of line too. the telnet client passes that to us instead
of linefeed.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/lib/libc/gen/getpass.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/gen/getpass.c
diff -u src/lib/libc/gen/getpass.c:1.27 src/lib/libc/gen/getpass.c:1.28
--- src/lib/libc/gen/getpass.c:1.27	Sat May 26 15:34:16 2012
+++ src/lib/libc/gen/getpass.c	Mon Jun 16 12:29:30 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: getpass.c,v 1.27 2012/05/26 19:34:16 christos Exp $	*/
+/*	$NetBSD: getpass.c,v 1.28 2014/06/16 16:29:30 christos Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: getpass.c,v 1.27 2012/05/26 19:34:16 christos Exp $");
+__RCSID("$NetBSD: getpass.c,v 1.28 2014/06/16 16:29:30 christos Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include "namespace.h"
@@ -245,7 +245,7 @@ getpassfd(const char *prompt, char *buf,
 		}
 
 		/* End of line */
-		if (c == C(VEOL, CTRL('j')) || c == C(VEOL2, CTRL('l')))
+		if (c == C(VEOL, CTRL('j')) || c == C(VEOL2, CTRL('m')))
 			c = '\0';
 add:
 		if (l >= len) {

Reply via email to