[5482] in Kerberos

home help back first fref pref prev next nref lref last post

Kerberos5 beta5 login.krb5 tty-handling bug

daemon@ATHENA.MIT.EDU (Jonathan Stone)
Tue Jul 11 16:31:45 1995

Date: Tue, 11 Jul 1995 13:19:03 -0700
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
To: kerberos@MIT.EDU


[[Previously sent to krb5-bugs but not the mailing-list/newsgroup]]

The MIT Kerberos telnet daemon has never worked properly at Stanford
DSG on Ultrix 4.2a (and, I think, Ultrix 4.1).  

Specifically, the pseudo-tty state for the server side a telnet
session ends up ``raw mode'' while login executes.  That is,
input is not echoed, carriage-return is not treated as a line
delimiter, newlines are not mapped to cr/nl on output, etc.

A cut-and-paste of an example login session (note staircasing of output
and lack of echo of username!) is:


    Connected to Pescadero.Stanford.EDU.
    Escape character is '^]'.
    
    
    ULTRIX (Pescadero.Stanford.EDU) (ttypb)
    
    login: Password: 
                     Login incorrect
                                    login: Connection closed by foreign host.


It turns out that appl/bsd/login.c is using TIOCLSET regardless
of whether or not it's configured to use termios or the BSD tty
interface. The following patch fixes that, at least for Ultrix.
(Replacing the ``#ifdef TIOCLSET''` with ``#ifndef POSIX_TERMIOS''
 would probably be cleaner; but I cant' test that on enough platforms.)



*** src/appl/bsd/login.c.DIST	Fri Apr 28 17:36:13 1995
--- src/appl/bsd/login.c	Thu May 18 20:32:20 1995
***************
*** 397,402 ****
--- 397,409 ----
  
  #if !defined(_AIX)
  	ioctlval = 0;
+ 
+ #ifdef ultrix
+ 	/* Ultrix 4.2a apparently resets the tty to ``raw mode''
+ 	 * when TIOCLSET is called.  So pretend we dont have it. */
+ #undef TIOCLSET
+ #endif
+ 
  #ifdef TIOCLSET
  	/* linux, sco don't have this line discipline interface */
  	(void)ioctl(0, TIOCLSET, (char *)&ioctlval);

home help back first fref pref prev next nref lref last post