From owner-freebsd-bugs@FreeBSD.ORG Sun Dec 7 17:36:48 2008 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D61C106567B; Sun, 7 Dec 2008 17:36:48 +0000 (UTC) (envelope-from matteo@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 3D61E8FC0C; Sun, 7 Dec 2008 17:36:48 +0000 (UTC) (envelope-from matteo@FreeBSD.org) Received: from freefall.freebsd.org (matteo@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id mB7Ham8l083717; Sun, 7 Dec 2008 17:36:48 GMT (envelope-from matteo@freefall.freebsd.org) Received: (from matteo@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id mB7HamGE083713; Sun, 7 Dec 2008 17:36:48 GMT (envelope-from matteo) Date: Sun, 7 Dec 2008 17:36:48 GMT Message-Id: <200812071736.mB7HamGE083713@freefall.freebsd.org> To: up@3.am, matteo@FreeBSD.org, freebsd-bugs@FreeBSD.org From: matteo@FreeBSD.org Cc: Subject: Re: misc/129483: the "w" has a "-n" switch that does not work. X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Dec 2008 17:36:48 -0000 Synopsis: the "w" has a "-n" switch that does not work. State-Changed-From-To: open->closed State-Changed-By: matteo State-Changed-When: Dom 7 Dic 2008 17:26:58 UTC State-Changed-Why: This is not a bug in w. The FROM field comes from the utmp record for the login. The '-n' flag of w does the following: 1) if the utmp record contains a name, just print the name 2) if the utmp record contains an IP address, just print the address. The rationale behind 1) is that: a) which address should it print if there is more than one address for the name? b) what family should be used if there is both one or more IPv4 addresses and one or more IPv6 addresses? c) What if the utmp record contains a name but the IP address of the host from where the user logged in has changed between the moment he logged in and the moment "w -n" is executed? We are going to show a non correct information if we try to resolve the name to an address. I may agree that the man page need a better explaination of what -n does, but "-n" does not mean:"show me the IP addresses". Best regards http://www.freebsd.org/cgi/query-pr.cgi?pr=129483