Home | History | Annotate | Download | only in ac

Lines Matching defs:usr

53 	struct utmp usr;
233 if (is_login_tty(up->usr.ut_line))
366 secs = yesterday - lp->usr.ut_time;
367 Users = update_user(Users, lp->usr.ut_name, secs);
368 lp->usr.ut_time = yesterday; /* as if they just logged in */
391 if (*up->ut_line == '~' || strncmp(lp->usr.ut_line, up->ut_line,
393 secs = up->ut_time - lp->usr.ut_time;
394 Users = update_user(Users, lp->usr.ut_name, secs);
399 sizeof (lp->usr.ut_line), lp->usr.ut_line,
400 sizeof (lp->usr.ut_name), lp->usr.ut_name,
444 memmove((char *)&lp->usr, (char *)up, sizeof (struct utmp));
448 ctime(&lp->usr.ut_time), sizeof (up->ut_line),
462 struct utmp usr;
467 while (fread((char *)&usr, sizeof(usr), 1, fp) == 1) {
469 FirstTime = usr.ut_time;
471 ltm = localtime(&usr.ut_time);
477 secs = usr.ut_time;
485 switch(*usr.ut_line) {
487 secs = usr.ut_time;
490 secs -= usr.ut_time;
495 lp->usr.ut_time -= secs;
498 head = log_out(head, &usr);
499 FirstTime = usr.ut_time; /* shouldn't be needed */
507 if (*usr.ut_name) {
508 if ((strncmp(usr.ut_line, "tty", 3) != 0 &&
509 strncmp(usr.ut_line, "dty", 3) != 0) ||
510 strchr("pqrstuvwxyzPQRST", usr.ut_line[3]) == 0 ||
511 *usr.ut_host != '\0' ||
512 is_login_tty(usr.ut_line))
513 head = log_in(head, &usr);
517 19, ctime(&usr.ut_time),
518 sizeof (usr.ut_line), usr.ut_line,
519 sizeof (usr.ut_name), usr.ut_name);
522 head = log_out(head, &usr);
527 usr.ut_time = time((time_t *)0);
528 (void)strcpy(usr.ut_line, "~");
531 ltm = localtime(&usr.ut_time);
536 secs = usr.ut_time;
546 head = log_out(head, &usr);