From owner-freebsd-bugs Sat Oct 7 20:40:05 1995 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id UAA14627 for bugs-outgoing; Sat, 7 Oct 1995 20:40:05 -0700 Received: (from gnats@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id UAA14621 ; Sat, 7 Oct 1995 20:40:02 -0700 Resent-Date: Sat, 7 Oct 1995 20:40:02 -0700 Resent-Message-Id: <199510080340.UAA14621@freefall.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@freefall.FreeBSD.org, "Received:from who.cdrom.com (who.cdrom.com [192.216.222.3]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id UAA14312 for" ; Sat, 7.Oct.1995.20:35:05.-0700 Received: from relay2.UU.NET (relay2.UU.NET [192.48.96.7]) by who.cdrom.com (8.6.12/8.6.11) with ESMTP id UAA09063 for ; Sat, 7 Oct 1995 20:34:24 -0700 Received: from ast.com by relay2.UU.NET with SMTP id QQzkmw17490; Sat, 7 Oct 1995 23:33:45 -0400 Received: from trsvax.fw.ast.com (fw.ast.com) by ast.com with SMTP id AA10855 (5.67b/IDA-1.5 for ); Sat, 7 Oct 1995 20:35:11 -0700 Received: by trsvax.fw.ast.com (/\=-/\ Smail3.1.18.1 #18.1) id ; Sat, 7 Oct 95 22:33 CDT Received: by nemesis.lonestar.org (Smail3.1.27.1 #19) id m0t1mR0-000IvNC; Sat, 7 Oct 95 22:29 WET DST Message-Id: Date: Sat, 7 Oct 95 22:29 WET DST From: uhclem%nemesis@fw.ast.com To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: bin/771: telnet character mode not set and broken when set - FDIV034 Sender: owner-bugs@freebsd.org Precedence: bulk >Number: 771 >Category: bin >Synopsis: telnet character mode not set and broken when set - FDIV034 >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Oct 7 20:40:01 PDT 1995 >Last-Modified: >Originator: Frank Durda IV >Organization: >Release: FreeBSD 2.1.0-951005-SNAP >Environment: Generic 2.1.0 951005 SNAP running on ethernet network with FreeBSD 2.0.5, 1.1.5.1, SCO UNIX and SUN OS systems. (The other systems needed only for comparative purposes.) >Description: Three issues: 1. Between 1.1.5.1 and 2.0.5, telnet changed to default to non-raw operating state to line-mode instead of character-at-a-time mode. For compatibility with existing systems reasons, this change seems like a bad idea. 2. Between 2.0.5 and 2.1.0-951005, telnet changed so that even if you specify "mode character" to get character-at-a-time mode, the EOF character (^D) is not transmitted when it should be. 3. When the remote system runs an application that enters raw mode, the telnet session no longer handles it properly and the [Enter] key is not detected as such by the remote application. All three items worked correctly in FreeBSD 1.1.5.1. >How-To-Repeat: (Examples are simplified and not the sole reproduction method - OK?) Item 1 Telnet to a system from 2.1.0 or 2.0.5 on a system where you can view the XMIT light on the network card. at the csh prompt, Type "ABCDEFGHIJK" while watching the light. Note that the transmit light remains dark until you press [ENTER]. If you repeat the test under 1.1.5.1, each character causes the XMIT light to flash, demonstrating that character-at-a-time is active. All keys are therefore "live". (See Item 2.) You can force the telnet session into the character at a time mode in 2.0.5/2.1.0 by typing the telnet escape character, and typing "mode character", but it is broken in 2.1.0. (See Item 2.) However, was there a reason for changing the default action? Item 2 On FreeBSD 2.1.0, login to a stock account using csh from the CONSOLE. Type: ls /bin/[CTRL-D] Note that it displays the contents of the bin directory as expected. Now telnet into 2.1.0 (from 2.1.0) and login to the same account. Type: ls /bin/[CTRL-D] Note that the directory is not displayed, only a CTRL-D. Now, press [ENTER] a few times and then type the telnet escape character Now type: mode character[ENTER] to force the telnet session into character-at-a-time mode. Now type: ls /bin/[CTRL-D] Note that despite putting the telnet in character-at-a-time mode, the [CTRL-D] was still not sent when the key was pressed. This can verified by monitoring the XMIT light on the network adapter. If you press [CTRL-D] a second time, it is treated as a [CTRL-D] at the start of a line (a line-mode action, not a character-at-a-time action), and this [CTRL-D] is actually sent to the remote system. The first [CTRL-D] apparently is thrown away. If you repeat this test under 2.0.5, you find that the first [CTRL-D] is transmitted as expected for character-at-a-time mode, so this was broken since 2.0.5. Item 3 If you telnet to any system from a 2.1.0 system and the application on the remote end enters RAW mode, if you press [ENTER], the remote program does not see the newline character. Depending on the application, either nothing happens or the bell beeps, etc. Even if you explicitly set "character-at-a-time" mode (which should have been done automatically by entering raw mode) after entering the raw-mode remote application, [ENTER] is still not accepted by the applications. However, CTRL-J is accepted. For this problem, the remote system can be 2.1.0, 2.0.5, 1.1.5.1, SCO UNIX, or SUN OS, and possibly others. The applications include commercial, "all keys active", binary-only applications that cannot be operated from 2.0.5/2.1.0, but work fine when accessed from 1.1.5.1, SCO or SUN systems. For whoever investigates this, I can provide a sample application that demonstrates the problem. I have permission from the author to do this to help debug the problem, but I can't distribute it to a larger audience. Also, I can't distribute any of the other applications that demonstrate the problem since they are copyrighted commercial products, nearly all running on SCO UNIX or SUN OS systems. >Fix: For issue #1, change code to default to 'mode character'. Alternately, make user set this command every time telnet is invoked. Look at code as it stood in 1.1.5.1. For issues #2 and #3, until the code is fixed, the user must continue using a system other than 2.0.5 and 2.1.0. Actual change not known. Look at code as it stood in 1.1.5.1. I would prefer a code fix to give back the effortless functionality we had in 1.1.5.1. *END* >Audit-Trail: >Unformatted: