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
|
.sp
|
||||||
/* Values for ut_type field, below */
|
/* Values for ut_type field, below */
|
||||||
|
|
||||||
#define EMPTY 0 /* Record does not contain valid info
|
#define EMPTY 0 /* Record does not contain valid info
|
||||||
(formerly known as UT_UNKNOWN) */
|
(formerly known as UT_UNKNOWN on Linux) */
|
||||||
#define RUN_LVL 1 /* Change in system run-level (see
|
#define RUN_LVL 1 /* Change in system run-level (see
|
||||||
\fBinit\fP(8) */
|
\fBinit\fP(8) */
|
||||||
#define BOOT_TIME 2 /* Time of system booy (in \fIut_tv\fP) */
|
#define BOOT_TIME 2 /* Time of system booy (in \fIut_tv\fP) */
|
||||||
#define NEW_TIME 3 /* Time after system clock change
|
#define NEW_TIME 3 /* Time after system clock change
|
||||||
(in \fIut_tv\fP) */
|
(in \fIut_tv\fP) */
|
||||||
#define OLD_TIME 4 /* Time before system clock change
|
#define OLD_TIME 4 /* Time before system clock change
|
||||||
(in \fIut_tv\fP) */
|
(in \fIut_tv\fP) */
|
||||||
#define INIT_PROCESS 5 /* Process spawned by \fBinit\fP(8) */
|
#define INIT_PROCESS 5 /* Process spawned by \fBinit\fP(8) */
|
||||||
#define LOGIN_PROCESS 6 /* Session leader process for user login */
|
#define LOGIN_PROCESS 6 /* Session leader process for user login */
|
||||||
#define USER_PROCESS 7 /* Normal process */
|
#define USER_PROCESS 7 /* Normal process */
|
||||||
#define DEAD_PROCESS 8 /* Terminated process */
|
#define DEAD_PROCESS 8 /* Terminated process */
|
||||||
#define ACCOUNTING 9 /* Not implemented */
|
#define ACCOUNTING 9 /* Not implemented */
|
||||||
|
|
||||||
#define UT_LINESIZE 32
|
#define UT_LINESIZE 32
|
||||||
#define UT_NAMESIZE 32
|
#define UT_NAMESIZE 32
|
||||||
|
@ -246,28 +246,29 @@ structure.
|
||||||
.SS Comparison with Historical Systems
|
.SS Comparison with Historical Systems
|
||||||
Linux utmp entries conform neither to v7/BSD nor to System V; they are a
|
Linux utmp entries conform neither to v7/BSD nor to System V; they are a
|
||||||
mix of the two.
|
mix of the two.
|
||||||
|
|
||||||
v7/BSD has fewer fields; most importantly it lacks
|
v7/BSD has fewer fields; most importantly it lacks
|
||||||
\fIut_type\fP, which causes native v7/BSD-like programs to display (for
|
\fIut_type\fP, which causes native v7/BSD-like programs to display (for
|
||||||
example) dead or login entries.
|
example) dead or login entries.
|
||||||
Further, there is no configuration file
|
Further, there is no configuration file
|
||||||
which allocates slots to sessions.
|
which allocates slots to sessions.
|
||||||
BSD does so because it lacks \fIut_id\fP fields.
|
BSD does so because it lacks \fIut_id\fP fields.
|
||||||
|
|
||||||
In Linux (as in System V), the \fIut_id\fP field of a
|
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
|
record will never change once it has been set, which reserves that slot
|
||||||
without needing a configuration file.
|
without needing a configuration file.
|
||||||
Clearing \fIut_id\fP may result
|
Clearing \fIut_id\fP may result
|
||||||
in race conditions leading to corrupted utmp entries and potential
|
in race conditions leading to corrupted utmp entries and potential
|
||||||
security holes.
|
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,
|
with null bytes is not required by System V semantics,
|
||||||
but makes it possible to run
|
but makes it possible to run
|
||||||
many programs which assume BSD semantics and which do not modify utmp.
|
many programs which assume BSD semantics and which do not modify utmp.
|
||||||
Linux uses the BSD conventions for line contents, as documented above.
|
Linux uses the BSD conventions for line contents, as documented above.
|
||||||
.PP
|
.PP
|
||||||
System V only uses the type field to mark them and logs informative messages
|
.\" mtk: What is the referrent of "them" in the following sentence?
|
||||||
such as \fB"new time"\fP in the line field.
|
.\" System V only uses the type field to mark them and logs
|
||||||
\fBUT_UNKNOWN\fP seems
|
.\" informative messages such as \fB"new time"\fP in the line field.
|
||||||
to be a Linux invention.
|
|
||||||
System V has no \fIut_host\fP or \fIut_addr_v6\fP fields.
|
System V has no \fIut_host\fP or \fIut_addr_v6\fP fields.
|
||||||
.SH NOTES
|
.SH NOTES
|
||||||
.PP
|
.PP
|
||||||
|
|
Loading…
Reference in New Issue