2.0.7pre2, utmp in particular
freddie at ns1.nowait.net
Sat Mar 18 12:13:09 GMT 2000
Having actually read the rest of the utmp(5) man page, it seems that SYSV
has no ut_host or ut_addr_v6 (4 bytes used to store the ip) fields. Helpful.
Linux utmp entries conform neither to v7/BSD nor to SYSV:
They are a mix of the two. v7/BSD has fewer fields; most
importantly it lacks ut_type, which causes native v7/BSD-
like programs to display (for example) dead or login
entries. Further there is no configuration file which
allocates slots to sessions. BSD does so, because it
lacks ut_id fields. In Linux (as in SYSV), the ut_id
field of a record will never change once it has been set,
which reserves that slot without needing a configuration
file. Clearing ut_id may result in race conditions lead
ing to corrupted utmp entries and and potential security
holes. Clearing the above mentioned fields by filling
them with null bytes is not required by SYSV semantics,
but it allows to run many programs which assume BSD seman
tics and which do not modify utmp. Linux uses the BSD
conventions for line contents, as documented above.
SYSV only uses the type field to mark them and logs infor
mative messages such as e.g. "new time" in the line field.
UT_UNKNOWN seems to be a Linux invention. SYSV has no
ut_host or ut_addr_v6 fields.
I guess we'd have to work out what sort of system we're running under if we
want to have utmp supported on a largeish number of systems.
More information about the samba-technical