NetBSD Problem Report #506

From gnats  Tue Oct  4 16:37:09 1994
Received: from cray-ymp.acm.stuorg.vt.edu (root@cray-ymp.acm.stuorg.vt.edu [128.173.43.251]) by sun-lamp.cs.berkeley.edu (8.6.9/8.6.9) with ESMTP id QAA04392 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Tue, 4 Oct 1994 16:37:09 -0700
Message-Id: <199410042338.TAA20684@cray-ymp.acm.stuorg.vt.edu>
Date: Tue, 4 Oct 1994 19:38:32 -0400
From: Allen Briggs <briggs@cray-ymp.acm.stuorg.vt.edu>
Reply-To: briggs@vt.edu
To: gnats-bugs@sun-lamp.cs.berkeley.edu
Subject: Problem with name lookup for utmp.
X-Send-Pr-Version: 3.2

>Number:         506
>Category:       bin
>Synopsis:       ut_host not always set to host.domain
>Confidential:   no
>Severity:       non-critical
>Priority:       high
>Responsible:    gnats-admin
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Oct 04 16:50:03 +0000 1994
>Closed-Date:    Mon Oct 10 00:01:59 +0000 1994
>Last-Modified:  
>Originator:     Allen Briggs
>Release:        1.0_BETA (Aug 1st binaries)
>Organization:
Virginia Tech
>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.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: briggs 
State-Changed-When: Sun Oct 9 17:01:59 PDT 1994 
State-Changed-Why:  
The report was incorrect (User Brain Damage). 
>Unformatted:

 It is definitely a problem that telnetd and rlogind act differently.  It
 has been suggested that rlogind and any other daemons that are recording
 information in ut_host be modified to follow telnetd's practice.  At the
 same time, any user-land programs that would make use of the information
 in ut_host be modified to map IP address to hostname like w(1) does.

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.