Lines Matching refs:utmp
80 /* update utmp and wtmp - the BSD way */
85 prepare_utmp (struct utmp *utmp, char *tty,
90 memset(utmp, 0, sizeof(*utmp));
91 utmp->ut_time = time(NULL);
92 strncpy(utmp->ut_line, ttyx, sizeof(utmp->ut_line));
93 strncpy(utmp->ut_name, username, sizeof(utmp->ut_name));
96 strncpy(utmp->ut_user, username, sizeof(utmp->ut_user));
103 memcpy(&utmp->ut_addr, he->h_addr_list[0],
104 sizeof(utmp->ut_addr));
109 shrink_hostname (hostname, utmp->ut_host, sizeof(utmp->ut_host));
113 utmp->ut_type = USER_PROCESS;
117 utmp->ut_pid = getpid();
121 strncpy(utmp->ut_id, make_id(ttyx), sizeof(utmp->ut_id));
135 struct utmp utmp;
138 prepare_utmp (&utmp, tty, username, hostname);
143 pututline(&utmp);
152 lseek(fd, (long)(ttyno * sizeof(struct utmp)), SEEK_SET);
153 write(fd, &utmp, sizeof(struct utmp));
161 write(fd, &utmp, sizeof(struct utmp));