Commit 46bffd98 authored by Wayne Davison's avatar Wayne Davison

Fix the setting of module_dirlen for a module path of "/".

This fixes a crash in the exclude code when chroot is off.
parent 41b84ce0
......@@ -321,13 +321,11 @@ static int rsync_module(int f_in, int f_out, int i)
/* 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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment