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
;
20 if (!tunable_deny_file
)
24 if (str_isempty(&s_access_str
))
26 str_alloc_text(&s_access_str
, tunable_deny_file
);
28 if (vsf_filename_passes_filter(p_filename_str
, &s_access_str
))
34 struct str_locate_result loc_res
=
35 str_locate_str(p_filename_str
, &s_access_str
);
45 vsf_access_check_file_visible(const struct mystr
* p_filename_str
)
47 static struct mystr s_access_str
;
49 if (!tunable_hide_file
)
53 if (str_isempty(&s_access_str
))
55 str_alloc_text(&s_access_str
, tunable_hide_file
);
57 if (vsf_filename_passes_filter(p_filename_str
, &s_access_str
))
63 struct str_locate_result loc_res
=
64 str_locate_str(p_filename_str
, &s_access_str
);