diff options
author | uhclem <uhclem@FreeBSD.org> | 1997-10-08 03:10:32 +0000 |
---|---|---|
committer | uhclem <uhclem@FreeBSD.org> | 1997-10-08 03:10:32 +0000 |
commit | a278a3be1699411f887125d58dafc5acb30a146f (patch) | |
tree | c8672e5d21b5566fca73014134412b49a10439a9 /libexec/telnetd | |
parent | aa0e9691a0bfe95ed60368820d85c1c76a293784 (diff) | |
download | FreeBSD-src-a278a3be1699411f887125d58dafc5acb30a146f.zip FreeBSD-src-a278a3be1699411f887125d58dafc5acb30a146f.tar.gz |
PR: bin/771 and bin/1037 are resolved by this change
This change changes the default handling of linemode so that older and/or
stupider telnet clients can still get wakeup characters like <ESC> and
<CTRL>D to work correctly multiple times on the same line, as in csh
"set filec" operations. It also causes CR and LF characters to be read by
apps in certain terminal modes consistently, as opposed to returning
CR sometimes and LF sometimes, which broke existing apps. The change
was shown to fix the problem demonstrated in the FreeBSD telnet client,
along with the telnet client in Solaris, SCO, Windows '95 & NT, DEC OSF,
NCSA, and others.
A similar change will be incorporated in the crypto version of telnetd.
This resolves bin/771 and bin/1037.
Diffstat (limited to 'libexec/telnetd')
-rw-r--r-- | libexec/telnetd/telnetd.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/libexec/telnetd/telnetd.c b/libexec/telnetd/telnetd.c index 8aafdbd..52eab70 100644 --- a/libexec/telnetd/telnetd.c +++ b/libexec/telnetd/telnetd.c @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: telnetd.c,v 1.10 1997/02/22 14:22:31 peter Exp $ + * $Id: telnetd.c,v 1.11 1997/03/28 15:48:18 imp Exp $ */ #ifndef lint @@ -179,6 +179,22 @@ main(argc, argv) progname = *argv; + /* + * This initialization causes linemode to default to a configuration + * that works on all telnet clients, including the FreeBSD client. + * This is not quite the same as the telnet client issuing a "mode + * character" command, but has most of the same benefits, and is + * preferable since some clients (like usofts) don't have the + * mode character command anyway and linemode breaks things. + * The most notable symptom of fix is that csh "set filec" operations + * like <ESC> (filename completion) and ^D (choices) keys now work + * in telnet sessions and can be used more than once on the same line. + * CR/LF handling is also corrected in some termio modes. This + * change resolves problem reports bin/771 and bin/1037. + */ + + linemode=1; /*Default to mode that works on bulk of clients*/ + #ifdef CRAY /* * Get number of pty's before trying to process options, |