static int refused_delete, refused_archive_part, refused_compress;
static int refused_partial, refused_progress, refused_delete_before;
static int refused_delete_during;
static int refused_delete, refused_archive_part, refused_compress;
static int refused_partial, refused_progress, refused_delete_before;
static int refused_delete_during;
static char *max_size_arg, *min_size_arg;
static char tmp_partialdir[] = ".~tmp~";
static char *max_size_arg, *min_size_arg;
static char tmp_partialdir[] = ".~tmp~";
char const *got_socketpair = "no ";
char const *have_inplace = "no ";
char const *hardlinks = "no ";
char const *got_socketpair = "no ";
char const *have_inplace = "no ";
char const *hardlinks = "no ";
char const *acls = "no ";
char const *xattrs = "no ";
char const *links = "no ";
char const *acls = "no ";
char const *xattrs = "no ";
char const *links = "no ";
rprintf(f, "%s version %s protocol version %d%s\n",
RSYNC_NAME, RSYNC_VERSION, PROTOCOL_VERSION, subprotocol);
rprintf(f, "%s version %s protocol version %d%s\n",
RSYNC_NAME, RSYNC_VERSION, PROTOCOL_VERSION, subprotocol);
(int)(sizeof (int64) * 8));
rprintf(f, " %ssocketpairs, %shardlinks, %ssymlinks, %sIPv6, batchfiles, %sinplace,\n",
got_socketpair, hardlinks, links, ipv6, have_inplace);
(int)(sizeof (int64) * 8));
rprintf(f, " %ssocketpairs, %shardlinks, %ssymlinks, %sIPv6, batchfiles, %sinplace,\n",
got_socketpair, hardlinks, links, ipv6, have_inplace);
- rprintf(f, " %sappend, %sACLs, %sxattrs, %siconv\n",
- have_inplace, acls, xattrs, iconv);
+ rprintf(f, " %sappend, %sACLs, %sxattrs, %siconv, %ssymtimes\n",
+ have_inplace, acls, xattrs, iconv, symtimes);
OPT_FILTER, OPT_COMPARE_DEST, OPT_COPY_DEST, OPT_LINK_DEST, OPT_HELP,
OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW, OPT_MIN_SIZE, OPT_CHMOD,
OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_ONLY_WRITE_BATCH, OPT_MAX_SIZE,
OPT_FILTER, OPT_COMPARE_DEST, OPT_COPY_DEST, OPT_LINK_DEST, OPT_HELP,
OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW, OPT_MIN_SIZE, OPT_CHMOD,
OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_ONLY_WRITE_BATCH, OPT_MAX_SIZE,
OPT_SERVER, OPT_REFUSED_BASE = 9000};
static struct poptOption long_options[] = {
OPT_SERVER, OPT_REFUSED_BASE = 9000};
static struct poptOption long_options[] = {
{"ignore-times", 'I', POPT_ARG_NONE, &ignore_times, 0, 0, 0 },
{"size-only", 0, POPT_ARG_NONE, &size_only, 0, 0, 0 },
{"one-file-system", 'x', POPT_ARG_NONE, 0, 'x', 0, 0 },
{"ignore-times", 'I', POPT_ARG_NONE, &ignore_times, 0, 0, 0 },
{"size-only", 0, POPT_ARG_NONE, &size_only, 0, 0, 0 },
{"one-file-system", 'x', POPT_ARG_NONE, 0, 'x', 0, 0 },
+ {"no-one-file-system",'x',POPT_ARG_VAL, &one_file_system, 0, 0, 0 },
+ {"no-x", 'x', POPT_ARG_VAL, &one_file_system, 0, 0, 0 },
{"update", 'u', POPT_ARG_NONE, &update_only, 0, 0, 0 },
{"existing", 0, POPT_ARG_NONE, &ignore_non_existing, 0, 0, 0 },
{"ignore-non-existing",0,POPT_ARG_NONE, &ignore_non_existing, 0, 0, 0 },
{"update", 'u', POPT_ARG_NONE, &update_only, 0, 0, 0 },
{"existing", 0, POPT_ARG_NONE, &ignore_non_existing, 0, 0, 0 },
{"ignore-non-existing",0,POPT_ARG_NONE, &ignore_non_existing, 0, 0, 0 },
{"temp-dir", 'T', POPT_ARG_STRING, &tmpdir, 0, 0, 0 },
#ifdef ICONV_OPTION
{"iconv", 0, POPT_ARG_STRING, &iconv_opt, 0, 0, 0 },
{"temp-dir", 'T', POPT_ARG_STRING, &tmpdir, 0, 0, 0 },
#ifdef ICONV_OPTION
{"iconv", 0, POPT_ARG_STRING, &iconv_opt, 0, 0, 0 },
#endif
{"ipv4", '4', POPT_ARG_VAL, &default_af_hint, AF_INET, 0, 0 },
{"ipv6", '6', POPT_ARG_VAL, &default_af_hint, AF_INET6, 0, 0 },
#endif
{"ipv4", '4', POPT_ARG_VAL, &default_af_hint, AF_INET, 0, 0 },
{"ipv6", '6', POPT_ARG_VAL, &default_af_hint, AF_INET6, 0, 0 },
refused_progress = op->val;
else if (wildmatch("inplace", op->longName))
refused_inplace = op->val;
refused_progress = op->val;
else if (wildmatch("inplace", op->longName))
refused_inplace = op->val;
arg = sanitize_path(NULL, arg, NULL, 0);
if (server_filter_list.head) {
int rej;
arg = sanitize_path(NULL, arg, NULL, 0);
if (server_filter_list.head) {
int rej;
- clean_fname(cp, CFN_COLLAPSE_DOT_DOT_DIRS);
- rej = check_filter(&server_filter_list, cp, 0) < 0;
+ dir = cp + (*cp == '/' ? module_dirlen : 0);
+ clean_fname(dir, CFN_COLLAPSE_DOT_DOT_DIRS);
+ rej = check_filter(&server_filter_list, dir, 0) < 0;
case OPT_MAX_SIZE:
if ((max_size = parse_size_arg(&max_size_arg, 'b')) <= 0) {
snprintf(err_buf, sizeof err_buf,
case OPT_MAX_SIZE:
if ((max_size = parse_size_arg(&max_size_arg, 'b')) <= 0) {
snprintf(err_buf, sizeof err_buf,
if (read_batch && files_from) {
snprintf(err_buf, sizeof err_buf,
"--read-batch cannot be used with --files-from\n");
if (read_batch && files_from) {
snprintf(err_buf, sizeof err_buf,
"--read-batch cannot be used with --files-from\n");
- clean_fname(tmpdir, CFN_COLLAPSE_DOT_DOT_DIRS);
- if (check_filter(elp, tmpdir, 1) < 0)
+ dir = tmpdir + (*tmpdir == '/' ? module_dirlen : 0);
+ clean_fname(dir, CFN_COLLAPSE_DOT_DOT_DIRS);
+ if (check_filter(elp, dir, 1) < 0)
- clean_fname(backup_dir, CFN_COLLAPSE_DOT_DOT_DIRS);
- if (check_filter(elp, backup_dir, 1) < 0)
+ dir = backup_dir + (*backup_dir == '/' ? module_dirlen : 0);
+ clean_fname(dir, CFN_COLLAPSE_DOT_DOT_DIRS);
+ if (check_filter(elp, dir, 1) < 0)
if (sanitize_paths)
files_from = sanitize_path(NULL, files_from, NULL, 0);
if (server_filter_list.head) {
if (sanitize_paths)
files_from = sanitize_path(NULL, files_from, NULL, 0);
if (server_filter_list.head) {
- clean_fname(files_from, CFN_COLLAPSE_DOT_DOT_DIRS);
- if (check_filter(&server_filter_list, files_from, 0) < 0)
+ dir = files_from + (*files_from == '/' ? module_dirlen : 0);
+ clean_fname(dir, CFN_COLLAPSE_DOT_DOT_DIRS);
+ if (check_filter(&server_filter_list, dir, 0) < 0)
#if SUBPROTOCOL_VERSION != 0
if (protocol_version == PROTOCOL_VERSION) {
x += snprintf(argstr+x, sizeof argstr - x,
#if SUBPROTOCOL_VERSION != 0
if (protocol_version == PROTOCOL_VERSION) {
x += snprintf(argstr+x, sizeof argstr - x,
- "e%d.%d%s", PROTOCOL_VERSION, SUBPROTOCOL_VERSION,
- allow_inc_recurse ? "i" : "");
+ "%d.%d", PROTOCOL_VERSION, SUBPROTOCOL_VERSION);