utmp update for bsd systems (try 2)

Luke Mewburn lukem at NetBSD.org
Mon Apr 18 23:51:05 GMT 2005


On Mon, Apr 18, 2005 at 06:48:29AM -0400, Michael Shalayeff wrote:
  | Making, drinking tea and reading an opus magnum from David Lee:
  | > On Sat, 16 Apr 2005, Andrew Bartlett wrote:
  | > Use of the higher-level subroutines ("pututline()", "login()" etc.), where
  | > provided by the OS, certainly seems preferable.  For one thing, it should 
  | > (assuming no bugs!) manage locking, in a consistent fashion, of the 
  | > underlying utmp/wtmp database files.  (Imagine two or more simultaneous 
  | > connects or disconnects of any entities (ftpd, telnetd, sshd, smbd, ...) 
  | > which try to update those database files.)
  | 
  | those interfaces do not exist in *bsd.
  | login/logout is unusable as well and it is explained
  | in the comments in my diff WHY

login(3) and logout(3) certainly exist in NetBSD's libutil, and NetBSD
has had them since inception (March 1993).  FreeBSD has them.
OpenBSD should have them as NetBSD had them at the time OpenBSD forked
from NetBSD, unless they've since been removed.

With the addition of utmpx(5) support in NetBSD a couple of years ago,
NetBSD also provides loginx(3), logout(x) and logwtmpx(3) APIs in 
libutil, as well as the POSIX pututxline(3) (et al) API in libc.

autoconf tests can be used to detect which particular utmp/wtmp/utmpx/wtmpx
APIs are present and working on a given system so that Samba can DTRT.


I hope that helps,
Luke.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20050419/6ec8dcfb/attachment.bin


More information about the samba-technical mailing list