Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Dec 2008 16:34:26 GMT
From:      James Smallacombe <up@3.am>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/129483: the "w" has a "-n" switch that does not work.
Message-ID:  <200812071634.mB7GYQtp016159@www.freebsd.org>
Resent-Message-ID: <200812071640.mB7Ge106027298@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         129483
>Category:       misc
>Synopsis:       the "w" has a "-n" switch that does not work.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Dec 07 16:40:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     James Smallacombe
>Release:        6.3-STABLE
>Organization:
PlantageNet Internet, Ltd.
>Environment:
FreeBSD mx1.pil.net 6.3-STABLE FreeBSD 6.3-STABLE #0: Thu Apr 17 09:39:00 EDT 2008     root@mx1.pil.net:/usr/src/sys/i386/compile/MX1.SMP  i386
>Description:
the "w" utility does:

w -- display who is logged in and what they are doing

Unfortunately, the utility always resolves the logged in IP, which then gets truncated by the 16 character limit thusly:

USER             TTY      FROM              LOGIN@  IDLE WHAT
up               p0       pool-173-49-94-1 10:55AM     - w

This makes it impossible to distinguish the real IP the person is coming from, not to mention that it can easily be faked or useless info.  The man page for the utility shows this option:

     -n      Do not attempt to resolve network addresses (normally w inter-
             prets addresses and attempts to display them as names).

However, the output does not change at all.  I would think that this would be an easy fix and an important one, too.
>How-To-Repeat:
Type:

"w -n"
>Fix:
I am not a programmer, but simply stopping the utility from doing reverse lookups, at least when the "-n" switch is present should be pretty easy, I'd think.

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200812071634.mB7GYQtp016159>