Linux Standard Base Core Specification 3.0Preview1 | ||
---|---|---|
<<< Previous | Next >>> |
If the process has permission to update the user accounting databases, the logwtmp() function shall append a record to the user accounting database that records all logins and logouts. The record to be appended shall be constructed as follows:
The ut_line
field shall be initialized
from line.
If the user accounting database imposes a limit on the size of the
ut_line
field, it shall
truncate the value, but any such limit shall not be smaller than
UT_LINESIZE
(including a terminating null character).
The ut_name
field shall be initialized
from name.
If the user accounting database imposes a limit on the size of the
ut_name
field, it shall
truncate the value, but any such limit shall not be smaller than
UT_NAMESIZE
(including a terminating null character).
The ut_host
field shall be initialized
from host.
If the user accounting database imposes a limit on the size of the
ut_host
field, it shall
truncate the value, but any such limit shall not be smaller than
UT_HOSTSIZE
(including a terminating null character).
If the name parameter does not refer
to an empty string (i.e. ""
),
the ut_type
field shall be set to
USER_PROCESS
; otherwise the
ut_type
field shall be set to
DEAD_PROCESS
.
The ut_id
field shall be set to the
process identifier for the current process.
The ut_tv
field shall be set to the
current time of day.
Note: If a process does not have write access to the the user accounting database, the logwtmp() function will not update it. Since the function does not return any value, an application has no way of knowing whether it succeeded or failed.
<<< Previous | Home | Next >>> |
logout | Up | openpty |