Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Nov 2002 18:51:57 -0500 (EST)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Peter Wemm <peter@FreeBSD.org>
Cc:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   Re: PERFORCE change 21049 for review
Message-ID:  <Pine.NEB.3.96L.1021113185056.43300A-100000@fledge.watson.org>
In-Reply-To: <200211132230.gADMU6wa075082@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Robert Drehmel has a personal branch in Perforce somewhere that implements
the portable APIs to utmp and wtmp, and pushes utmp into the kernel for
management.  Dig around and you'll probably find it.  I was hoping to get
the utmp stuff into the main tree for 5.0, but didn't find time to do
reviews and the like.

Robert N M Watson             FreeBSD Core Team, TrustedBSD Projects
robert@fledge.watson.org      Network Associates Laboratories

On Wed, 13 Nov 2002, Peter Wemm wrote:

> http://perforce.freebsd.org/chv.cgi?CH=21049
> 
> Change 21049 by peter@peter_daintree on 2002/11/13 14:29:17
> 
> 	less unportable.  The whole utmp/wtmp thing needs a proper API
> 	anyway.
> 
> Affected files ...
> 
> .. //depot/projects/ia64/usr.sbin/ppp/physical.c#9 edit
> .. //depot/projects/ia64/usr.sbin/pppd/auth.c#4 edit
> 
> Differences ...
> 
> ==== //depot/projects/ia64/usr.sbin/ppp/physical.c#9 (text+ko) ====
> 
> @@ -45,11 +45,6 @@
>  #else
>  #include <libutil.h>
>  #endif
> -#if defined(__FreeBSD__)
> -#include <timeconv.h>
> -#else
> -#define _time_to_time32(t) (t)
> -#endif
>  
>  #include "layer.h"
>  #ifndef NONAT
> @@ -921,7 +916,7 @@
>      char *colon;
>  
>      memset(&ut, 0, sizeof ut);
> -    ut.ut_time = _time_to_time32(time(NULL));
> +    ut.ut_time = time(NULL);
>      strncpy(ut.ut_name, name, sizeof ut.ut_name);
>      if (p->handler && (p->handler->type == TCP_DEVICE ||
>                         p->handler->type == UDP_DEVICE)) {
> 
> ==== //depot/projects/ia64/usr.sbin/pppd/auth.c#4 (text+ko) ====
> 
> @@ -49,7 +49,6 @@
>  #include <sys/socket.h>
>  #include <utmp.h>
>  #include <fcntl.h>
> -#include <timeconv.h>
>  #if defined(_PATH_LASTLOG) && defined(_linux_)
>  #include <lastlog.h>
>  #endif
> @@ -996,7 +995,7 @@
>  #endif
>  
>      memset((void *)&utmp, 0, sizeof(utmp));
> -    utmp.ut_time = _time_to_time32(time(NULL));
> +    utmp.ut_time = time(NULL);
>      (void)strncpy(utmp.ut_name, user, sizeof(utmp.ut_name));
>      (void)strncpy(utmp.ut_host, ":PPP", sizeof(utmp.ut_host));
>      (void)strncpy(utmp.ut_line, tty, sizeof(utmp.ut_line));
> 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe p4-projects" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.96L.1021113185056.43300A-100000>