From owner-freebsd-bugs Sat Feb 22 08:01:52 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id IAA21003 for bugs-outgoing; Sat, 22 Feb 1997 08:01:52 -0800 (PST) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id IAA20970; Sat, 22 Feb 1997 08:01:48 -0800 (PST) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.3/8.6.9) id CAA08367; Sun, 23 Feb 1997 02:59:16 +1100 Date: Sun, 23 Feb 1997 02:59:16 +1100 From: Bruce Evans Message-Id: <199702221559.CAA08367@godzilla.zeta.org.au> To: j@uriah.heep.sax.de, mpp@freefall.freebsd.org Subject: Re: bin/1073 Cc: freebsd-bugs@freefall.freebsd.org, hsu@clinet.fi Sender: owner-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >> Verified that problem still exists in -current as of 2/21/97. > >It doesn't seem to be a FreeBSD problem. I've just connected to a >SunOS 5.5 machine, and it does everything fine except the telnetd on >SunOS turns off icanon, icrnl, opost, and onlcr. However, telnet -8 >from this very same SunOS to itself experiences the very same >behaviour, so if it should be considered a bug at all, then it's on >the SunOS side. This is probably related to FDIV's suite of PRs about telnet. A single `binary' flag is inadequate for handling 20-50 termios flags. I fixed one of the newline bugs locally, but no one seemed interested. You can attach this to a relevant PR. Bruce diff -c2 telnetd/state.c~ telnetd/state.c *** state.c~ Wed Jan 15 03:30:40 1997 --- state.c Wed Jan 15 03:30:50 1997 *************** *** 112,115 **** --- 112,150 ---- break; } + #ifdef LINEMODE + /* + * Handle some cases that would otherwise be botched. + */ + if (linemode) { + /* + * Convert CR to NL in the -ICANON ICRNL + * case. This case can also be fixed by + * changing isbinary() to fail if ICRNL + * is set. Then we never get here. This + * fix seems reasonable since we don't + * have pure binary if we're converting + * CR's. However, it breaks ISTRIP (by + * forcing -ISTRIP). + */ + if (c == '\r') { + if (tty_israw() && tty_iscrnl()) + c = '\n'; + *pfrontp++ = c; + break; + } + /* + * XXX missing: IGNCR, INLCR. These also + * stop binary mode from being pure, but + * checking them in isbinary() doesn't help. + * + * XXX broken: IEXTEN. Turning it off has + * no effect on the things that it is supposed + * to control. + * + * We don't really understand termio[s]. + */ + } + #endif + /* * We now map \r\n ==> \r for pragmatic reasons.