w and who can't display bare IPv6 source addresses
On a FreeBSD 9.2 system, it looks like =91w=92 and =91who=92 have a collect=
ion of bugs that conspire to prevent the display of a complete IPv6 address=
.. I=92m wondering if there are known workarounds for this, and whether peo=
ple think this should be one big PR or not=85
First off, =91w -n=92 is ignored in all cases (this is true for v4 and v6):
> w -n
9:38PM up 106 days, 22:23, 2 users, load averages: 0.00, 0.00, 0.00
USER TTY FROM LOGIN@ IDLE WHAT
matt pts/0 2001:4900:1044:0:2808:f1 9:38PM - -tcsh (tcsh)
matt pts/1 kaywinnit.conundrum.com 9:38PM - w -n
One of those logins is from a host with reverse DNS, the other without. Th=
at part is a clear bug.
I will also point out that the address without rev DNS is incomplete. This=
is the other problem=85 w is not able to readjust for long field lengths. =
Widening the terminal doesn=92t help. And, it seems that =91w=92 doesn=92=
t pay attention to the COLUMNS environment variable defined by environ(7)=
=85 at least not for widening the display. This seems like at least a desi=
gn flaw, if not a bug.
=91who=92 can display a whole IPv6 address in its output if you happen to n=
ot have reverse DNS. But, who doesn=92t implement -n at all, so if an addr=
ess has reverse DNS, you=92re stuck. A full 39-character string representa=
tion of an IPv6 address would pad the below line out to exactly 80 columns,=
so despite the fact that who=92s man page says it listens to the COLUMNS e=
nvironment variable, it doesn=92t need to for extending the line .. it woul=
d fit into a typical 80-column layout anyway. =85 if only -n existed. The =
absence of -n here also seems like a design flaw.
> who
matt pts/0 May 1 21:38 (2001:4900:1044:0:2808:f1c9:e677:504=
5)
matt pts/1 May 1 21:38 (kaywinnit.conundrum.com)
Does this make sense to anyone else? Should I file a couple PRs about thes=
e tools?
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"