[3060] in Kerberos-V5-bugs
pty/706: Problem with login.krb5 setting ttyname in utmp under irix
daemon@ATHENA.MIT.EDU (sentner@digex.net)
Fri Mar 26 16:47:07 1999
Resent-From: gnats@rt-11.MIT.EDU (GNATS Management)
Resent-To: hartmans@MIT.EDU
Resent-Reply-To: krb5-bugs@MIT.EDU, sentner@digex.net
Date: Fri, 26 Mar 1999 16:46:19 -0500 (EST)
From: sentner@digex.net
Reply-To: sentner@digex.net
To: krb5-bugs@MIT.EDU
>Number: 706
>Category: pty
>Synopsis: utmp ttyname problem under irix
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: hartmans
>State: open
>Class: sw-bug
>Submitter-Id: unknown
>Arrival-Date: Fri Mar 26 16:47:01 EST 1999
>Last-Modified:
>Originator: Eric J. Sentner
>Organization:
Intermedia Communications/DIGEX, Beltsville, MD USA
>Release: krb5-1.0.5
>Environment:
Multiple machines, Irix 6.x, compiled with MIPSpro C
System: IRIX64 mickey 6.5 11051731 IP27
>Description:
When compiled on an SGI running irix, there is a problem with the
way that the login program sets the utmp entry. Because it adds the 'kl' to
the beginning of the tty name, irix does not return the correct name for
the 'logname' command. This causes problems with some programs which check
for your logname. I found the problem when I tried changing the cache
settings on a RAID but it told me I was not allowed (even though I was logged
in as root). 'logname' showed me logged in as a normal user who'd previously
been on the same tty using ssh instead of rlogin. This causes other wierd
problems.
>How-To-Repeat:
Compile krb5 under irix (I used 6.5). Log into the machine using a
non-kerberized telnetd or sshd as some user. Run 'who' to find out your tty
name. Run 'whoami' and 'logname' and the results should match. Then log out,
and log back in through a kerberized telnetd or klogind as a _different_ user.
Run 'who' again to make sure you're on the same tty. If so, run 'whoami'
then 'logname' again, and the results should not match. The logname output
will be the same as the previous user. The reason is that the system reads
utmp and uses the real tty name (not the kltty) entry when looking up your
username from utmp.
>Fix:
There is only one line to change in 'src/util/pty/update_utmp.c'.
There appears to have been a problem with hpux machines as well because
there is an "#ifdef __hpux" statement in there which works around this
problem by just copying the ttyname instead of adding the 'kl' to the
beginning. Just changing that line to "#if defined(__hpux) || defined(__sgi)"
solved the problem.
>Audit-Trail:
>Unformatted: