Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Oct 1995 14:20:57 -0400
From:      "Garrett A. Wollman" <wollman@lcs.mit.edu>
To:        Bill Fenner <fenner@parc.xerox.com>
Cc:        uhclem%nemesis@fw.ast.com (Frank Durda IV), freebsd-bugs@freefall.freebsd.org
Subject:   Re: bin/771: telnet - FDIV035 
Message-ID:  <9510101820.AA10316@halloran-eldar.lcs.mit.edu>
In-Reply-To: <95Oct10.090037pdt.177475@crevenia.parc.xerox.com>
References:  <199510100130.SAA00868@freefall.freebsd.org> <95Oct10.090037pdt.177475@crevenia.parc.xerox.com>

next in thread | previous in thread | raw e-mail | index | archive | help
<<On Tue, 10 Oct 1995 09:00:29 PDT, Bill Fenner <fenner@parc.xerox.com> said:

> Using a -stable sup'd on saturday, I can telnet to myself and duplicate
> Frank's problem #2 (related to control-D).  It doesn't happen when connecting
> from -stable to a SunOS 4.1.3 box.

I have now managed to reproduce this problem.  It seems to be a
fundamental incompatibility between the expectations of the shell and
the way TELNET's LINEMODE option works.

The problem is this: LINEMODE has to submodes in which it can
operate.  One of these is EDIT|TRAPSIG, and is equivalent to the tty
driver's ICANON mode.  The second is plain TRAPSIG, which works like
ISIG mode in the tty driver.  However, there is a subtle difference:
the tty driver's ISIG mode only interprets the VINTR [IP], VQUIT
[ABORT], and VSUSP [SUSPEND] characters.  However, LINEMODE's TRAPSIG
submode interprets all of the control characters, including (most
significantly for our purposes) VEOF [EOF].  This causes the shell to
get an end-of-file indication when you type ^D, rather than the ^D
character that it was expecting.

There are two possible fixes for this problem:

	1) Only use LINEMODE to implement ICANON.

	2) When switching between EDIT|TRAPSIG and plain TRAPSIG
modes (or between ICANON and ISIG or ISIG|IEXTEN in the equivalent TTY
driver terms), telnetd must negotiate to have those special characters
disabled which would not have been implemented by the TTY driver in
that mode.

I prefer option (2).  Unfortunately, I don't know Dave Borman's
current address to ask his opinion...

-GAWollman

--
Garrett A. Wollman   | Shashish is simple, it's discreet, it's brief. ... 
wollman@lcs.mit.edu  | Shashish is the bonding of hearts in spite of distance.
Opinions not those of| It is a bond more powerful than absence.  We like people
MIT, LCS, ANA, or NSA| who like Shashish.  - Claude McKenzie + Florent Vollant



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9510101820.AA10316>