/* Returns true if any domain can open @filename for reading, false otherwise.  */
static bool tomoyo_is_globally_readable_file(const struct tomoyo_path_info *filename)
/* Returns true if any domain can open @filename for reading, false otherwise.  */
static bool tomoyo_is_globally_readable_file(const struct tomoyo_path_info *filename)
{
	struct tomoyo_globally_readable_file_entry *ptr;
	bool found = false;
	down_read(&tomoyo_globally_readable_list_lock);
	list_for_each_entry(ptr, &tomoyo_globally_readable_list, list) {
		if (!ptr->is_deleted &&
		    tomoyo_path_matches_pattern(filename, ptr->filename)) {
			found = true;
			break;
		}
	}
	up_read(&tomoyo_globally_readable_list_lock);
	return found;
}