From 3d1facaa5afe7d5c66cfb13d628471f2bf101ac4 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Mon, 14 Feb 2005 02:56:36 +0000 Subject: [PATCH] Fixed patch fuzz. --- openssl-support.diff | 38 +++++++++++++++++----------------- remove-sent-files.diff | 46 +++++++++++++++++++++--------------------- 2 files changed, 42 insertions(+), 42 deletions(-) diff --git a/openssl-support.diff b/openssl-support.diff index 16ee103..0c2b1a5 100644 --- a/openssl-support.diff +++ b/openssl-support.diff @@ -72,7 +72,7 @@ can't say if I've left any cleanup/compatibility errors in the code. if (verbose > 3) { rprintf(FINFO,"_exit_cleanup(code=%d, file=%s, line=%d): entered\n", code, safe_fname(file), line); ---- orig/clientserver.c 2005-02-07 20:41:56 +--- orig/clientserver.c 2005-02-14 02:45:10 +++ clientserver.c 2004-10-08 20:44:59 @@ -45,6 +45,9 @@ extern int select_timeout; extern int orig_umask; @@ -223,9 +223,9 @@ can't say if I've left any cleanup/compatibility errors in the code. AC_MSG_CHECKING([whether to call shutdown on all sockets]) case $host_os in *cygwin* ) AC_MSG_RESULT(yes) ---- orig/main.c 2005-02-07 20:41:56 +--- orig/main.c 2005-02-14 02:45:10 +++ main.c 2004-10-08 20:15:28 -@@ -52,6 +52,9 @@ extern int write_batch; +@@ -53,6 +53,9 @@ extern int write_batch; extern int batch_fd; extern int batch_gen_fd; extern int filesfrom_fd; @@ -235,7 +235,7 @@ can't say if I've left any cleanup/compatibility errors in the code. extern pid_t cleanup_child_pid; extern char *files_from; extern char *remote_filesfrom_file; -@@ -821,33 +824,48 @@ static int start_client(int argc, char * +@@ -823,33 +826,48 @@ static int start_client(int argc, char * if ((rc = copy_argv(argv))) return rc; @@ -308,7 +308,7 @@ can't say if I've left any cleanup/compatibility errors in the code. p = find_colon(argv[0]); if (p) { /* source is remote */ if (remote_filesfrom_file -@@ -879,12 +897,26 @@ static int start_client(int argc, char * +@@ -881,12 +899,26 @@ static int start_client(int argc, char * argv++; } else { /* source is local */ am_sender = 1; @@ -338,9 +338,9 @@ can't say if I've left any cleanup/compatibility errors in the code. p = strchr(host,'/'); if (p) { *p = '\0'; ---- orig/options.c 2005-02-11 18:21:45 +--- orig/options.c 2005-02-14 02:45:10 +++ options.c 2004-11-27 18:31:46 -@@ -143,6 +143,14 @@ int quiet = 0; +@@ -144,6 +144,14 @@ int quiet = 0; int always_checksum = 0; int list_only = 0; @@ -355,15 +355,15 @@ can't say if I've left any cleanup/compatibility errors in the code. #define MAX_BATCH_NAME_LEN 256 /* Must be less than MAXPATHLEN-13 */ char *batch_name = NULL; -@@ -168,6 +176,7 @@ static void print_rsync_version(enum log +@@ -169,6 +177,7 @@ static void print_rsync_version(enum log char const *hardlinks = "no "; char const *links = "no "; char const *ipv6 = "no "; + char const *ssl = "no "; STRUCT_STAT *dumstat; - #if HAVE_SOCKETPAIR -@@ -190,6 +199,10 @@ static void print_rsync_version(enum log + #ifdef HAVE_SOCKETPAIR +@@ -191,6 +200,10 @@ static void print_rsync_version(enum log ipv6 = ""; #endif @@ -374,7 +374,7 @@ can't say if I've left any cleanup/compatibility errors in the code. rprintf(f, "%s version %s protocol version %d\n", RSYNC_NAME, RSYNC_VERSION, PROTOCOL_VERSION); rprintf(f, -@@ -203,10 +216,10 @@ static void print_rsync_version(enum log +@@ -204,10 +217,10 @@ static void print_rsync_version(enum log /* Note that this field may not have type ino_t. It depends * on the complicated interaction between largefile feature * macros. */ @@ -387,7 +387,7 @@ can't say if I've left any cleanup/compatibility errors in the code. #ifdef MAINTAINER_MODE rprintf(f, " panic action: \"%s\"\n", get_panic_action()); -@@ -333,6 +346,13 @@ void usage(enum logcode F) +@@ -335,6 +348,13 @@ void usage(enum logcode F) rprintf(F," -4, --ipv4 prefer IPv4\n"); rprintf(F," -6, --ipv6 prefer IPv6\n"); #endif @@ -401,7 +401,7 @@ can't say if I've left any cleanup/compatibility errors in the code. rprintf(F," -h, --help show this help screen\n"); rprintf(F,"\nUse \"rsync --daemon --help\" to see the daemon-mode command-line options.\n"); -@@ -343,7 +363,7 @@ void usage(enum logcode F) +@@ -345,7 +365,7 @@ void usage(enum logcode F) enum {OPT_VERSION = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM, OPT_FILTER, OPT_COMPARE_DEST, OPT_COPY_DEST, OPT_LINK_DEST, OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW, @@ -410,7 +410,7 @@ can't say if I've left any cleanup/compatibility errors in the code. OPT_REFUSED_BASE = 9000}; static struct poptOption long_options[] = { -@@ -439,6 +459,13 @@ static struct poptOption long_options[] +@@ -442,6 +462,13 @@ static struct poptOption long_options[] {"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 @@ -424,7 +424,7 @@ can't say if I've left any cleanup/compatibility errors in the code. /* All these options switch us into daemon-mode option-parsing. */ {"address", 0, POPT_ARG_STRING, 0, OPT_DAEMON, 0, 0 }, {"config", 0, POPT_ARG_STRING, 0, OPT_DAEMON, 0, 0 }, -@@ -831,6 +858,12 @@ int parse_arguments(int *argc, const cha +@@ -834,6 +861,12 @@ int parse_arguments(int *argc, const cha basis_dir[basis_dir_cnt++] = (char *)arg; break; @@ -437,7 +437,7 @@ can't say if I've left any cleanup/compatibility errors in the code. default: /* A large opt value means that set_refuse_options() * turned this option off. */ -@@ -1063,6 +1096,17 @@ int parse_arguments(int *argc, const cha +@@ -1066,6 +1099,17 @@ int parse_arguments(int *argc, const cha if (delay_updates && !partial_dir) partial_dir = partialdir_for_delayupdate; @@ -453,9 +453,9 @@ can't say if I've left any cleanup/compatibility errors in the code. +#endif + if (inplace) { - #if HAVE_FTRUNCATE + #ifdef HAVE_FTRUNCATE if (partial_dir) { ---- orig/rsync.h 2005-02-07 20:41:57 +--- orig/rsync.h 2005-02-14 02:45:10 +++ rsync.h 2004-10-08 21:01:33 @@ -32,6 +32,7 @@ @@ -465,7 +465,7 @@ can't say if I've left any cleanup/compatibility errors in the code. #define BACKUP_SUFFIX "~" -@@ -382,6 +383,11 @@ enum msgcode { +@@ -384,6 +385,11 @@ enum msgcode { # define SIZEOF_INT64 SIZEOF_OFF_T #endif diff --git a/remove-sent-files.diff b/remove-sent-files.diff index 9da8fc3..5964ad8 100644 --- a/remove-sent-files.diff +++ b/remove-sent-files.diff @@ -38,7 +38,7 @@ command before "make": case MSG_INFO: case MSG_ERROR: if (remaining >= sizeof line) { ---- orig/main.c 2005-02-07 20:41:56 +--- orig/main.c 2005-02-14 02:45:10 +++ main.c 2005-02-05 01:24:16 @@ -32,12 +32,14 @@ extern int am_daemon; extern int verbose; @@ -55,7 +55,7 @@ command before "make": extern int orig_umask; extern int copy_links; extern int keep_dirlinks; -@@ -440,6 +442,12 @@ static void do_server_sender(int f_in, i +@@ -441,6 +443,12 @@ static void do_server_sender(int f_in, i exit_cleanup(RERR_SYNTAX); return; } @@ -68,7 +68,7 @@ command before "make": if (!relative_paths && !push_dir(dir)) { rsyserr(FERROR, errno, "push_dir#3 %s failed", -@@ -670,6 +678,8 @@ void start_server(int f_in, int f_out, i +@@ -672,6 +680,8 @@ void start_server(int f_in, int f_out, i if (am_sender) { keep_dirlinks = 0; /* Must be disabled on the sender. */ @@ -77,7 +77,7 @@ command before "make": recv_filter_list(f_in); do_server_sender(f_in, f_out, argc, argv); -@@ -747,6 +757,9 @@ int client_run(int f_in, int f_out, pid_ +@@ -749,6 +759,9 @@ int client_run(int f_in, int f_out, pid_ exit_cleanup(status); } @@ -87,7 +87,7 @@ command before "make": if (argc == 0) list_only |= 1; ---- orig/options.c 2005-02-11 18:21:45 +--- orig/options.c 2005-02-14 02:45:10 +++ options.c 2005-01-23 07:30:51 @@ -59,6 +59,7 @@ int delete_during = 0; int delete_before = 0; @@ -97,7 +97,7 @@ command before "make": int one_file_system = 0; int protocol_version = PROTOCOL_VERSION; int sparse_files = 0; -@@ -92,6 +93,7 @@ int bwlimit = 0; +@@ -93,6 +94,7 @@ int fuzzy_basis = 0; size_t bwlimit_writemax = 0; int only_existing = 0; int opt_ignore_existing = 0; @@ -105,7 +105,7 @@ command before "make": int max_delete = 0; OFF_T max_size = 0; int ignore_errors = 0; -@@ -289,6 +291,7 @@ void usage(enum logcode F) +@@ -290,6 +292,7 @@ void usage(enum logcode F) 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"); @@ -113,7 +113,7 @@ command before "make": 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"); -@@ -364,6 +367,7 @@ static struct poptOption long_options[] +@@ -366,6 +369,7 @@ static struct poptOption long_options[] {"delete-during", 0, POPT_ARG_NONE, &delete_during, 0, 0, 0 }, {"delete-after", 0, POPT_ARG_NONE, &delete_after, 0, 0, 0 }, {"delete-excluded", 0, POPT_ARG_NONE, &delete_excluded, 0, 0, 0 }, @@ -121,7 +121,7 @@ command before "make": {"force", 0, POPT_ARG_NONE, &force_delete, 0, 0, 0 }, {"numeric-ids", 0, POPT_ARG_NONE, &numeric_ids, 0, 0, 0 }, {"filter", 'f', POPT_ARG_STRING, 0, OPT_FILTER, 0, 0 }, -@@ -955,6 +959,9 @@ int parse_arguments(int *argc, const cha +@@ -958,6 +962,9 @@ int parse_arguments(int *argc, const cha return 0; } @@ -131,9 +131,9 @@ command before "make": *argv = poptGetArgs(pc); *argc = count_args(*argv); -@@ -1382,6 +1389,9 @@ void server_options(char **args,int *arg - if (!implied_dirs && !am_sender) - args[ac++] = "--no-implied-dirs"; +@@ -1388,6 +1395,9 @@ void server_options(char **args,int *arg + if (fuzzy_basis && am_sender) + args[ac++] = "--fuzzy"; + if (delete_sent_files) + args[ac++] = "--delete-sent-files"; @@ -141,7 +141,7 @@ command before "make": *argc = ac; return; ---- orig/receiver.c 2005-02-11 10:53:14 +--- orig/receiver.c 2005-02-14 02:45:10 +++ receiver.c 2004-08-13 08:38:51 @@ -41,6 +41,7 @@ extern int basis_dir_cnt; extern int make_backups; @@ -151,7 +151,7 @@ command before "make": extern int module_id; extern int ignore_errors; extern int orig_umask; -@@ -276,7 +277,7 @@ int recv_files(int f_in, struct file_lis +@@ -306,7 +307,7 @@ int recv_files(int f_in, struct file_lis char *fname, fbuf[MAXPATHLEN]; char template[MAXPATHLEN]; char fnametmp[MAXPATHLEN]; @@ -160,7 +160,7 @@ command before "make": char fnamecmpbuf[MAXPATHLEN]; uchar *delayed_bits = NULL; struct file_struct *file; -@@ -533,7 +534,12 @@ int recv_files(int f_in, struct file_lis +@@ -567,7 +568,12 @@ int recv_files(int f_in, struct file_lis cleanup_disable(); @@ -174,7 +174,7 @@ command before "make": int msgtype = csum_length == SUM_LENGTH || read_batch ? FERROR : FINFO; if (msgtype == FERROR || verbose) { -@@ -557,9 +563,8 @@ int recv_files(int f_in, struct file_lis +@@ -591,9 +597,8 @@ int recv_files(int f_in, struct file_lis keptstr, redostr); } if (csum_length != SUM_LENGTH) { @@ -186,17 +186,17 @@ command before "make": } } } ---- orig/rsync.h 2005-02-07 20:41:57 +--- orig/rsync.h 2005-02-14 02:45:10 +++ rsync.h 2005-02-03 02:04:59 -@@ -61,6 +61,7 @@ - #define FLAG_HLINK_EOL (1<<1) /* generator only */ +@@ -62,6 +62,7 @@ #define FLAG_MOUNT_POINT (1<<2) /* sender only */ + #define FLAG_NO_FUZZY (1<<2) /* generator only */ #define FLAG_DEL_HERE (1<<3) /* receiver/generator */ +#define FLAG_SENT (1<<7) /* sender only */ /* update this if you make incompatible changes */ #define PROTOCOL_VERSION 29 -@@ -142,6 +143,7 @@ enum logcode { FERROR=1, FINFO=2, FLOG=3 +@@ -144,6 +145,7 @@ enum logcode { FERROR=1, FINFO=2, FLOG=3 /* Messages types that are sent over the message channel. The logcode * values must all be present here with identical numbers. */ enum msgcode { @@ -204,7 +204,7 @@ command before "make": MSG_DONE=5, /* current phase is done */ MSG_REDO=4, /* reprocess indicated flist index */ MSG_ERROR=FERROR, MSG_INFO=FINFO, MSG_LOG=FLOG, /* remote logging */ ---- orig/rsync.yo 2005-02-11 23:14:49 +--- orig/rsync.yo 2005-02-14 02:45:11 +++ rsync.yo 2005-02-03 02:05:29 @@ -338,6 +338,7 @@ to the detailed description below for a --delete-during receiver deletes during xfer, not before @@ -214,8 +214,8 @@ command before "make": --ignore-errors delete even if there are I/O errors --force force deletion of dirs even if not empty --max-delete=NUM don't delete more than NUM files -@@ -728,6 +729,11 @@ receiving side that are not on the sendi - delete any files on the receiving side that are excluded (see bf(--exclude)). +@@ -734,6 +735,11 @@ this way on the receiver, and for a way + bf(--delete-excluded). See bf(--delete) (which is implied) for more details on file-deletion. +dit(bf(--delete-sent-files)) This tells rsync to remove the source files -- 2.34.1