read_only = 1;
if (lp_transfer_logging(i)) {
- if (strstr(lp_log_format(i), "%i") != NULL)
+ if (log_format_has(lp_log_format(i), 'i'))
daemon_log_format_has_i = 1;
if (daemon_log_format_has_i
- || strstr(lp_log_format(i), "%o") != NULL)
+ || log_format_has(lp_log_format(i), 'o'))
daemon_log_format_has_o_or_i = 1;
}
/* TODO: Perhaps take a list of gids, and make them into the
* supplementary groups. */
- if (use_chroot) {
+ if (use_chroot || (module_dirlen = strlen(lp_path(i))) == 1) {
module_dirlen = 0;
set_filter_dir("/", 1);
- } else {
- module_dirlen = strlen(lp_path(i));
+ } else
set_filter_dir(lp_path(i), module_dirlen);
- }
p = lp_filter(i);
parse_rule(&server_filter_list, p, MATCHFLG_WORD_SPLIT,