From 8f72c7ae6846c29d00fb242a9dd012f8e6d5a9cb Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Fri, 11 Mar 2005 11:26:30 +0000 Subject: [PATCH] Fixed failing hunks. --- acls.diff | 40 ++++++++++++++++++++-------------------- append.diff | 34 +++++++++++++++++----------------- backup-dir-dels.diff | 18 +++++++++--------- copy-dest.diff | 26 +++++++++++++------------- owner-group-mod.diff | 18 +++++++++--------- 5 files changed, 68 insertions(+), 68 deletions(-) diff --git a/acls.diff b/acls.diff index bb35674..7557372 100644 --- a/acls.diff +++ b/acls.diff @@ -11,7 +11,7 @@ from a disk that doesn't support ACLs. This should be changed to silently notice that no ACLs are available to copy. Of course, trying to write out ACLs to a non-ACL-supporting disk should complain. ---- orig/Makefile.in 2004-11-03 11:56:03 +--- orig/Makefile.in 2004-11-02 16:47:15 +++ Makefile.in 2004-10-20 06:32:26 @@ -25,16 +25,16 @@ VERSION=@VERSION@ .SUFFIXES: @@ -1166,7 +1166,7 @@ ACLs to a non-ACL-supporting disk should complain. +} + +#endif /* SUPPORT_ACLS */ ---- orig/backup.c 2005-02-22 02:10:16 +--- orig/backup.c 2005-02-22 01:57:58 +++ backup.c 2004-10-06 00:13:09 @@ -135,6 +135,7 @@ static int make_bak_dir(char *fullpath) } else { @@ -1193,7 +1193,7 @@ ACLs to a non-ACL-supporting disk should complain. free(file); if (verbose > 1) { ---- orig/configure.in 2005-02-25 18:44:31 +--- orig/configure.in 2005-03-01 06:22:19 +++ configure.in 2004-08-19 19:53:27 @@ -467,6 +467,11 @@ if test x"$ac_cv_func_strcasecmp" = x"no AC_CHECK_LIB(resolv, strcasecmp) @@ -1285,7 +1285,7 @@ ACLs to a non-ACL-supporting disk should complain. AC_CONFIG_FILES([Makefile lib/dummy zlib/dummy popt/dummy shconfig]) AC_OUTPUT ---- orig/flist.c 2005-02-26 19:27:54 +--- orig/flist.c 2005-03-03 18:44:42 +++ flist.c 2005-02-14 02:45:34 @@ -971,6 +971,8 @@ void send_file_name(int f, struct file_l file = make_file(fname, flist, f == -2 ? SERVER_FILTERS : ALL_FILTERS); @@ -1307,7 +1307,7 @@ ACLs to a non-ACL-supporting disk should complain. } if (recursive && S_ISDIR(file->mode) -@@ -1293,6 +1299,8 @@ struct file_list *recv_file_list(int f) +@@ -1292,6 +1298,8 @@ struct file_list *recv_file_list(int f) flags |= read_byte(f) << 8; file = receive_file_entry(flist, flags, f); @@ -1316,7 +1316,7 @@ ACLs to a non-ACL-supporting disk should complain. if (S_ISREG(file->mode)) stats.total_size += file->length; -@@ -1315,6 +1323,8 @@ struct file_list *recv_file_list(int f) +@@ -1314,6 +1322,8 @@ struct file_list *recv_file_list(int f) clean_flist(flist, relative_paths, 1); @@ -1325,9 +1325,9 @@ ACLs to a non-ACL-supporting disk should complain. if (f >= 0) { /* Now send the uid/gid list. This was introduced in * protocol version 15 */ ---- orig/generator.c 2005-02-27 18:24:42 -+++ generator.c 2005-02-20 00:02:51 -@@ -686,6 +686,10 @@ static void recv_generator(char *fname, +--- orig/generator.c 2005-03-09 23:46:28 ++++ generator.c 2005-03-11 11:18:22 +@@ -711,6 +711,10 @@ static void recv_generator(char *fname, if (set_perms(fname, file, statret ? NULL : &st, 0) && verbose && code && f_out != -1) rprintf(code, "%s/\n", safe_fname(fname)); @@ -1335,9 +1335,9 @@ ACLs to a non-ACL-supporting disk should complain. + if (f_out == -1) + SET_ACL(fname, file); +#endif - if (delete_during && f_out != -1 && csum_length != SUM_LENGTH + if (delete_during && f_out != -1 && !phase && dry_run < 2 && (file->flags & FLAG_DEL_HERE)) - delete_in_dir(flist, fname, file, allowed_lull); + delete_in_dir(the_file_list, fname, file); --- orig/lib/sysacls.c 2004-10-20 15:35:58 +++ lib/sysacls.c 2004-10-20 15:35:58 @@ -0,0 +1,3217 @@ @@ -4586,7 +4586,7 @@ ACLs to a non-ACL-supporting disk should complain. +int sys_acl_free_text(char *text); +int sys_acl_free_acl(SMB_ACL_T the_acl); +int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype); ---- orig/mkproto.awk 2005-02-18 20:17:35 +--- orig/mkproto.awk 2005-02-18 20:16:59 +++ mkproto.awk 2005-02-18 20:18:17 @@ -58,7 +58,7 @@ BEGIN { next; @@ -4597,7 +4597,7 @@ ACLs to a non-ACL-supporting disk should complain. next; } ---- orig/options.c 2005-03-01 05:49:24 +--- orig/options.c 2005-03-09 18:53:53 +++ options.c 2005-02-14 02:46:05 @@ -44,6 +44,7 @@ int keep_dirlinks = 0; int copy_links = 0; @@ -4688,7 +4688,7 @@ ACLs to a non-ACL-supporting disk should complain. if (preserve_uid) argstr[x++] = 'o'; if (preserve_gid) ---- orig/rsync.c 2005-02-25 18:44:31 +--- orig/rsync.c 2005-02-25 17:08:57 +++ rsync.c 2004-07-03 20:11:58 @@ -138,6 +138,14 @@ int set_perms(char *fname,struct file_st } @@ -4705,9 +4705,9 @@ ACLs to a non-ACL-supporting disk should complain. if (verbose > 1 && flags & PERMS_REPORT) { enum logcode code = daemon_log_format_has_i || dry_run ? FCLIENT : FINFO; ---- orig/rsync.h 2005-02-23 02:57:27 +--- orig/rsync.h 2005-03-09 18:53:49 +++ rsync.h 2004-07-03 20:11:58 -@@ -628,6 +628,40 @@ struct stats { +@@ -638,6 +638,40 @@ struct stats { #include "lib/permstring.h" #include "lib/addrinfo.h" @@ -4748,9 +4748,9 @@ ACLs to a non-ACL-supporting disk should complain. #include "proto.h" /* We have replacement versions of these if they're missing. */ ---- orig/rsync.yo 2005-03-01 01:22:59 +--- orig/rsync.yo 2005-03-05 18:58:26 +++ rsync.yo 2004-07-03 20:11:58 -@@ -317,6 +317,7 @@ to the detailed description below for a +@@ -316,6 +316,7 @@ to the detailed description below for a -H, --hard-links preserve hard links -K, --keep-dirlinks treat symlinked dir on receiver as dir -p, --perms preserve permissions @@ -4758,7 +4758,7 @@ ACLs to a non-ACL-supporting disk should complain. -o, --owner preserve owner (root only) -g, --group preserve group -D, --devices preserve devices (root only) -@@ -624,6 +625,11 @@ source file's permissions and the umask +@@ -623,6 +624,11 @@ source file's permissions and the umask other files (including updated files) retain their existing permissions (which is the same behavior as other file-copy utilities, such as cp). @@ -5050,7 +5050,7 @@ ACLs to a non-ACL-supporting disk should complain. + +#endif /* No ACLs. */ +#endif /* _SMB_ACLS_H */ ---- orig/uidlist.c 2005-02-14 02:45:11 +--- orig/uidlist.c 2005-02-14 00:53:44 +++ uidlist.c 2004-07-03 20:11:58 @@ -34,6 +34,7 @@ extern int verbose; diff --git a/append.diff b/append.diff index f481c55..a5c6ce5 100644 --- a/append.diff +++ b/append.diff @@ -1,7 +1,7 @@ This patch adds the --append option, which works like a "resume" mode in an ftp client, appending new data onto the end of the files it updates. ---- orig/generator.c 2005-03-05 00:25:24 +--- orig/generator.c 2005-03-09 23:46:28 +++ generator.c 2005-03-03 02:59:17 @@ -51,6 +51,7 @@ extern int remove_sent_files; extern int update_only; @@ -11,7 +11,7 @@ an ftp client, appending new data onto the end of the files it updates. extern int make_backups; extern int csum_length; extern int ignore_times; -@@ -459,35 +460,42 @@ static void generate_and_send_sums(int f +@@ -463,35 +464,42 @@ static void generate_and_send_sums(int f OFF_T offset = 0; sum_sizes_sqroot(&sum, len); @@ -61,7 +61,7 @@ an ftp client, appending new data onto the end of the files it updates. } if (mapbuf) -@@ -950,6 +958,9 @@ static void recv_generator(char *fname, +@@ -957,6 +965,9 @@ static void recv_generator(char *fname, return; } @@ -71,7 +71,7 @@ an ftp client, appending new data onto the end of the files it updates. if (!compare_dest && fnamecmp_type <= FNAMECMP_BASIS_DIR_HIGH) ; else if (fnamecmp_type == FNAMECMP_FUZZY) -@@ -1126,7 +1137,7 @@ void generate_files(int f_out, struct fi +@@ -1129,7 +1140,7 @@ void generate_files(int f_out, struct fi if (delete_before && !local_name && flist->count > 0) do_delete_pass(flist); @@ -80,7 +80,7 @@ an ftp client, appending new data onto the end of the files it updates. whole_file = 0; if (verbose >= 2) { rprintf(FINFO, "delta-transmission %s\n", -@@ -1173,6 +1184,8 @@ void generate_files(int f_out, struct fi +@@ -1180,6 +1191,8 @@ void generate_files(int f_out, struct fi only_existing = max_size = opt_ignore_existing = 0; update_only = always_checksum = size_only = 0; ignore_times = 1; @@ -89,7 +89,7 @@ an ftp client, appending new data onto the end of the files it updates. make_backups = 0; /* avoid a duplicate backup for inplace processing */ /* We expect to just sit around now, so don't exit on a timeout. ---- orig/match.c 2005-02-15 19:27:04 +--- orig/match.c 2005-03-05 17:51:23 +++ match.c 2005-02-11 20:26:31 @@ -23,6 +23,7 @@ extern int verbose; extern int am_server; @@ -99,7 +99,7 @@ an ftp client, appending new data onto the end of the files it updates. int updating_basis_file; -@@ -334,6 +335,21 @@ void match_sums(int f, struct sum_struct +@@ -330,6 +331,21 @@ void match_sums(int f, struct sum_struct sum_init(checksum_seed); @@ -121,7 +121,7 @@ an ftp client, appending new data onto the end of the files it updates. if (len > 0 && s->count > 0) { build_hash_table(s); -@@ -347,7 +363,7 @@ void match_sums(int f, struct sum_struct +@@ -343,7 +359,7 @@ void match_sums(int f, struct sum_struct } else { OFF_T j; /* by doing this in pieces we avoid too many seeks */ @@ -130,8 +130,8 @@ an ftp client, appending new data onto the end of the files it updates. matched(f, s, buf, j, -2); matched(f, s, buf, len, -1); } ---- orig/options.c 2005-03-02 09:52:06 -+++ options.c 2005-02-16 15:36:40 +--- orig/options.c 2005-03-09 18:53:53 ++++ options.c 2005-03-11 11:21:34 @@ -39,6 +39,7 @@ int make_backups = 0; **/ int whole_file = -1; @@ -140,14 +140,14 @@ an ftp client, appending new data onto the end of the files it updates. int archive_mode = 0; int keep_dirlinks = 0; int copy_links = 0; -@@ -163,6 +164,7 @@ static int F_option_cnt = 0; +@@ -164,6 +165,7 @@ static int F_option_cnt = 0; static int modify_window_set; static int refused_delete, refused_archive_part; static int refused_partial, refused_progress, refused_delete_before; +static int refused_inplace; - static char *dest_option = NULL; static char *max_size_arg; static char partialdir_for_delayupdate[] = ".~tmp~"; + @@ -272,6 +274,7 @@ void usage(enum logcode F) rprintf(F," --suffix=SUFFIX set backup suffix (default %s w/o --backup-dir)\n",BACKUP_SUFFIX); rprintf(F," -u, --update skip files that are newer on the receiver\n"); @@ -199,7 +199,7 @@ an ftp client, appending new data onto the end of the files it updates. args[ac++] = "--inplace"; if (tmpdir) { ---- orig/receiver.c 2005-03-05 00:25:25 +--- orig/receiver.c 2005-03-10 00:06:01 +++ receiver.c 2005-02-11 20:26:32 @@ -44,6 +44,7 @@ extern int remove_sent_files; extern int module_id; @@ -238,7 +238,7 @@ an ftp client, appending new data onto the end of the files it updates. while ((i = recv_token(f_in, &data)) != 0) { if (do_progress) show_progress(offset, total_size); -@@ -383,6 +406,7 @@ int recv_files(int f_in, struct file_lis +@@ -364,6 +387,7 @@ int recv_files(int f_in, struct file_lis send_msg(MSG_DONE, "", 0); if (keep_partial && !partial_dir) make_backups = 0; /* prevents double backup */ @@ -246,7 +246,7 @@ an ftp client, appending new data onto the end of the files it updates. continue; } ---- orig/rsync.yo 2005-03-04 16:13:54 +--- orig/rsync.yo 2005-03-05 18:58:26 +++ rsync.yo 2005-02-11 20:36:38 @@ -308,6 +308,7 @@ to the detailed description below for a --suffix=SUFFIX backup suffix (default ~ w/o --backup-dir) @@ -271,7 +271,7 @@ an ftp client, appending new data onto the end of the files it updates. dit(bf(-d, --dirs)) Tell the sending side to include any directories that are encountered. Unlike bf(--recursive), a directory's contents are not copied unless the directory was specified on the command-line as either "." or a ---- orig/sender.c 2005-03-05 00:25:25 +--- orig/sender.c 2005-03-10 00:05:58 +++ sender.c 2005-02-20 00:17:01 @@ -28,6 +28,7 @@ extern int log_format_has_i; extern int daemon_log_format_has_i; @@ -295,7 +295,7 @@ an ftp client, appending new data onto the end of the files it updates. if (s->count == 0) return(s); -@@ -211,6 +219,7 @@ void send_files(struct file_list *flist, +@@ -234,6 +242,7 @@ void send_files(struct file_list *flist, /* For inplace: redo phase turns off the backup * flag so that we do a regular inplace send. */ make_backups = 0; diff --git a/backup-dir-dels.diff b/backup-dir-dels.diff index dd0b5b9..3fde3d2 100644 --- a/backup-dir-dels.diff +++ b/backup-dir-dels.diff @@ -13,7 +13,7 @@ suffix. Marc St-Onge ---- orig/backup.c 2005-02-22 02:10:16 +--- orig/backup.c 2005-02-22 01:57:58 +++ backup.c 2005-02-22 02:11:15 @@ -22,11 +22,17 @@ @@ -106,8 +106,8 @@ Marc St-Onge + deleting = 0; + return ret; +} ---- orig/generator.c 2005-03-05 00:25:24 -+++ generator.c 2005-03-05 00:26:54 +--- orig/generator.c 2005-03-09 23:46:28 ++++ generator.c 2005-03-11 11:22:38 @@ -83,6 +83,9 @@ extern dev_t filesystem_dev; extern char *backup_dir; extern char *backup_suffix; @@ -134,10 +134,10 @@ Marc St-Onge } -@@ -112,8 +119,8 @@ static int delete_item(char *fname, int - return -1; - +@@ -111,8 +118,8 @@ static int delete_item(char *fname, int if (!S_ISDIR(mode)) { + if (max_delete && ++deletion_count > max_delete) + return 0; - if (make_backups && (backup_dir || !is_backup_file(fname))) - ok = make_backup(fname); + if (make_backups && (backup_dir_dels || !is_backup_file(fname))) @@ -145,8 +145,8 @@ Marc St-Onge else ok = robust_unlink(fname) == 0; if (ok) { -@@ -134,9 +141,9 @@ static int delete_item(char *fname, int - if (dry_run && zap_dir) { +@@ -135,9 +142,9 @@ static int delete_item(char *fname, int + || (dry_run && zap_dir)) { ok = 0; errno = ENOTEMPTY; - } else if (make_backups && !backup_dir && !is_backup_file(fname) @@ -157,7 +157,7 @@ Marc St-Onge else ok = do_rmdir(fname) == 0; if (ok) { ---- orig/options.c 2005-03-02 09:52:06 +--- orig/options.c 2005-03-09 18:53:53 +++ options.c 2005-03-01 01:25:39 @@ -127,10 +127,14 @@ int no_detach int write_batch = 0; diff --git a/copy-dest.diff b/copy-dest.diff index f529acd..81c8cca 100644 --- a/copy-dest.diff +++ b/copy-dest.diff @@ -2,8 +2,8 @@ This adds the option --copy-dest, which works just like --link-dest except that identical files are copied into the destination instead of hard-linked. ---- orig/generator.c 2005-03-05 00:25:24 -+++ generator.c 2005-03-05 00:27:49 +--- orig/generator.c 2005-03-09 23:46:28 ++++ generator.c 2005-03-11 11:24:17 @@ -66,6 +66,7 @@ extern int always_checksum; extern char *partial_dir; extern char *basis_dir[]; @@ -12,7 +12,7 @@ of hard-linked. extern int link_dest; extern int whole_file; extern int local_server; -@@ -860,6 +861,8 @@ static void recv_generator(char *fname, +@@ -873,6 +874,8 @@ static void recv_generator(char *fname, continue; best_match = i; match_level = 2; @@ -21,7 +21,7 @@ of hard-linked. /* FALL THROUGH */ case 2: if (!unchanged_attrs(file, &st)) -@@ -897,7 +900,20 @@ static void recv_generator(char *fname, +@@ -910,7 +913,20 @@ static void recv_generator(char *fname, match_level = 2; } #endif @@ -43,22 +43,22 @@ of hard-linked. fnamecmp = fnamecmpbuf; fnamecmp_type = i; } -@@ -964,11 +980,9 @@ static void recv_generator(char *fname, +@@ -973,11 +989,9 @@ static void recv_generator(char *fname, return; } /* Only --compare-dest gets here. */ - if (unchanged_attrs(file, &st)) { -- itemize(file, ndx, statret, &st, -- ITEM_NO_DEST_AND_NO_UPDATE, NULL); +- itemize(file, ndx, real_ret, &real_st, +- ITEM_NO_DEST_AND_NO_UPDATE, 0, NULL); - return; - } -+ itemize(file, ndx, statret, &st, -+ ITEM_NO_DEST_AND_NO_UPDATE, NULL); ++ itemize(file, ndx, real_ret, &real_st, ++ ITEM_NO_DEST_AND_NO_UPDATE, 0, NULL); + return; } prepare_to_open: ---- orig/options.c 2005-03-02 09:52:06 +--- orig/options.c 2005-03-09 18:53:53 +++ options.c 2005-03-02 10:05:21 @@ -143,6 +143,7 @@ char *backup_dir = NULL; char backup_dir_buf[MAXPATHLEN]; @@ -67,7 +67,7 @@ of hard-linked. +int copy_dest = 0; int link_dest = 0; int basis_dir_cnt = 0; - + char *dest_option = NULL; @@ -317,6 +318,7 @@ void usage(enum logcode F) rprintf(F," -T, --temp-dir=DIR create temporary files in directory DIR\n"); rprintf(F," -y, --fuzzy find similar file for basis if no dest file\n"); @@ -117,7 +117,7 @@ of hard-linked. return 0; } ---- orig/rsync.yo 2005-03-04 16:13:54 +--- orig/rsync.yo 2005-03-05 18:58:26 +++ rsync.yo 2005-03-03 02:19:19 @@ -353,6 +353,7 @@ to the detailed description below for a -T, --temp-dir=DIR create temporary files in directory DIR @@ -175,7 +175,7 @@ of hard-linked. Note that rsync versions prior to 2.6.1 had a bug that could prevent bf(--link-dest) from working properly for a non-root user when bf(-o) was specified ---- orig/testsuite/compare-dest.test 2005-02-26 19:51:27 +--- orig/testsuite/compare-dest.test 2005-02-26 19:49:59 +++ testsuite/compare-dest.test 2005-03-01 15:57:27 @@ -31,9 +31,9 @@ $RSYNC -av --exclude=/text --exclude=etc checkit "$RSYNC -avv --no-whole-file \ diff --git a/owner-group-mod.diff b/owner-group-mod.diff index ed2cfc3..ae78130 100644 --- a/owner-group-mod.diff +++ b/owner-group-mod.diff @@ -5,8 +5,8 @@ groups, even if they weren't returned by getgroups(). E.g.: rsync -avoogg host:/from/ /to/ ---- orig/compat.c 2005-02-20 00:02:22 -+++ compat.c 2005-02-20 00:09:11 +--- orig/compat.c 2005-03-09 18:53:55 ++++ compat.c 2005-03-11 11:25:46 @@ -28,11 +28,14 @@ int remote_protocol = 0; @@ -14,15 +14,15 @@ groups, even if they weren't returned by getgroups(). E.g.: +extern int am_root; extern int am_server; extern int am_sender; + extern int inplace; extern int fuzzy_basis; extern int read_batch; - extern int checksum_seed; +extern int preserve_uid; +extern int preserve_gid; + extern int checksum_seed; + extern int basis_dir_cnt; extern int protocol_version; - - void setup_protocol(int f_out,int f_in) -@@ -89,4 +92,11 @@ void setup_protocol(int f_out,int f_in) +@@ -106,4 +109,11 @@ void setup_protocol(int f_out,int f_in) } else { checksum_seed = read_int(f_in); } @@ -34,7 +34,7 @@ groups, even if they weren't returned by getgroups(). E.g.: + preserve_gid = 2; + } } ---- orig/options.c 2005-03-01 05:49:24 +--- orig/options.c 2005-03-09 18:53:53 +++ options.c 2004-09-09 01:59:08 @@ -402,8 +402,8 @@ static struct poptOption long_options[] {"no-whole-file", 0, POPT_ARG_VAL, &whole_file, 0, 0, 0 }, @@ -92,7 +92,7 @@ groups, even if they weren't returned by getgroups(). E.g.: if (preserve_devices) argstr[x++] = 'D'; if (preserve_times) ---- orig/rsync.c 2005-02-25 18:44:31 +--- orig/rsync.c 2005-02-25 17:08:57 +++ rsync.c 2005-02-01 10:46:04 @@ -27,7 +27,6 @@ extern int dry_run; extern int daemon_log_format_has_i; @@ -111,7 +111,7 @@ groups, even if they weren't returned by getgroups(). E.g.: change_gid = preserve_gid && file->gid != GID_NONE && st->st_gid != file->gid; #if !defined HAVE_LCHOWN && !defined CHOWN_MODIFIES_SYMLINK ---- orig/uidlist.c 2005-02-14 02:45:11 +--- orig/uidlist.c 2005-02-14 00:53:44 +++ uidlist.c 2004-09-09 01:59:08 @@ -35,7 +35,6 @@ extern int verbose; extern int preserve_uid; -- 2.34.1