From owner-freebsd-hackers Fri Oct 12 11:30:25 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from avocet.mail.pas.earthlink.net (avocet.mail.pas.earthlink.net [207.217.121.50]) by hub.freebsd.org (Postfix) with ESMTP id 6D95437B409; Fri, 12 Oct 2001 11:30:12 -0700 (PDT) Received: from dialup-209.247.139.200.dial1.sanjose1.level3.net ([209.247.139.200] helo=mindspring.com) by avocet.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 15s74V-0002r2-00; Fri, 12 Oct 2001 11:30:11 -0700 Message-ID: <3BC736E5.2AF183F4@mindspring.com> Date: Fri, 12 Oct 2001 11:31:01 -0700 From: Terry Lambert Reply-To: tlambert2@mindspring.com X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Yar Tikhiy Cc: hackers@freebsd.org, doc@freebsd.org Subject: Re: utmp(5) manpage revised References: <20011011170226.A2162@snark.rinet.ru> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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