Lines Matching defs:utmpx
86 #include <utmpx.h>
232 logit(LOG_NOTICE, "%s(): no utmpx record for %s",
274 struct utmpx utmpx;
277 memset((void *)&utmpx, 0, sizeof(utmpx));
278 utmpx.ut_tv = *now;
279 (void)strncpy(utmpx.ut_name, username, sizeof(utmpx.ut_name));
281 (void)strncpy(utmpx.ut_host, hostname, sizeof(utmpx.ut_host));
283 utmpx.ut_ss = *ss;
285 (void)strncpy(utmpx.ut_line, tty, sizeof(utmpx.ut_line));
286 utmpx.ut_type = USER_PROCESS;
287 utmpx.ut_pid = getpid();
289 if ((size_t)(t - tty) >= sizeof(utmpx.ut_id)) {
290 (void)strncpy(utmpx.ut_id, t - sizeof(utmpx.ut_id),
291 sizeof(utmpx.ut_id));
293 (void)strncpy(utmpx.ut_id, tty, sizeof(utmpx.ut_id));
295 if (pututxline(&utmpx) == NULL)
296 logit(LOG_NOTICE, "Cannot update utmpx: %s", strerror(errno));
298 if (updwtmpx(_PATH_WTMPX, &utmpx) != 0)