Lines Matching defs:elem

162 	int all, ch, elem, flag, _fmt, i, lineno, linelen, left;
534 for (elem = 0; elem < pidlist.count; elem++)
538 if (kp[i].ki_ppid == pidlist.l.pids[elem]) {
546 for (elem = 0; elem < pidlist.count; elem++) {
547 if (elem >= pid_count.initial && elem < pid_count.traversed)
552 if (kp[i].ki_pid == pidlist.l.pids[elem]) {
569 for (elem = 0; elem < pidlist.count; elem++)
570 if (kp->ki_pid == pidlist.l.pids[elem])
586 for (elem = 0; elem < gidlist.count; elem++)
587 if (kp->ki_rgid == gidlist.l.gids[elem])
591 for (elem = 0; elem < jidlist.count; elem++)
592 if (kp->ki_jid == jidlist.l.jids[elem])
596 for (elem = 0; elem < pgrplist.count; elem++)
598 pgrplist.l.pids[elem])
602 for (elem = 0; elem < ruidlist.count; elem++)
604 ruidlist.l.uids[elem])
608 for (elem = 0; elem < sesslist.count; elem++)
609 if (kp->ki_sid == sesslist.l.pids[elem])
613 for (elem = 0; elem < ttylist.count; elem++)
614 if (kp->ki_tdev == ttylist.l.ttys[elem])
618 for (elem = 0; elem < uidlist.count; elem++)
619 if (kp->ki_uid == uidlist.l.uids[elem])
752 addelem_gid(struct listinfo *inf, const char *elem)
759 if (*elem == '\0' || strlen(elem) >= MAXLOGNAME) {
760 if (*elem == '\0')
763 xo_warnx("%s name too long: %s", inf->lname, elem);
780 bigtemp = strtoul(elem, &endp, 10);
786 grp = getgrnam(elem);
788 xo_warnx("No %s %s '%s'", inf->lname, nameorID, elem);
799 addelem_jid(struct listinfo *inf, const char *elem)
803 if (*elem == '\0') {
809 tempid = jail_getid(elem);
811 xo_warnx("Invalid %s: %s", inf->lname, elem);
823 addelem_pid(struct listinfo *inf, const char *elem)
828 if (*elem == '\0') {
835 tempid = strtol(elem, &endp, 10);
836 if (*endp != '\0' || tempid < 0 || elem == endp) {
837 xo_warnx("Invalid %s: %s", inf->lname, elem);
840 xo_warnx("%s too large: %s", inf->lname, elem);
861 addelem_tty(struct listinfo *inf, const char *elem)
870 switch (*elem) {
872 ttypath = elem;
875 if (strcmp(elem, "co") == 0) {
882 strlcat(pathbuf, elem, sizeof(pathbuf));
890 /* Check to see if /dev/tty${elem} exists */
892 strlcat(pathbuf2, elem, sizeof(pathbuf2));
898 /* Check to see if /dev/pts/${elem} exists */
900 strlcat(pathbuf3, elem, sizeof(pathbuf3));
935 addelem_uid(struct listinfo *inf, const char *elem)
941 if (*elem == '\0' || strlen(elem) >= MAXLOGNAME) {
942 if (*elem == '\0')
945 xo_warnx("%s name too long: %s", inf->lname, elem);
950 pwd = getpwnam(elem);
953 bigtemp = strtoul(elem, &endp, 10);
955 xo_warnx("No %s named '%s'", inf->lname, elem);
961 inf->lname, elem);