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 intitialized
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 intitialized
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 intitialized
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 fieldshall 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.
If a process does not have write access to the
the user accounting database, the
|