Home | History | Annotate | Download | only in login

Lines Matching defs:utmpx

66 #include <utmpx.h>
241 struct utmpx utmpx;
244 memset((void *)&utmpx, 0, sizeof(utmpx));
245 utmpx.ut_tv = now;
246 (void)strncpy(utmpx.ut_name, username, sizeof(utmpx.ut_name));
248 (void)strncpy(utmpx.ut_host, hostname, sizeof(utmpx.ut_host));
249 utmpx.ut_ss = ss;
251 (void)strncpy(utmpx.ut_line, tty, sizeof(utmpx.ut_line));
252 utmpx.ut_type = USER_PROCESS;
253 utmpx.ut_pid = getpid();
255 if ((size_t)(t - tty) >= sizeof(utmpx.ut_id)) {
256 (void)strncpy(utmpx.ut_id, t - sizeof(utmpx.ut_id),
257 sizeof(utmpx.ut_id));
259 (void)strncpy(utmpx.ut_id, tty, sizeof(utmpx.ut_id));
261 if (pututxline(&utmpx) == NULL)
262 syslog(LOG_NOTICE, "Cannot update utmpx: %m");
264 if (updwtmpx(_PATH_WTMPX, &utmpx) != 0)