Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Feb 1997 02:59:16 +1100
From:      Bruce Evans <bde@zeta.org.au>
To:        j@uriah.heep.sax.de, mpp@freefall.freebsd.org
Cc:        freebsd-bugs@freefall.freebsd.org, hsu@clinet.fi
Subject:   Re: bin/1073
Message-ID:  <199702221559.CAA08367@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>>  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.



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