UTMP IP address implimentation

Philip Anderson pza at australia.op.org
Wed Apr 23 05:52:45 GMT 2003


I just made a simple attempt at implimenting ut->addr in utmp.c so that
'last -i' wouldp produce the client's IP address.  I tried it, and all
appears to work on my RedHat 9 machine.  Is this a valid solution?

I added the following lines to the end of sys_utmp_fill in utmp.c:

#if defined(HAVE_UT_UT_ADDR)
        inet_pton(AF_INET,hostname,&(u->ut_addr));
#endif

Phil



More information about the samba-technical mailing list