Date: Tue, 18 Jun 1996 04:17:32 +0800 From: Peter Wemm <peter@spinner.DIALix.COM> To: =?KOI8-R?Q?=E1=CE=C4=D2=C5=CA_=FE=C5=D2=CE=CF=D7?= (aka Andrey A. Chernov, Black Mage) <ache@astral.msk.su> Cc: CVS-committers@freefall.freebsd.org, cvs-all@freefall.freebsd.org, cvs-usrbin@freefall.freebsd.org Subject: Re: cvs commit: src/usr.bin/w w.c Message-ID: <199606172017.EAA02442@spinner.DIALix.COM> In-Reply-To: Your message of "Mon, 17 Jun 1996 23:30:53 %2B0400." <199606171930.XAA00442@astral.msk.su>
next in thread | previous in thread | raw e-mail | index | archive | help
>> >ache 96/06/17 11:35:19 >> > >> > Modified: usr.bin/w w.c >> > Log: >> > Don't try convert "-" to numeric form for -n option >> >> I'm not sure I like the direction this is going.. The ut_host field is >> useful for storing various sorts of useful information, the changes that > >Well, I need an example, at least one. All programs that I found keeps >hostname in this field and _not_ various sorts of info. I mean general > [<hostname>][:<anything>] >format. >Moreover some statistics packages assume real hostname there, >it will be nice for security reasons too or one host can >mimic to another by using truncated names assumption. >I think nobody wants to keep junk in utmp/wtmp/lastlog and junk >will be there for all hostnames > 16. Maybe so, but I dont think this is useful at all: % w -n 3:44AM up 17 days, 15:29, 19 users, load averages: 0.00, 0.00, 0.00 USER TTY FROM LOGIN@ IDLE WHAT ... gethostbyname: Unknown host hstake A04 28800/ARQ:ppp 2:53AM 50 -tserv ... peter pb :0.0 3:09AM 29 ssh -l root gecko2 gethostbyname: Unknown host root pc haywire.dialix.c 3:33AM 10 -csh (csh) gethostbyname: Unknown host peter pd unix:0.0 3:42AM - -csh (tcsh) I think it's pretty obvious when a hostname is invalid.. I'm not arguing about the conversion to IP addresses, I just dont like the new error messages when something slips through. >> IMHO, the -n option was documented badly. As originally implemented, it >> was a "dont convert IP addresses to names" flag, but the man page wasn't >> in sync. I think that actively attempting to *convert* ut_host data to IP > >I think manpage is right (it is the same flag as for netstat and it >is very useful for scripts, please check PR original 402). >I think w historically assumes IP address in utmp. No, it's a different case.. With 'route' and 'netstat' etc, the program starts off with an IP address and converts it to a hostname, and the -n flag disables the conversion and causes it to be displayed in it's natural form. If anything, the traditional meaning of "-n" means "no nameserver lookups", which is opposite of what you've done. Now, 'w -n' causes the nameserver to be referenced! :-( (I realise you're still working on it, but it's still not quite compatable with xterm.. X11 can have a $DISPLAY of "unix:0.0") (I think I should go and add a leading ":" to the entry that our modem pool monitoring software stores there since there seems to be a convention.. screen puts in things like ":ttyp6:S.0". If this indeed is the "rule", then a mention should be made in the utmp man page...) Incidently, how long has it been since the last round of discussion about the utmp/wtmp record size? I personally would like the default utmp/wtmp record size changed so that usernames are increased from 8 characters to either 12 or 16, and a new field added to store an IP address, and the pid of the session (allowing easier tracking of user processes from utmp records).. Cheers, -Peter
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199606172017.EAA02442>
