Re: bin/76089: The -n option in /usr/bin/w is broken

2005-02-14 Thread Sergey Matveychuk
Sergey Matveychuk wrote:
BTW, UT_HOSTSIZE=16 is too short in my opinion.
As I can see, linux has UT_HOSTSIZE=256.
--
Sem.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: bin/76089: The -n option in /usr/bin/w is broken

2005-02-13 Thread Sergey Matveychuk
w(1) behaviour has changed with brien commit in w.c revision 1.48.
Funny, but looks like '-n' options works right after commit, not before.
The reason is utmp holds a host name and w(1) with '-n' flag _do_ 
resolve hostname back in IP address and without '-n' don't resolve it.
It's confised.

IMHO to be more robust, we should make utmp to hold an IP address 
instead of a hostname and change all applications that use it. As bonus 
it will fix a delay on login when resolving does not work. And last(1) 
will show more useful IP address instead of changable hostname.

But I'm not sure about standards.
--
Sem.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: bin/76089: The -n option in /usr/bin/w is broken

2005-02-13 Thread Peter Jeremy
On Sun, 2005-Feb-13 19:50:44 +0300, Sergey Matveychuk wrote:
IMHO to be more robust, we should make utmp to hold an IP address 
instead of a hostname and change all applications that use it. As bonus 
it will fix a delay on login when resolving does not work. And last(1) 
will show more useful IP address instead of changable hostname.

Depending on the environment, the IP address may be more changeable
than the hostname.  Definitely, in a DHCP or dialup environment, you
can't rely on the IP address at any time other than during the
session.  There is little (if any) benefit in logging the IP address
instead of the hostname.

-- 
Peter Jeremy
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: bin/76089: The -n option in /usr/bin/w is broken

2005-02-13 Thread Sergey Matveychuk
Peter Jeremy wrote:
Depending on the environment, the IP address may be more changeable
than the hostname.  Definitely, in a DHCP or dialup environment, you
can't rely on the IP address at any time other than during the
session.  There is little (if any) benefit in logging the IP address
instead of the hostname.
I agree, environments are different. So may be it makes no sense to 
change hostname with IP. It was just an idea.

But fact is, we lost 'w -n' semantic. And it should be fixed.
BTW, UT_HOSTSIZE=16 is too short in my opinion.
--
Sem.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: bin/76089: The -n option in /usr/bin/w is broken

2005-02-13 Thread Garance A Drosihn
At 5:16 PM +1100 2/14/05, Peter Jeremy wrote:
On Sun, 2005-Feb-13 19:50:44 +0300, Sergey Matveychuk wrote:
 IMHO to be more robust, we should make utmp to hold an IP address
  instead of a hostname and change all applications that use it. As
  bonus it will fix a delay on login when resolving does not work.
  And last(1) will show more useful IP address instead of changable
  hostname.
Depending on the environment, the IP address may be more changeable
than the hostname.  Definitely, in a DHCP or dialup environment, you
can't rely on the IP address at any time other than during the
session.  There is little (if any) benefit in logging the IP address
instead of the hostname.
Actually, it would be nice to log both.  That's what I have done
for some printer-related statistics (not sure if I did that in
FreeBSD, but I do that for production use at RPI).
--
Garance Alistair Drosehn=   [EMAIL PROTECTED]
Senior Systems Programmer   or  [EMAIL PROTECTED]
Rensselaer Polytechnic Instituteor  [EMAIL PROTECTED]
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: bin/76089: The -n option in /usr/bin/w is broken

2005-02-13 Thread Masachika ISHIZUKA
  IMHO to be more robust, we should make utmp to hold an IP address
 instead of a hostname and change all applications that use it. As
 bonus it will fix a delay on login when resolving does not work.
 And last(1) will show more useful IP address instead of changable
 hostname.

  [snip]
 
 Actually, it would be nice to log both.  That's what I have done
 for some printer-related statistics (not sure if I did that in
 FreeBSD, but I do that for production use at RPI).

  Hi, this is [EMAIL PROTECTED]

  Please you should think IPv6 address that may be 39 bytes.
I connected to sshd from a remote computer but w -n displayed IPv4
address. It was not good for me.

-- 
[EMAIL PROTECTED]
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: bin/76089: The -n option in /usr/bin/w is broken

2005-02-13 Thread Sergey Matveychuk
Garance A Drosihn wrote:
Actually, it would be nice to log both.  That's what I have done
for some printer-related statistics (not sure if I did that in
FreeBSD, but I do that for production use at RPI).
I like the idea. We can add field 'address' in utmp structure and save 
hostname and IP  address there.
It will some backward compatible then (but not for wtmp though).

--
Sem.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]