freebsd-dev/lib/libulog
Ed Schouten a627ac61ab Implement <utmpx.h>.
The utmpx interface is the standardized interface of the user accounting
database. The standard only defines a subset of the functions that were
present in System V-like systems.

I'd like to highlight some of the traits my implementation has:

- The standard allows the on-disk format to be different than the
  in-memory representation (struct utmpx). Most operating systems don't
  do this, but we do. This allows us to keep our ABI more stable, while
  giving us the opportunity to modify the on-disk format. It also allows
  us to use a common file format across different architectures (i.e.
  byte ordering).

- Our implementation of pututxline() also updates wtmp and lastlog (now
  called utx.log and utx.lastlogin). This means the databases are more
  likely to be in sync.

- Care must be taken that our implementation discard any fields that are
  not applicable. For example, our DEAD_PROCESS records do not hold a
  TTY name. Just a time stamp, a record identifier and a process
  identifier. It also guarantees that strings (ut_host, ut_line and
  ut_user) are null terminated. ut_id is obviously not null terminated,
  because it's not a string.

- The API and its behaviour should be conformant to POSIX, but there may
  be things that slightly deviate from the standard. This implementation
  uses separate file descriptors when writing to the log files. It also
  doesn't use getutxid() to search for a field to overwrite. It uses an
  allocation strategy similar to getutxid(), but prevents DEAD_PROCESS
  records from accumulating.

Make sure libulog doesn't overwrite the manpages shipped with our C
library. Also keep the symbol list in Symbol.map sorted.

I'll bump __FreeBSD_version later this evening. I first want to convert
everything to <utmpx.h> and get rid of <utmp.h>.
2010-01-13 17:29:55 +00:00
..
Makefile Implement <utmpx.h>. 2010-01-13 17:29:55 +00:00
Symbol.map Add a libutempter compatibility interface to libulog. 2009-12-06 20:30:21 +00:00
ulog_getutxent.3 Massively extend libulog: 2009-12-05 19:53:29 +00:00
ulog_getutxent.c Parse DEAD_PROCESS entries properly. 2009-12-27 22:26:29 +00:00
ulog_internal.h Massively extend libulog: 2009-12-05 19:53:29 +00:00
ulog_login_pseudo.c
ulog_login.3 Massively extend libulog: 2009-12-05 19:53:29 +00:00
ulog_login.c The hostname passed to ulog_login(3) may be optional. 2009-12-11 23:52:42 +00:00
ulog_pututxline.c Don't corrupt logout entries in utmp files. 2009-12-25 20:04:36 +00:00
ulog_setutxfile.3 Several refinements to libulog's API. 2009-12-26 22:36:05 +00:00
ulog_util.c Massively extend libulog: 2009-12-05 19:53:29 +00:00
ulog.h Several refinements to libulog's API. 2009-12-26 22:36:05 +00:00
utempter_add_record.3 Add a libutempter compatibility interface to libulog. 2009-12-06 20:30:21 +00:00
utempter.c Add a libutempter compatibility interface to libulog. 2009-12-06 20:30:21 +00:00
utempter.h Add a libutempter compatibility interface to libulog. 2009-12-06 20:30:21 +00:00