Subject: bin/9107: telnetd can't read password from some clients
To: None <gnats-bugs@gnats.netbsd.org>
From: None <perseant@hitl.washington.edu>
List: netbsd-bugs
Date: 01/03/2000 10:31:07
>Number:         9107
>Category:       bin
>Synopsis:       telnetd switches off CRMOD when ECHO is turned off
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jan  3 10:30:00 2000
>Last-Modified:
>Originator:     
>Organization:
------------------------------------------------------------------------
Konrad Schroder          http://www.hitl.washington.edu/people/perseant/
System Administrator                        perseant@hitl.washington.edu
Human Interface Technology Lab                    Voice: +1.206.616.1478
Box 352142, University of Washington, 98195, USA    FAX: +1.206.543.5380
>Release:        2000-01-03
>Environment:
	
System: NetBSD porter 1.4P NetBSD 1.4P (PORTER) #19: Mon Nov 29 15:25:17 PST 1999 perseant@old-porter:/usr/src/sys/arch/alpha/compile/PORTER alpha


>Description:
	When the terminal is set to noecho mode, telnetd also turns off
	incoming newline translation.  This causes some users not to be able
	to log in unless they know to type control-J after their password
	instead of return, which is ... not ideal.
>How-To-Repeat:
	Use NCSA Telnet for Mac, and telnet into a NetBSD box.  Notice
	that it will not take your password.
>Fix:
The following seems to take care of the problem, however I'm not sure what
else might break because of this (does any app that turns echo off care?)

So I'd like some feedback before I commit this.

Index: sys_term.c
===================================================================
RCS file: /cvsroot/basesrc/libexec/telnetd/sys_term.c,v
retrieving revision 1.18
diff -u -r1.18 sys_term.c
--- sys_term.c	1999/12/31 12:42:35	1.18
+++ sys_term.c	2000/01/03 18:13:53
@@ -729,9 +729,9 @@
 {
 #ifndef	USE_TERMIO
 	if (on)
-		termbuf.sg.sg_flags |= ECHO|CRMOD;
+		termbuf.sg.sg_flags |= ECHO;
 	else
-		termbuf.sg.sg_flags &= ~(ECHO|CRMOD);
+		termbuf.sg.sg_flags &= ~(ECHO);
 #else
 	if (on)
 		termbuf.c_lflag |= ECHO;
>Audit-Trail:
>Unformatted: