Lines Matching +defs:match +defs:line

20   * addresses (or network numbers), or on terminal line names in case of
55 /* login_access - match username/group and host/tty with access control file */
61 char line[BUFSIZ];
65 int match = NO;
77 * Process the table one line at a time and stop at the first match.
85 while (!match && fgets(line, sizeof(line), fp)) {
87 if (line[end = strlen(line) - 1] != '\n') {
88 syslog(LOG_ERR, "%s: line %d: missing newline or line too long",
92 if (line[0] == '#')
93 continue; /* comment line */
94 while (end > 0 && isspace((unsigned char)line[end - 1]))
96 line[end] = 0; /* strip trailing whitespace */
97 if (line[0] == 0) /* skip blank lines */
100 if (!(perm = strtok_r(line, fs, &foo))
104 syslog(LOG_ERR, "%s: line %d: bad field count",
110 syslog(LOG_ERR, "%s: line %d: bad first field",
115 match = (list_match(froms, &item, from_match)
122 return (match == 0 || (line[0] == '+'));
125 /* list_match - match an item against a list of tokens with exceptions */
133 int match = NO;
139 * a match, look for an "EXCEPT" list and recurse to determine whether
140 * the match is affected by any exceptions.
148 if ((match = (*match_fn) (tok, item)) != 0) /* YES */
153 if (match != NO) {
157 return (match);
175 /* netgroup_match - match group against machine or user */
191 /* user_match - match a username against one token */
202 * If a token has the magic value "ALL" the match always succeeds.
214 } else if (string_match(tok, string)) { /* ALL or exact match */
226 /* from_match - match a host or tty against a list of tokens */
235 * If a token has the magic value "ALL" the match always succeeds. Return
245 } else if (string_match(tok, string)) { /* ALL or exact match */
247 } else if (tok[0] == '.') { /* domain: match last fields */
261 /* string_match - match a string against one token */
267 * If the token has the magic value "ALL" the match always succeeds.
273 } else if (strcasecmp(tok, string) == 0) { /* try exact match */