Lines Matching refs:filename
146 static bool tomoyo_correct_path2(const char *filename, const size_t len);
250 char *filename; in tomoyo_parse_name_union() local
257 filename = tomoyo_read_token(param); in tomoyo_parse_name_union()
258 if (!tomoyo_correct_word(filename)) in tomoyo_parse_name_union()
260 ptr->filename = tomoyo_get_name(filename); in tomoyo_parse_name_union()
261 return ptr->filename != NULL; in tomoyo_parse_name_union()
526 static bool tomoyo_correct_path2(const char *filename, const size_t len) in tomoyo_correct_path2() argument
528 const char *cp1 = memchr(filename, '/', len); in tomoyo_correct_path2()
529 const char *cp2 = memchr(filename, '.', len); in tomoyo_correct_path2()
531 return cp1 && (!cp2 || (cp1 < cp2)) && tomoyo_correct_word2(filename, len); in tomoyo_correct_path2()
542 bool tomoyo_correct_path(const char *filename) in tomoyo_correct_path() argument
544 return tomoyo_correct_path2(filename, strlen(filename)); in tomoyo_correct_path()
630 static int tomoyo_const_part_length(const char *filename) in tomoyo_const_part_length() argument
635 if (!filename) in tomoyo_const_part_length()
637 while ((c = *filename++) != '\0') { in tomoyo_const_part_length()
642 c = *filename++; in tomoyo_const_part_length()
651 c = *filename++; in tomoyo_const_part_length()
654 c = *filename++; in tomoyo_const_part_length()
693 static bool tomoyo_file_matches_pattern2(const char *filename, in tomoyo_file_matches_pattern2() argument
698 while (filename < filename_end && pattern < pattern_end) { in tomoyo_file_matches_pattern2()
704 if (*filename++ != *pattern++) in tomoyo_file_matches_pattern2()
708 c = *filename; in tomoyo_file_matches_pattern2()
715 if (filename[1] == '\\') in tomoyo_file_matches_pattern2()
716 filename++; in tomoyo_file_matches_pattern2()
717 else if (tomoyo_byte_range(filename + 1)) in tomoyo_file_matches_pattern2()
718 filename += 3; in tomoyo_file_matches_pattern2()
726 if (*++filename != '\\') in tomoyo_file_matches_pattern2()
745 if (c == '\\' && tomoyo_byte_range(filename + 1) in tomoyo_file_matches_pattern2()
746 && strncmp(filename + 1, pattern, 3) == 0) { in tomoyo_file_matches_pattern2()
747 filename += 3; in tomoyo_file_matches_pattern2()
754 for (i = 0; i <= filename_end - filename; i++) { in tomoyo_file_matches_pattern2()
756 filename + i, filename_end, in tomoyo_file_matches_pattern2()
759 c = filename[i]; in tomoyo_file_matches_pattern2()
764 if (filename[i + 1] == '\\') in tomoyo_file_matches_pattern2()
766 else if (tomoyo_byte_range(filename + i + 1)) in tomoyo_file_matches_pattern2()
776 while (isdigit(filename[j])) in tomoyo_file_matches_pattern2()
779 while (isxdigit(filename[j])) in tomoyo_file_matches_pattern2()
782 while (tomoyo_alphabet_char(filename[j])) in tomoyo_file_matches_pattern2()
787 filename + i, filename_end, in tomoyo_file_matches_pattern2()
793 filename++; in tomoyo_file_matches_pattern2()
799 return filename == filename_end && pattern == pattern_end; in tomoyo_file_matches_pattern2()
812 static bool tomoyo_file_matches_pattern(const char *filename, in tomoyo_file_matches_pattern() argument
825 result = tomoyo_file_matches_pattern2(filename, in tomoyo_file_matches_pattern()
836 result = tomoyo_file_matches_pattern2(filename, filename_end, in tomoyo_file_matches_pattern()
932 bool tomoyo_path_matches_pattern(const struct tomoyo_path_info *filename, in tomoyo_path_matches_pattern() argument
935 const char *f = filename->name; in tomoyo_path_matches_pattern()
941 return !tomoyo_pathcmp(filename, pattern); in tomoyo_path_matches_pattern()
943 if (filename->is_dir != pattern->is_dir) in tomoyo_path_matches_pattern()