mirror of https://github.com/mkerrisk/man-pages
Rmoved some crufty text; ffixes;
This commit is contained in:
parent
5018c1b4c5
commit
377dda5900
39
man5/utmp.5
39
man5/utmp.5
|
@ -55,20 +55,20 @@ around; details depend on the version of libc):
|
|||
.sp
|
||||
/* Values for ut_type field, below */
|
||||
|
||||
#define EMPTY 0 /* Record does not contain valid info
|
||||
(formerly known as UT_UNKNOWN) */
|
||||
#define RUN_LVL 1 /* Change in system run-level (see
|
||||
\fBinit\fP(8) */
|
||||
#define BOOT_TIME 2 /* Time of system booy (in \fIut_tv\fP) */
|
||||
#define NEW_TIME 3 /* Time after system clock change
|
||||
(in \fIut_tv\fP) */
|
||||
#define OLD_TIME 4 /* Time before system clock change
|
||||
(in \fIut_tv\fP) */
|
||||
#define INIT_PROCESS 5 /* Process spawned by \fBinit\fP(8) */
|
||||
#define LOGIN_PROCESS 6 /* Session leader process for user login */
|
||||
#define USER_PROCESS 7 /* Normal process */
|
||||
#define DEAD_PROCESS 8 /* Terminated process */
|
||||
#define ACCOUNTING 9 /* Not implemented */
|
||||
#define EMPTY 0 /* Record does not contain valid info
|
||||
(formerly known as UT_UNKNOWN on Linux) */
|
||||
#define RUN_LVL 1 /* Change in system run-level (see
|
||||
\fBinit\fP(8) */
|
||||
#define BOOT_TIME 2 /* Time of system booy (in \fIut_tv\fP) */
|
||||
#define NEW_TIME 3 /* Time after system clock change
|
||||
(in \fIut_tv\fP) */
|
||||
#define OLD_TIME 4 /* Time before system clock change
|
||||
(in \fIut_tv\fP) */
|
||||
#define INIT_PROCESS 5 /* Process spawned by \fBinit\fP(8) */
|
||||
#define LOGIN_PROCESS 6 /* Session leader process for user login */
|
||||
#define USER_PROCESS 7 /* Normal process */
|
||||
#define DEAD_PROCESS 8 /* Terminated process */
|
||||
#define ACCOUNTING 9 /* Not implemented */
|
||||
|
||||
#define UT_LINESIZE 32
|
||||
#define UT_NAMESIZE 32
|
||||
|
@ -246,28 +246,29 @@ structure.
|
|||
.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
|
||||
\fIut_type\fP, 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 \fIut_id\fP fields.
|
||||
|
||||
In Linux (as in System V), the \fIut_id\fP field of a
|
||||
record will never change once it has been set, which reserves that slot
|
||||
without needing a configuration file.
|
||||
Clearing \fIut_id\fP may result
|
||||
in race conditions leading to corrupted utmp entries and potential
|
||||
security holes.
|
||||
Clearing the above mentioned fields by filling them
|
||||
Clearing the abovementioned fields by filling them
|
||||
with null bytes is not required by System V semantics,
|
||||
but makes it possible to run
|
||||
many programs which assume BSD semantics and which do not modify utmp.
|
||||
Linux uses the BSD conventions for line contents, as documented above.
|
||||
.PP
|
||||
System V only uses the type field to mark them and logs informative messages
|
||||
such as \fB"new time"\fP in the line field.
|
||||
\fBUT_UNKNOWN\fP seems
|
||||
to be a Linux invention.
|
||||
.\" mtk: What is the referrent of "them" in the following sentence?
|
||||
.\" System V only uses the type field to mark them and logs
|
||||
.\" informative messages such as \fB"new time"\fP in the line field.
|
||||
System V has no \fIut_host\fP or \fIut_addr_v6\fP fields.
|
||||
.SH NOTES
|
||||
.PP
|
||||
|
|
Loading…
Reference in New Issue