Listing 1: /etc/wtmp file structure
struct utmp
{
char ut_user[8] ; /* User login name */
char ut_id[4] ; /* /etc/lines id(usually line #) */
char ut_line[12] ; /* device name (console, lnxx) */
short ut_pid ; /* process id */
short ut_type ; /* type of entry */
struct exit_status
{
short e_termination ; /* Process termination status */
short e_exit ; /* Process exit status */
}
ut_exit ; /* The exit status of a process
* marked as DEAD_PROCESS.
*/
time_t ut_time ; /* time entry was made */
} ;
|