sargs[sargc] = NULL;
- io_printf(f_out, "@RSYNCD: %d\n", PROTOCOL_VERSION);
+ io_printf(f_out, "@RSYNCD: %d\n", protocol_version);
if (!read_line(f_in, line, sizeof(line)-1)) {
rprintf(FERROR, "rsync: did not see server greeting\n");
io_printf(f_out, "\n");
if (protocol_version < 23) {
- if (protocol_version == 22 || (protocol_version > 17 && !am_sender))
+ if (protocol_version == 22 || !am_sender)
io_start_multiplex_in(f_in);
}
* supplementary groups. */
exclude_path_prefix = use_chroot? "" : lp_path(i);
+ if (*exclude_path_prefix == '/' && !exclude_path_prefix[1])
+ exclude_path_prefix = "";
p = lp_include_from(i);
add_exclude_file(&server_exclude_list, p, MISSING_FATAL, ADD_INCLUDE);
return -1;
}
- if (!push_dir("/", 0)) {
+ if (!push_dir("/")) {
rsyserr(FERROR, errno, "chdir %s failed\n", lp_path(i));
io_printf(f_out, "@ERROR: chdir failed\n");
return -1;
}
} else {
- if (!push_dir(lp_path(i), 0)) {
+ if (!push_dir(lp_path(i))) {
rsyserr(FERROR, errno, "chdir %s failed\n", lp_path(i));
io_printf(f_out, "@ERROR: chdir failed\n");
return -1;
#endif
if (protocol_version < 23) {
- if (protocol_version == 22 || (protocol_version > 17 && am_sender))
+ if (protocol_version == 22 || am_sender)
io_start_multiplex_out(f_out);
}
set_nonblocking(f_in);
}
- io_printf(f_out, "@RSYNCD: %d\n", PROTOCOL_VERSION);
+ io_printf(f_out, "@RSYNCD: %d\n", protocol_version);
motd = lp_motd_file();
if (motd && *motd) {