From owner-freebsd-bugs@FreeBSD.ORG Thu Jun 24 19:10:30 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9D3D716A4CE for ; Thu, 24 Jun 2004 19:10:30 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9609D43D5D for ; Thu, 24 Jun 2004 19:10:30 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id i5OJAOeA017886 for ; Thu, 24 Jun 2004 19:10:24 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i5OJAO28017885; Thu, 24 Jun 2004 19:10:24 GMT (envelope-from gnats) Date: Thu, 24 Jun 2004 19:10:24 GMT Message-Id: <200406241910.i5OJAO28017885@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Giorgos Keramidas Subject: Re: misc/68134: 'invalid hostname' displayed in w/who output X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Giorgos Keramidas List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Jun 2004 19:10:30 -0000 The following reply was made to PR misc/68134; it has been noted by GNATS. From: Giorgos Keramidas To: Jonas Nagel Cc: bug-followup@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 wrote: > System: > FreeBSD www.zerouptime.ch 4.10-RELEASE FreeBSD 4.10-RELEASE #0: > Sat Jun 12 17:49:50 CEST 2004 root@www.zerouptime.ch:/usr/obj/usr/src/sys/WWW i386 > >Description: > > fireball@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@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