Subject: Re: telnet problem
To: Ken Hornstein <kenh@cmf.nrl.navy.mil>
From: Bill Studenmund <skippy@macro.stanford.edu>
List: current-users
Date: 06/29/1998 14:41:00
On Mon, 29 Jun 1998, Ken Hornstein wrote:

> >Basically, it seems that the <CR> <0> to <CR> conversion, which is
> >supposed to be happening in telnetd, isn't. Or else it's getting
> >negotiated differently.

Thanks! This is getting in the right direction!

> Okay, some of is starting to become clear.  This happens inside of
> src/libexec/telnetd/state.c, in telrcv():
> 
>                 case TS_CR:
>                         state = TS_DATA;
>                         /* Strip off \n or \0 after a \r */
>                         if ((c == 0) || (c == '\n')) {
>                                 break;
>                         }
> 
> Also, a bit farther down:
> 
>                         if ((c == '\r') && his_state_is_wont(TELOPT_BINARY)) {
>                                 int nc = *netip;
> #ifdef  LINEMODE
>                                 /*
>                                  * If we are operating in linemode,
>                                  * convert to local end-of-line.
>                                  */
>                                 if (linemode && (ncc > 0) && (('\n' == nc) ||
>                                          ((0 == nc) && tty_iscrnl())) ) {
>                                         netip++; ncc--;
>                                         c = '\n';
>                                 } else
> #endif
>                                 {
>                                         state = TS_CR;
>                                 }
> 
> So, I would guess this is a linemode issue.  Maybe the Mac is negotiating
> binary mode by mistake?

I think the mac is negotiating binary mode. I have -D dumps from login
attempts both from the mac and from other unix boxes. Hmm. I'll see if the
other boxes support -D dumps, and try logging into one of them from the
mac.

If you want, I'll send them. But I'll avoid spamming the list. :-)

> This starts to get into the black art of telnet option negotiation.
> You might try playing with different options on telnetd for linemode
> negotiation.  Or perhaps there are some related options on the client?
> 
> Alternatively, you could always get a new Mac telnet client :-/

This client is the one which Stanford pached to do Kerberos. It'll forward
your tickets (using kftgt I think) for you.

Plus, for 1.2, it worked with NO change to the telnet client!

Take care,

Bill