[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#2069: GNU last doesn't use ut_addr



Package: last
Version: 5-12

The GNU version of last doesn't make use of the ut_addr utmp field which
is supposed to contain the IP address for remote logins.  The size of
ut_host (16 chars) is too small and host names are often truncated.  The
IP address is the only reliable way to identify the remote host.

The BSD-derived last from the current util-linux supports ut_addr.
The remote address is stored in network byte order.  It is currently
not reliable either (login does a hostname lookup on the name passed
after the -h flag) but I have a working patch for telnetd/rlogind to
create an utmp entry for login (ut_addr filled in with the real remote
IP address from getpeername, avoiding one hostname lookup).  I will
make this patch available soon, after some testing.

BTW, it is probably too late to change "struct utmp" (more room for host
namei, tty) - do we need the SVR4 utmpx thing?

Marek


Reply to: