--- ppp-2.3.9/pppd/pppd.h.wtmp Thu Aug 12 21:57:37 1999 +++ ppp-2.3.9/pppd/pppd.h Fri Aug 13 12:11:02 1999 @@ -405,8 +405,6 @@ int lock __P((char *)); /* Create lock file for device */ int relock __P((int)); /* Rewrite lock file with new pid */ void unlock __P((void)); /* Delete previously-created lock file */ -void logwtmp __P((const char *, const char *, const char *)); - /* Write entry to wtmp file */ int get_host_seed __P((void)); /* Get host-dependent random number seed */ int have_route_to __P((u_int32_t)); /* Check if route to addr exists */ #ifdef PPP_FILTER --- ppp-2.3.9/pppd/sys-linux.c.wtmp Thu Aug 12 01:18:55 1999 +++ ppp-2.3.9/pppd/sys-linux.c Fri Aug 13 12:10:08 1999 @@ -1743,84 +1743,6 @@ /******************************************************************** * - * Update the wtmp file with the appropriate user name and tty device. - */ - -void logwtmp (const char *line, const char *name, const char *host) -{ - struct utmp ut, *utp; - pid_t mypid = getpid(); -#if __GLIBC__ < 2 - int wtmp; -#endif - -/* - * Update the signon database for users. - * Christoph Lameter: Copied from poeigl-1.36 Jan 3, 1996 - */ - utmpname(_PATH_UTMP); - setutent(); - while ((utp = getutent()) && (utp->ut_pid != mypid)) - /* nothing */; - - /* Is this call really necessary? There is another one after the 'put' */ - endutent(); - - if (utp) - memcpy(&ut, utp, sizeof(ut)); - else - /* some gettys/telnetds don't initialize utmp... */ - memset(&ut, 0, sizeof(ut)); - - if (ut.ut_id[0] == 0) - strncpy(ut.ut_id, line + 3, sizeof(ut.ut_id)); - - strncpy(ut.ut_user, name, sizeof(ut.ut_user)); - strncpy(ut.ut_line, line, sizeof(ut.ut_line)); - - time(&ut.ut_time); - - ut.ut_type = USER_PROCESS; - ut.ut_pid = mypid; - - /* Insert the host name if one is supplied */ - if (*host) - strncpy (ut.ut_host, host, sizeof(ut.ut_host)); - - /* Insert the IP address of the remote system if IP is enabled */ - if (ipcp_protent.enabled_flag && ipcp_hisoptions[0].neg_addr) - memcpy(&ut.ut_addr, (char *) &ipcp_hisoptions[0].hisaddr, - sizeof(ut.ut_addr)); - - /* CL: Makes sure that the logout works */ - if (*host == 0 && *name==0) - ut.ut_host[0]=0; - - pututline(&ut); - endutent(); -/* - * Update the wtmp file. - */ -#if __GLIBC__ >= 2 - updwtmp(_PATH_WTMP, &ut); -#else - wtmp = open(_PATH_WTMP, O_APPEND|O_WRONLY); - if (wtmp >= 0) { - flock(wtmp, LOCK_EX); - - if (write (wtmp, (char *)&ut, sizeof(ut)) != sizeof(ut)) - warn("error writing %s: %m", _PATH_WTMP); - - flock(wtmp, LOCK_UN); - - close (wtmp); - } -#endif -} - - -/******************************************************************** - * * sifvjcomp - config tcp header compression */ --- ppp-2.4.0/pppd/Makefile.linux~ Wed Dec 27 03:27:04 2000 +++ ppp-2.4.0/pppd/Makefile.linux Wed Dec 27 03:29:20 2000 @@ -110,6 +110,8 @@ CFLAGS += -DPPP_FILTER -I/usr/include/pcap endif +LIBS += -lutil + ifdef HAVE_INET6 PPPDSRCS += ipv6cp.c eui64.c HEADERS += ipv6cp.h eui64.h