misc/68134: 'invalid hostname' displayed in w/who output
Giorgos Keramidas
keramida at ceid.upatras.gr
Thu Jun 24 19:10:30 GMT 2004
The following reply was made to PR misc/68134; it has been noted by GNATS.
From: Giorgos Keramidas <keramida at ceid.upatras.gr>
To: Jonas Nagel <fireball at zerouptime.ch>
Cc: bug-followup at freebsd.org
Subject: Re: misc/68134: 'invalid hostname' displayed in w/who output
Date: Thu, 24 Jun 2004 21:09:03 +0300
On 2004-06-20 03:58, Jonas Nagel <fireball at zerouptime.ch> wrote:
> System:
> FreeBSD www.zerouptime.ch 4.10-RELEASE FreeBSD 4.10-RELEASE #0:
> Sat Jun 12 17:49:50 CEST 2004 root at www.zerouptime.ch:/usr/obj/usr/src/sys/WWW i386
> >Description:
>
> fireball at www[~]$ w
> 3:50AM up 6 days, 23:05, 2 users, load averages: 0.26, 0.06, 0.02
> USER TTY FROM LOGIN@ IDLE WHAT
> fireball p0 invalid hostname Sat04AM - vi /tmp/pf.SSE0doNI
> fireball p1 invalid hostname 3:50AM - w
> fireball at www[~]$ who
> fireball ttyp0 Jun 19 04:07 (invalid hostname)
> fireball ttyp1 Jun 20 03:50 (invalid hostname)
>
> I actually do have an IP of 192.168.0.xxx. Maybe is to mention that I
> am accessing the box (in the DMZ) through a NAT (ipnat), and IMO it
> should be displaying the IP if it is unable to resolve the hostname
> correctly.
I think it's probably revision 1.48 of src/usr.bin/w/w.c that you want.
: revision 1.48
: date: 2001/07/26 19:20:13; author: brian; state: Exp; lines: +40 -41
: When -n is specified, don't attempt to turn hostnames found in utmp
: into addresses as we have no idea what address family they belong to.
:
: When -n is not specified, resolve IPv6 as well as IPv4 addresses found
: in the host field of utmp. Use realhostname_sa() to resolve addresses
: (the old code was wrong).
:
: Rename ``x'' to ``x_suffix'' to avoid confusion.
:
: Hard code the host column width to 16 (against the imminent increase
: of UT_HOSTSIZE in utmp.h).
I don't have a 4.X installation nearby to test this & merge it though :(
- Giorgos
More information about the freebsd-bugs
mailing list