Lines Matching defs:tok

115     char   *tok;
126 for (tok = strtok(list, listsep); tok != NULL; tok = strtok((char *) 0, listsep)) {
127 if (strcmp(tok, "EXCEPT") == 0) /* EXCEPT: give up */
129 if ((match = (*match_fn)(tok, item, login_access_opts)) != 0) /* YES */
135 while ((tok = strtok((char *) 0, listsep)) && strcmp(tok, "EXCEPT")) {
138 if (tok == NULL ||
176 group_match(const char *tok, const char *username)
186 if ((group = getgrnam(tok)) == NULL) {
210 user_match(const char *tok, const char *string,
223 if (tok[0] == '@') { /* netgroup */
224 return (netgroup_match(tok + 1, (char *) 0, string));
225 } else if (tok[0] == '(' && tok[(stringlen = strlen(&tok[1]))] == ')') { /* group */
226 if ((grpstr = strndup(&tok[1], stringlen - 1)) == NULL) {
233 } else if (string_match(tok, string)) { /* ALL or exact match */
236 return (group_match(tok, string));
244 from_match(const char *tok, const char *string,
259 if (tok[0] == '@') { /* netgroup */
260 return (netgroup_match(tok + 1, string, (char *) 0));
261 } else if (string_match(tok, string)) { /* ALL or exact match */
263 } else if (tok[0] == '.') { /* domain: match last fields */
264 if ((str_len = strlen(string)) > (tok_len = strlen(tok))
265 && strcasecmp(tok, string + str_len - tok_len) == 0)
267 } else if (strcmp(tok, "LOCAL") == 0) { /* local: no dots */
270 } else if (tok[(tok_len = strlen(tok)) - 1] == '.' /* network */
271 && strncmp(tok, string, tok_len) == 0) {
280 string_match(const char *tok, const char *string)
288 if (strcmp(tok, "ALL") == 0) { /* all: always matches */
290 } else if (strcasecmp(tok, string) == 0) { /* try exact match */