Add discussion of POSIX.1 utmpx specification.

Move some text from CONFORMING To to NOTES.
This commit is contained in:
Michael Kerrisk 2008-06-29 06:16:33 +00:00
parent 1c3f428027
commit 0ef1b0fc23
1 changed files with 16 additions and 1 deletions

View File

@ -219,6 +219,20 @@ removed, record-keeping is turned off.
.br
/var/log/wtmp
.SH "CONFORMING TO"
.PP
POSIX.1 does not specify a
.I utmp
structure, but rather one named
.IR utmpx ,
with specifications for the fields
.IR ut_type ,
.IR ut_pid ,
.IR ut_line ,
.IR ut_id ,
.IR ut_user ,
and
.IR ut_tv .
.SS Comparison with Historical Systems
Linux utmp entries conform neither to v7/BSD nor to System V; they are a
mix of the two.
v7/BSD has fewer fields; most importantly it lacks
@ -244,6 +258,7 @@ such as \fB"new time"\fP in the line field.
\fBUT_UNKNOWN\fP seems
to be a Linux invention.
System V has no \fIut_host\fP or \fIut_addr_v6\fP fields.
.SH NOTES
.PP
Unlike various other
systems, where utmp logging can be disabled by removing the file, utmp
@ -256,7 +271,7 @@ Note that the \fIutmp\fP struct from libc5 has changed in libc6.
Because of this,
binaries using the old libc5 struct will corrupt
.IR /var/run/utmp " and/or " /var/log/wtmp .
.SH NOTES
.PP
The file format is machine-dependent, so it is recommended that it be
processed only on the machine architecture where it was created.
.PP