freebsd-src/lib/libc
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
..
amd64
arm
compat-43
db
gdtoa
gen Implement <utmpx.h>. 2010-01-13 17:29:55 +00:00
gmon
i386
ia64
include Use umtx to implement process sharable semaphore, to make this work, 2010-01-05 02:37:59 +00:00
inet
isc
locale
mips Merge r195030 from project/mips to head by hand 2010-01-09 00:01:35 +00:00
nameser
net Miscellaneous mdoc, spelling and inconsistency fixes. 2010-01-12 21:45:03 +00:00
nls
posix1e Don't forget to clean up the file copied from the kernel sources. 2010-01-02 20:27:14 +00:00
powerpc
quad
regex
resolv
rpc Use the correct types to store uids and gids in the credential cache. 2010-01-09 23:36:51 +00:00
softfloat
sparc64
stdio Give a less silly response to a silly request. 2010-01-10 14:30:30 +00:00
stdlib
stdtime Use _pthread_once() rather than _once() for localtime() and gmtime(). These 2010-01-06 20:43:40 +00:00
string
sys Miscellaneous mdoc, spelling and inconsistency fixes. 2010-01-12 21:45:03 +00:00
uuid
xdr
yp
Makefile Merge r195030 from project/mips to head by hand 2010-01-09 00:01:35 +00:00
Versions.def