This function is used to check if a file should be included/excluded * from the list of files based on its name and type etc. The value of * filter_level is set to either SERVER_FILTERS or ALL_FILTERS. */
| 1008 | * from the list of files based on its name and type etc. The value of |
| 1009 | * filter_level is set to either SERVER_FILTERS or ALL_FILTERS. */ |
| 1010 | int name_is_excluded(const char *fname, int name_flags, int filter_level) |
| 1011 | { |
| 1012 | if (daemon_filter_list.head && check_filter(&daemon_filter_list, FLOG, fname, name_flags) < 0) { |
| 1013 | if (!(name_flags & NAME_IS_XATTR)) |
| 1014 | errno = ENOENT; |
| 1015 | return 1; |
| 1016 | } |
| 1017 | |
| 1018 | if (filter_level != ALL_FILTERS) |
| 1019 | return 0; |
| 1020 | |
| 1021 | if (filter_list.head && check_filter(&filter_list, FINFO, fname, name_flags) < 0) |
| 1022 | return 1; |
| 1023 | |
| 1024 | return 0; |
| 1025 | } |
| 1026 | |
| 1027 | int check_server_filter(filter_rule_list *listp, enum logcode code, const char *name, int name_flags) |
| 1028 | { |
no test coverage detected