/* Perform name match against the schema. Result is stored in * match_type. */ void cnode_schema_match(struct cnode *schema, char *name, enum match_type *match_type) { switch (schema->type) { case CNODE_TYPE_KEYWORD: keyword_match(name, schema->name, match_type); break; case CNODE_TYPE_WORD: word_match(name, match_type); break; case CNODE_TYPE_IPV4: ipv4_match(name, match_type); break; case CNODE_TYPE_IPV4_PREFIX: ipv4_prefix_match(name, match_type); break; case CNODE_TYPE_IPV6: ipv6_match(name, match_type); break; case CNODE_TYPE_IPV6_PREFIX: ipv6_prefix_match(name, match_type); break; case CNODE_TYPE_MAC: mac_address_match(name, match_type); break; case CNODE_TYPE_RANGE: range_match(name, schema, match_type); break; default: *match_type = NONE_MATCH; break; } }
soulB::checks_returns soulCH::acl_checks(char *acl) { /* Run checks for ACL if they exist in confile file */ soulB::checks_returns return_value = CONTINUE; if ((db_io->do_exist(users_file,0,acl,NULL)) == TRUE) if(return_value = user_match(acl)) return return_value; if ((db_io->do_exist(ext_file,0,acl,NULL)) == TRUE) if(return_value = extensions_match(acl)) return return_value; if ((db_io->do_exist(key_file,0,acl,NULL)) == TRUE) if(return_value = keyword_match(acl)) return return_value; if ((db_io->do_exist(prob_file,0,acl,NULL)) == TRUE) if(return_value = prob_match(acl)) return return_value; if ((db_io->do_exist(textdom_file,0,acl,NULL)) == TRUE) if(return_value = db_match(acl,DOMAINS)) return return_value; if ((db_io->do_exist(texturl_file,0,acl,NULL)) == TRUE) if(return_value = db_match(acl,URLS)) return return_value; return CONTINUE; }