From owner-freebsd-current Fri Jun 28 13: 7:41 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7723A37B400; Fri, 28 Jun 2002 13:07:24 -0700 (PDT) Received: from overcee.wemm.org (12-232-114-102.client.attbi.com [12.232.114.102]) by mx1.FreeBSD.org (Postfix) with ESMTP id C015743E12; Fri, 28 Jun 2002 13:07:23 -0700 (PDT) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by overcee.wemm.org (Postfix) with ESMTP id 30D19390F; Fri, 28 Jun 2002 13:07:29 -0700 (PDT) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Poul-Henning Kamp Cc: Mike Barcroft , Robert Drehmel , current@FreeBSD.ORG, robert@FreeBSD.ORG Subject: Re: changing 'struct utmp' In-Reply-To: <4381.1025278687@critter.freebsd.dk> Date: Fri, 28 Jun 2002 13:07:29 -0700 From: Peter Wemm Message-Id: <20020628200729.30D19390F@overcee.wemm.org> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Poul-Henning Kamp wrote: > In message <20020628113454.B34516@espresso.q9media.com>, Mike Barcroft writes : > >Robert Drehmel writes: > >> While trying to fix the bug described in a problem report about > >> 'w -n', and finding out that it is somewhat broken*, I came to > >> the conclusion that our 'struct utmp' is too limiting. > >> > >> I would like to modernize it as follows: > >> > >> #define UT_USERSIZE 16 > >> #define UT_LINESIZE 8 > >> #define UT_HOSTSIZE 18 /* increase by two bytes */ > > > >I think it might be a wise idea to make UT_HOSTSIZE much larger. > >Currently, it isn't even large enough to hold an IPv6 address. > > really guys, we need to do this right. > > The entire "line-number from /etc/ttys is index into file" concept > sucks. > > Fixed sized records suck badly. > > Please, if you're going to do it, do it right. Yep. Also: - make a proper API to deal with it, otherwise things like xterm will trash the utmp file all over again without a 'final solution'. - make sure we can extend it in the future without having to do this all over again. - I'd quite like a variable sized .db file with a 'standard' getutent() style interface to it. - wtmp probably shouldn't be a .db file, but then again, it probably can. Cheers, -Peter -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message