From 0ef1b0fc23cc39cb4775920c773f4b37d06e8ff2 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Sun, 29 Jun 2008 06:16:33 +0000 Subject: [PATCH] Add discussion of POSIX.1 utmpx specification. Move some text from CONFORMING To to NOTES. --- man5/utmp.5 | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/man5/utmp.5 b/man5/utmp.5 index b66fc312d..557e4154e 100644 --- a/man5/utmp.5 +++ b/man5/utmp.5 @@ -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