From owner-p4-projects Wed Nov 13 15:52:39 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7E44837B404; Wed, 13 Nov 2002 15:52:36 -0800 (PST) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1345337B401; Wed, 13 Nov 2002 15:52:36 -0800 (PST) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 59AB443E75; Wed, 13 Nov 2002 15:52:35 -0800 (PST) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (fledge.pr.watson.org [192.0.2.3]) by fledge.watson.org (8.12.4/8.12.4) with SMTP id gADNpvOo043474; Wed, 13 Nov 2002 18:51:58 -0500 (EST) (envelope-from robert@fledge.watson.org) Date: Wed, 13 Nov 2002 18:51:57 -0500 (EST) From: Robert Watson X-Sender: robert@fledge.watson.org To: Peter Wemm Cc: Perforce Change Reviews Subject: Re: PERFORCE change 21049 for review In-Reply-To: <200211132230.gADMU6wa075082@repoman.freebsd.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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 > #endif > -#if defined(__FreeBSD__) > -#include > -#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 > #include > #include > -#include > #if defined(_PATH_LASTLOG) && defined(_linux_) > #include > #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