[1510] in Kerberos-V5-bugs

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

bug in krb5.b5 (also krb5.b4) login.krb5

daemon@ATHENA.MIT.EDU (Jonathan Stone)
Mon Jul 3 16:23:23 1995

Date: Mon, 3 Jul 1995 13:22:40 -0700
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
To: krb5-bugs@MIT.EDU

[[I don't __think__ I sent this in before... If I did, apologies. ]]


src/appl/bsd/login.c calls TIOCLSET when it's using a POSIX
termios interface.   This loses on (old) Ultrix systems,
of which there seem to be many here.

This ___finally___ fixes the last of the ``staircasing'' bugs
reported against KRB5 rlogind/telnetd on Ultrix 4.2 going back to,
oh, at least krb5beta3, if I recall correctly.

In general, though, using TIOCLSET with termios _anywhere_ doesn't
seem right to me. TIOCLSET is clearly, nay, indubitably part of the
BSD (7th edition?) terminal interface, not termios or termio.

Surely the right thing to do is to _never_ do a TIOCLSET ioctl() when
POSIX_TERMIOS is defined.  TIOCLSET manipulates the 4.[23] BSD `local'
characters added by the ``BSD new'' line discipline.  Mixing BSD tty
and termio/termios calls seems neither portable nor robust. (Though it
_does_ appear to work on SunOS 4.1.x.)

(The comment that ``linx, sco  don't have this line discipline interface''
 should be a giveaway.  Presumably Linux doesn't have it because it's not
 part of the POSIX termios interface.  On systems where termio/termios
 is being used, surely a termio/termios call should be used to clear
 the  c_lflag!)


Is TIOCNXCL a potential problem? I can't find it in 1003.1-1988,
but I think it dates back to v7 and even Linux  has it; maybe I need
to get  an up-to-date 1003.1 spec.



*** 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