Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Jun 2002 12:21:10 -0400
From:      Garance A Drosihn <drosih@rpi.edu>
To:        Robert Drehmel <robert@zoot.drehmel.com>, current@FreeBSD.ORG
Cc:        robert@FreeBSD.ORG
Subject:   Re: changing 'struct utmp'
Message-ID:  <p051117b1b94238eb44fc@[128.113.24.47]>
In-Reply-To: <20020628110244.A34627@bsd.develop.ferrari.local>
References:  <20020628110244.A34627@bsd.develop.ferrari.local>

next in thread | previous in thread | raw e-mail | index | archive | help
At 11:02 AM +0200 6/28/02, Robert Drehmel wrote:
>Hello.
>
>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:

The present utmp is way too limiting.  At the same time, it's a
pain to "just change it in place".  It is a database format,
where every user of the database has intimate knowledge of the
internal format.  If you change the size of anything, then you
have to be SURE to compile absolutely everything that looks at
utmp, and recompile them all at the same time.  And you have to
make sure that none of them have built-in assumptions about the
field sizes, or you will introduce bugs if you blindly recompile
them.

I think it's better to leave utmp as it is, and start work on a
utmpx definition which is more standardized.  Access to this
new improved database should be through the endutxent, getutxent,
getutxid, getutxline, pututxline, and setutxent routines.  For
awhile we should generate both utmp and utmpx files, so we can
gradually convert programs over to using the standardized API.
Once we're happy with that, we can pull the plug on the old
utmp file & it's format.

See also the standardized definition of utmpx.h.

It would be very nice to see this in freebsd.

-- 
Garance Alistair Drosehn            =   gad@gilead.netel.rpi.edu
Senior Systems Programmer           or  gad@freebsd.org
Rensselaer Polytechnic Institute    or  drosih@rpi.edu

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?p051117b1b94238eb44fc>