misc/129483: the "w" has a "-n" switch that does not work.

matteo at FreeBSD.org matteo at FreeBSD.org
Sun Dec 7 09:36:48 PST 2008


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


More information about the freebsd-bugs mailing list