X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/91f4b31fe1031adc3ec3e3066534c9d6be979d21..01d124d9e251317cdd9f12fb170a94e65f3c5e18:/options.c diff --git a/options.c b/options.c index 14071c87..b6eae4e1 100644 --- a/options.c +++ b/options.c @@ -311,15 +311,15 @@ void usage(enum logcode F) rprintf(F," -B, --block-size=SIZE force a fixed checksum block-size\n"); rprintf(F," -e, --rsh=COMMAND specify the remote shell to use\n"); rprintf(F," --rsync-path=PROGRAM specify the rsync to run on the remote machine\n"); - rprintf(F," --existing ignore non-existing files on receiving side\n"); - rprintf(F," --ignore-existing ignore files that already exist on receiving side\n"); - rprintf(F," --remove-sent-files sent files/symlinks are removed from sending side\n"); + rprintf(F," --existing skip creating new files on receiver\n"); + rprintf(F," --ignore-existing skip updating files that already exist on receiver\n"); + rprintf(F," --remove-sent-files sender removes successfully sent files (non-dirs)\n"); rprintf(F," --del an alias for --delete-during\n"); - rprintf(F," --delete delete files that don't exist on the sending side\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 on the receiving side\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," --force force deletion of directories even if not empty\n"); rprintf(F," --max-delete=NUM don't delete more than NUM files\n"); @@ -890,8 +890,10 @@ int parse_arguments(int *argc, const char ***argv, int frommain) case OPT_EXCLUDE_FROM: case OPT_INCLUDE_FROM: arg = poptGetOptArg(pc); - if (sanitize_paths) + if (sanitize_paths) { arg = sanitize_path(NULL, arg, NULL, 0, NULL); + die_on_unsafe_path((char*)arg, 0); + } if (server_filter_list.head) { char *cp = strdup(arg); if (!cp) @@ -1025,7 +1027,7 @@ int parse_arguments(int *argc, const char ***argv, int frommain) break; case OPT_LINK_DEST: -#ifdef HAVE_LINK +#ifdef SUPPORT_HARD_LINKS link_dest = 1; dest_option = "--link-dest"; goto set_dest_dir; @@ -1209,12 +1211,14 @@ int parse_arguments(int *argc, const char ***argv, int frommain) int i; for (i = *argc; i-- > 0; ) (*argv)[i] = sanitize_path(NULL, (*argv)[i], "", 0, NULL); - if (tmpdir) + if (tmpdir) { tmpdir = sanitize_path(NULL, tmpdir, NULL, 0, NULL); - if (partial_dir) - partial_dir = sanitize_path(NULL, partial_dir, NULL, 0, NULL); - if (backup_dir) + die_on_unsafe_path(tmpdir, 0); + } + if (backup_dir) { backup_dir = sanitize_path(NULL, backup_dir, NULL, 0, NULL); + die_on_unsafe_path(backup_dir, 0); + } } if (server_filter_list.head && !am_sender) { struct filter_list_struct *elp = &server_filter_list; @@ -1225,11 +1229,6 @@ int parse_arguments(int *argc, const char ***argv, int frommain) if (check_filter(elp, tmpdir, 1) < 0) goto options_rejected; } - if (partial_dir && *partial_dir) { - clean_fname(partial_dir, 1); - if (check_filter(elp, partial_dir, 1) < 0) - goto options_rejected; - } if (backup_dir) { if (!*backup_dir) goto options_rejected;