Subject: bin/506: Problem with name lookup for utmp.
To: None <gnats-admin@sun-lamp.cs.berkeley.edu>
From: Allen Briggs <briggs@cray-ymp.acm.stuorg.vt.edu>
List: netbsd-bugs
Date: 10/04/1994 16:50:04
>Number:         506
>Category:       bin
>Synopsis:       ut_host not always set to host.domain
>Confidential:   no
>Severity:       non-critical
>Priority:       high
>Responsible:    gnats-admin (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Oct  4 16:50:03 1994
>Originator:     Allen Briggs
>Organization:
Virginia Tech
>Release:        1.0_BETA (Aug 1st binaries)
>Environment:
	
System: NetBSD cray-ymp.acm.stuorg.vt.edu 1.0_BETA NetBSD 1.0_BETA (CRAY) #0: Sat Oct 1 20:22:53 EDT 1994 briggs@cray-ymp.acm.stuorg.vt.edu:/usr/src/sys/arch/i386/compile/CRAY i386


>Description:
	The ut_host field of the utmp structure is not always set
correctly.  On this machine, for instance, w and who report:

 7:32PM  up 1 day,  4:37, 4 users, load averages: 0.04, 0.06, 0.01
USER    TTY FROM              LOGIN@  ...
xxxxxxxx p0 asm4-3.cns.vt.ed  7:15PM  ...
xxxxxxxx p1 cs500-4.cns.vt.e  7:25PM  ...
xxxxxxxx p2 roander3.async.v  7:22PM  ...
briggs   p3 puma.bevd.blacks  6:43PM  ...

xxx      ttyp0   Oct  4 19:15	(128.173.16.4)
xxxxxxx  ttyp1   Oct  4 19:25	(128.173.24.8)
xxxxxxxx ttyp2   Oct  4 19:22	(128.173.151.61)
briggs   ttyp3   Oct  4 18:43	(puma.bevd.blacks)

Note that, with the exception of puma.bevd.blacksburg.va.us, the hosts
listed by who(1) are IP numbers.  There does not appear to be a logical
pattern for which IP numbers are looked up.  As far as I can tell from
the code, the same process is used in login(1) and w(1) to map IP to
hostname.  The only difference is that w(1) explicitly uses AF_INET.

>How-To-Repeat:
	See above.
>Fix:
	None known.
>Audit-Trail:
>Unformatted: