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()
531 static bool tomoyo_correct_path2(const char *filename, const size_t len) in tomoyo_correct_path2() argument
533 const char *cp1 = memchr(filename, '/', len); in tomoyo_correct_path2()
534 const char *cp2 = memchr(filename, '.', len); in tomoyo_correct_path2()
536 return cp1 && (!cp2 || (cp1 < cp2)) && tomoyo_correct_word2(filename, len); in tomoyo_correct_path2()
547 bool tomoyo_correct_path(const char *filename) in tomoyo_correct_path() argument
549 return tomoyo_correct_path2(filename, strlen(filename)); in tomoyo_correct_path()
635 static int tomoyo_const_part_length(const char *filename) in tomoyo_const_part_length() argument
640 if (!filename) in tomoyo_const_part_length()
642 while ((c = *filename++) != '\0') { in tomoyo_const_part_length()
647 c = *filename++; in tomoyo_const_part_length()
656 c = *filename++; in tomoyo_const_part_length()
659 c = *filename++; in tomoyo_const_part_length()
698 static bool tomoyo_file_matches_pattern2(const char *filename, in tomoyo_file_matches_pattern2() argument
703 while (filename < filename_end && pattern < pattern_end) { in tomoyo_file_matches_pattern2()
709 if (*filename++ != *pattern++) in tomoyo_file_matches_pattern2()
713 c = *filename; in tomoyo_file_matches_pattern2()
720 if (filename[1] == '\\') in tomoyo_file_matches_pattern2()
721 filename++; in tomoyo_file_matches_pattern2()
722 else if (tomoyo_byte_range(filename + 1)) in tomoyo_file_matches_pattern2()
723 filename += 3; in tomoyo_file_matches_pattern2()
731 if (*++filename != '\\') in tomoyo_file_matches_pattern2()
750 if (c == '\\' && tomoyo_byte_range(filename + 1) in tomoyo_file_matches_pattern2()
751 && strncmp(filename + 1, pattern, 3) == 0) { in tomoyo_file_matches_pattern2()
752 filename += 3; in tomoyo_file_matches_pattern2()
759 for (i = 0; i <= filename_end - filename; i++) { in tomoyo_file_matches_pattern2()
761 filename + i, filename_end, in tomoyo_file_matches_pattern2()
764 c = filename[i]; in tomoyo_file_matches_pattern2()
769 if (filename[i + 1] == '\\') in tomoyo_file_matches_pattern2()
771 else if (tomoyo_byte_range(filename + i + 1)) in tomoyo_file_matches_pattern2()
781 while (isdigit(filename[j])) in tomoyo_file_matches_pattern2()
784 while (isxdigit(filename[j])) in tomoyo_file_matches_pattern2()
787 while (tomoyo_alphabet_char(filename[j])) in tomoyo_file_matches_pattern2()
792 filename + i, filename_end, in tomoyo_file_matches_pattern2()
798 filename++; in tomoyo_file_matches_pattern2()
804 return filename == filename_end && pattern == pattern_end; in tomoyo_file_matches_pattern2()
817 static bool tomoyo_file_matches_pattern(const char *filename, in tomoyo_file_matches_pattern() argument
830 result = tomoyo_file_matches_pattern2(filename, in tomoyo_file_matches_pattern()
841 result = tomoyo_file_matches_pattern2(filename, filename_end, in tomoyo_file_matches_pattern()
937 bool tomoyo_path_matches_pattern(const struct tomoyo_path_info *filename, in tomoyo_path_matches_pattern() argument
940 const char *f = filename->name; in tomoyo_path_matches_pattern()
946 return !tomoyo_pathcmp(filename, pattern); in tomoyo_path_matches_pattern()
948 if (filename->is_dir != pattern->is_dir) in tomoyo_path_matches_pattern()