Lines Matching defs:utmp
53 * Lastlog support and dynamic utmp entry allocation
60 * simple wtmp/utmp frobber
62 * usage: sessreg [ -w <wtmp-file> ] [ -u <utmp-file> ]
83 static void set_utmp (struct utmp *u, char *line, char *user, char *host,
134 "%s: usage %s {-a -d} [-w wtmp-file] [-u utmp-file]"
199 * utmp/wtmp files, since strlcpy() does not write past the \0 terminator.
214 int utmp;
221 struct utmp utmp_entry;
391 utmp = open (utmp_file, O_RDWR);
392 if (utmp != -1) {
393 syserr ((int) lseek (utmp, (off_t) slot_number * sizeof (struct utmp), 0), "lseek");
394 sysnerr (write (utmp, (char *) &utmp_entry, sizeof (utmp_entry))
395 == sizeof (utmp_entry), "write utmp entry");
396 close (utmp);
447 * fill in the appropriate records of the utmp entry
452 set_utmp (struct utmp *u, char *line, char *user, char *host, time_t date, int addp)
508 struct utmpx *u; /* pointer to entry in utmp file */
616 * design, but is limited by the non-existent interface to utmp.
671 * display not found in Xservers file - allocate utmp entry dynamically
677 * find a free utmp slot for the X display. This allocates a new entry
684 int utmp;
685 struct utmp entry;
689 syserr(utmp = open (utmp_file, O_RDONLY), "open utmp");
695 syserr ((int) lseek (utmp, (off_t) slot * sizeof (struct utmp), 0), "lseek");
700 while (read (utmp, (char *) &entry, sizeof (entry)) == sizeof (entry)) {
717 close (utmp);