Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Oct 2001 11:31:01 -0700
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Yar Tikhiy <yar@freebsd.org>
Cc:        hackers@freebsd.org, doc@freebsd.org
Subject:   Re: utmp(5) manpage revised
Message-ID:  <3BC736E5.2AF183F4@mindspring.com>
References:  <20011011170226.A2162@snark.rinet.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
Yar Tikhiy wrote:
> 
> Hi everybody,
> 
> The current utmp(5) manpage language (not markup)
> has a number of drawbacks and errors:
> 
> o There is no information for programmers on the actual structure
>   of the files the page describes.

It is opaque.  You are not supposed to access it directly, you
are supposed to use library routines.  You could make the same
argument about "db" files...

> o The C structure members aren't described.

""

> o Despites the page language, neither utmp nor lastlog grow
>   continually or need rotation.

That's a real error.  Good catch.

> o It describes in a wrong way how a user's logout is recorded to wtmp.

I'm not sure that that's not an implementation detail that
should be reomved from the man page entirely, but what you've
done is equally valid.

> o The login(3), logout(3) and logwtmp(3) functions aren't mentioned.

This is a good correction.


> Here's a patch addressing all the issues. Review it please.

I'm not sure that the structure should be documented, as it
will encourage people to access the data directly.  The point
of having them access it through library routines is that it's
possible to replace the implementation by replacing the libc.so
on a system, and have software continue to function.  Or, it's
possible to install binaries that use libc.so on a system with
a different underlying implementaiton, and have them "just work"
for commercial vendors.

-- Terry

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




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