--- telnet/telnetd/sys_term.c.orig 2007-11-09 21:34:18.000000000 -0600 +++ telnet/telnetd/sys_term.c 2007-11-09 21:39:39.000000000 -0600 @@ -2509,7 +2509,7 @@ f = open(wtmpf, O_WRONLY|O_APPEND); if (f >= 0) { SCPYN(wtmp.ut_line, line+5); - SCPYN(wtmp.UT_USER, ""); + SCPYN(wtmp.ut_user, ""); SCPYN(wtmp.ut_host, ""); #if (!defined(NO_WTMPX) && defined(HAVE_UTMPX_UT_TV)) || (defined(NO_WTMPX) && defined(HAVE_UTMP_UT_TV)) (void) time(&wtmp.ut_tv.tv_sec); --- base/lib/shadow.c.orig 2007-11-09 21:45:40.000000000 -0600 +++ base/lib/shadow.c 2007-11-09 21:46:29.000000000 -0600 @@ -166,7 +166,7 @@ * sgetspent - convert string in shadow file format to (struct spwd *) */ -static struct spwd * +struct spwd * sgetspent (string) const char *string; { --- base/lib/utent.c.orig 2007-11-09 21:49:21.000000000 -0600 +++ base/lib/utent.c 2007-11-09 21:52:37.000000000 -0600 @@ -40,6 +40,9 @@ static char rcsid[] = "$Id: utent.c,v 1.1 2000/12/17 05:34:11 tom Exp $"; #endif +#include +#define _UTMP_FILE _PATH_UTMPX + static int utmp_fd = -1; static struct utmp utmp_buf; --- base/libmisc/limits.c.orig 2007-11-09 21:56:26.000000000 -0600 +++ base/libmisc/limits.c 2007-11-09 21:57:43.000000000 -0600 @@ -111,9 +111,9 @@ if (ut->ut_type != USER_PROCESS) continue; #endif - if (ut->UT_USER[0] == '\0') + if (ut->ut_name[0] == '\0') continue; - if (strncmp(name, ut->UT_USER, sizeof(ut->UT_USER)) != 0) + if (strncmp(name, ut->ut_name, sizeof(ut->ut_name)) != 0) continue; if (++count >= limit) break; --- base/libmisc/utmp.c.orig 2007-11-09 21:59:27.000000000 -0600 +++ base/libmisc/utmp.c 2007-11-09 22:14:10.000000000 -0600 @@ -58,7 +58,7 @@ extern struct utmpx utxent; extern char *host; #endif -extern struct utmp utent; +extern struct utmpx utent; #ifndef HAVE_UTMP_H extern struct utmp *getutent(); @@ -102,9 +102,9 @@ #ifdef HAVE_UTMP_H #include #else - struct utmp *getutline(); + struct utmpx *getutline(); #endif - struct utmp *ut; + struct utmpx *ut; #ifdef DEBUG pid_t pid = getppid(); #else @@ -214,7 +214,7 @@ strcpy(utent.ut_user, "LOGIN"); utent.ut_pid = getpid(); utent.ut_type = LOGIN_PROCESS; - time(&utent.ut_time); + gettimeofday((struct timeval *) &utent.ut_tv, NULL); #if HAVE_UTMPX_H if ((utx = getutxline(&utxent))) strncpy(utxent.ut_id, utent.ut_id, sizeof utxent.ut_id); @@ -223,7 +223,7 @@ utxent.ut_pid = utent.ut_pid; utxent.ut_type = utent.ut_type; gettimeofday((struct timeval *) &utxent.ut_tv, NULL); - utent.ut_time = utxent.ut_tv.tv_sec; + gettimeofday((struct timeval *) &utent.ut_tv, NULL); #endif } #else /* !USG */ @@ -269,7 +269,7 @@ time(&utent.ut_time); /* other fields already filled in by checkutmp above */ setutent(); - pututline(&utent); + pututxline(&utent); endutent(); fd = open(_WTMP_FILE, O_APPEND | O_WRONLY, 0); if (fd >= 0) { @@ -277,7 +277,7 @@ close(fd); } #elif HAVE_UTMPX_H - struct utmp *utmp, utline; + struct utmpx *utmp, utline; struct utmpx *utmpx, utxline; pid_t pid = getpid (); FILE *utmpx_fp; @@ -356,7 +356,7 @@ utline.ut_type = utxline.ut_type = USER_PROCESS; gettimeofday(&utxline.ut_tv, NULL); - utline.ut_time = utxline.ut_tv.tv_sec; + gettimeofday(&utline.ut_tv, NULL); strncpy (utxline.ut_host, host, sizeof utxline.ut_host); @@ -366,7 +366,8 @@ utxline.ut_syslen = sizeof (utxline.ut_host); #endif - pututline (&utline); +/* pututline (&utline); +*/ pututxline (&utxline); #ifdef _WTMP_FILE