2 * Part of Very Secure FTPd
7 * Routines to do very very simple access control based on filenames.
16 vsf_access_check_file(const struct mystr
* p_filename_str
)
18 static struct mystr s_access_str
;
19 unsigned int iters
= 0;
21 if (!tunable_deny_file
)
25 if (str_isempty(&s_access_str
))
27 str_alloc_text(&s_access_str
, tunable_deny_file
);
29 if (vsf_filename_passes_filter(p_filename_str
, &s_access_str
, &iters
))
35 struct str_locate_result loc_res
=
36 str_locate_str(p_filename_str
, &s_access_str
);
46 vsf_access_check_file_visible(const struct mystr
* p_filename_str
)
48 static struct mystr s_access_str
;
49 unsigned int iters
= 0;
51 if (!tunable_hide_file
)
55 if (str_isempty(&s_access_str
))
57 str_alloc_text(&s_access_str
, tunable_hide_file
);
59 if (vsf_filename_passes_filter(p_filename_str
, &s_access_str
, &iters
))
65 struct str_locate_result loc_res
=
66 str_locate_str(p_filename_str
, &s_access_str
);