/* Returns pointer to "struct tomoyo_domain_info" if found, NULL otherwise.  */
struct tomoyo_domain_info* tomoyo_find_domain(const char *domainname)
/* Returns pointer to "struct tomoyo_domain_info" if found, NULL otherwise.  */
struct tomoyo_domain_info* tomoyo_find_domain(const char *domainname)
{
	struct tomoyo_domain_info *domain;
	struct tomoyo_path_info name;
	name.name = domainname;
	tomoyo_fill_path_info(&name);
	list_for_each_entry(domain, &tomoyo_domain_list, list) {
		if (!domain->is_deleted &&
		    !tomoyo_pathcmp(&name, domain->domainname))
			return domain;
	}
	return NULL;
}