| 262 | } |
| 263 | |
| 264 | static inline int path_is_daemon_excluded(char *path, int ignore_filename) |
| 265 | { |
| 266 | if (daemon_filter_list.head) { |
| 267 | char *slash = path; |
| 268 | |
| 269 | while ((slash = strchr(slash+1, '/')) != NULL) { |
| 270 | int ret; |
| 271 | *slash = '\0'; |
| 272 | ret = check_filter(&daemon_filter_list, FLOG, path, 1); |
| 273 | *slash = '/'; |
| 274 | if (ret < 0) { |
| 275 | errno = ENOENT; |
| 276 | return 1; |
| 277 | } |
| 278 | } |
| 279 | |
| 280 | if (!ignore_filename |
| 281 | && check_filter(&daemon_filter_list, FLOG, path, 1) < 0) { |
| 282 | errno = ENOENT; |
| 283 | return 1; |
| 284 | } |
| 285 | } |
| 286 | |
| 287 | return 0; |
| 288 | } |
| 289 | |
| 290 | static inline int is_excluded(const char *fname, int is_dir, int filter_level) |
| 291 | { |
no test coverage detected