Subject: bin/4425: "telnet -E" doesn't ignore all characters
To: None <gnats-bugs@gnats.netbsd.org>
From: Michael Eriksson T/D <Michael.Eriksson@era-t.ericsson.se>
List: netbsd-bugs
Date: 11/04/1997 08:41:23
>Number: 4425
>Category: bin
>Synopsis: "telnet -E" doesn't ignore all characters
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people (Utility Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Nov 3 23:50:04 1997
>Last-Modified:
>Originator:
>Organization:
Ericsson Radio Systems AB
>Release: NetBSD-1.3_ALPHA from 971027
>Environment:
System: NetBSD abro 1.3_ALPHA NetBSD 1.3_ALPHA (ABRO) #0: Fri Oct 31 13:05:42 MET 1997 eramer@abro:/usr/src/sys/arch/sparc/compile/ABRO sparc
>Description:
"telnet -E" is supposed to turn off the escape character handling. In
spite of this, \377 (M-DEL) will be recognised as an escape character.
>How-To-Repeat:
% telnet -E -8 localhost
<Send \377 and see telnet go into command mode>
>Fix:
This fix is for /usr/src/usr.bin/telnet. Probably,
/usr/src/domestic/usr.bin/telnet will have to be patched as well, but
what do I know? :-)
*** telnet.c.orig Tue Jun 3 13:26:09 1997
--- telnet.c Sun Nov 2 20:30:17 1997
***************
*** 1991,1997 ****
}
if ((sc == '\n') || (sc == '\r'))
bol = 1;
! } else if (sc == escape) {
/*
* Double escape is a pass through of a single escape character.
*/
--- 1991,1997 ----
}
if ((sc == '\n') || (sc == '\r'))
bol = 1;
! } else if (sc == escape && escape != _POSIX_VDISABLE) {
/*
* Double escape is a pass through of a single escape character.
*/
>Audit-Trail:
>Unformatted: