Lines Matching refs:utmpp

104 static struct	utmpx *utmpp;	/* pointer for getutxent()	*/  variable
109 #define NMAX (sizeof (utmpp->ut_user))
110 #define LMAX (sizeof (utmpp->ut_line))
126 static char nameval[sizeof (utmpp->ut_user) + 1]; /* invoker's name */
144 static char user[sizeof (utmpp->ut_user) + 1]; /* holds user name */
483 char device[sizeof (utmpp->ut_line) + 1]; in dump()
487 char path[sizeof (utmpp->ut_line) + 6]; in dump()
496 if (utmpp->ut_user[0] == '\0') in dump()
499 (void) strncpy(user, utmpp->ut_user, sizeof (user)); in dump()
524 if (utmpp->ut_type == RUN_LVL || utmpp->ut_type == DEAD_PROCESS) { in dump()
525 pterm = utmpp->ut_exit.e_termination; in dump()
526 pexit = utmpp->ut_exit.e_exit; in dump()
532 lptr = localtime(&utmpp->ut_xtime); in dump()
539 if (utmpp->ut_line[0] == '\0') in dump()
542 (void) strncpy(device, utmpp->ut_line, in dump()
543 sizeof (utmpp->ut_line)); in dump()
544 device[sizeof (utmpp->ut_line)] = '\0'; in dump()
551 if (Topt && (utmpp->ut_type == USER_PROCESS)) { in dump()
554 (void) strncpy(path + 5, utmpp->ut_line, in dump()
555 sizeof (utmpp->ut_line)); in dump()
556 path[5 + sizeof (utmpp->ut_line)] = '\0'; in dump()
578 if (utmpp->ut_type == USER_PROCESS) { in dump()
580 (void) strncpy(path + 5, utmpp->ut_line, in dump()
581 sizeof (utmpp->ut_line)); in dump()
582 path[5 + sizeof (utmpp->ut_line)] = '\0'; in dump()
603 if (utmpp->ut_type != BOOT_TIME && in dump()
604 utmpp->ut_type != RUN_LVL && in dump()
605 utmpp->ut_type != ACCOUNTING) in dump()
606 (void) printf(" %5ld", utmpp->ut_pid); in dump()
611 if (utmpp->ut_type == DEAD_PROCESS) { in dump()
613 utmpp->ut_id); in dump()
616 } else if (utmpp->ut_type != INIT_PROCESS) { in dump()
629 while ((rc = strncmp(utmpp->ut_id, iinit, in dump()
668 if (utmpp->ut_type == INIT_PROCESS) in dump()
669 (void) printf(gettext(" id=%4.4s"), utmpp->ut_id); in dump()
673 if (dopt && utmpp->ut_type == DEAD_PROCESS) { in dump()
683 if (utmpp->ut_type == RUN_LVL) { in dump()
684 (void) printf(" %c %5ld %c", pterm, utmpp->ut_pid, in dump()
695 if (utmpp->ut_type == BOOT_TIME) { in dump()
705 if (utmpp->ut_host[0]) in dump()
706 (void) printf("\t(%.*s)", sizeof (utmpp->ut_host), in dump()
707 utmpp->ut_host); in dump()
727 while ((utmpp = getutxent()) != NULL) { in process()
731 utmpp->ut_user, utmpp->ut_id, utmpp->ut_line, utmpp->ut_type); in process()
733 if (utmpp->ut_type <= UTMAXTYPE) { in process()
738 if (strncmp(myname, utmpp->ut_user, in process()
739 sizeof (utmpp->ut_user)) == 0 && in process()
740 strncmp(mytty, utmpp->ut_line, in process()
741 sizeof (utmpp->ut_line)) == 0 && in process()
742 utmpp->ut_type == USER_PROCESS) { in process()
760 if (validtype[utmpp->ut_type]) { in process()
762 if (utmpp->ut_type == LOGIN_PROCESS) { in process()
763 if ((utmpp->ut_line[0] == '\0') || in process()
764 (strcmp(utmpp->ut_user, in process()
774 "of %d\n"), program, utmpp->ut_type); in process()
805 utmpp = &utmpt; in process()