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

Re: who am i

I'm working on a patch to make login log just the ip address to
(w|u)tmp, however for some reason I thought it used to do a check
about whether the hostname passed was greater than 16 chars, and if so
logged the ip.

Hopefully I won't break anything too horribly :)

(and yes, logging dotted quads is probably the most certain on an IPv4
system, however it might be worthwhile to incread UT_HOSTSIZE by a
bit, and perhaps modify who(1) and friends to just cut it off for

> George, I do not think you can get more than the first 16 chars of the
> hostname easily. Take a look at /usr/src/include/utmp.h -- it defines
> UT_HOSTSIZE to be 16.