int log_before_transfer = 0;
int stdout_format_has_i = 0;
int stdout_format_has_o_or_i = 0;
int log_before_transfer = 0;
int stdout_format_has_i = 0;
int stdout_format_has_o_or_i = 0;
rprintf(F,"Options\n");
rprintf(F," -v, --verbose increase verbosity\n");
rprintf(F," -q, --quiet suppress non-error messages\n");
rprintf(F,"Options\n");
rprintf(F," -v, --verbose increase verbosity\n");
rprintf(F," -q, --quiet suppress non-error messages\n");
rprintf(F," -c, --checksum skip based on checksum, not mod-time & size\n");
rprintf(F," -a, --archive archive mode; same as -rlptgoD (no -H)\n");
rprintf(F," --no-OPTION turn off an implied OPTION (e.g. --no-D)\n");
rprintf(F," -c, --checksum skip based on checksum, not mod-time & size\n");
rprintf(F," -a, --archive archive mode; same as -rlptgoD (no -H)\n");
rprintf(F," --no-OPTION turn off an implied OPTION (e.g. --no-D)\n");
rprintf(F," -H, --hard-links preserve hard links\n");
rprintf(F," -p, --perms preserve permissions\n");
rprintf(F," -E, --executability preserve the file's executability\n");
rprintf(F," -H, --hard-links preserve hard links\n");
rprintf(F," -p, --perms preserve permissions\n");
rprintf(F," -E, --executability preserve the file's executability\n");
rprintf(F," -o, --owner preserve owner (super-user only)\n");
rprintf(F," -g, --group preserve group\n");
rprintf(F," --devices preserve device files (super-user only)\n");
rprintf(F," -o, --owner preserve owner (super-user only)\n");
rprintf(F," -g, --group preserve group\n");
rprintf(F," --devices preserve device files (super-user only)\n");
rprintf(F," --delete delete extraneous files from destination dirs\n");
rprintf(F," --delete-before receiver deletes before transfer (default)\n");
rprintf(F," --delete-during receiver deletes during transfer, not before\n");
rprintf(F," --delete delete extraneous files from destination dirs\n");
rprintf(F," --delete-before receiver deletes before transfer (default)\n");
rprintf(F," --delete-during receiver deletes during transfer, not before\n");
rprintf(F," --delete-after receiver deletes after transfer, not before\n");
rprintf(F," --delete-excluded also delete excluded files from destination dirs\n");
rprintf(F," --ignore-errors delete even if there are I/O errors\n");
rprintf(F," --delete-after receiver deletes after transfer, not before\n");
rprintf(F," --delete-excluded also delete excluded files from destination dirs\n");
rprintf(F," --ignore-errors delete even if there are I/O errors\n");
{"no-verbose", 0, POPT_ARG_VAL, &verbose, 0, 0, 0 },
{"no-v", 0, POPT_ARG_VAL, &verbose, 0, 0, 0 },
{"quiet", 'q', POPT_ARG_NONE, 0, 'q', 0, 0 },
{"no-verbose", 0, POPT_ARG_VAL, &verbose, 0, 0, 0 },
{"no-v", 0, POPT_ARG_VAL, &verbose, 0, 0, 0 },
{"quiet", 'q', POPT_ARG_NONE, 0, 'q', 0, 0 },
+ {"motd", 0, POPT_ARG_VAL, &output_motd, 1, 0, 0 },
+ {"no-motd", 0, POPT_ARG_VAL, &output_motd, 0, 0, 0 },
{"stats", 0, POPT_ARG_NONE, &do_stats, 0, 0, 0 },
{"human-readable", 'h', POPT_ARG_NONE, 0, 'h', 0, 0},
{"dry-run", 'n', POPT_ARG_NONE, &dry_run, 0, 0, 0 },
{"stats", 0, POPT_ARG_NONE, &do_stats, 0, 0, 0 },
{"human-readable", 'h', POPT_ARG_NONE, 0, 'h', 0, 0},
{"dry-run", 'n', POPT_ARG_NONE, &dry_run, 0, 0, 0 },
{"del", 0, POPT_ARG_NONE, &delete_during, 0, 0, 0 },
{"delete", 0, POPT_ARG_NONE, &delete_mode, 0, 0, 0 },
{"delete-before", 0, POPT_ARG_VAL, &delete_before, 2, 0, 0 },
{"del", 0, POPT_ARG_NONE, &delete_during, 0, 0, 0 },
{"delete", 0, POPT_ARG_NONE, &delete_mode, 0, 0, 0 },
{"delete-before", 0, POPT_ARG_VAL, &delete_before, 2, 0, 0 },
- {"delete-during", 0, POPT_ARG_NONE, &delete_during, 0, 0, 0 },
+ {"delete-during", 0, POPT_ARG_VAL, &delete_during, 1, 0, 0 },
+ {"delete-delay", 0, POPT_ARG_VAL, &delete_during, 2, 0, 0 },
{"delete-after", 0, POPT_ARG_NONE, &delete_after, 0, 0, 0 },
{"delete-excluded", 0, POPT_ARG_NONE, &delete_excluded, 0, 0, 0 },
{"remove-sent-files",0, POPT_ARG_VAL, &remove_source_files, 2, 0, 0 }, /* deprecated */
{"delete-after", 0, POPT_ARG_NONE, &delete_after, 0, 0, 0 },
{"delete-excluded", 0, POPT_ARG_NONE, &delete_excluded, 0, 0, 0 },
{"remove-sent-files",0, POPT_ARG_VAL, &remove_source_files, 2, 0, 0 }, /* deprecated */
- strcpy(err_buf, "Error parsing options: "
- "option may be supported on client but not on server?\n");
+ strlcpy(err_buf, "Error parsing options: option may "
+ "be supported on client but not on server?\n",
+ sizeof err_buf);
arg = sanitize_path(NULL, arg, NULL, 0, NULL);
arg = sanitize_path(NULL, arg, NULL, 0, NULL);
snprintf(err_buf, sizeof err_buf,
"You may not combine multiple --delete-WHEN options.\n");
return 0;
snprintf(err_buf, sizeof err_buf,
"You may not combine multiple --delete-WHEN options.\n");
return 0;
int i;
for (i = *argc; i-- > 0; )
(*argv)[i] = sanitize_path(NULL, (*argv)[i], "", 0, NULL);
int i;
for (i = *argc; i-- > 0; )
(*argv)[i] = sanitize_path(NULL, (*argv)[i], "", 0, NULL);
tmpdir = sanitize_path(NULL, tmpdir, NULL, 0, NULL);
tmpdir = sanitize_path(NULL, tmpdir, NULL, 0, NULL);
backup_dir = sanitize_path(NULL, backup_dir, NULL, 0, NULL);
backup_dir = sanitize_path(NULL, backup_dir, NULL, 0, NULL);
- if (check_filter(elp, backup_dir, 1) < 0) {
- options_rejected:
- snprintf(err_buf, sizeof err_buf,
- "Your options have been rejected by the server.\n");
- return 0;
- }
+ if (check_filter(elp, backup_dir, 1) < 0)
+ goto options_rejected;
clean_fname(partial_dir, 1);
if (!*partial_dir || strcmp(partial_dir, ".") == 0)
partial_dir = NULL;
clean_fname(partial_dir, 1);
if (!*partial_dir || strcmp(partial_dir, ".") == 0)
partial_dir = NULL;
parse_rule(&filter_list, partial_dir,
MATCHFLG_NO_PREFIXES|MATCHFLG_DIRECTORY, 0);
}
parse_rule(&filter_list, partial_dir,
MATCHFLG_NO_PREFIXES|MATCHFLG_DIRECTORY, 0);
}