The patches for 3.2.0pre1.
authorWayne Davison <wayne@opencoder.net>
Sun, 14 Jun 2020 01:52:35 +0000 (18:52 -0700)
committerWayne Davison <wayne@opencoder.net>
Sun, 14 Jun 2020 02:58:29 +0000 (19:58 -0700)
41 files changed:
acls.diff
adaptec_acl_mods.diff
backup-deleted.diff
backup-dir-dels.diff
catch_crash_signals.diff
checksum-reading.diff
checksum-updating.diff
checksum-xattr.diff
clone-dest.diff
congestion.diff
copy-devices.diff
crtimes.diff
cvs-entries.diff
date-only.diff
db.diff
detect-renamed-lax.diff
detect-renamed.diff
direct-io.diff
downdate.diff
fileflags.diff
filter-attribute-mods.diff
fsync.diff
hfs-compression.diff
ignore-case.diff
kerberos.diff
link-by-hash.diff
md5p8.diff
nameconverter.diff
netgroup-auth.diff
omit-dir-changes.diff
slow-down.diff
slp.diff
soften-links.diff
source-backup.diff
source-filter_dest-filter.diff
sparse-block.diff
time-limit.diff
transliterate.diff
tru64.diff
xattrs.diff
xxh3.diff

index 1cdd2bea74b699321f599ef2d183c4007f870d18..5f23547dc831a2721d7a8c6e61fcc70b6a12b75e 100644 (file)
--- a/acls.diff
+++ b/acls.diff
@@ -9,7 +9,7 @@ To use this patch, run these commands for a successful build:
     ./configure                         (optional if already run)
     make
 
-based-on: cdf58a7aba23e31653661c950c2c870b96de08fa
+based-on: c528f8d5c8aa7b16b20cda72a9f4119699890c28
 diff --git a/acls.c b/acls.c
 --- a/acls.c
 +++ b/acls.c
@@ -40,7 +40,7 @@ diff --git a/acls.c b/acls.c
  static int calc_sacl_entries(const rsync_acl *racl)
  {
        /* A System ACL always gets user/group/other permission entries. */
-@@ -581,6 +594,96 @@ int get_acl(const char *fname, stat_x *sxp)
+@@ -579,6 +592,96 @@ int get_acl(const char *fname, stat_x *sxp)
        return 0;
  }
  
@@ -137,7 +137,7 @@ diff --git a/acls.c b/acls.c
  /* === Send functions === */
  
  /* Send the ida list over the file descriptor. */
-@@ -656,6 +759,11 @@ static void send_rsync_acl(int f, rsync_acl *racl, SMB_ACL_TYPE_T type,
+@@ -654,6 +757,11 @@ static void send_rsync_acl(int f, rsync_acl *racl, SMB_ACL_TYPE_T type,
   * This also frees the ACL data. */
  void send_acl(int f, stat_x *sxp)
  {
@@ -149,7 +149,7 @@ diff --git a/acls.c b/acls.c
        if (!sxp->acc_acl) {
                sxp->acc_acl = create_racl();
                rsync_acl_fake_perms(sxp->acc_acl, sxp->st.st_mode);
-@@ -673,6 +781,160 @@ void send_acl(int f, stat_x *sxp)
+@@ -671,6 +779,160 @@ void send_acl(int f, stat_x *sxp)
        }
  }
  
@@ -310,7 +310,7 @@ diff --git a/acls.c b/acls.c
  /* === Receive functions === */
  
  static uint32 recv_acl_access(int f, uchar *name_follows_ptr)
-@@ -794,6 +1056,11 @@ static int recv_rsync_acl(int f, item_list *racl_list, SMB_ACL_TYPE_T type, mode
+@@ -792,6 +1054,11 @@ static int recv_rsync_acl(int f, item_list *racl_list, SMB_ACL_TYPE_T type, mode
  /* Receive the ACL info the sender has included for this file-list entry. */
  void receive_acl(int f, struct file_struct *file)
  {
@@ -325,17 +325,17 @@ diff --git a/acls.c b/acls.c
 diff --git a/compat.c b/compat.c
 --- a/compat.c
 +++ b/compat.c
-@@ -529,13 +529,6 @@ void setup_protocol(int f_out,int f_in)
-       if (protocol_version < 30) {
-               if (append_mode == 1)
-                       append_mode = 2;
--              if (preserve_acls && !local_server) {
--                      rprintf(FERROR,
--                          "--acls requires protocol 30 or higher"
--                          " (negotiated %d).\n",
--                          protocol_version);
--                      exit_cleanup(RERR_PROTOCOL);
--              }
+@@ -536,6 +536,13 @@ void setup_protocol(int f_out,int f_in)
+                               protocol_version);
+                       exit_cleanup(RERR_PROTOCOL);
+               }
++              if (preserve_acls && !local_server) {
++                      rprintf(FERROR,
++                              "--acls requires protocol 30 or higher"
++                              " (negotiated %d).\n",
++                              protocol_version);
++                      exit_cleanup(RERR_PROTOCOL);
++              }
                if (preserve_xattrs && !local_server) {
                        rprintf(FERROR,
-                           "--xattrs requires protocol 30 or higher"
+                               "--xattrs requires protocol 30 or higher"
index b4b4877e78c861d766f07c157fb1964004529995..60c833013dc758951a8a428720b3a088ca4fdba7 100644 (file)
@@ -24,7 +24,7 @@ Todo:
 Fix a bug that could lose some bits when stripping some (supposedly)
 superfluous ACL info.
 
-based-on: cdf58a7aba23e31653661c950c2c870b96de08fa
+based-on: c528f8d5c8aa7b16b20cda72a9f4119699890c28
 diff --git a/lib/sysacls.c b/lib/sysacls.c
 --- a/lib/sysacls.c
 +++ b/lib/sysacls.c
index 16910e138229bbe9109a9e6830a2e81603c5a2e4..4f550c2598f8bf77178c3d5c6c68fe531da5661a 100644 (file)
@@ -7,11 +7,11 @@ To use this patch, run these commands for a successful build:
     ./configure                                 (optional if already run)
     make
 
-based-on: cdf58a7aba23e31653661c950c2c870b96de08fa
+based-on: c528f8d5c8aa7b16b20cda72a9f4119699890c28
 diff --git a/generator.c b/generator.c
 --- a/generator.c
 +++ b/generator.c
-@@ -1819,7 +1819,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1808,7 +1808,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                goto notify_others;
  
        if (read_batch || whole_file) {
@@ -20,7 +20,7 @@ diff --git a/generator.c b/generator.c
                        if (!(backupptr = get_backup_name(fname)))
                                goto cleanup;
                        if (!(back_file = make_file(fname, NULL, NULL, 0, NO_FILTERS)))
-@@ -1855,7 +1855,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1844,7 +1844,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                goto notify_others;
        }
  
@@ -29,7 +29,7 @@ diff --git a/generator.c b/generator.c
                if (!(backupptr = get_backup_name(fname))) {
                        close(fd);
                        goto cleanup;
-@@ -1979,7 +1979,7 @@ int atomic_create(struct file_struct *file, char *fname, const char *slnk, const
+@@ -1968,7 +1968,7 @@ int atomic_create(struct file_struct *file, char *fname, const char *slnk, const
                skip_atomic = 0;
  
        if (del_for_flag) {
@@ -41,7 +41,7 @@ diff --git a/generator.c b/generator.c
 diff --git a/options.c b/options.c
 --- a/options.c
 +++ b/options.c
-@@ -923,7 +923,8 @@ static struct poptOption long_options[] = {
+@@ -922,7 +922,8 @@ static struct poptOption long_options[] = {
    {"no-i",             0,  POPT_ARG_VAL,    &itemize_changes, 0, 0, 0 },
    {"bwlimit",          0,  POPT_ARG_STRING, &bwlimit_arg, OPT_BWLIMIT, 0, 0 },
    {"no-bwlimit",       0,  POPT_ARG_VAL,    &bwlimit, 0, 0, 0 },
@@ -51,7 +51,7 @@ diff --git a/options.c b/options.c
    {"no-backup",        0,  POPT_ARG_VAL,    &make_backups, 0, 0, 0 },
    {"backup-dir",       0,  POPT_ARG_STRING, &backup_dir, 0, 0, 0 },
    {"suffix",           0,  POPT_ARG_STRING, &backup_suffix, 0, 0, 0 },
-@@ -2677,6 +2678,10 @@ void server_options(char **args, int *argc_p)
+@@ -2672,6 +2673,10 @@ void server_options(char **args, int *argc_p)
        }
  
        if (am_sender) {
@@ -111,7 +111,7 @@ diff --git a/rsync.1.md b/rsync.1.md
 diff --git a/rsync.c b/rsync.c
 --- a/rsync.c
 +++ b/rsync.c
-@@ -709,7 +709,7 @@ int finish_transfer(const char *fname, const char *fnametmp,
+@@ -708,7 +708,7 @@ int finish_transfer(const char *fname, const char *fnametmp,
                goto do_set_file_attrs;
        }
  
index 6becd8ea784bcda303aa04e22e6e9c276a9dc92e..a2d5d4b2f36ce40cef39d2f88015c85d149dfe89 100644 (file)
@@ -229,7 +229,7 @@ diff --git a/options.c b/options.c
  char *sockopts = NULL;
  char *usermap = NULL;
  char *groupmap = NULL;
-@@ -927,7 +933,9 @@ static struct poptOption long_options[] = {
+@@ -926,7 +932,9 @@ static struct poptOption long_options[] = {
    {"backup-deleted",   0,  POPT_ARG_VAL,    &make_backups, 1, 0, 0 },
    {"no-backup",        0,  POPT_ARG_VAL,    &make_backups, 0, 0, 0 },
    {"backup-dir",       0,  POPT_ARG_STRING, &backup_dir, 0, 0, 0 },
@@ -239,7 +239,7 @@ diff --git a/options.c b/options.c
    {"list-only",        0,  POPT_ARG_VAL,    &list_only, 2, 0, 0 },
    {"read-batch",       0,  POPT_ARG_STRING, &batch_name, OPT_READ_BATCH, 0, 0 },
    {"write-batch",      0,  POPT_ARG_STRING, &batch_name, OPT_WRITE_BATCH, 0, 0 },
-@@ -2142,6 +2150,8 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2137,6 +2145,8 @@ int parse_arguments(int *argc_p, const char ***argv_p)
                        tmpdir = sanitize_path(NULL, tmpdir, NULL, 0, SP_DEFAULT);
                if (backup_dir)
                        backup_dir = sanitize_path(NULL, backup_dir, NULL, 0, SP_DEFAULT);
@@ -248,7 +248,7 @@ diff --git a/options.c b/options.c
        }
        if (daemon_filter_list.head && !am_sender) {
                filter_rule_list *elp = &daemon_filter_list;
-@@ -2163,6 +2173,14 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2158,6 +2168,14 @@ int parse_arguments(int *argc_p, const char ***argv_p)
                        if (check_filter(elp, FLOG, dir, 1) < 0)
                                goto options_rejected;
                }
@@ -263,7 +263,7 @@ diff --git a/options.c b/options.c
        }
  
        if (!backup_suffix)
-@@ -2174,6 +2192,20 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2169,6 +2187,20 @@ int parse_arguments(int *argc_p, const char ***argv_p)
                        backup_suffix);
                return 0;
        }
@@ -284,7 +284,7 @@ diff --git a/options.c b/options.c
        if (backup_dir) {
                size_t len;
                while (*backup_dir == '.' && backup_dir[1] == '/')
-@@ -2209,6 +2241,34 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2204,6 +2236,34 @@ int parse_arguments(int *argc_p, const char ***argv_p)
                        "P *%s", backup_suffix);
                parse_filter_str(&filter_list, backup_dir_buf, rule_template(0), 0);
        }
@@ -319,7 +319,7 @@ diff --git a/options.c b/options.c
  
        if (preserve_times) {
                preserve_times = PRESERVE_FILE_TIMES;
-@@ -2652,6 +2712,10 @@ void server_options(char **args, int *argc_p)
+@@ -2647,6 +2707,10 @@ void server_options(char **args, int *argc_p)
                args[ac++] = "--backup-dir";
                args[ac++] = backup_dir;
        }
@@ -330,7 +330,7 @@ diff --git a/options.c b/options.c
  
        /* Only send --suffix if it specifies a non-default value. */
        if (strcmp(backup_suffix, backup_dir ? "" : BACKUP_SUFFIX) != 0) {
-@@ -2660,6 +2724,14 @@ void server_options(char **args, int *argc_p)
+@@ -2655,6 +2719,14 @@ void server_options(char **args, int *argc_p)
                        goto oom;
                args[ac++] = arg;
        }
index 46eeb471ad65c988d238555f75088e25a3daca6c..b5caeb1d7c325a869eebaf93fffb7b08e288213c 100644 (file)
@@ -25,7 +25,7 @@ To use this patch, run these commands for a successful build:
     ./configure                                  (optional if already run)
     make
 
-based-on: cdf58a7aba23e31653661c950c2c870b96de08fa
+based-on: c528f8d5c8aa7b16b20cda72a9f4119699890c28
 diff --git a/errcode.h b/errcode.h
 --- a/errcode.h
 +++ b/errcode.h
@@ -52,7 +52,7 @@ diff --git a/log.c b/log.c
 diff --git a/main.c b/main.c
 --- a/main.c
 +++ b/main.c
-@@ -207,8 +207,11 @@ static void wait_process_with_flush(pid_t pid, int *exit_code_ptr)
+@@ -208,8 +208,11 @@ static void wait_process_with_flush(pid_t pid, int *exit_code_ptr)
                        *exit_code_ptr = RERR_TERMINATED;
                else
                        *exit_code_ptr = RERR_WAITCHILD;
@@ -65,7 +65,7 @@ diff --git a/main.c b/main.c
  }
  
  void write_del_stats(int f)
-@@ -1590,6 +1593,14 @@ void remember_children(UNUSED(int val))
+@@ -1592,6 +1595,14 @@ void remember_children(UNUSED(int val))
                                break;
                        }
                }
@@ -80,7 +80,7 @@ diff --git a/main.c b/main.c
        }
  #endif
  #ifndef HAVE_SIGACTION
-@@ -1645,6 +1656,12 @@ static void rsync_panic_handler(UNUSED(int whatsig))
+@@ -1647,6 +1658,12 @@ static void rsync_panic_handler(UNUSED(int whatsig))
  }
  #endif
  
@@ -93,7 +93,7 @@ diff --git a/main.c b/main.c
  
  int main(int argc,char *argv[])
  {
-@@ -1669,6 +1686,11 @@ int main(int argc,char *argv[])
+@@ -1671,6 +1688,11 @@ int main(int argc,char *argv[])
        SIGACTMASK(SIGFPE, rsync_panic_handler);
        SIGACTMASK(SIGABRT, rsync_panic_handler);
        SIGACTMASK(SIGBUS, rsync_panic_handler);
@@ -108,7 +108,7 @@ diff --git a/main.c b/main.c
 diff --git a/socket.c b/socket.c
 --- a/socket.c
 +++ b/socket.c
-@@ -532,7 +532,17 @@ int is_a_socket(int fd)
+@@ -526,7 +526,17 @@ int is_a_socket(int fd)
  static void sigchld_handler(UNUSED(int val))
  {
  #ifdef WNOHANG
index 3d903b2c345c1fc2184a367ffdb1a4d42481c730..123ad039ac310c6d05c51b61e816e51ab9bf3969 100644 (file)
@@ -16,7 +16,7 @@ To use this patch, run these commands for a successful build:
     ./configure                               (optional if already run)
     make
 
-based-on: cdf58a7aba23e31653661c950c2c870b96de08fa
+based-on: c528f8d5c8aa7b16b20cda72a9f4119699890c28
 diff --git a/clientserver.c b/clientserver.c
 --- a/clientserver.c
 +++ b/clientserver.c
@@ -29,7 +29,7 @@ diff --git a/clientserver.c b/clientserver.c
  extern int io_timeout;
  extern int no_detach;
  extern int write_batch;
-@@ -975,6 +977,9 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
+@@ -974,6 +976,9 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
        } else if (am_root < 0) /* Treat --fake-super from client as --super. */
                am_root = 2;
  
@@ -463,7 +463,7 @@ diff --git a/generator.c b/generator.c
  extern int remove_source_files;
  extern int delay_updates;
  extern int update_only;
-@@ -584,7 +585,7 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
+@@ -580,7 +581,7 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
  
  
  /* Perform our quick-check heuristic for determining if a file is unchanged. */
@@ -472,7 +472,7 @@ diff --git a/generator.c b/generator.c
  {
        if (st->st_size != F_LENGTH(file))
                return 0;
-@@ -593,7 +594,10 @@ int unchanged_file(char *fn, struct file_struct *file, STRUCT_STAT *st)
+@@ -589,7 +590,10 @@ int unchanged_file(char *fn, struct file_struct *file, STRUCT_STAT *st)
           of the file time to determine whether to sync */
        if (always_checksum > 0 && S_ISREG(st->st_mode)) {
                char sum[MAX_DIGEST_LEN];
@@ -484,7 +484,7 @@ diff --git a/generator.c b/generator.c
                return memcmp(sum, F_SUM(file), flist_csum_len) == 0;
        }
  
-@@ -890,7 +894,7 @@ static int try_dests_reg(struct file_struct *file, char *fname, int ndx,
+@@ -886,7 +890,7 @@ static int try_dests_reg(struct file_struct *file, char *fname, int ndx,
                        best_match = j;
                        match_level = 1;
                }
@@ -493,7 +493,7 @@ diff --git a/generator.c b/generator.c
                        continue;
                if (match_level == 1) {
                        best_match = j;
-@@ -1201,7 +1205,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1197,7 +1201,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
         * --ignore-non-existing, daemon exclude, or mkdir failure. */
        static struct file_struct *skip_dir = NULL;
        static struct file_list *fuzzy_dirlist[MAX_BASIS_DIRS+1];
@@ -502,7 +502,7 @@ diff --git a/generator.c b/generator.c
        struct file_struct *fuzzy_file = NULL;
        int fd = -1, f_copy = -1;
        stat_x sx, real_sx;
-@@ -1312,8 +1316,9 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1308,8 +1312,9 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                                                fuzzy_dirlist[i] = NULL;
                                        }
                                }
@@ -514,7 +514,7 @@ diff --git a/generator.c b/generator.c
  #ifdef SUPPORT_ACLS
                        if (!preserve_perms)
                                dflt_perms = default_perms_for_dir(dn);
-@@ -1321,6 +1326,24 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1317,6 +1322,24 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                }
                parent_dirname = dn;
  
@@ -539,7 +539,7 @@ diff --git a/generator.c b/generator.c
                statret = link_stat(fname, &sx.st, keep_dirlinks && is_dir);
                stat_errno = errno;
        }
-@@ -1731,22 +1754,6 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1720,22 +1743,6 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                partialptr = NULL;
  
        if (statret != 0 && fuzzy_basis) {
@@ -562,7 +562,7 @@ diff --git a/generator.c b/generator.c
                /* Sets fnamecmp_type to FNAMECMP_FUZZY or above. */
                fuzzy_file = find_fuzzy(file, fuzzy_dirlist, &fnamecmp_type);
                if (fuzzy_file) {
-@@ -1779,7 +1786,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1768,7 +1775,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                ;
        else if (fnamecmp_type >= FNAMECMP_FUZZY)
                ;
@@ -574,7 +574,7 @@ diff --git a/generator.c b/generator.c
 diff --git a/hlink.c b/hlink.c
 --- a/hlink.c
 +++ b/hlink.c
-@@ -410,7 +410,7 @@ int hard_link_check(struct file_struct *file, int ndx, char *fname,
+@@ -408,7 +408,7 @@ int hard_link_check(struct file_struct *file, int ndx, char *fname,
                                }
                                break;
                        }
@@ -643,7 +643,7 @@ diff --git a/options.c b/options.c
  int max_delete = INT_MIN;
  OFF_T max_size = -1;
  OFF_T min_size = -1;
-@@ -736,7 +737,7 @@ enum {OPT_SERVER = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
+@@ -735,7 +736,7 @@ enum {OPT_SERVER = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
        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,
@@ -652,7 +652,7 @@ diff --git a/options.c b/options.c
        OPT_USERMAP, OPT_GROUPMAP, OPT_CHOWN, OPT_BWLIMIT,
        OPT_OLD_COMPRESS, OPT_NEW_COMPRESS, OPT_NO_COMPRESS,
        OPT_REFUSED_BASE = 9000};
-@@ -887,6 +888,7 @@ static struct poptOption long_options[] = {
+@@ -886,6 +887,7 @@ static struct poptOption long_options[] = {
    {"no-c",             0,  POPT_ARG_VAL,    &always_checksum, 0, 0, 0 },
    {"checksum-choice",  0,  POPT_ARG_STRING, &checksum_choice, 0, 0, 0 },
    {"cc",               0,  POPT_ARG_STRING, &checksum_choice, 0, 0, 0 },
@@ -660,7 +660,7 @@ diff --git a/options.c b/options.c
    {"block-size",      'B', POPT_ARG_LONG,   &block_size, 0, 0, 0 },
    {"compare-dest",     0,  POPT_ARG_STRING, 0, OPT_COMPARE_DEST, 0, 0 },
    {"copy-dest",        0,  POPT_ARG_STRING, 0, OPT_COPY_DEST, 0, 0 },
-@@ -1725,6 +1727,23 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1720,6 +1722,23 @@ int parse_arguments(int *argc_p, const char ***argv_p)
                        }
                        break;
  
@@ -684,7 +684,7 @@ diff --git a/options.c b/options.c
                case OPT_INFO:
                        arg = poptGetOptArg(pc);
                        parse_output_words(info_words, info_levels, arg, USER_PRIORITY);
-@@ -1994,6 +2013,9 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1989,6 +2008,9 @@ int parse_arguments(int *argc_p, const char ***argv_p)
        }
  #endif
  
index b82856030042fd70d516924680995532a178159b..43dc2a3a66d2beea19f4ec317af026b0a0fd0183 100644 (file)
@@ -455,7 +455,7 @@ diff --git a/generator.c b/generator.c
  static const char *solo_file = NULL;
  
  enum nonregtype {
-@@ -595,7 +596,7 @@ int unchanged_file(char *fn, struct file_struct *file, STRUCT_STAT *st, int slot
+@@ -591,7 +592,7 @@ int unchanged_file(char *fn, struct file_struct *file, STRUCT_STAT *st, int slot
        if (always_checksum > 0 && S_ISREG(st->st_mode)) {
                char sum[MAX_DIGEST_LEN];
                if (checksum_files && slot >= 0)
@@ -464,7 +464,7 @@ diff --git a/generator.c b/generator.c
                else
                        file_checksum(fn, st, sum);
                return memcmp(sum, F_SUM(file), flist_csum_len) == 0;
-@@ -1339,7 +1340,8 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1335,7 +1336,8 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                                }
                        }
                        if (checksum_files) {
@@ -474,7 +474,7 @@ diff --git a/generator.c b/generator.c
                        }
                        need_new_dirscan = 0;
                }
-@@ -1513,6 +1515,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1506,6 +1508,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                        else
                                change_local_filter_dir(fname, strlen(fname), F_DEPTH(file));
                }
@@ -482,7 +482,7 @@ diff --git a/generator.c b/generator.c
                prior_dir_file = file;
                goto cleanup;
        }
-@@ -1792,6 +1795,8 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1781,6 +1784,8 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                        handle_partial_dir(partialptr, PDIR_DELETE);
                }
                set_file_attrs(fname, file, &sx, NULL, maybe_ATTRS_REPORT | maybe_ATTRS_ACCURATE_TIME);
@@ -491,7 +491,7 @@ diff --git a/generator.c b/generator.c
                if (itemizing)
                        itemize(fnamecmp, file, ndx, statret, &sx, 0, 0, NULL);
  #ifdef SUPPORT_HARD_LINKS
-@@ -2290,6 +2295,7 @@ void generate_files(int f_out, const char *local_name)
+@@ -2279,6 +2284,7 @@ void generate_files(int f_out, const char *local_name)
                                } else
                                        change_local_filter_dir(fbuf, strlen(fbuf), F_DEPTH(fp));
                        }
@@ -499,7 +499,7 @@ diff --git a/generator.c b/generator.c
                }
                for (i = cur_flist->low; i <= cur_flist->high; i++) {
                        struct file_struct *file = cur_flist->sorted[i];
-@@ -2384,6 +2390,9 @@ void generate_files(int f_out, const char *local_name)
+@@ -2373,6 +2379,9 @@ void generate_files(int f_out, const char *local_name)
                        wait_for_receiver();
        }
  
@@ -547,7 +547,7 @@ diff --git a/loadparm.c b/loadparm.c
 diff --git a/options.c b/options.c
 --- a/options.c
 +++ b/options.c
-@@ -1729,7 +1729,15 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1724,7 +1724,15 @@ int parse_arguments(int *argc_p, const char ***argv_p)
  
                case OPT_SUMFILES:
                        arg = poptGetOptArg(pc);
@@ -584,7 +584,7 @@ diff --git a/receiver.c b/receiver.c
                                 || (preserve_hard_links && F_IS_HLINKED(file)))
                                        send_msg_int(MSG_SUCCESS, ndx);
                                handle_partial_dir(partialptr, PDIR_DELETE);
-@@ -908,7 +909,7 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -906,7 +907,7 @@ int recv_files(int f_in, int f_out, char *local_name)
                case 2:
                        break;
                case 1:
index 04288cb2eb13dd1317abbedb0eb135f551b1c962..6367a8af0061c60c52e48f2536aa799f277e79b2 100644 (file)
@@ -8,7 +8,7 @@ To use this patch, run these commands for a successful build:
     ./configure                               (optional if already run)
     make
 
-based-on: cdf58a7aba23e31653661c950c2c870b96de08fa
+based-on: c528f8d5c8aa7b16b20cda72a9f4119699890c28
 diff --git a/flist.c b/flist.c
 --- a/flist.c
 +++ b/flist.c
@@ -25,7 +25,7 @@ diff --git a/flist.c b/flist.c
 diff --git a/generator.c b/generator.c
 --- a/generator.c
 +++ b/generator.c
-@@ -593,7 +593,8 @@ int unchanged_file(char *fn, struct file_struct *file, STRUCT_STAT *st)
+@@ -589,7 +589,8 @@ int unchanged_file(char *fn, struct file_struct *file, STRUCT_STAT *st)
           of the file time to determine whether to sync */
        if (always_checksum > 0 && S_ISREG(st->st_mode)) {
                char sum[MAX_DIGEST_LEN];
@@ -257,7 +257,7 @@ diff --git a/xattrs.c b/xattrs.c
  extern int saw_xattr_filter;
  
  #define RSYNC_XAL_INITIAL 5
-@@ -73,6 +75,10 @@ extern int saw_xattr_filter;
+@@ -72,6 +74,10 @@ extern int saw_xattr_filter;
  #define XACC_ACL_ATTR RSYNC_PREFIX "%" XACC_ACL_SUFFIX
  #define XDEF_ACL_SUFFIX "dacl"
  #define XDEF_ACL_ATTR RSYNC_PREFIX "%" XDEF_ACL_SUFFIX
@@ -268,7 +268,7 @@ diff --git a/xattrs.c b/xattrs.c
  
  typedef struct {
        char *datum, *name;
-@@ -266,7 +272,9 @@ static int rsync_xal_get(const char *fname, item_list *xalp)
+@@ -264,7 +270,9 @@ static int rsync_xal_get(const char *fname, item_list *xalp)
                         || (am_root < 0
                          && (strcmp(name+RPRE_LEN+1, XSTAT_SUFFIX) == 0
                           || strcmp(name+RPRE_LEN+1, XACC_ACL_SUFFIX) == 0
@@ -279,7 +279,7 @@ diff --git a/xattrs.c b/xattrs.c
                                continue;
                }
  
-@@ -1133,6 +1141,38 @@ int del_def_xattr_acl(const char *fname)
+@@ -1130,6 +1138,38 @@ int del_def_xattr_acl(const char *fname)
  }
  #endif
  
index 58fde3adde44c085c1146524612cb89ea47b0362..122a1c639fd15d4ec62a0cc0547639817d6e20ae 100644 (file)
@@ -13,11 +13,11 @@ To use this patch, run these commands for a successful build:
     ./configure                         (optional if already run)
     make
 
-based-on: cdf58a7aba23e31653661c950c2c870b96de08fa
+based-on: c528f8d5c8aa7b16b20cda72a9f4119699890c28
 diff --git a/generator.c b/generator.c
 --- a/generator.c
 +++ b/generator.c
-@@ -896,7 +896,7 @@ static int try_dests_reg(struct file_struct *file, char *fname, int ndx,
+@@ -892,7 +892,7 @@ static int try_dests_reg(struct file_struct *file, char *fname, int ndx,
                        best_match = j;
                        match_level = 2;
                }
@@ -26,7 +26,7 @@ diff --git a/generator.c b/generator.c
                        best_match = j;
                        match_level = 3;
                        break;
-@@ -936,7 +936,12 @@ static int try_dests_reg(struct file_struct *file, char *fname, int ndx,
+@@ -932,7 +932,12 @@ static int try_dests_reg(struct file_struct *file, char *fname, int ndx,
                        }
                } else
  #endif
@@ -40,7 +40,7 @@ diff --git a/generator.c b/generator.c
                        if (itemizing)
                                itemize(cmpbuf, file, ndx, 0, sxp, 0, 0, NULL);
                }
-@@ -1092,7 +1097,7 @@ static int try_dests_non(struct file_struct *file, char *fname, int ndx,
+@@ -1088,7 +1093,7 @@ static int try_dests_non(struct file_struct *file, char *fname, int ndx,
  
        if (match_level == 3) {
  #ifdef SUPPORT_HARD_LINKS
@@ -52,7 +52,7 @@ diff --git a/generator.c b/generator.c
 diff --git a/options.c b/options.c
 --- a/options.c
 +++ b/options.c
-@@ -737,7 +737,7 @@ enum {OPT_SERVER = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
+@@ -736,7 +736,7 @@ enum {OPT_SERVER = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
        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_NO_D, OPT_APPEND, OPT_NO_ICONV, OPT_INFO, OPT_DEBUG,
@@ -61,7 +61,7 @@ diff --git a/options.c b/options.c
        OPT_OLD_COMPRESS, OPT_NEW_COMPRESS, OPT_NO_COMPRESS,
        OPT_REFUSED_BASE = 9000};
  
-@@ -891,6 +891,7 @@ static struct poptOption long_options[] = {
+@@ -890,6 +890,7 @@ static struct poptOption long_options[] = {
    {"compare-dest",     0,  POPT_ARG_STRING, 0, OPT_COMPARE_DEST, 0, 0 },
    {"copy-dest",        0,  POPT_ARG_STRING, 0, OPT_COPY_DEST, 0, 0 },
    {"link-dest",        0,  POPT_ARG_STRING, 0, OPT_LINK_DEST, 0, 0 },
@@ -69,7 +69,7 @@ diff --git a/options.c b/options.c
    {"fuzzy",           'y', POPT_ARG_NONE,   0, 'y', 0, 0 },
    {"no-fuzzy",         0,  POPT_ARG_VAL,    &fuzzy_basis, 0, 0, 0 },
    {"no-y",             0,  POPT_ARG_VAL,    &fuzzy_basis, 0, 0, 0 },
-@@ -1146,6 +1147,9 @@ static void set_refuse_options(void)
+@@ -1145,6 +1146,9 @@ static void set_refuse_options(void)
  #ifndef SUPPORT_HARD_LINKS
        parse_one_refuse_match(0, "link-dest", list_end);
  #endif
@@ -79,7 +79,7 @@ diff --git a/options.c b/options.c
  #ifndef ICONV_OPTION
        parse_one_refuse_match(0, "iconv", list_end);
  #endif
-@@ -1309,6 +1313,8 @@ char *alt_dest_opt(int type)
+@@ -1308,6 +1312,8 @@ char *alt_dest_opt(int type)
                return "--copy-dest";
        case LINK_DEST:
                return "--link-dest";
@@ -88,7 +88,7 @@ diff --git a/options.c b/options.c
        default:
                assert(0);
        }
-@@ -1688,6 +1694,10 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1683,6 +1689,10 @@ int parse_arguments(int *argc_p, const char ***argv_p)
                        want_dest_type = LINK_DEST;
                        goto set_dest_dir;
  
index f17d916a43f513a3e22c67e3b7c8df82b93397d7..04d4167424696c828838bf9d5c6abce3e605bf11 100644 (file)
@@ -27,7 +27,7 @@ To use this patch, run these commands for a successful build:
     ./configure                         (optional if already run)
     make
 
-based-on: cdf58a7aba23e31653661c950c2c870b96de08fa
+based-on: c528f8d5c8aa7b16b20cda72a9f4119699890c28
 diff --git a/loadparm.c b/loadparm.c
 --- a/loadparm.c
 +++ b/loadparm.c
@@ -116,7 +116,7 @@ diff --git a/options.c b/options.c
  int remove_source_files = 0;
  int one_file_system = 0;
  int protocol_version = PROTOCOL_VERSION;
-@@ -967,6 +969,8 @@ static struct poptOption long_options[] = {
+@@ -966,6 +968,8 @@ static struct poptOption long_options[] = {
    {"outbuf",           0,  POPT_ARG_STRING, &outbuf_mode, 0, 0, 0 },
    {"remote-option",   'M', POPT_ARG_STRING, 0, 'M', 0, 0 },
    {"protocol",         0,  POPT_ARG_INT,    &protocol_version, 0, 0, 0 },
@@ -149,7 +149,7 @@ diff --git a/socket.c b/socket.c
  
  #ifdef HAVE_SIGACTION
  static struct sigaction sigact;
-@@ -166,6 +168,37 @@ static void contimeout_handler(UNUSED(int val))
+@@ -165,6 +167,37 @@ static void contimeout_handler(UNUSED(int val))
        connect_timeout = -1;
  }
  
@@ -187,7 +187,7 @@ diff --git a/socket.c b/socket.c
  /* Open a socket to a tcp remote host with the specified port.
   *
   * Based on code from Warren.  Proxy support by Stephen Rothwell.
-@@ -275,6 +308,7 @@ int open_socket_out(char *host, int port, const char *bind_addr,
+@@ -273,6 +306,7 @@ int open_socket_out(char *host, int port, const char *bind_addr, int af_hint)
                        alarm(connect_timeout);
                }
  
@@ -195,7 +195,7 @@ diff --git a/socket.c b/socket.c
                set_socket_options(s, sockopts);
                while (connect(s, res->ai_addr, res->ai_addrlen) < 0) {
                        if (connect_timeout < 0)
-@@ -449,6 +483,7 @@ static int *open_socket_in(int type, int port, const char *bind_addr,
+@@ -444,6 +478,7 @@ static int *open_socket_in(int type, int port, const char *bind_addr,
                        continue;
                }
  
index e99cc849f0b7c2df80b36aa31d2e8905f1a9555c..d67abc4d10a40e75c4ba32bec3bf6e1b3094669d 100644 (file)
@@ -8,7 +8,7 @@ To use this patch, run these commands for a successful build:
     ./configure                      (optional if already run)
     make
 
-based-on: cdf58a7aba23e31653661c950c2c870b96de08fa
+based-on: c528f8d5c8aa7b16b20cda72a9f4119699890c28
 diff --git a/generator.c b/generator.c
 --- a/generator.c
 +++ b/generator.c
@@ -20,7 +20,7 @@ diff --git a/generator.c b/generator.c
  extern int write_devices;
  extern int preserve_specials;
  extern int preserve_hard_links;
-@@ -1660,7 +1661,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1650,7 +1651,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                goto cleanup;
        }
  
@@ -29,7 +29,7 @@ diff --git a/generator.c b/generator.c
                if (solo_file)
                        fname = f_name(file, NULL);
                rprintf(FINFO, "skipping non-regular file \"%s\"\n", fname);
-@@ -1882,6 +1883,9 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1871,6 +1872,9 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                fnamecmp_type = FNAMECMP_BACKUP;
        }
  
@@ -50,7 +50,7 @@ diff --git a/options.c b/options.c
  int write_devices = 0;
  int preserve_links = 0;
  int preserve_hard_links = 0;
-@@ -811,6 +812,7 @@ static struct poptOption long_options[] = {
+@@ -810,6 +811,7 @@ static struct poptOption long_options[] = {
    {"no-D",             0,  POPT_ARG_NONE,   0, OPT_NO_D, 0, 0 },
    {"devices",          0,  POPT_ARG_VAL,    &preserve_devices, 1, 0, 0 },
    {"no-devices",       0,  POPT_ARG_VAL,    &preserve_devices, 0, 0, 0 },
@@ -58,7 +58,7 @@ diff --git a/options.c b/options.c
    {"write-devices",    0,  POPT_ARG_VAL,    &write_devices, 1, 0, 0 },
    {"no-write-devices", 0,  POPT_ARG_VAL,    &write_devices, 0, 0, 0 },
    {"specials",         0,  POPT_ARG_VAL,    &preserve_specials, 1, 0, 0 },
-@@ -1105,6 +1107,7 @@ static void set_refuse_options(void)
+@@ -1104,6 +1106,7 @@ static void set_refuse_options(void)
                 || strcmp("iconv", longName) == 0
                 || strcmp("no-iconv", longName) == 0
                 || strcmp("checksum-seed", longName) == 0
@@ -66,7 +66,7 @@ diff --git a/options.c b/options.c
                 || strcmp("write-devices", longName) == 0 /* disable wild-match (it gets refused below) */
                 || strcmp("log-format", longName) == 0 /* aka out-format (NOT log-file-format) */
                 || strcmp("sender", longName) == 0
-@@ -1116,6 +1119,7 @@ static void set_refuse_options(void)
+@@ -1115,6 +1118,7 @@ static void set_refuse_options(void)
        assert(list_end != NULL);
  
        if (am_daemon) { /* Refused by default, but can be accepted via a negated exact match. */
@@ -74,7 +74,7 @@ diff --git a/options.c b/options.c
                parse_one_refuse_match(0, "write-devices", list_end);
        }
  
-@@ -2841,6 +2845,9 @@ void server_options(char **args, int *argc_p)
+@@ -2836,6 +2840,9 @@ void server_options(char **args, int *argc_p)
        else if (remove_source_files)
                args[ac++] = "--remove-sent-files";
  
@@ -106,7 +106,7 @@ diff --git a/rsync.c b/rsync.c
  extern int am_root;
  extern int am_server;
  extern int am_daemon;
-@@ -420,7 +421,8 @@ int read_ndx_and_attrs(int f_in, int f_out, int *iflag_ptr, uchar *type_ptr,
+@@ -419,7 +420,8 @@ int read_ndx_and_attrs(int f_in, int f_out, int *iflag_ptr, uchar *type_ptr, cha
  
        if (iflags & ITEM_TRANSFER) {
                int i = ndx - cur_flist->ndx_start;
@@ -136,7 +136,7 @@ diff --git a/rsyncd.conf.5.md b/rsyncd.conf.5.md
 diff --git a/sender.c b/sender.c
 --- a/sender.c
 +++ b/sender.c
-@@ -370,6 +370,9 @@ void send_files(int f_in, int f_out)
+@@ -366,6 +366,9 @@ void send_files(int f_in, int f_out)
                        exit_cleanup(RERR_FILEIO);
                }
  
index c93c688e79e29dccaa7768073e6133a386d99eaf..76506381cf59c69fefb7bbb89e498716779a832e 100644 (file)
@@ -171,13 +171,13 @@ diff --git a/generator.c b/generator.c
  extern int preserve_hard_links;
  extern int preserve_executability;
  extern int preserve_fileflags;
-@@ -401,6 +402,19 @@ static inline int mtime_differs(STRUCT_STAT *stp, struct file_struct *file)
+@@ -398,6 +399,19 @@ static inline int mtime_differs(STRUCT_STAT *stp, struct file_struct *file)
  #endif
  }
  
 +static inline int any_time_differs(stat_x *sxp, struct file_struct *file, UNUSED(const char *fname))
 +{
-+      int differs = time_differs(&sxp->st, file);
++      int differs = mtime_differs(&sxp->st, file);
 +#ifdef SUPPORT_CRTIMES
 +      if (!differs && crtimes_ndx) {
 +              if (sxp->crtime == 0)
@@ -191,7 +191,7 @@ diff --git a/generator.c b/generator.c
  static inline int perms_differ(struct file_struct *file, stat_x *sxp)
  {
        if (preserve_perms)
-@@ -455,7 +469,7 @@ int unchanged_attrs(const char *fname, struct file_struct *file, stat_x *sxp)
+@@ -452,7 +466,7 @@ int unchanged_attrs(const char *fname, struct file_struct *file, stat_x *sxp)
  {
        if (S_ISLNK(file->mode)) {
  #ifdef CAN_SET_SYMLINK_TIMES
@@ -200,7 +200,7 @@ diff --git a/generator.c b/generator.c
                        return 0;
  #endif
  #ifdef CAN_CHMOD_SYMLINK
-@@ -475,7 +489,7 @@ int unchanged_attrs(const char *fname, struct file_struct *file, stat_x *sxp)
+@@ -472,7 +486,7 @@ int unchanged_attrs(const char *fname, struct file_struct *file, stat_x *sxp)
                        return 0;
  #endif
        } else {
@@ -209,7 +209,7 @@ diff --git a/generator.c b/generator.c
                        return 0;
                if (perms_differ(file, sxp))
                        return 0;
-@@ -521,6 +535,14 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
+@@ -518,6 +532,14 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
                if (atimes_ndx && !S_ISDIR(file->mode) && !S_ISLNK(file->mode)
                 && !same_time(F_ATIME(file), 0, sxp->st.st_atime, 0))
                        iflags |= ITEM_REPORT_ATIME;
@@ -224,7 +224,7 @@ diff --git a/generator.c b/generator.c
  #if !defined HAVE_LCHMOD && !defined HAVE_SETATTRLIST
                if (S_ISLNK(file->mode)) {
                        ;
-@@ -1146,6 +1168,7 @@ static void list_file_entry(struct file_struct *f)
+@@ -1142,6 +1164,7 @@ static void list_file_entry(struct file_struct *f)
        int size_width = human_readable ? 14 : 11;
        int mtime_width = 1 + strlen(mtime_str);
        int atime_width = atimes_ndx ? mtime_width : 0;
@@ -232,7 +232,7 @@ diff --git a/generator.c b/generator.c
  
        if (!F_IS_ACTIVE(f)) {
                /* this can happen if duplicate names were removed */
-@@ -1156,10 +1179,11 @@ static void list_file_entry(struct file_struct *f)
+@@ -1152,10 +1175,11 @@ static void list_file_entry(struct file_struct *f)
  
        if (missing_args == 2 && f->mode == 0) {
                rprintf(FINFO, "%-*s %s\n",
@@ -245,7 +245,7 @@ diff --git a/generator.c b/generator.c
                const char *arrow, *lnk;
  
                permstring(permbuf, f->mode);
-@@ -1172,9 +1196,9 @@ static void list_file_entry(struct file_struct *f)
+@@ -1168,9 +1192,9 @@ static void list_file_entry(struct file_struct *f)
  #endif
                        arrow = lnk = "";
  
@@ -257,7 +257,7 @@ diff --git a/generator.c b/generator.c
                        f_name(f, NULL), arrow, lnk);
        }
  }
-@@ -1270,6 +1294,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1266,6 +1290,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                        return;
                }
        }
@@ -289,7 +289,7 @@ diff --git a/options.c b/options.c
  int update_only = 0;
  int open_noatime = 0;
  int cvs_exclude = 0;
-@@ -651,6 +652,11 @@ static void print_capabilities(enum logcode f)
+@@ -650,6 +651,11 @@ static void print_capabilities(enum logcode f)
  #endif
                        "file-flags",
  
@@ -301,7 +301,7 @@ diff --git a/options.c b/options.c
                NULL
        };
  
-@@ -800,6 +806,9 @@ static struct poptOption long_options[] = {
+@@ -799,6 +805,9 @@ static struct poptOption long_options[] = {
    {"no-U",             0,  POPT_ARG_VAL,    &preserve_atimes, 0, 0, 0 },
    {"open-noatime",     0,  POPT_ARG_VAL,    &open_noatime, 1, 0, 0 },
    {"no-open-noatime",  0,  POPT_ARG_VAL,    &open_noatime, 0, 0, 0 },
@@ -311,7 +311,7 @@ diff --git a/options.c b/options.c
    {"omit-dir-times",  'O', POPT_ARG_VAL,    &omit_dir_times, 1, 0, 0 },
    {"no-omit-dir-times",0,  POPT_ARG_VAL,    &omit_dir_times, 0, 0, 0 },
    {"no-O",             0,  POPT_ARG_VAL,    &omit_dir_times, 0, 0, 0 },
-@@ -1175,6 +1184,9 @@ static void set_refuse_options(void)
+@@ -1174,6 +1183,9 @@ static void set_refuse_options(void)
        parse_one_refuse_match(0, "force-uchange", list_end);
        parse_one_refuse_match(0, "force-schange", list_end);
  #endif
@@ -321,7 +321,7 @@ diff --git a/options.c b/options.c
  
        /* Now we use the descrip values to actually mark the options for refusal. */
        for (op = long_options; op != list_end; op++) {
-@@ -2520,6 +2532,10 @@ void server_options(char **args, int *argc_p)
+@@ -2515,6 +2527,10 @@ void server_options(char **args, int *argc_p)
                if (preserve_atimes > 1)
                        argstr[x++] = 'U';
        }
@@ -376,7 +376,7 @@ diff --git a/rsync.1.md b/rsync.1.md
 diff --git a/rsync.c b/rsync.c
 --- a/rsync.c
 +++ b/rsync.c
-@@ -619,6 +619,9 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
+@@ -618,6 +618,9 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
                memcpy(&sx2.st, &sxp->st, sizeof (sx2.st));
        if (!atimes_ndx || S_ISDIR(sxp->st.st_mode))
                flags |= ATTRS_SKIP_ATIME;
@@ -386,7 +386,7 @@ diff --git a/rsync.c b/rsync.c
        if (!(flags & ATTRS_SKIP_MTIME) && !same_mtime(file, &sxp->st, flags & ATTRS_ACCURATE_TIME)) {
                sx2.st.st_mtime = file->modtime;
  #ifdef ST_MTIME_NSEC
-@@ -648,6 +651,16 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
+@@ -647,6 +650,16 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
                        file->flags |= FLAG_TIME_FAILED;
                }
        }
@@ -403,7 +403,7 @@ diff --git a/rsync.c b/rsync.c
  
  #ifdef SUPPORT_ACLS
        /* It's OK to call set_acl() now, even for a dir, as the generator
-@@ -767,7 +780,7 @@ int finish_transfer(const char *fname, const char *fnametmp,
+@@ -766,7 +779,7 @@ int finish_transfer(const char *fname, const char *fnametmp,
        /* Change permissions before putting the file into place. */
        set_file_attrs(fnametmp, file, NULL, fnamecmp,
                       ATTRS_DELAY_IMMUTABLE
@@ -412,7 +412,7 @@ diff --git a/rsync.c b/rsync.c
  
        /* move tmp file over real file */
        if (DEBUG_GTE(RECV, 1))
-@@ -796,7 +809,7 @@ int finish_transfer(const char *fname, const char *fnametmp,
+@@ -795,7 +808,7 @@ int finish_transfer(const char *fname, const char *fnametmp,
  
    do_set_file_attrs:
        set_file_attrs(fnametmp, file, NULL, fnamecmp,
@@ -449,7 +449,7 @@ diff --git a/rsync.h b/rsync.h
  #define ITEM_BASIS_TYPE_FOLLOWS (1<<11)
  #define ITEM_XNAME_FOLLOWS (1<<12)
  #define ITEM_IS_NEW (1<<13)
-@@ -572,6 +574,10 @@ typedef unsigned int size_t;
+@@ -575,6 +577,10 @@ typedef unsigned int size_t;
  #define ST_FLAGS(st) NO_FFLAGS
  #endif
  
@@ -460,7 +460,7 @@ diff --git a/rsync.h b/rsync.h
  /* Find a variable that is either exactly 32-bits or longer.
   * If some code depends on 32-bit truncation, it will need to
   * take special action in a "#if SIZEOF_INT32 > 4" section. */
-@@ -781,6 +787,7 @@ struct file_struct {
+@@ -784,6 +790,7 @@ struct file_struct {
  extern int file_extra_cnt;
  extern int inc_recurse;
  extern int atimes_ndx;
@@ -468,7 +468,7 @@ diff --git a/rsync.h b/rsync.h
  extern int pathname_ndx;
  extern int depth_ndx;
  extern int uid_ndx;
-@@ -845,6 +852,7 @@ extern int xattrs_ndx;
+@@ -848,6 +855,7 @@ extern int xattrs_ndx;
  #define F_XATTR(f) REQ_EXTRA(f, xattrs_ndx)->num
  #define F_NDX(f) REQ_EXTRA(f, unsort_ndx)->num
  #define F_ATIME(f) REQ_EXTRA64(f, atimes_ndx)->num
@@ -476,7 +476,7 @@ diff --git a/rsync.h b/rsync.h
  
  /* These items are per-entry optional: */
  #define F_HL_GNUM(f) OPT_EXTRA(f, START_BUMP(f))->num /* non-dirs */
-@@ -1087,6 +1095,7 @@ typedef struct {
+@@ -1090,6 +1098,7 @@ typedef struct {
  
  typedef struct {
      STRUCT_STAT st;
@@ -501,7 +501,7 @@ diff --git a/syscall.c b/syscall.c
  #define RETURN_ERROR_IF(x,e) \
        do { \
                if (x) { \
-@@ -494,6 +501,40 @@ int do_setattrlist_times(const char *fname, STRUCT_STAT *stp)
+@@ -493,6 +500,40 @@ int do_setattrlist_times(const char *fname, STRUCT_STAT *stp)
  }
  #endif
  
@@ -638,7 +638,7 @@ diff --git a/tls.c b/tls.c
  
        /* TODO: Perhaps escape special characters in fname? */
        printf("%s ", permbuf);
-@@ -206,14 +223,17 @@ static void list_file(const char *fname)
+@@ -204,14 +221,17 @@ static void list_file(const char *fname)
        } else
                printf("%15s", do_big_num(buf.st_size, 1, NULL));
  
@@ -658,7 +658,7 @@ diff --git a/tls.c b/tls.c
    {"link-times",      'l', POPT_ARG_NONE,   &link_times, 0, 0, 0 },
    {"link-owner",      'L', POPT_ARG_NONE,   &link_owner, 0, 0, 0 },
  #ifdef SUPPORT_XATTRS
-@@ -233,6 +253,9 @@ static void NORETURN tls_usage(int ret)
+@@ -231,6 +251,9 @@ static void NORETURN tls_usage(int ret)
    fprintf(F,"Trivial file listing program for portably checking rsync\n");
    fprintf(F,"\nOptions:\n");
    fprintf(F," -U, --atimes                display access (last-used) times\n");
index 5962ffe8c031e1cf1cd57caf981fda5e8933add6..ff0e2ea74e9cb0d189e14a5fec759635cda7845f 100644 (file)
@@ -8,7 +8,7 @@ To use this patch, run these commands for a successful build:
     ./configure                                 (optional if already run)
     make
 
-based-on: cdf58a7aba23e31653661c950c2c870b96de08fa
+based-on: c528f8d5c8aa7b16b20cda72a9f4119699890c28
 diff --git a/exclude.c b/exclude.c
 --- a/exclude.c
 +++ b/exclude.c
index be30cbbd8aa7c4a1e5b4679ebb601318cdca35be..8d05056a86af15579ff6a761ee24c16561c2c3bd 100644 (file)
@@ -14,7 +14,7 @@ To use this patch, run these commands for a successful build:
     ./configure                                 (optional if already run)
     make
 
-based-on: cdf58a7aba23e31653661c950c2c870b96de08fa
+based-on: c528f8d5c8aa7b16b20cda72a9f4119699890c28
 diff --git a/generator.c b/generator.c
 --- a/generator.c
 +++ b/generator.c
@@ -26,12 +26,12 @@ diff --git a/generator.c b/generator.c
  extern int size_only;
  extern OFF_T max_size;
  extern OFF_T min_size;
-@@ -586,6 +587,9 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
+@@ -582,6 +583,9 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
  /* Perform our quick-check heuristic for determining if a file is unchanged. */
  int unchanged_file(char *fn, struct file_struct *file, STRUCT_STAT *st)
  {
 +      if (date_only)
-+              return time_diff(st, file) == 0;
++              return !mtime_differs(st, file);
 +
        if (st->st_size != F_LENGTH(file))
                return 0;
@@ -47,7 +47,7 @@ diff --git a/options.c b/options.c
  int daemon_bwlimit = 0;
  int bwlimit = 0;
  int fuzzy_basis = 0;
-@@ -838,6 +839,7 @@ static struct poptOption long_options[] = {
+@@ -837,6 +838,7 @@ static struct poptOption long_options[] = {
    {"chmod",            0,  POPT_ARG_STRING, 0, OPT_CHMOD, 0, 0 },
    {"ignore-times",    'I', POPT_ARG_NONE,   &ignore_times, 0, 0, 0 },
    {"size-only",        0,  POPT_ARG_NONE,   &size_only, 0, 0, 0 },
@@ -55,7 +55,7 @@ diff --git a/options.c b/options.c
    {"one-file-system", 'x', POPT_ARG_NONE,   0, 'x', 0, 0 },
    {"no-one-file-system",0, POPT_ARG_VAL,    &one_file_system, 0, 0, 0 },
    {"no-x",             0,  POPT_ARG_VAL,    &one_file_system, 0, 0, 0 },
-@@ -2728,6 +2730,9 @@ void server_options(char **args, int *argc_p)
+@@ -2723,6 +2725,9 @@ void server_options(char **args, int *argc_p)
        else if (missing_args == 1 && !am_sender)
                args[ac++] = "--ignore-missing-args";
  
diff --git a/db.diff b/db.diff
index 9b53d7c20a45e5db2229809c6ac8117aa273be01..c95a00275b78cd7782c014c29c22f8754d943ea8 100644 (file)
--- a/db.diff
+++ b/db.diff
@@ -21,7 +21,7 @@ To use this patch, run these commands for a successful build:
     ./configure
     make
 
-based-on: cdf58a7aba23e31653661c950c2c870b96de08fa
+based-on: c528f8d5c8aa7b16b20cda72a9f4119699890c28
 diff --git a/.gitignore b/.gitignore
 --- a/.gitignore
 +++ b/.gitignore
@@ -202,7 +202,7 @@ diff --git a/clientserver.c b/clientserver.c
  extern char *bind_address;
  extern char *config_file;
  extern char *logfile_format;
-@@ -776,6 +779,11 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
+@@ -775,6 +778,11 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
  
        log_init(1);
  
@@ -214,7 +214,7 @@ diff --git a/clientserver.c b/clientserver.c
  #ifdef HAVE_PUTENV
        if ((*lp_early_exec(i) || *lp_prexfer_exec(i) || *lp_postxfer_exec(i))
         && !getenv("RSYNC_NO_XFER_EXEC")) {
-@@ -963,6 +971,8 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
+@@ -962,6 +970,8 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
  
        am_server = 1; /* Don't let someone try to be tricky. */
        quiet = 0;
@@ -2316,7 +2316,7 @@ diff --git a/generator.c b/generator.c
  extern int append_mode;
  extern int make_backups;
  extern int csum_length;
-@@ -593,7 +594,8 @@ int unchanged_file(char *fn, struct file_struct *file, STRUCT_STAT *st)
+@@ -589,7 +590,8 @@ int unchanged_file(char *fn, struct file_struct *file, STRUCT_STAT *st)
           of the file time to determine whether to sync */
        if (always_checksum > 0 && S_ISREG(st->st_mode)) {
                char sum[MAX_DIGEST_LEN];
@@ -2326,7 +2326,7 @@ diff --git a/generator.c b/generator.c
                return memcmp(sum, F_SUM(file), flist_csum_len) == 0;
        }
  
-@@ -2252,6 +2254,13 @@ void generate_files(int f_out, const char *local_name)
+@@ -2241,6 +2243,13 @@ void generate_files(int f_out, const char *local_name)
                        : "enabled");
        }
  
@@ -2340,7 +2340,7 @@ diff --git a/generator.c b/generator.c
        dflt_perms = (ACCESSPERMS & ~orig_umask);
  
        do {
-@@ -2377,6 +2386,9 @@ void generate_files(int f_out, const char *local_name)
+@@ -2366,6 +2375,9 @@ void generate_files(int f_out, const char *local_name)
                        wait_for_receiver();
        }
  
@@ -2396,7 +2396,7 @@ diff --git a/io.c b/io.c
  extern int io_error;
  extern int batch_fd;
  extern int eol_nulls;
-@@ -1490,6 +1492,32 @@ static void read_a_msg(void)
+@@ -1489,6 +1491,32 @@ static void read_a_msg(void)
                if (am_sender)
                        maybe_send_keepalive(time(NULL), MSK_ALLOW_FLUSH);
                break;
@@ -2429,7 +2429,7 @@ diff --git a/io.c b/io.c
        case MSG_DELETED:
                if (msg_bytes >= sizeof data)
                        goto overflow;
-@@ -1641,6 +1669,7 @@ static void read_a_msg(void)
+@@ -1640,6 +1668,7 @@ static void read_a_msg(void)
                 * with a duplicate exit message. */
                _exit_cleanup(val, __FILE__, 0 - __LINE__);
        default:
@@ -2532,7 +2532,7 @@ diff --git a/main.c b/main.c
  extern int file_total;
  extern int recurse;
  extern int xfer_dirs;
-@@ -87,6 +89,7 @@ extern char *logfile_format;
+@@ -88,6 +90,7 @@ extern char *logfile_format;
  extern char *filesfrom_host;
  extern char *partial_dir;
  extern char *rsync_path;
@@ -2540,7 +2540,7 @@ diff --git a/main.c b/main.c
  extern char *shell_cmd;
  extern char *password_file;
  extern char *backup_dir;
-@@ -1200,6 +1203,9 @@ void start_server(int f_in, int f_out, int argc, char *argv[])
+@@ -1205,6 +1208,9 @@ void start_server(int f_in, int f_out, int argc, char *argv[])
        if (am_daemon && io_timeout && protocol_version >= 31)
                send_msg_int(MSG_IO_TIMEOUT, io_timeout);
  
@@ -2550,7 +2550,7 @@ diff --git a/main.c b/main.c
        if (am_sender) {
                keep_dirlinks = 0; /* Must be disabled on the sender. */
                if (need_messages_from_generator)
-@@ -1493,6 +1499,9 @@ static int start_client(int argc, char *argv[])
+@@ -1496,6 +1502,9 @@ static int start_client(int argc, char *argv[])
        else
                env_port = rsync_port;
  
@@ -2597,7 +2597,7 @@ diff --git a/options.c b/options.c
        DEBUG_WORD(DEL, W_REC, "Debug delete actions (levels 1-3)"),
        DEBUG_WORD(DELTASUM, W_SND|W_REC, "Debug delta-transfer checksumming (levels 1-4)"),
        DEBUG_WORD(DUP, W_REC, "Debug weeding of duplicate names"),
-@@ -644,6 +650,16 @@ static void print_capabilities(enum logcode f)
+@@ -643,6 +649,16 @@ static void print_capabilities(enum logcode f)
  #endif
                        "SIMD",
  
@@ -2614,7 +2614,7 @@ diff --git a/options.c b/options.c
                NULL
        };
  
-@@ -737,6 +753,7 @@ enum {OPT_SERVER = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
+@@ -736,6 +752,7 @@ enum {OPT_SERVER = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
        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_NO_D, OPT_APPEND, OPT_NO_ICONV, OPT_INFO, OPT_DEBUG,
@@ -2622,7 +2622,7 @@ diff --git a/options.c b/options.c
        OPT_USERMAP, OPT_GROUPMAP, OPT_CHOWN, OPT_BWLIMIT,
        OPT_OLD_COMPRESS, OPT_NEW_COMPRESS, OPT_NO_COMPRESS,
        OPT_REFUSED_BASE = 9000};
-@@ -887,6 +904,10 @@ static struct poptOption long_options[] = {
+@@ -886,6 +903,10 @@ static struct poptOption long_options[] = {
    {"no-c",             0,  POPT_ARG_VAL,    &always_checksum, 0, 0, 0 },
    {"checksum-choice",  0,  POPT_ARG_STRING, &checksum_choice, 0, 0, 0 },
    {"cc",               0,  POPT_ARG_STRING, &checksum_choice, 0, 0, 0 },
@@ -2633,7 +2633,7 @@ diff --git a/options.c b/options.c
    {"block-size",      'B', POPT_ARG_LONG,   &block_size, 0, 0, 0 },
    {"compare-dest",     0,  POPT_ARG_STRING, 0, OPT_COMPARE_DEST, 0, 0 },
    {"copy-dest",        0,  POPT_ARG_STRING, 0, OPT_COPY_DEST, 0, 0 },
-@@ -976,6 +997,9 @@ static struct poptOption long_options[] = {
+@@ -975,6 +996,9 @@ static struct poptOption long_options[] = {
    {"dparam",           0,  POPT_ARG_STRING, 0, OPT_DAEMON, 0, 0 },
    {"detach",           0,  POPT_ARG_NONE,   0, OPT_DAEMON, 0, 0 },
    {"no-detach",        0,  POPT_ARG_NONE,   0, OPT_DAEMON, 0, 0 },
@@ -2643,7 +2643,7 @@ diff --git a/options.c b/options.c
    {0,0,0,0, 0, 0, 0}
  };
  
-@@ -1016,6 +1040,39 @@ static struct poptOption long_daemon_options[] = {
+@@ -1015,6 +1039,39 @@ static struct poptOption long_daemon_options[] = {
    {0,0,0,0, 0, 0, 0}
  };
  
@@ -2683,7 +2683,7 @@ diff --git a/options.c b/options.c
  
  static char err_buf[200];
  
-@@ -1141,6 +1198,8 @@ static void set_refuse_options(void)
+@@ -1140,6 +1197,8 @@ static void set_refuse_options(void)
                        parse_one_refuse_match(0, "iconv", list_end);
  #endif
                parse_one_refuse_match(0, "log-file*", list_end);
@@ -2692,7 +2692,7 @@ diff --git a/options.c b/options.c
        }
  
  #ifndef SUPPORT_HARD_LINKS
-@@ -1279,6 +1338,102 @@ static void create_refuse_error(int which)
+@@ -1278,6 +1337,102 @@ static void create_refuse_error(int which)
                snprintf(err_buf + n, sizeof err_buf - n, " (-%c)\n", op->shortName);
  }
  
@@ -2795,7 +2795,7 @@ diff --git a/options.c b/options.c
  /* This is used to make sure that --daemon & --server cannot be aliased to
   * something else. These options have always disabled popt aliases for the
   * parsing of a daemon or server command-line, but we have to make sure that
-@@ -1335,6 +1490,12 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1334,6 +1489,12 @@ int parse_arguments(int *argc_p, const char ***argv_p)
                return 0;
        }
  
@@ -2808,7 +2808,7 @@ diff --git a/options.c b/options.c
        set_refuse_options();
  
  #ifdef ICONV_OPTION
-@@ -1456,6 +1617,12 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1452,6 +1613,12 @@ int parse_arguments(int *argc_p, const char ***argv_p)
                        am_daemon = 1;
                        return 1;
  
@@ -2821,7 +2821,7 @@ diff --git a/options.c b/options.c
                case OPT_MODIFY_WINDOW:
                        /* The value has already been set by popt, but
                         * we need to remember that we're using a
-@@ -1530,6 +1697,10 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1526,6 +1693,10 @@ int parse_arguments(int *argc_p, const char ***argv_p)
                        preserve_devices = preserve_specials = 0;
                        break;
  
@@ -2852,7 +2852,7 @@ diff --git a/pipe.c b/pipe.c
  /**
   * Create a child connected to us via its stdin/stdout.
   *
-@@ -142,13 +147,22 @@ pid_t local_child(int argc, char **argv, int *f_in, int *f_out,
+@@ -141,13 +146,22 @@ pid_t local_child(int argc, char **argv, int *f_in, int *f_out,
                }
  
                if (remote_option_cnt) {
@@ -2874,8 +2874,8 @@ diff --git a/pipe.c b/pipe.c
 +              } else if (use_db)
 +                      same_db = 1;
  
-               if (dup2(to_child_pipe[0], STDIN_FILENO) < 0 ||
-                   close(to_child_pipe[1]) < 0 ||
+               if (dup2(to_child_pipe[0], STDIN_FILENO) < 0
+                || close(to_child_pipe[1]) < 0
 diff --git a/receiver.c b/receiver.c
 --- a/receiver.c
 +++ b/receiver.c
@@ -2910,7 +2910,7 @@ diff --git a/receiver.c b/receiver.c
        progress_init();
  
        while (1) {
-@@ -880,6 +890,8 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -878,6 +888,8 @@ int recv_files(int f_in, int f_out, char *local_name)
                                        do_unlink(partialptr);
                                handle_partial_dir(partialptr, PDIR_DELETE);
                        }
@@ -2919,7 +2919,7 @@ diff --git a/receiver.c b/receiver.c
                } else if (keep_partial && partialptr && !one_inplace) {
                        if (!handle_partial_dir(partialptr, PDIR_CREATE)) {
                                rprintf(FERROR,
-@@ -893,6 +905,8 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -891,6 +903,8 @@ int recv_files(int f_in, int f_out, char *local_name)
                                recv_ok = -1;
                        else if (delay_updates && recv_ok) {
                                bitbag_set_bit(delayed_bits, ndx);
@@ -2952,7 +2952,7 @@ diff --git a/rsync.c b/rsync.c
  extern int am_starting_up;
  extern int allow_8bit_chars;
  extern int protocol_version;
-@@ -795,6 +796,8 @@ struct file_list *flist_for_ndx(int ndx, const char *fatal_error_loc)
+@@ -794,6 +795,8 @@ struct file_list *flist_for_ndx(int ndx, const char *fatal_error_loc)
  
  const char *who_am_i(void)
  {
index d9121629a84f9710bbe2ec5bf1bb36f507724a59..1595fa009f57a3a47ca8f2c68a750697884abc37 100644 (file)
@@ -24,7 +24,7 @@ based-on: patch/master/detect-renamed
 diff --git a/generator.c b/generator.c
 --- a/generator.c
 +++ b/generator.c
-@@ -471,7 +471,9 @@ static int fattr_find(struct file_struct *f, char *fname)
+@@ -468,7 +468,9 @@ static int fattr_find(struct file_struct *f, char *fname)
                                continue;
                        }
                }
@@ -35,7 +35,7 @@ diff --git a/generator.c b/generator.c
                diff = u_strcmp(fmid->basename, f->basename);
                if (diff == 0) {
                        good_match = mid;
-@@ -1964,6 +1966,21 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1953,6 +1955,21 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                fnamecmp = partialptr;
                fnamecmp_type = FNAMECMP_PARTIAL_DIR;
                statret = 0;
@@ -60,7 +60,7 @@ diff --git a/generator.c b/generator.c
 diff --git a/options.c b/options.c
 --- a/options.c
 +++ b/options.c
-@@ -892,7 +892,9 @@ static struct poptOption long_options[] = {
+@@ -891,7 +891,9 @@ static struct poptOption long_options[] = {
    {"compare-dest",     0,  POPT_ARG_STRING, 0, OPT_COMPARE_DEST, 0, 0 },
    {"copy-dest",        0,  POPT_ARG_STRING, 0, OPT_COPY_DEST, 0, 0 },
    {"link-dest",        0,  POPT_ARG_STRING, 0, OPT_LINK_DEST, 0, 0 },
@@ -71,7 +71,7 @@ diff --git a/options.c b/options.c
    {"fuzzy",           'y', POPT_ARG_NONE,   0, 'y', 0, 0 },
    {"no-fuzzy",         0,  POPT_ARG_VAL,    &fuzzy_basis, 0, 0, 0 },
    {"no-y",             0,  POPT_ARG_VAL,    &fuzzy_basis, 0, 0, 0 },
-@@ -2714,8 +2716,14 @@ void server_options(char **args, int *argc_p)
+@@ -2709,8 +2711,14 @@ void server_options(char **args, int *argc_p)
                        args[ac++] = "--super";
                if (size_only)
                        args[ac++] = "--size-only";
index d6f03a24b9e45ac7e908737891ff4a7b89768f16..aeb0c0fdc2e7582ab2ba9c9f403aa2a1f0908ce4 100644 (file)
@@ -38,7 +38,7 @@ TODO:
   a file that can't use it, while missing out on giving it to a file
   that could use it.
 
-based-on: cdf58a7aba23e31653661c950c2c870b96de08fa
+based-on: c528f8d5c8aa7b16b20cda72a9f4119699890c28
 diff --git a/backup.c b/backup.c
 --- a/backup.c
 +++ b/backup.c
@@ -246,7 +246,7 @@ diff --git a/generator.c b/generator.c
  static int deldelay_size = 0, deldelay_cnt = 0;
  static char *deldelay_buf = NULL;
  static int deldelay_fd = -1;
-@@ -272,14 +275,19 @@ static void do_delayed_deletions(char *delbuf)
+@@ -269,14 +272,19 @@ static void do_delayed_deletions(char *delbuf)
   * all the --delete-WHEN options.  Note that the fbuf pointer must point to a
   * MAXPATHLEN buffer with the name of the directory in it (the functions we
   * call will append names onto the end, but the old dir value will be restored
@@ -270,7 +270,7 @@ diff --git a/generator.c b/generator.c
  
        if (!fbuf) {
                change_local_filter_dir(NULL, 0, 0);
-@@ -293,17 +301,22 @@ static void delete_in_dir(char *fbuf, struct file_struct *file, dev_t *fs_dev)
+@@ -290,17 +298,22 @@ static void delete_in_dir(char *fbuf, struct file_struct *file, dev_t *fs_dev)
                maybe_send_keepalive(time(NULL), MSK_ALLOW_FLUSH);
  
        if (io_error & IOERR_GENERAL && !ignore_errors) {
@@ -298,7 +298,7 @@ diff --git a/generator.c b/generator.c
        if (one_file_system) {
                if (!dev_tbl)
                        dev_tbl = hashtable_create(16, HT_KEY64);
-@@ -319,6 +332,14 @@ static void delete_in_dir(char *fbuf, struct file_struct *file, dev_t *fs_dev)
+@@ -316,6 +329,14 @@ static void delete_in_dir(char *fbuf, struct file_struct *file, dev_t *fs_dev)
  
        dirlist = get_dirlist(fbuf, dlen, 0);
  
@@ -313,7 +313,7 @@ diff --git a/generator.c b/generator.c
        /* If an item in dirlist is not found in flist, delete it
         * from the filesystem. */
        for (i = dirlist->used; i--; ) {
-@@ -331,6 +352,10 @@ static void delete_in_dir(char *fbuf, struct file_struct *file, dev_t *fs_dev)
+@@ -328,6 +349,10 @@ static void delete_in_dir(char *fbuf, struct file_struct *file, dev_t *fs_dev)
                                        f_name(fp, NULL));
                        continue;
                }
@@ -324,7 +324,7 @@ diff --git a/generator.c b/generator.c
                /* Here we want to match regardless of file type.  Replacement
                 * of a file with one of another type is handled separately by
                 * a delete_item call with a DEL_MAKE_ROOM flag. */
-@@ -339,14 +364,19 @@ static void delete_in_dir(char *fbuf, struct file_struct *file, dev_t *fs_dev)
+@@ -336,14 +361,19 @@ static void delete_in_dir(char *fbuf, struct file_struct *file, dev_t *fs_dev)
                        if (!(fp->mode & S_IWUSR) && !am_root && fp->flags & FLAG_OWNED_BY_US)
                                flags |= DEL_NO_UID_WRITE;
                        f_name(fp, delbuf);
@@ -348,7 +348,7 @@ diff --git a/generator.c b/generator.c
        flist_free(dirlist);
  }
  
-@@ -382,14 +412,125 @@ static void do_delete_pass(void)
+@@ -379,14 +409,125 @@ static void do_delete_pass(void)
                 || !S_ISDIR(st.st_mode))
                        continue;
  
@@ -476,7 +476,7 @@ diff --git a/generator.c b/generator.c
  static inline int mtime_differs(STRUCT_STAT *stp, struct file_struct *file)
  {
  #ifdef ST_MTIME_NSEC
-@@ -1168,6 +1309,7 @@ static void list_file_entry(struct file_struct *f)
+@@ -1164,6 +1305,7 @@ static void list_file_entry(struct file_struct *f)
        }
  }
  
@@ -484,7 +484,7 @@ diff --git a/generator.c b/generator.c
  static int phase = 0;
  static int dflt_perms;
  
-@@ -1298,7 +1440,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1294,7 +1436,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                         && do_stat(dn, &sx.st) < 0) {
                                if (dry_run)
                                        goto parent_is_dry_missing;
@@ -493,7 +493,7 @@ diff --git a/generator.c b/generator.c
                                        rsyserr(FERROR_XFER, errno,
                                                "recv_generator: mkdir %s failed",
                                                full_fname(dn));
-@@ -1436,7 +1578,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1430,7 +1572,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                }
                if (real_ret != 0 && do_mkdir(fname,file->mode|added_perms) < 0 && errno != EEXIST) {
                        if (!relative_paths || errno != ENOENT
@@ -502,7 +502,7 @@ diff --git a/generator.c b/generator.c
                         || (do_mkdir(fname, file->mode|added_perms) < 0 && errno != EEXIST)) {
                                rsyserr(FERROR_XFER, errno,
                                        "recv_generator: mkdir %s failed",
-@@ -1485,9 +1627,12 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1478,9 +1620,12 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                }
                else if (delete_during && f_out != -1 && !phase
                    && !(file->flags & FLAG_MISSING_DIR)) {
@@ -518,7 +518,7 @@ diff --git a/generator.c b/generator.c
                                change_local_filter_dir(fname, strlen(fname), F_DEPTH(file));
                }
                prior_dir_file = file;
-@@ -1768,8 +1913,14 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1757,8 +1902,14 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                        goto cleanup;
                }
  #endif
@@ -534,7 +534,7 @@ diff --git a/generator.c b/generator.c
                rsyserr(FERROR_XFER, stat_errno, "recv_generator: failed to stat %s",
                        full_fname(fname));
                goto cleanup;
-@@ -2233,6 +2384,12 @@ void generate_files(int f_out, const char *local_name)
+@@ -2222,6 +2373,12 @@ void generate_files(int f_out, const char *local_name)
        if (DEBUG_GTE(GENR, 1))
                rprintf(FINFO, "generator starting pid=%d\n", (int)getpid());
  
@@ -547,7 +547,7 @@ diff --git a/generator.c b/generator.c
        if (delete_before && !solo_file && cur_flist->used > 0)
                do_delete_pass();
        if (delete_during == 2) {
-@@ -2243,7 +2400,7 @@ void generate_files(int f_out, const char *local_name)
+@@ -2232,7 +2389,7 @@ void generate_files(int f_out, const char *local_name)
        }
        info_levels[INFO_FLIST] = info_levels[INFO_PROGRESS] = 0;
  
@@ -556,7 +556,7 @@ diff --git a/generator.c b/generator.c
                whole_file = 0;
        if (DEBUG_GTE(FLIST, 1)) {
                rprintf(FINFO, "delta-transmission %s\n",
-@@ -2279,7 +2436,7 @@ void generate_files(int f_out, const char *local_name)
+@@ -2268,7 +2425,7 @@ void generate_files(int f_out, const char *local_name)
                                                dirdev = MAKEDEV(DEV_MAJOR(devp), DEV_MINOR(devp));
                                        } else
                                                dirdev = MAKEDEV(0, 0);
@@ -565,7 +565,7 @@ diff --git a/generator.c b/generator.c
                                } else
                                        change_local_filter_dir(fbuf, strlen(fbuf), F_DEPTH(fp));
                        }
-@@ -2326,7 +2483,21 @@ void generate_files(int f_out, const char *local_name)
+@@ -2315,7 +2472,21 @@ void generate_files(int f_out, const char *local_name)
        } while ((cur_flist = cur_flist->next) != NULL);
  
        if (delete_during)
@@ -599,7 +599,7 @@ diff --git a/options.c b/options.c
  int implied_dirs = 1;
  int missing_args = 0; /* 0 = FERROR_XFER, 1 = ignore, 2 = delete */
  int numeric_ids = 0;
-@@ -891,6 +892,7 @@ static struct poptOption long_options[] = {
+@@ -890,6 +891,7 @@ static struct poptOption long_options[] = {
    {"compare-dest",     0,  POPT_ARG_STRING, 0, OPT_COMPARE_DEST, 0, 0 },
    {"copy-dest",        0,  POPT_ARG_STRING, 0, OPT_COPY_DEST, 0, 0 },
    {"link-dest",        0,  POPT_ARG_STRING, 0, OPT_LINK_DEST, 0, 0 },
@@ -607,7 +607,7 @@ diff --git a/options.c b/options.c
    {"fuzzy",           'y', POPT_ARG_NONE,   0, 'y', 0, 0 },
    {"no-fuzzy",         0,  POPT_ARG_VAL,    &fuzzy_basis, 0, 0, 0 },
    {"no-y",             0,  POPT_ARG_VAL,    &fuzzy_basis, 0, 0, 0 },
-@@ -2300,7 +2302,7 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2295,7 +2297,7 @@ int parse_arguments(int *argc_p, const char ***argv_p)
                inplace = 1;
        }
  
@@ -616,7 +616,7 @@ diff --git a/options.c b/options.c
                partial_dir = tmp_partialdir;
  
        if (inplace) {
-@@ -2309,6 +2311,7 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2304,6 +2306,7 @@ int parse_arguments(int *argc_p, const char ***argv_p)
                        snprintf(err_buf, sizeof err_buf,
                                 "--%s cannot be used with --%s\n",
                                 append_mode ? "append" : "inplace",
@@ -624,7 +624,7 @@ diff --git a/options.c b/options.c
                                 delay_updates ? "delay-updates" : "partial-dir");
                        return 0;
                }
-@@ -2711,6 +2714,8 @@ void server_options(char **args, int *argc_p)
+@@ -2706,6 +2709,8 @@ void server_options(char **args, int *argc_p)
                        args[ac++] = "--super";
                if (size_only)
                        args[ac++] = "--size-only";
@@ -729,7 +729,7 @@ diff --git a/util.c b/util.c
                        ret = -ret - 1;
                else
                        ret++;
-@@ -1174,6 +1174,32 @@ char *normalize_path(char *path, BOOL force_newbuf, unsigned int *len_ptr)
+@@ -1171,6 +1171,32 @@ char *normalize_path(char *path, BOOL force_newbuf, unsigned int *len_ptr)
        return path;
  }
  
@@ -762,7 +762,7 @@ diff --git a/util.c b/util.c
  /**
   * Return a quoted string with the full pathname of the indicated filename.
   * The string " (in MODNAME)" may also be appended.  The returned pointer
-@@ -1267,7 +1293,7 @@ int handle_partial_dir(const char *fname, int create)
+@@ -1264,7 +1290,7 @@ int handle_partial_dir(const char *fname, int create)
                        }
                        statret = -1;
                }
index 11c49edfde184f5222099e19d3521ed078ae35c1..5ef24ba7e63dc1ed29b11e67acd3d986f0aa11a8 100644 (file)
@@ -10,7 +10,7 @@ To use this patch, run these commands for a successful build:
     ./configure                         (optional if already run)
     make
 
-based-on: cdf58a7aba23e31653661c950c2c870b96de08fa
+based-on: c528f8d5c8aa7b16b20cda72a9f4119699890c28
 diff --git a/options.c b/options.c
 --- a/options.c
 +++ b/options.c
@@ -22,7 +22,7 @@ diff --git a/options.c b/options.c
  extern int module_id;
  extern int local_server;
  extern int sanitize_paths;
-@@ -911,6 +912,8 @@ static struct poptOption long_options[] = {
+@@ -910,6 +911,8 @@ static struct poptOption long_options[] = {
    {"partial-dir",      0,  POPT_ARG_STRING, &partial_dir, 0, 0, 0 },
    {"delay-updates",    0,  POPT_ARG_VAL,    &delay_updates, 1, 0, 0 },
    {"no-delay-updates", 0,  POPT_ARG_VAL,    &delay_updates, 0, 0, 0 },
index 6650773015b019dfe42e624088d785bddd7eb1e8..a49c850cbe59884630cffe494f1d23dc8a722bea 100644 (file)
@@ -7,7 +7,7 @@ To use this patch, run these commands for a successful build:
     ./configure                                 (optional if already run)
     make
 
-based-on: cdf58a7aba23e31653661c950c2c870b96de08fa
+based-on: c528f8d5c8aa7b16b20cda72a9f4119699890c28
 diff --git a/generator.c b/generator.c
 --- a/generator.c
 +++ b/generator.c
@@ -19,11 +19,11 @@ diff --git a/generator.c b/generator.c
  extern int human_readable;
  extern int ignore_existing;
  extern int ignore_non_existing;
-@@ -1694,6 +1695,12 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1684,6 +1685,12 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                goto cleanup;
        }
  
-+      if (downdate_only && statret == 0 && time_diff(&sx.st, file) < 0) {
++      if (downdate_only > 0 && statret == 0 && file->modtime - sx.st.st_mtime >= modify_window) {
 +              if (INFO_GTE(SKIP, 1))
 +                      rprintf(FINFO, "%s is older\n", fname);
 +              return;
@@ -32,7 +32,7 @@ diff --git a/generator.c b/generator.c
        fnamecmp_type = FNAMECMP_FNAME;
  
        if (statret == 0 && !(S_ISREG(sx.st.st_mode) || (write_devices && IS_DEVICE(sx.st.st_mode)))) {
-@@ -2139,6 +2146,7 @@ void check_for_finished_files(int itemizing, enum logcode code, int check_redo)
+@@ -2128,6 +2135,7 @@ void check_for_finished_files(int itemizing, enum logcode code, int check_redo)
                        ignore_existing = -ignore_existing;
                        ignore_non_existing = -ignore_non_existing;
                        update_only = -update_only;
@@ -40,7 +40,7 @@ diff --git a/generator.c b/generator.c
                        always_checksum = -always_checksum;
                        size_only = -size_only;
                        append_mode = -append_mode;
-@@ -2164,6 +2172,7 @@ void check_for_finished_files(int itemizing, enum logcode code, int check_redo)
+@@ -2153,6 +2161,7 @@ void check_for_finished_files(int itemizing, enum logcode code, int check_redo)
                        ignore_existing = -ignore_existing;
                        ignore_non_existing = -ignore_non_existing;
                        update_only = -update_only;
@@ -59,7 +59,7 @@ diff --git a/options.c b/options.c
  int update_only = 0;
  int open_noatime = 0;
  int cvs_exclude = 0;
-@@ -842,6 +843,7 @@ static struct poptOption long_options[] = {
+@@ -841,6 +842,7 @@ static struct poptOption long_options[] = {
    {"no-one-file-system",0, POPT_ARG_VAL,    &one_file_system, 0, 0, 0 },
    {"no-x",             0,  POPT_ARG_VAL,    &one_file_system, 0, 0, 0 },
    {"update",          'u', POPT_ARG_NONE,   &update_only, 0, 0, 0 },
index ae22a54ebbbf02d0219fca1399c4b82456c77110..3bbc4e7dfd595c9d73788eef647e89bfa9d3d0be 100644 (file)
@@ -7,7 +7,7 @@ To use this patch, run these commands for a successful build:
     ./configure                         (optional if already run)
     make
 
-based-on: cdf58a7aba23e31653661c950c2c870b96de08fa
+based-on: c528f8d5c8aa7b16b20cda72a9f4119699890c28
 diff --git a/compat.c b/compat.c
 --- a/compat.c
 +++ b/compat.c
@@ -215,7 +215,7 @@ diff --git a/generator.c b/generator.c
  extern int delete_mode;
  extern int delete_before;
  extern int delete_during;
-@@ -477,6 +479,10 @@ int unchanged_attrs(const char *fname, struct file_struct *file, stat_x *sxp)
+@@ -474,6 +476,10 @@ int unchanged_attrs(const char *fname, struct file_struct *file, stat_x *sxp)
                        return 0;
                if (perms_differ(file, sxp))
                        return 0;
@@ -226,9 +226,9 @@ diff --git a/generator.c b/generator.c
                if (ownership_differs(file, sxp))
                        return 0;
  #ifdef SUPPORT_ACLS
-@@ -531,6 +537,11 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
-               if (gid_ndx && !(file->flags & FLAG_SKIP_GROUP)
-                   && sxp->st.st_gid != (gid_t)F_GROUP(file))
+@@ -527,6 +533,11 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
+                       iflags |= ITEM_REPORT_OWNER;
+               if (gid_ndx && !(file->flags & FLAG_SKIP_GROUP) && sxp->st.st_gid != (gid_t)F_GROUP(file))
                        iflags |= ITEM_REPORT_GROUP;
 +#ifdef SUPPORT_FILEFLAGS
 +              if (preserve_fileflags && !S_ISLNK(file->mode)
@@ -238,18 +238,18 @@ diff --git a/generator.c b/generator.c
  #ifdef SUPPORT_ACLS
                if (preserve_acls && !S_ISLNK(file->mode)) {
                        if (!ACL_READY(*sxp))
-@@ -1418,6 +1429,10 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
-                       file->mode = dest_mode(file->mode, sx.st.st_mode,
-                                              dflt_perms, statret == 0);
+@@ -1413,6 +1424,10 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+               if (!preserve_perms) { /* See comment in non-dir code below. */
+                       file->mode = dest_mode(file->mode, sx.st.st_mode, dflt_perms, statret == 0);
                }
 +#ifdef SUPPORT_FORCE_CHANGE
 +              if (force_change && !preserve_fileflags)
 +                      F_FFLAGS(file) = sx.st.st_flags;
 +#endif
                if (statret != 0 && basis_dir[0] != NULL) {
-                       int j = try_dests_non(file, fname, ndx, fnamecmpbuf, &sx,
-                                             itemizing, code);
-@@ -1462,10 +1477,15 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+                       int j = try_dests_non(file, fname, ndx, fnamecmpbuf, &sx, itemizing, code);
+                       if (j == -2) {
+@@ -1455,10 +1470,15 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                 * readable and writable permissions during the time we are
                 * putting files within them.  This is then restored to the
                 * former permissions after the transfer is done. */
@@ -266,9 +266,9 @@ diff --git a/generator.c b/generator.c
                                rsyserr(FERROR_XFER, errno,
                                        "failed to modify permissions on %s",
                                        full_fname(fname));
-@@ -1501,6 +1521,10 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
-               file->mode = dest_mode(file->mode, sx.st.st_mode, dflt_perms,
-                                      exists);
+@@ -1493,6 +1513,10 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+               int exists = statret == 0 && !S_ISDIR(sx.st.st_mode);
+               file->mode = dest_mode(file->mode, sx.st.st_mode, dflt_perms, exists);
        }
 +#ifdef SUPPORT_FORCE_CHANGE
 +      if (force_change && !preserve_fileflags)
@@ -277,7 +277,7 @@ diff --git a/generator.c b/generator.c
  
  #ifdef SUPPORT_HARD_LINKS
        if (preserve_hard_links && F_HLINK_NOT_FIRST(file)
-@@ -2084,17 +2108,25 @@ static void touch_up_dirs(struct file_list *flist, int ndx)
+@@ -2073,17 +2097,25 @@ static void touch_up_dirs(struct file_list *flist, int ndx)
                        continue;
                fname = f_name(file, NULL);
                if (fix_dir_perms)
@@ -338,7 +338,7 @@ diff --git a/main.c b/main.c
  extern int file_total;
  extern int recurse;
  extern int xfer_dirs;
-@@ -945,6 +949,22 @@ static int do_recv(int f_in, int f_out, char *local_name)
+@@ -951,6 +955,22 @@ static int do_recv(int f_in, int f_out, char *local_name)
         * points to an identical file won't be replaced by the referent. */
        copy_links = copy_dirlinks = copy_unsafe_links = 0;
  
@@ -380,7 +380,7 @@ diff --git a/options.c b/options.c
  int io_timeout = 0;
  int prune_empty_dirs = 0;
  int use_qsort = 0;
-@@ -644,6 +646,11 @@ static void print_capabilities(enum logcode f)
+@@ -643,6 +645,11 @@ static void print_capabilities(enum logcode f)
  #endif
                        "SIMD",
  
@@ -392,7 +392,7 @@ diff --git a/options.c b/options.c
                NULL
        };
  
-@@ -776,6 +783,8 @@ static struct poptOption long_options[] = {
+@@ -775,6 +782,8 @@ static struct poptOption long_options[] = {
    {"perms",           'p', POPT_ARG_VAL,    &preserve_perms, 1, 0, 0 },
    {"no-perms",         0,  POPT_ARG_VAL,    &preserve_perms, 0, 0, 0 },
    {"no-p",             0,  POPT_ARG_VAL,    &preserve_perms, 0, 0, 0 },
@@ -401,7 +401,7 @@ diff --git a/options.c b/options.c
    {"executability",   'E', POPT_ARG_NONE,   &preserve_executability, 0, 0, 0 },
    {"acls",            'A', POPT_ARG_NONE,   0, 'A', 0, 0 },
    {"no-acls",          0,  POPT_ARG_VAL,    &preserve_acls, 0, 0, 0 },
-@@ -869,6 +878,12 @@ static struct poptOption long_options[] = {
+@@ -868,6 +877,12 @@ static struct poptOption long_options[] = {
    {"remove-source-files",0,POPT_ARG_VAL,    &remove_source_files, 1, 0, 0 },
    {"force",            0,  POPT_ARG_VAL,    &force_delete, 1, 0, 0 },
    {"no-force",         0,  POPT_ARG_VAL,    &force_delete, 0, 0, 0 },
@@ -414,7 +414,7 @@ diff --git a/options.c b/options.c
    {"ignore-errors",    0,  POPT_ARG_VAL,    &ignore_errors, 1, 0, 0 },
    {"no-ignore-errors", 0,  POPT_ARG_VAL,    &ignore_errors, 0, 0, 0 },
    {"max-delete",       0,  POPT_ARG_INT,    &max_delete, 0, 0, 0 },
-@@ -1152,6 +1167,14 @@ static void set_refuse_options(void)
+@@ -1151,6 +1166,14 @@ static void set_refuse_options(void)
  #ifndef HAVE_SETVBUF
        parse_one_refuse_match(0, "outbuf", list_end);
  #endif
@@ -429,7 +429,7 @@ diff --git a/options.c b/options.c
  
        /* Now we use the descrip values to actually mark the options for refusal. */
        for (op = long_options; op != list_end; op++) {
-@@ -2602,6 +2625,9 @@ void server_options(char **args, int *argc_p)
+@@ -2597,6 +2620,9 @@ void server_options(char **args, int *argc_p)
        if (xfer_dirs && !recurse && delete_mode && am_sender)
                args[ac++] = "--no-r";
  
@@ -439,7 +439,7 @@ diff --git a/options.c b/options.c
        if (do_compression && do_compression_level != CLVL_NOT_SPECIFIED) {
                if (asprintf(&arg, "--compress-level=%d", do_compression_level) < 0)
                        goto oom;
-@@ -2705,6 +2731,16 @@ void server_options(char **args, int *argc_p)
+@@ -2700,6 +2726,16 @@ void server_options(char **args, int *argc_p)
                        args[ac++] = "--delete-excluded";
                if (force_delete)
                        args[ac++] = "--force";
@@ -577,7 +577,7 @@ diff --git a/rsync.c b/rsync.c
  extern int preserve_executability;
  extern int preserve_times;
  extern int am_root;
-@@ -468,6 +469,39 @@ mode_t dest_mode(mode_t flist_mode, mode_t stat_mode, int dflt_perms,
+@@ -467,6 +468,39 @@ mode_t dest_mode(mode_t flist_mode, mode_t stat_mode, int dflt_perms,
        return new_mode;
  }
  
@@ -617,7 +617,7 @@ diff --git a/rsync.c b/rsync.c
  static int same_mtime(struct file_struct *file, STRUCT_STAT *st, int extra_accuracy)
  {
  #ifdef ST_MTIME_NSEC
-@@ -544,7 +578,7 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
+@@ -543,7 +577,7 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
                if (am_root >= 0) {
                        uid_t uid = change_uid ? (uid_t)F_OWNER(file) : sxp->st.st_uid;
                        gid_t gid = change_gid ? (gid_t)F_GROUP(file) : sxp->st.st_gid;
@@ -626,7 +626,7 @@ diff --git a/rsync.c b/rsync.c
                                /* We shouldn't have attempted to change uid
                                 * or gid unless have the privilege. */
                                rsyserr(FERROR_XFER, errno, "%s %s failed",
-@@ -630,7 +664,7 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
+@@ -629,7 +663,7 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
  
  #ifdef HAVE_CHMOD
        if (!BITS_EQUAL(sxp->st.st_mode, new_mode, CHMOD_BITS)) {
@@ -635,7 +635,7 @@ diff --git a/rsync.c b/rsync.c
                if (ret < 0) {
                        rsyserr(FERROR_XFER, errno,
                                "failed to set permissions on %s",
-@@ -642,6 +676,19 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
+@@ -641,6 +675,19 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
        }
  #endif
  
@@ -655,7 +655,7 @@ diff --git a/rsync.c b/rsync.c
        if (INFO_GTE(NAME, 2) && flags & ATTRS_REPORT) {
                if (updated)
                        rprintf(FCLIENT, "%s\n", fname);
-@@ -719,7 +766,8 @@ int finish_transfer(const char *fname, const char *fnametmp,
+@@ -718,7 +765,8 @@ int finish_transfer(const char *fname, const char *fnametmp,
  
        /* Change permissions before putting the file into place. */
        set_file_attrs(fnametmp, file, NULL, fnamecmp,
@@ -665,7 +665,7 @@ diff --git a/rsync.c b/rsync.c
  
        /* move tmp file over real file */
        if (DEBUG_GTE(RECV, 1))
-@@ -736,6 +784,10 @@ int finish_transfer(const char *fname, const char *fnametmp,
+@@ -735,6 +783,10 @@ int finish_transfer(const char *fname, const char *fnametmp,
        }
        if (ret == 0) {
                /* The file was moved into place (not copied), so it's done. */
@@ -704,7 +704,7 @@ diff --git a/rsync.h b/rsync.h
  #define ITEM_BASIS_TYPE_FOLLOWS (1<<11)
  #define ITEM_XNAME_FOLLOWS (1<<12)
  #define ITEM_IS_NEW (1<<13)
-@@ -548,6 +550,28 @@ typedef unsigned int size_t;
+@@ -548,6 +550,31 @@ typedef unsigned int size_t;
  #endif
  #endif
  
@@ -727,13 +727,16 @@ diff --git a/rsync.h b/rsync.h
 +#define ALL_IMMUTABLE (USR_IMMUTABLE|SYS_IMMUTABLE)
 +#define ST_FLAGS(st) ((st).st_flags)
 +#else
++#define USR_IMMUTABLE 0
++#define SYS_IMMUTABLE 0
++#define ALL_IMMUTABLE 0
 +#define ST_FLAGS(st) NO_FFLAGS
 +#endif
 +
  /* Find a variable that is either exactly 32-bits or longer.
   * If some code depends on 32-bit truncation, it will need to
   * take special action in a "#if SIZEOF_INT32 > 4" section. */
-@@ -761,6 +785,7 @@ extern int pathname_ndx;
+@@ -761,6 +788,7 @@ extern int pathname_ndx;
  extern int depth_ndx;
  extern int uid_ndx;
  extern int gid_ndx;
@@ -741,7 +744,7 @@ diff --git a/rsync.h b/rsync.h
  extern int acls_ndx;
  extern int xattrs_ndx;
  
-@@ -811,6 +836,11 @@ extern int xattrs_ndx;
+@@ -811,6 +839,11 @@ extern int xattrs_ndx;
  /* When the associated option is on, all entries will have these present: */
  #define F_OWNER(f) REQ_EXTRA(f, uid_ndx)->unum
  #define F_GROUP(f) REQ_EXTRA(f, gid_ndx)->unum
@@ -869,7 +872,7 @@ diff --git a/syscall.c b/syscall.c
  {
        int code;
        if (dry_run) return 0;
-@@ -235,17 +288,73 @@ int do_chmod(const char *path, mode_t mode)
+@@ -235,17 +288,72 @@ int do_chmod(const char *path, mode_t mode)
        } else
                code = chmod(path, mode & CHMOD_BITS); /* DISCOURAGED FUNCTION */
  #endif /* !HAVE_LCHMOD */
@@ -905,7 +908,6 @@ diff --git a/syscall.c b/syscall.c
 +}
 +#endif
 +
-+int do_rename(const char *old_path, const char *new_path)
  int do_rename(const char *old_path, const char *new_path)
  {
        if (dry_run) return 0;
@@ -1077,7 +1079,7 @@ diff --git a/util.c b/util.c
 diff --git a/xattrs.c b/xattrs.c
 --- a/xattrs.c
 +++ b/xattrs.c
-@@ -1219,7 +1219,7 @@ int set_stat_xattr(const char *fname, struct file_struct *file, mode_t new_mode)
+@@ -1216,7 +1216,7 @@ int set_stat_xattr(const char *fname, struct file_struct *file, mode_t new_mode)
        mode = (fst.st_mode & _S_IFMT) | (fmode & ACCESSPERMS)
             | (S_ISDIR(fst.st_mode) ? 0700 : 0600);
        if (fst.st_mode != mode)
index 0bb900f7b60c449b54e649eeef5cb392cf71dfaa..d10f9daff7d2a32ab9c68754d28610d24ec6db53 100644 (file)
@@ -9,7 +9,7 @@ To use this patch, run these commands for a successful build:
     ./configure                         (optional if already run)
     make
 
-based-on: cdf58a7aba23e31653661c950c2c870b96de08fa
+based-on: c528f8d5c8aa7b16b20cda72a9f4119699890c28
 diff --git a/exclude.c b/exclude.c
 --- a/exclude.c
 +++ b/exclude.c
@@ -359,7 +359,7 @@ diff --git a/rsync.1.md b/rsync.1.md
  0.  `--timeout=TIMEOUT`
  
      This option allows you to set a maximum I/O timeout in seconds.  If no data
-@@ -3367,6 +3373,15 @@ The following modifiers are accepted after a "`+`" or "`-`":
+@@ -3378,6 +3384,15 @@ The following modifiers are accepted after a "`+`" or "`-`":
    rules that exclude things like "CVS" and "`*.o`" are marked as perishable,
    and will not prevent a directory that was removed on the source from being
    deleted on the destination.
@@ -375,7 +375,7 @@ diff --git a/rsync.1.md b/rsync.1.md
  - An `x` indicates that a rule affects xattr names in xattr copy/delete
    operations (and is thus ignored when matching file/dir names).  If no
    xattr-matching rules are specified, a default xattr filtering rule is used
-@@ -3424,6 +3439,12 @@ The following modifiers are accepted after a merge or dir-merge rule:
+@@ -3435,6 +3450,12 @@ The following modifiers are accepted after a merge or dir-merge rule:
    rules in the file must not specify sides (via a modifier or a rule prefix
    such as `hide`).
  
@@ -444,7 +444,7 @@ diff --git a/rsync.h b/rsync.h
 diff --git a/util.c b/util.c
 --- a/util.c
 +++ b/util.c
-@@ -891,6 +891,25 @@ size_t stringjoin(char *dest, size_t destsize, ...)
+@@ -889,6 +889,25 @@ size_t stringjoin(char *dest, size_t destsize, ...)
        return ret;
  }
  
index 6988cfc5a90208c727f31a40ff1756fa8cf22103..c8e000bf05acc44d35280ee89a28b61ab3281fef 100644 (file)
@@ -7,7 +7,7 @@ To use this patch, run these commands for a successful build:
     ./configure                         (optional if already run)
     make
 
-based-on: cdf58a7aba23e31653661c950c2c870b96de08fa
+based-on: c528f8d5c8aa7b16b20cda72a9f4119699890c28
 diff --git a/options.c b/options.c
 --- a/options.c
 +++ b/options.c
@@ -19,7 +19,7 @@ diff --git a/options.c b/options.c
  int ignore_times = 0;
  int delete_mode = 0;
  int delete_during = 0;
-@@ -946,6 +947,7 @@ static struct poptOption long_options[] = {
+@@ -945,6 +946,7 @@ static struct poptOption long_options[] = {
    {"no-timeout",       0,  POPT_ARG_VAL,    &io_timeout, 0, 0, 0 },
    {"contimeout",       0,  POPT_ARG_INT,    &connect_timeout, 0, 0, 0 },
    {"no-contimeout",    0,  POPT_ARG_VAL,    &connect_timeout, 0, 0, 0 },
@@ -27,7 +27,7 @@ diff --git a/options.c b/options.c
    {"rsh",             'e', POPT_ARG_STRING, &shell_cmd, 0, 0, 0 },
    {"rsync-path",       0,  POPT_ARG_STRING, &rsync_path, 0, 0, 0 },
    {"temp-dir",        'T', POPT_ARG_STRING, &tmpdir, 0, 0, 0 },
-@@ -2791,6 +2793,9 @@ void server_options(char **args, int *argc_p)
+@@ -2786,6 +2788,9 @@ void server_options(char **args, int *argc_p)
                        args[ac++] = tmpdir;
                }
  
index 54880bee8561d8f1017551004541122c27ca5861..3a4471548f01d6dd1ed7b2c5a4b2061b7c147512 100644 (file)
@@ -43,7 +43,7 @@ diff --git a/generator.c b/generator.c
  extern int preserve_links;
  extern int preserve_devices;
  extern int write_devices;
-@@ -1805,6 +1806,14 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1794,6 +1795,14 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                                        fname, fnamecmpbuf);
                        }
                        sx.st.st_size = F_LENGTH(fuzzy_file);
@@ -58,7 +58,7 @@ diff --git a/generator.c b/generator.c
                        statret = 0;
                        fnamecmp = fnamecmpbuf;
                }
-@@ -1972,6 +1981,18 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1961,6 +1970,18 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
        if (read_batch)
                goto cleanup;
  
@@ -162,7 +162,7 @@ diff --git a/main.c b/main.c
  extern int protocol_version;
  extern int force_change;
  extern int file_total;
-@@ -110,6 +115,7 @@ int daemon_over_rsh = 0;
+@@ -111,6 +116,7 @@ int daemon_over_rsh = 0;
  mode_t orig_umask = 0;
  int batch_gen_fd = -1;
  int sender_keeps_checksum = 0;
@@ -170,7 +170,7 @@ diff --git a/main.c b/main.c
  int raw_argc, cooked_argc;
  char **raw_argv, **cooked_argv;
  
-@@ -660,6 +666,43 @@ static pid_t do_cmd(char *cmd, char *machine, char *user, char **remote_argv, in
+@@ -667,6 +673,43 @@ static pid_t do_cmd(char *cmd, char *machine, char *user, char **remote_argv, in
        return 0; /* not reached */
  }
  
@@ -214,7 +214,7 @@ diff --git a/main.c b/main.c
  /* The receiving side operates in one of two modes:
   *
   * 1. it receives any number of files into a destination directory,
-@@ -718,6 +761,9 @@ static char *get_local_name(struct file_list *flist, char *dest_path)
+@@ -725,6 +768,9 @@ static char *get_local_name(struct file_list *flist, char *dest_path)
                                exit_cleanup(RERR_FILESELECT);
                        }
                        filesystem_dev = st.st_dev; /* ensures --force works right w/-x */
@@ -224,7 +224,7 @@ diff --git a/main.c b/main.c
                        return NULL;
                }
                if (file_total > 1) {
-@@ -778,7 +824,9 @@ static char *get_local_name(struct file_list *flist, char *dest_path)
+@@ -784,7 +830,9 @@ static char *get_local_name(struct file_list *flist, char *dest_path)
                                full_fname(dest_path));
                        exit_cleanup(RERR_FILESELECT);
                }
@@ -235,7 +235,7 @@ diff --git a/main.c b/main.c
                return NULL;
        }
  
-@@ -798,6 +846,9 @@ static char *get_local_name(struct file_list *flist, char *dest_path)
+@@ -804,6 +852,9 @@ static char *get_local_name(struct file_list *flist, char *dest_path)
                        full_fname(dest_path));
                exit_cleanup(RERR_FILESELECT);
        }
@@ -256,7 +256,7 @@ diff --git a/options.c b/options.c
  int preserve_perms = 0;
  int preserve_fileflags = 0;
  int preserve_executability = 0;
-@@ -893,6 +894,10 @@ static struct poptOption long_options[] = {
+@@ -892,6 +893,10 @@ static struct poptOption long_options[] = {
    {"no-force-change",  0,  POPT_ARG_VAL,    &force_change, 0, 0, 0 },
    {"force-uchange",    0,  POPT_ARG_VAL,    &force_change, USR_IMMUTABLE, 0, 0 },
    {"force-schange",    0,  POPT_ARG_VAL,    &force_change, SYS_IMMUTABLE, 0, 0 },
@@ -267,7 +267,7 @@ diff --git a/options.c b/options.c
    {"ignore-errors",    0,  POPT_ARG_VAL,    &ignore_errors, 1, 0, 0 },
    {"no-ignore-errors", 0,  POPT_ARG_VAL,    &ignore_errors, 0, 0, 0 },
    {"max-delete",       0,  POPT_ARG_INT,    &max_delete, 0, 0, 0 },
-@@ -1187,6 +1192,10 @@ static void set_refuse_options(void)
+@@ -1186,6 +1191,10 @@ static void set_refuse_options(void)
  #ifndef SUPPORT_CRTIMES
        parse_one_refuse_match(0, "crtimes", list_end);
  #endif
@@ -278,7 +278,7 @@ diff --git a/options.c b/options.c
  
        /* Now we use the descrip values to actually mark the options for refusal. */
        for (op = long_options; op != list_end; op++) {
-@@ -2029,6 +2038,15 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2024,6 +2033,15 @@ int parse_arguments(int *argc_p, const char ***argv_p)
        }
  #endif
  
@@ -294,7 +294,7 @@ diff --git a/options.c b/options.c
        if (block_size) {
                /* We may not know the real protocol_version at this point if this is the client
                 * option parsing, but we still want to check it so that the client can specify
-@@ -2644,6 +2662,11 @@ void server_options(char **args, int *argc_p)
+@@ -2639,6 +2657,11 @@ void server_options(char **args, int *argc_p)
        if (preserve_fileflags)
                args[ac++] = "--fileflags";
  
@@ -369,7 +369,7 @@ diff --git a/rsync.1.md b/rsync.1.md
 diff --git a/rsync.c b/rsync.c
 --- a/rsync.c
 +++ b/rsync.c
-@@ -607,8 +607,14 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
+@@ -606,8 +606,14 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
  #ifdef SUPPORT_XATTRS
        if (am_root < 0)
                set_stat_xattr(fname, file, new_mode);
@@ -385,7 +385,7 @@ diff --git a/rsync.c b/rsync.c
  #endif
  
        if (!preserve_times
-@@ -622,7 +628,11 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
+@@ -621,7 +627,11 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
        /* Don't set the creation date on the root folder of an HFS+ volume. */
        if (sxp->st.st_ino == 2 && S_ISDIR(sxp->st.st_mode))
                flags |= ATTRS_SKIP_CRTIME;
@@ -398,7 +398,7 @@ diff --git a/rsync.c b/rsync.c
                sx2.st.st_mtime = file->modtime;
  #ifdef ST_MTIME_NSEC
                sx2.st.ST_MTIME_NSEC = F_MOD_NSEC_or_0(file);
-@@ -699,6 +709,16 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
+@@ -698,6 +708,16 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
                 && !set_fileflags(fname, fileflags))
                        goto cleanup;
                updated = 1;
@@ -418,7 +418,7 @@ diff --git a/rsync.c b/rsync.c
 diff --git a/rsync.h b/rsync.h
 --- a/rsync.h
 +++ b/rsync.h
-@@ -574,6 +574,17 @@ typedef unsigned int size_t;
+@@ -577,6 +577,17 @@ typedef unsigned int size_t;
  #define ST_FLAGS(st) NO_FFLAGS
  #endif
  
@@ -468,8 +468,8 @@ diff --git a/xattrs.c b/xattrs.c
 +
  #define MAX_FULL_DATUM 32
  
- #define HAS_PREFIX(str, prfx) (*(str) == *(prfx) \
-@@ -74,6 +79,17 @@ extern int saw_xattr_filter;
+ #define HAS_PREFIX(str, prfx) (*(str) == *(prfx) && strncmp(str, prfx, sizeof (prfx) - 1) == 0)
+@@ -73,6 +78,17 @@ extern int saw_xattr_filter;
  #define XDEF_ACL_SUFFIX "dacl"
  #define XDEF_ACL_ATTR RSYNC_PREFIX "%" XDEF_ACL_SUFFIX
  
@@ -487,17 +487,16 @@ diff --git a/xattrs.c b/xattrs.c
  typedef struct {
        char *datum, *name;
        size_t datum_len, name_len;
-@@ -185,8 +201,7 @@ static ssize_t get_xattr_names(const char *fname)
+@@ -184,7 +200,7 @@ static ssize_t get_xattr_names(const char *fname)
  /* On entry, the *len_ptr parameter contains the size of the extra space we
   * should allocate when we create a buffer for the data.  On exit, it contains
   * the length of the datum. */
--static char *get_xattr_data(const char *fname, const char *name, size_t *len_ptr,
--                          int no_missing_error)
+-static char *get_xattr_data(const char *fname, const char *name, size_t *len_ptr, int no_missing_error)
 +static char *get_xattr_data(const char *fname, const char *name, size_t *len_ptr, int flags)
  {
        size_t datum_len = sys_lgetxattr(fname, name, NULL, 0);
        size_t extra_len = *len_ptr;
-@@ -195,7 +210,7 @@ static char *get_xattr_data(const char *fname, const char *name, size_t *len_ptr
+@@ -193,7 +209,7 @@ static char *get_xattr_data(const char *fname, const char *name, size_t *len_ptr
        *len_ptr = datum_len;
  
        if (datum_len == (size_t)-1) {
@@ -506,7 +505,7 @@ diff --git a/xattrs.c b/xattrs.c
                        return NULL;
                rsyserr(FERROR_XFER, errno,
                        "get_xattr_data: lgetxattr(%s,\"%s\",0) failed",
-@@ -203,6 +218,15 @@ static char *get_xattr_data(const char *fname, const char *name, size_t *len_ptr
+@@ -201,6 +217,15 @@ static char *get_xattr_data(const char *fname, const char *name, size_t *len_ptr
                return NULL;
        }
  
@@ -522,7 +521,7 @@ diff --git a/xattrs.c b/xattrs.c
        if (!datum_len && !extra_len)
                extra_len = 1; /* request non-zero amount of memory */
        if (datum_len + extra_len < datum_len)
-@@ -231,7 +255,31 @@ static char *get_xattr_data(const char *fname, const char *name, size_t *len_ptr
+@@ -229,7 +254,31 @@ static char *get_xattr_data(const char *fname, const char *name, size_t *len_ptr
        return ptr;
  }
  
@@ -555,7 +554,7 @@ diff --git a/xattrs.c b/xattrs.c
  {
        ssize_t list_len, name_len;
        size_t datum_len, name_offset;
-@@ -240,7 +288,8 @@ static int rsync_xal_get(const char *fname, item_list *xalp)
+@@ -238,7 +287,8 @@ static int rsync_xal_get(const char *fname, item_list *xalp)
        int user_only = am_sender ? 0 : !am_root;
  #endif
        rsync_xa *rxa;
@@ -565,7 +564,7 @@ diff --git a/xattrs.c b/xattrs.c
  
        /* This puts the name list into the "namebuf" buffer. */
        if ((list_len = get_xattr_names(fname)) < 0)
-@@ -271,11 +320,15 @@ static int rsync_xal_get(const char *fname, item_list *xalp)
+@@ -269,11 +319,15 @@ static int rsync_xal_get(const char *fname, item_list *xalp)
                }
  
                datum_len = name_len; /* Pass extra size to get_xattr_data() */
@@ -582,7 +581,7 @@ diff --git a/xattrs.c b/xattrs.c
                        name_offset = 1 + MAX_DIGEST_LEN;
                        sum_init(-1, checksum_seed);
                        sum_update(ptr, datum_len);
-@@ -284,7 +337,9 @@ static int rsync_xal_get(const char *fname, item_list *xalp)
+@@ -282,7 +336,9 @@ static int rsync_xal_get(const char *fname, item_list *xalp)
                        if (!(ptr = new_array(char, name_offset + name_len)))
                                out_of_memory("rsync_xal_get");
                        *ptr = XSTATE_ABBREV;
@@ -593,7 +592,7 @@ diff --git a/xattrs.c b/xattrs.c
                } else
                        name_offset = datum_len;
  
-@@ -330,7 +385,7 @@ int get_xattr(const char *fname, stat_x *sxp)
+@@ -328,7 +384,7 @@ int get_xattr(const char *fname, stat_x *sxp)
        } else if (IS_MISSING_FILE(sxp->st))
                return 0;
  
@@ -602,7 +601,7 @@ diff --git a/xattrs.c b/xattrs.c
                free_xattr(sxp);
                return -1;
        }
-@@ -367,6 +422,8 @@ int copy_xattrs(const char *source, const char *dest)
+@@ -365,6 +421,8 @@ int copy_xattrs(const char *source, const char *dest)
                datum_len = 0;
                if (!(ptr = get_xattr_data(source, name, &datum_len, 0)))
                        return -1;
@@ -611,7 +610,7 @@ diff --git a/xattrs.c b/xattrs.c
                if (sys_lsetxattr(dest, name, ptr, datum_len) < 0) {
                        int save_errno = errno ? errno : EINVAL;
                        rsyserr(FERROR_XFER, errno,
-@@ -457,6 +514,7 @@ static int find_matching_xattr(const item_list *xalp)
+@@ -455,6 +513,7 @@ static int find_matching_xattr(const item_list *xalp)
        }
  
        return -1;
@@ -619,7 +618,7 @@ diff --git a/xattrs.c b/xattrs.c
  }
  
  /* Store *xalp on the end of rsync_xal_l */
-@@ -673,11 +731,13 @@ void send_xattr_request(const char *fname, struct file_struct *file, int f_out)
+@@ -671,11 +730,13 @@ void send_xattr_request(const char *fname, struct file_struct *file, int f_out)
  
                        /* Re-read the long datum. */
                        if (!(ptr = get_xattr_data(fname, rxa->name, &len, 0))) {
@@ -634,7 +633,7 @@ diff --git a/xattrs.c b/xattrs.c
                        write_varint(f_out, len); /* length might have changed! */
                        write_bigbuf(f_out, ptr, len);
                        free(ptr);
-@@ -964,7 +1024,7 @@ static int rsync_xal_set(const char *fname, item_list *xalp,
+@@ -962,7 +1023,7 @@ static int rsync_xal_set(const char *fname, item_list *xalp,
        int user_only = am_root <= 0;
  #endif
        size_t name_len;
@@ -643,7 +642,7 @@ diff --git a/xattrs.c b/xattrs.c
  
        /* This puts the current name list into the "namebuf" buffer. */
        if ((list_len = get_xattr_names(fname)) < 0)
-@@ -977,7 +1037,10 @@ static int rsync_xal_set(const char *fname, item_list *xalp,
+@@ -975,7 +1036,10 @@ static int rsync_xal_set(const char *fname, item_list *xalp,
                        int sum_len;
                        /* See if the fnamecmp version is identical. */
                        len = name_len = rxas[i].name_len;
@@ -655,7 +654,7 @@ diff --git a/xattrs.c b/xattrs.c
                          still_abbrev:
                                if (am_generator)
                                        continue;
-@@ -986,6 +1049,8 @@ static int rsync_xal_set(const char *fname, item_list *xalp,
+@@ -984,6 +1048,8 @@ static int rsync_xal_set(const char *fname, item_list *xalp,
                                ret = -1;
                                continue;
                        }
@@ -664,7 +663,7 @@ diff --git a/xattrs.c b/xattrs.c
                        if (len != rxas[i].datum_len) {
                                free(ptr);
                                goto still_abbrev;
-@@ -1063,6 +1128,10 @@ static int rsync_xal_set(const char *fname, item_list *xalp,
+@@ -1061,6 +1127,10 @@ static int rsync_xal_set(const char *fname, item_list *xalp,
                }
        }
  
@@ -675,7 +674,7 @@ diff --git a/xattrs.c b/xattrs.c
        return ret;
  }
  
-@@ -1112,7 +1181,7 @@ char *get_xattr_acl(const char *fname, int is_access_acl, size_t *len_p)
+@@ -1109,7 +1179,7 @@ char *get_xattr_acl(const char *fname, int is_access_acl, size_t *len_p)
  {
        const char *name = is_access_acl ? XACC_ACL_ATTR : XDEF_ACL_ATTR;
        *len_p = 0; /* no extra data alloc needed from get_xattr_data() */
@@ -684,7 +683,7 @@ diff --git a/xattrs.c b/xattrs.c
  }
  
  int set_xattr_acl(const char *fname, int is_access_acl, const char *buf, size_t buf_len)
-@@ -1255,11 +1324,33 @@ int set_stat_xattr(const char *fname, struct file_struct *file, mode_t new_mode)
+@@ -1252,11 +1322,33 @@ int set_stat_xattr(const char *fname, struct file_struct *file, mode_t new_mode)
        return 0;
  }
  
@@ -718,7 +717,7 @@ diff --git a/xattrs.c b/xattrs.c
        return ret;
  }
  
-@@ -1268,6 +1359,9 @@ int x_lstat(const char *fname, STRUCT_STAT *fst, STRUCT_STAT *xst)
+@@ -1265,6 +1357,9 @@ int x_lstat(const char *fname, STRUCT_STAT *fst, STRUCT_STAT *xst)
        int ret = do_lstat(fname, fst);
        if ((ret < 0 || get_stat_xattr(fname, -1, fst, xst) < 0) && xst)
                xst->st_mode = 0;
@@ -728,7 +727,7 @@ diff --git a/xattrs.c b/xattrs.c
        return ret;
  }
  
-@@ -1276,6 +1370,9 @@ int x_fstat(int fd, STRUCT_STAT *fst, STRUCT_STAT *xst)
+@@ -1273,6 +1368,9 @@ int x_fstat(int fd, STRUCT_STAT *fst, STRUCT_STAT *xst)
        int ret = do_fstat(fd, fst);
        if ((ret < 0 || get_stat_xattr(NULL, fd, fst, xst) < 0) && xst)
                xst->st_mode = 0;
index 0e01a4ddbc5bd9bf9c7d3d55e4f53fcbb9d237b3..0b498d388d2d68d29f196c14fbb8c7f66c95fad7 100644 (file)
@@ -12,7 +12,7 @@ TODO:
  - Make this code handle multibyte character encodings, and honor the
    --iconv setting when converting case.
 
-based-on: cdf58a7aba23e31653661c950c2c870b96de08fa
+based-on: c528f8d5c8aa7b16b20cda72a9f4119699890c28
 diff --git a/exclude.c b/exclude.c
 --- a/exclude.c
 +++ b/exclude.c
@@ -220,7 +220,7 @@ diff --git a/options.c b/options.c
  int blocking_io = -1;
  int checksum_seed = 0;
  int inplace = 0;
-@@ -931,6 +932,8 @@ static struct poptOption long_options[] = {
+@@ -930,6 +931,8 @@ static struct poptOption long_options[] = {
    {"read-batch",       0,  POPT_ARG_STRING, &batch_name, OPT_READ_BATCH, 0, 0 },
    {"write-batch",      0,  POPT_ARG_STRING, &batch_name, OPT_WRITE_BATCH, 0, 0 },
    {"only-write-batch", 0,  POPT_ARG_STRING, &batch_name, OPT_ONLY_WRITE_BATCH, 0, 0 },
@@ -229,7 +229,7 @@ diff --git a/options.c b/options.c
    {"files-from",       0,  POPT_ARG_STRING, &files_from, 0, 0, 0 },
    {"from0",           '0', POPT_ARG_VAL,    &eol_nulls, 1, 0, 0},
    {"no-from0",         0,  POPT_ARG_VAL,    &eol_nulls, 0, 0, 0},
-@@ -2741,6 +2744,9 @@ void server_options(char **args, int *argc_p)
+@@ -2736,6 +2739,9 @@ void server_options(char **args, int *argc_p)
                args[ac++] = arg;
        }
  
index a6f1fd7dcb6c09149fa6167085a07925c50ab3db..df3e1b8d4dbf5744de82733499277ac3d5c414a9 100644 (file)
@@ -9,7 +9,7 @@ To use this patch, run these commands for a successful build:
     ./configure
     make
 
-based-on: cdf58a7aba23e31653661c950c2c870b96de08fa
+based-on: c528f8d5c8aa7b16b20cda72a9f4119699890c28
 diff --git a/Makefile.in b/Makefile.in
 --- a/Makefile.in
 +++ b/Makefile.in
@@ -25,7 +25,7 @@ diff --git a/Makefile.in b/Makefile.in
 diff --git a/clientserver.c b/clientserver.c
 --- a/clientserver.c
 +++ b/clientserver.c
-@@ -132,7 +132,7 @@ int start_socket_client(char *host, int remote_argc, char *remote_argv[],
+@@ -131,7 +131,7 @@ int start_socket_client(char *host, int remote_argc, char *remote_argv[],
        setup_iconv();
  #endif
  
@@ -34,7 +34,7 @@ diff --git a/clientserver.c b/clientserver.c
  
        return ret ? ret : client_run(fd, fd, -1, argc, argv);
  }
-@@ -211,7 +211,7 @@ static int exchange_protocols(int f_in, int f_out, char *buf, size_t bufsiz, int
+@@ -210,7 +210,7 @@ static int exchange_protocols(int f_in, int f_out, char *buf, size_t bufsiz, int
        return 0;
  }
  
@@ -43,7 +43,7 @@ diff --git a/clientserver.c b/clientserver.c
  {
        int i, modlen;
        char line[BIGPATHBUFLEN];
-@@ -297,6 +297,17 @@ int start_inband_exchange(int f_in, int f_out, const char *user, int argc, char
+@@ -296,6 +296,17 @@ int start_inband_exchange(int f_in, int f_out, const char *user, int argc, char
                        continue;
                }
  
@@ -61,7 +61,7 @@ diff --git a/clientserver.c b/clientserver.c
                if (strcmp(line,"@RSYNCD: OK") == 0)
                        break;
  
-@@ -652,7 +663,12 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
+@@ -651,7 +662,12 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
        }
  
        read_only = lp_read_only(i); /* may also be overridden by auth_server() */
@@ -495,7 +495,7 @@ diff --git a/loadparm.c b/loadparm.c
 diff --git a/main.c b/main.c
 --- a/main.c
 +++ b/main.c
-@@ -1535,7 +1535,7 @@ static int start_client(int argc, char *argv[])
+@@ -1537,7 +1537,7 @@ static int start_client(int argc, char *argv[])
         * remote shell command, we need to do the RSYNCD protocol first */
        if (daemon_over_rsh) {
                int tmpret;
index aeb4d3b3ca80e2e0313736039db0efb9bcd66b45..fb373cfef3d81792e6d42eaa57093ab1a900c94f 100644 (file)
@@ -12,7 +12,7 @@ To use this patch, run these commands for a successful build:
     ./configure
     make
 
-based-on: cdf58a7aba23e31653661c950c2c870b96de08fa
+based-on: c528f8d5c8aa7b16b20cda72a9f4119699890c28
 diff --git a/Makefile.in b/Makefile.in
 --- a/Makefile.in
 +++ b/Makefile.in
@@ -84,7 +84,7 @@ diff --git a/clientserver.c b/clientserver.c
  extern char *logfile_format;
  extern char *files_from;
  extern char *tmpdir;
-@@ -632,6 +633,9 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
+@@ -631,6 +632,9 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
                return -1;
        }
  
@@ -270,7 +270,7 @@ diff --git a/options.c b/options.c
        DEBUG_WORD(HLINK, W_SND|W_REC, "Debug hard-link actions (levels 1-3)"),
        DEBUG_WORD(ICONV, W_CLI|W_SRV, "Debug iconv character conversions (levels 1-2)"),
        DEBUG_WORD(IO, W_CLI|W_SRV, "Debug I/O routines (levels 1-4)"),
-@@ -736,7 +738,7 @@ enum {OPT_SERVER = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
+@@ -735,7 +737,7 @@ enum {OPT_SERVER = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
        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,
@@ -279,7 +279,7 @@ diff --git a/options.c b/options.c
        OPT_USERMAP, OPT_GROUPMAP, OPT_CHOWN, OPT_BWLIMIT,
        OPT_OLD_COMPRESS, OPT_NEW_COMPRESS, OPT_NO_COMPRESS,
        OPT_REFUSED_BASE = 9000};
-@@ -891,6 +893,7 @@ static struct poptOption long_options[] = {
+@@ -890,6 +892,7 @@ static struct poptOption long_options[] = {
    {"compare-dest",     0,  POPT_ARG_STRING, 0, OPT_COMPARE_DEST, 0, 0 },
    {"copy-dest",        0,  POPT_ARG_STRING, 0, OPT_COPY_DEST, 0, 0 },
    {"link-dest",        0,  POPT_ARG_STRING, 0, OPT_LINK_DEST, 0, 0 },
@@ -287,17 +287,17 @@ diff --git a/options.c b/options.c
    {"fuzzy",           'y', POPT_ARG_NONE,   0, 'y', 0, 0 },
    {"no-fuzzy",         0,  POPT_ARG_VAL,    &fuzzy_basis, 0, 0, 0 },
    {"no-y",             0,  POPT_ARG_VAL,    &fuzzy_basis, 0, 0, 0 },
-@@ -1342,6 +1345,9 @@ int parse_arguments(int *argc_p, const char ***argv_p)
-               iconv_opt = strdup(arg);
- #endif
+@@ -1134,6 +1137,9 @@ static void set_refuse_options(void)
+               ref = cp + 1;
+       }
  
 +      if (*lp_link_by_hash_dir(module_id))
-+              set_refuse_options("link-by-hash");
++              parse_one_refuse_match(0, "link-by-hash", list_end);
 +
-       /* TODO: Call poptReadDefaultConfig; handle errors. */
-       /* The context leaks in case of an error, but if there's a
-@@ -1837,6 +1843,21 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+       if (am_daemon) {
+ #ifdef ICONV_OPTION
+               if (!*lp_charset(module_id))
+@@ -1832,6 +1838,21 @@ int parse_arguments(int *argc_p, const char ***argv_p)
                        return 0;
  #endif
  
@@ -319,7 +319,7 @@ diff --git a/options.c b/options.c
                default:
                        /* A large opt value means that set_refuse_options()
                         * turned this option off. */
-@@ -2141,6 +2162,8 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2136,6 +2157,8 @@ int parse_arguments(int *argc_p, const char ***argv_p)
                        tmpdir = sanitize_path(NULL, tmpdir, NULL, 0, SP_DEFAULT);
                if (backup_dir)
                        backup_dir = sanitize_path(NULL, backup_dir, NULL, 0, SP_DEFAULT);
@@ -328,7 +328,7 @@ diff --git a/options.c b/options.c
        }
        if (daemon_filter_list.head && !am_sender) {
                filter_rule_list *elp = &daemon_filter_list;
-@@ -2816,6 +2839,12 @@ void server_options(char **args, int *argc_p)
+@@ -2811,6 +2834,12 @@ void server_options(char **args, int *argc_p)
        } else if (inplace)
                args[ac++] = "--inplace";
  
@@ -414,7 +414,7 @@ diff --git a/rsync.c b/rsync.c
  extern int sanitize_paths;
  extern struct file_list *cur_flist, *first_flist, *dir_flist;
  extern struct chmod_mode_struct *daemon_chmod_modes;
-@@ -736,6 +737,10 @@ int finish_transfer(const char *fname, const char *fnametmp,
+@@ -735,6 +736,10 @@ int finish_transfer(const char *fname, const char *fnametmp,
        }
        if (ret == 0) {
                /* The file was moved into place (not copied), so it's done. */
index 75d02bfec1bc440869bb3f191fab845e24704265..c83a0d3492836937007b11fe159c71d4ed0613a7 100644 (file)
@@ -18,7 +18,7 @@ xxHash is still preferred (and faster), but this provides a reasonably
 fast fallback for the case where xxHash libraries are not available at
 build time.
 
-based-on: cdf58a7aba23e31653661c950c2c870b96de08fa
+based-on: c528f8d5c8aa7b16b20cda72a9f4119699890c28
 diff --git a/Makefile.in b/Makefile.in
 --- a/Makefile.in
 +++ b/Makefile.in
@@ -177,7 +177,7 @@ diff --git a/checksum.c b/checksum.c
 diff --git a/generator.c b/generator.c
 --- a/generator.c
 +++ b/generator.c
-@@ -712,10 +712,12 @@ static int generate_and_send_sums(int fd, OFF_T len, int f_out, int f_copy)
+@@ -708,10 +708,12 @@ static int generate_and_send_sums(int fd, OFF_T len, int f_out, int f_copy)
        if (append_mode > 0 && f_copy < 0)
                return 0;
  
@@ -192,7 +192,7 @@ diff --git a/generator.c b/generator.c
  
        for (i = 0; i < sum.count; i++) {
                int32 n1 = (int32)MIN(len, (OFF_T)sum.blength);
-@@ -733,7 +735,7 @@ static int generate_and_send_sums(int fd, OFF_T len, int f_out, int f_copy)
+@@ -729,7 +731,7 @@ static int generate_and_send_sums(int fd, OFF_T len, int f_out, int f_copy)
                }
  
                sum1 = get_checksum1(map, n1);
@@ -201,7 +201,7 @@ diff --git a/generator.c b/generator.c
  
                if (DEBUG_GTE(DELTASUM, 3)) {
                        rprintf(FINFO,
-@@ -745,8 +747,10 @@ static int generate_and_send_sums(int fd, OFF_T len, int f_out, int f_copy)
+@@ -741,8 +743,10 @@ static int generate_and_send_sums(int fd, OFF_T len, int f_out, int f_copy)
                write_buf(f_out, sum2, sum.s2length);
        }
  
@@ -377,7 +377,7 @@ diff --git a/lib/mdigest.h b/lib/mdigest.h
 diff --git a/match.c b/match.c
 --- a/match.c
 +++ b/match.c
-@@ -167,6 +167,8 @@ static void hash_search(int f,struct sum_struct *s,
+@@ -166,6 +166,8 @@ static void hash_search(int f,struct sum_struct *s,
        if (DEBUG_GTE(DELTASUM, 3))
                rprintf(FINFO, "sum=%.8x k=%ld\n", sum, (long)k);
  
@@ -386,7 +386,7 @@ diff --git a/match.c b/match.c
        offset = aligned_offset = aligned_i = 0;
  
        end = len + 1 - s->sums[s->count-1].len;
-@@ -229,7 +231,7 @@ static void hash_search(int f,struct sum_struct *s,
+@@ -228,7 +230,7 @@ static void hash_search(int f,struct sum_struct *s,
  
                        if (!done_csum2) {
                                map = (schar *)map_ptr(buf,offset,l);
@@ -395,7 +395,7 @@ diff --git a/match.c b/match.c
                                done_csum2 = 1;
                        }
  
-@@ -271,7 +273,7 @@ static void hash_search(int f,struct sum_struct *s,
+@@ -270,7 +272,7 @@ static void hash_search(int f,struct sum_struct *s,
                                                sum = get_checksum1((char *)map, l);
                                                if (sum != s->sums[i].sum1)
                                                        goto check_want_i;
@@ -404,7 +404,7 @@ diff --git a/match.c b/match.c
                                                if (memcmp(sum2, s->sums[i].sum2, s->s2length) != 0)
                                                        goto check_want_i;
                                                /* OK, we have a re-alignment match.  Bump the offset
-@@ -339,6 +341,8 @@ static void hash_search(int f,struct sum_struct *s,
+@@ -337,6 +339,8 @@ static void hash_search(int f,struct sum_struct *s,
                        matched(f, s, buf, offset - s->blength, -2);
        } while (++offset < end);
  
index 56f07b7213f2b9eb2feffaf1a0c915afa65858de..ccca98680689e66e8a68b1f91530ec174c27969d 100644 (file)
@@ -20,7 +20,7 @@ To use this patch, run these commands for a successful build:
     ./configure                         (optional if already run)
     make
 
-based-on: cdf58a7aba23e31653661c950c2c870b96de08fa
+based-on: c528f8d5c8aa7b16b20cda72a9f4119699890c28
 diff --git a/authenticate.c b/authenticate.c
 --- a/authenticate.c
 +++ b/authenticate.c
@@ -79,7 +79,7 @@ diff --git a/clientserver.c b/clientserver.c
  
  #ifdef HAVE_SIGACTION
  static struct sigaction sigact;
-@@ -777,7 +779,7 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
+@@ -776,7 +778,7 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
        log_init(1);
  
  #ifdef HAVE_PUTENV
@@ -88,7 +88,7 @@ diff --git a/clientserver.c b/clientserver.c
         && !getenv("RSYNC_NO_XFER_EXEC")) {
                set_env_num("RSYNC_PID", (long)getpid());
  
-@@ -837,6 +839,45 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
+@@ -836,6 +838,45 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
                                return -1;
                        }
                }
@@ -134,7 +134,7 @@ diff --git a/clientserver.c b/clientserver.c
        }
  #endif
  
-@@ -1079,6 +1120,44 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
+@@ -1077,6 +1118,44 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
        return 0;
  }
  
index 6ebc2babb24ad9f2532d6cc24fdab665831d8ea4..9cf74d197dbedd94035c614db1a408b140a5c930 100644 (file)
@@ -9,7 +9,7 @@ To use this patch, run these commands for a successful build:
     ./configure                           (optional if already run)
     make
 
-based-on: cdf58a7aba23e31653661c950c2c870b96de08fa
+based-on: c528f8d5c8aa7b16b20cda72a9f4119699890c28
 diff --git a/access.c b/access.c
 --- a/access.c
 +++ b/access.c
index a7d1e691ebbcb89b9f24224caccaed4445ba7517..71fbd61247e0e5653aa5f26d377f94c8a3159fa5 100644 (file)
@@ -7,7 +7,7 @@ To use this patch, run these commands for a successful build:
     ./configure                              (optional if already run)
     make
 
-based-on: cdf58a7aba23e31653661c950c2c870b96de08fa
+based-on: c528f8d5c8aa7b16b20cda72a9f4119699890c28
 diff --git a/generator.c b/generator.c
 --- a/generator.c
 +++ b/generator.c
@@ -19,7 +19,7 @@ diff --git a/generator.c b/generator.c
  extern int delete_mode;
  extern int delete_before;
  extern int delete_during;
-@@ -497,6 +498,7 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
+@@ -494,6 +495,7 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
             const char *xname)
  {
        if (statret >= 0) { /* A from-dest-dir statret can == 1! */
@@ -27,30 +27,27 @@ diff --git a/generator.c b/generator.c
                int keep_time = !preserve_times ? 0
                    : S_ISDIR(file->mode) ? preserve_times & PRESERVE_DIR_TIMES
                    : S_ISLNK(file->mode) ? preserve_times & PRESERVE_LINK_TIMES
-@@ -526,10 +528,11 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
+@@ -523,9 +525,9 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
                } else if (preserve_executability
                 && ((sxp->st.st_mode & 0111 ? 1 : 0) ^ (file->mode & 0111 ? 1 : 0)))
                        iflags |= ITEM_REPORT_PERMS;
 -              if (uid_ndx && am_root && (uid_t)F_OWNER(file) != sxp->st.st_uid)
-+              if (uid_ndx && am_root && !omit_changes
-+               && (uid_t)F_OWNER(file) != sxp->st.st_uid)
++              if (uid_ndx && am_root && !omit_changes && (uid_t)F_OWNER(file) != sxp->st.st_uid)
                        iflags |= ITEM_REPORT_OWNER;
--              if (gid_ndx && !(file->flags & FLAG_SKIP_GROUP)
--                  && sxp->st.st_gid != (gid_t)F_GROUP(file))
-+              if (gid_ndx && !omit_changes
-+               && !(file->flags & FLAG_SKIP_GROUP) && sxp->st.st_gid != (gid_t)F_GROUP(file))
+-              if (gid_ndx && !(file->flags & FLAG_SKIP_GROUP) && sxp->st.st_gid != (gid_t)F_GROUP(file))
++              if (gid_ndx && !omit_changes && !(file->flags & FLAG_SKIP_GROUP) && sxp->st.st_gid != (gid_t)F_GROUP(file))
                        iflags |= ITEM_REPORT_GROUP;
  #ifdef SUPPORT_ACLS
                if (preserve_acls && !S_ISLNK(file->mode)) {
-@@ -1414,7 +1417,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1410,7 +1412,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                real_ret = statret;
                if (file->flags & FLAG_DIR_CREATED)
                        statret = -1;
 -              if (!preserve_perms) { /* See comment in non-dir code below. */
 +              if (!preserve_perms || omit_dir_changes) { /* See comment in non-dir code below. */
-                       file->mode = dest_mode(file->mode, sx.st.st_mode,
-                                              dflt_perms, statret == 0);
+                       file->mode = dest_mode(file->mode, sx.st.st_mode, dflt_perms, statret == 0);
                }
+               if (statret != 0 && basis_dir[0] != NULL) {
 diff --git a/options.c b/options.c
 --- a/options.c
 +++ b/options.c
@@ -62,7 +59,7 @@ diff --git a/options.c b/options.c
  int one_file_system = 0;
  int protocol_version = PROTOCOL_VERSION;
  int sparse_files = 0;
-@@ -797,6 +798,7 @@ static struct poptOption long_options[] = {
+@@ -796,6 +797,7 @@ static struct poptOption long_options[] = {
    {"omit-link-times", 'J', POPT_ARG_VAL,    &omit_link_times, 1, 0, 0 },
    {"no-omit-link-times",0, POPT_ARG_VAL,    &omit_link_times, 0, 0, 0 },
    {"no-J",             0,  POPT_ARG_VAL,    &omit_link_times, 0, 0, 0 },
@@ -70,7 +67,7 @@ diff --git a/options.c b/options.c
    {"modify-window",   '@', POPT_ARG_INT,    &modify_window, OPT_MODIFY_WINDOW, 0, 0 },
    {"super",            0,  POPT_ARG_VAL,    &am_root, 2, 0, 0 },
    {"no-super",         0,  POPT_ARG_VAL,    &am_root, 0, 0, 0 },
-@@ -2209,6 +2211,9 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2204,6 +2206,9 @@ int parse_arguments(int *argc_p, const char ***argv_p)
                parse_filter_str(&filter_list, backup_dir_buf, rule_template(0), 0);
        }
  
@@ -80,7 +77,7 @@ diff --git a/options.c b/options.c
        if (preserve_times) {
                preserve_times = PRESERVE_FILE_TIMES;
                if (!omit_dir_times)
-@@ -2461,6 +2466,8 @@ void server_options(char **args, int *argc_p)
+@@ -2456,6 +2461,8 @@ void server_options(char **args, int *argc_p)
                        argstr[x++] = 'O';
                if (omit_link_times)
                        argstr[x++] = 'J';
@@ -123,7 +120,7 @@ diff --git a/rsync.c b/rsync.c
  extern int am_root;
  extern int am_server;
  extern int am_daemon;
-@@ -520,9 +521,11 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
+@@ -519,9 +520,11 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
                get_acl(fname, sxp);
  #endif
  
index 84bf872f6e598163cef6e0252cd58eb780ae732f..522a2b07b52d3fcadcec85bc8a3b03415d1622dc 100644 (file)
@@ -14,7 +14,7 @@ To use this patch, run these commands for a successful build:
     ./configure                           (optional if already run)
     make
 
-based-on: cdf58a7aba23e31653661c950c2c870b96de08fa
+based-on: c528f8d5c8aa7b16b20cda72a9f4119699890c28
 diff --git a/flist.c b/flist.c
 --- a/flist.c
 +++ b/flist.c
@@ -47,7 +47,7 @@ diff --git a/options.c b/options.c
  size_t bwlimit_writemax = 0;
  int ignore_existing = 0;
  int ignore_non_existing = 0;
-@@ -921,6 +922,7 @@ static struct poptOption long_options[] = {
+@@ -920,6 +921,7 @@ static struct poptOption long_options[] = {
    {"itemize-changes", 'i', POPT_ARG_NONE,   0, 'i', 0, 0 },
    {"no-itemize-changes",0, POPT_ARG_VAL,    &itemize_changes, 0, 0, 0 },
    {"no-i",             0,  POPT_ARG_VAL,    &itemize_changes, 0, 0, 0 },
index 050f2278d523dbeaecafe14dc5d28bc78d56e0f6..46d911abf31fa428adca73f062ea33c6f1cffb4f 100644 (file)
--- a/slp.diff
+++ b/slp.diff
@@ -10,7 +10,7 @@ To use this patch, run these commands for a successful build:
 TODO: the configure changes should abort if the user requests --enable-slp
 and we can't honor that request.
 
-based-on: cdf58a7aba23e31653661c950c2c870b96de08fa
+based-on: c528f8d5c8aa7b16b20cda72a9f4119699890c28
 diff --git a/Makefile.in b/Makefile.in
 --- a/Makefile.in
 +++ b/Makefile.in
@@ -44,7 +44,7 @@ diff --git a/Makefile.in b/Makefile.in
 diff --git a/clientserver.c b/clientserver.c
 --- a/clientserver.c
 +++ b/clientserver.c
-@@ -1353,6 +1353,13 @@ int daemon_main(void)
+@@ -1351,6 +1351,13 @@ int daemon_main(void)
         * address too.  In fact, why not just do getnameinfo on the
         * local address??? */
  
@@ -127,7 +127,7 @@ diff --git a/loadparm.c b/loadparm.c
 diff --git a/main.c b/main.c
 --- a/main.c
 +++ b/main.c
-@@ -1372,6 +1372,18 @@ static int start_client(int argc, char *argv[])
+@@ -1377,6 +1377,18 @@ static int start_client(int argc, char *argv[])
  
        if (!read_batch) { /* for read_batch, NO source is specified */
                char *path = check_for_hostspec(argv[0], &shell_machine, &rsync_port);
@@ -149,7 +149,7 @@ diff --git a/main.c b/main.c
 diff --git a/options.c b/options.c
 --- a/options.c
 +++ b/options.c
-@@ -644,6 +644,11 @@ static void print_capabilities(enum logcode f)
+@@ -643,6 +643,11 @@ static void print_capabilities(enum logcode f)
  #endif
                        "SIMD",
  
@@ -221,7 +221,7 @@ diff --git a/rsyncd.conf.5.md b/rsyncd.conf.5.md
 diff --git a/socket.c b/socket.c
 --- a/socket.c
 +++ b/socket.c
-@@ -544,6 +544,16 @@ void start_accept_loop(int port, int (*fn)(int, int))
+@@ -538,6 +538,16 @@ void start_accept_loop(int port, int (*fn)(int, int))
  {
        fd_set deffds;
        int *sp, maxfd, i;
@@ -238,7 +238,7 @@ diff --git a/socket.c b/socket.c
  
  #ifdef HAVE_SIGACTION
        sigact.sa_flags = SA_NOCLDSTOP;
-@@ -572,14 +582,25 @@ void start_accept_loop(int port, int (*fn)(int, int))
+@@ -565,14 +575,25 @@ void start_accept_loop(int port, int (*fn)(int, int))
                        maxfd = sp[i];
        }
  
@@ -264,7 +264,7 @@ diff --git a/socket.c b/socket.c
  
                /* close log file before the potentially very long select so
                 * file can be trimmed by another process instead of growing
-@@ -592,7 +613,18 @@ void start_accept_loop(int port, int (*fn)(int, int))
+@@ -585,7 +606,18 @@ void start_accept_loop(int port, int (*fn)(int, int))
                fds = deffds;
  #endif
  
index e23f73ea6beebe01c36982f2897556094bb19a2e..5d7c2947e4f528c43899abead759c7c59134237b 100644 (file)
@@ -10,7 +10,7 @@ To use this patch, run these commands for a successful build:
     ./configure                           (optional if already run)
     make
 
-based-on: cdf58a7aba23e31653661c950c2c870b96de08fa
+based-on: c528f8d5c8aa7b16b20cda72a9f4119699890c28
 diff --git a/syscall.c b/syscall.c
 --- a/syscall.c
 +++ b/syscall.c
index 8a338af18e38835b050331abe44b1d9e2d729ecc..12a1a287275f54653e840c9ae90387a8ce5bcb2c 100644 (file)
@@ -9,7 +9,7 @@ To use this patch, run these commands for a successful build:
 
 -- Matt McCutchen <hashproduct@gmail.com>
 
-based-on: cdf58a7aba23e31653661c950c2c870b96de08fa
+based-on: c528f8d5c8aa7b16b20cda72a9f4119699890c28
 diff --git a/options.c b/options.c
 --- a/options.c
 +++ b/options.c
@@ -21,7 +21,7 @@ diff --git a/options.c b/options.c
  
  /**
   * If 1, send the whole file as literal data rather than trying to
-@@ -924,6 +925,7 @@ static struct poptOption long_options[] = {
+@@ -923,6 +924,7 @@ static struct poptOption long_options[] = {
    {"bwlimit",          0,  POPT_ARG_STRING, &bwlimit_arg, OPT_BWLIMIT, 0, 0 },
    {"no-bwlimit",       0,  POPT_ARG_VAL,    &bwlimit, 0, 0, 0 },
    {"backup",          'b', POPT_ARG_VAL,    &make_backups, 1, 0, 0 },
@@ -29,7 +29,7 @@ diff --git a/options.c b/options.c
    {"no-backup",        0,  POPT_ARG_VAL,    &make_backups, 0, 0, 0 },
    {"backup-dir",       0,  POPT_ARG_STRING, &backup_dir, 0, 0, 0 },
    {"suffix",           0,  POPT_ARG_STRING, &backup_suffix, 0, 0, 0 },
-@@ -2719,6 +2721,8 @@ void server_options(char **args, int *argc_p)
+@@ -2714,6 +2716,8 @@ void server_options(char **args, int *argc_p)
                                goto oom;
                        args[ac++] = arg;
                }
index f1653d167aaf3f8d27e3f0f30dcf1a9ad116d964..0775fe72180ed42733afcdcba172540a6045e815 100644 (file)
@@ -30,7 +30,7 @@ To use this patch, run these commands for a successful build:
     ./configure                                (optional if already run)
     make
 
-based-on: cdf58a7aba23e31653661c950c2c870b96de08fa
+based-on: c528f8d5c8aa7b16b20cda72a9f4119699890c28
 diff --git a/generator.c b/generator.c
 --- a/generator.c
 +++ b/generator.c
@@ -42,7 +42,7 @@ diff --git a/generator.c b/generator.c
  extern int size_only;
  extern OFF_T max_size;
  extern OFF_T min_size;
-@@ -586,7 +587,7 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
+@@ -582,7 +583,7 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
  /* Perform our quick-check heuristic for determining if a file is unchanged. */
  int unchanged_file(char *fn, struct file_struct *file, STRUCT_STAT *st)
  {
@@ -54,7 +54,7 @@ diff --git a/generator.c b/generator.c
 diff --git a/main.c b/main.c
 --- a/main.c
 +++ b/main.c
-@@ -180,7 +180,7 @@ int shell_exec(const char *cmd)
+@@ -181,7 +181,7 @@ int shell_exec(const char *cmd)
  }
  
  /* Wait for a process to exit, calling io_flush while waiting. */
@@ -83,7 +83,7 @@ diff --git a/options.c b/options.c
  char *rsync_path = RSYNC_PATH;
  char *backup_dir = NULL;
  char backup_dir_buf[MAXPATHLEN];
-@@ -838,6 +841,7 @@ static struct poptOption long_options[] = {
+@@ -837,6 +840,7 @@ static struct poptOption long_options[] = {
    {"chmod",            0,  POPT_ARG_STRING, 0, OPT_CHMOD, 0, 0 },
    {"ignore-times",    'I', POPT_ARG_NONE,   &ignore_times, 0, 0, 0 },
    {"size-only",        0,  POPT_ARG_NONE,   &size_only, 0, 0, 0 },
@@ -91,7 +91,7 @@ diff --git a/options.c b/options.c
    {"one-file-system", 'x', POPT_ARG_NONE,   0, 'x', 0, 0 },
    {"no-one-file-system",0, POPT_ARG_VAL,    &one_file_system, 0, 0, 0 },
    {"no-x",             0,  POPT_ARG_VAL,    &one_file_system, 0, 0, 0 },
-@@ -964,6 +968,8 @@ static struct poptOption long_options[] = {
+@@ -963,6 +967,8 @@ static struct poptOption long_options[] = {
    {"password-file",    0,  POPT_ARG_STRING, &password_file, 0, 0, 0 },
    {"blocking-io",      0,  POPT_ARG_VAL,    &blocking_io, 1, 0, 0 },
    {"no-blocking-io",   0,  POPT_ARG_VAL,    &blocking_io, 0, 0, 0 },
@@ -100,7 +100,7 @@ diff --git a/options.c b/options.c
    {"outbuf",           0,  POPT_ARG_STRING, &outbuf_mode, 0, 0, 0 },
    {"remote-option",   'M', POPT_ARG_STRING, 0, 'M', 0, 0 },
    {"protocol",         0,  POPT_ARG_INT,    &protocol_version, 0, 0, 0 },
-@@ -2344,6 +2350,16 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2339,6 +2345,16 @@ int parse_arguments(int *argc_p, const char ***argv_p)
                }
        }
  
@@ -117,7 +117,7 @@ diff --git a/options.c b/options.c
        if (files_from) {
                char *h, *p;
                int q;
-@@ -2728,6 +2744,25 @@ void server_options(char **args, int *argc_p)
+@@ -2723,6 +2739,25 @@ void server_options(char **args, int *argc_p)
        else if (missing_args == 1 && !am_sender)
                args[ac++] = "--ignore-missing-args";
  
@@ -154,7 +154,7 @@ diff --git a/pipe.c b/pipe.c
  extern char *logfile_name;
  extern int remote_option_cnt;
  extern const char **remote_options;
-@@ -178,3 +179,77 @@ pid_t local_child(int argc, char **argv, int *f_in, int *f_out,
+@@ -176,3 +177,77 @@ pid_t local_child(int argc, char **argv, int *f_in, int *f_out,
  
        return pid;
  }
@@ -283,7 +283,7 @@ diff --git a/receiver.c b/receiver.c
        progress_init();
  
        while (1) {
-@@ -854,6 +874,9 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -853,6 +873,9 @@ int recv_files(int f_in, int f_out, char *local_name)
                else if (!am_server && INFO_GTE(NAME, 1) && INFO_EQ(PROGRESS, 1))
                        rprintf(FINFO, "%s\n", fname);
  
@@ -293,7 +293,7 @@ diff --git a/receiver.c b/receiver.c
                /* recv file data */
                recv_ok = receive_data(f_in, fnamecmp, fd1, st.st_size, fname, fd2, file, inplace || one_inplace);
  
-@@ -869,6 +892,16 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -868,6 +891,16 @@ int recv_files(int f_in, int f_out, char *local_name)
                        exit_cleanup(RERR_FILEIO);
                }
  
@@ -416,7 +416,7 @@ diff --git a/sender.c b/sender.c
  
        if (DEBUG_GTE(SEND, 1))
                rprintf(FINFO, "send_files starting\n");
-@@ -340,6 +361,7 @@ void send_files(int f_in, int f_out)
+@@ -338,6 +359,7 @@ void send_files(int f_in, int f_out)
                        exit_cleanup(RERR_PROTOCOL);
                }
  
@@ -424,7 +424,7 @@ diff --git a/sender.c b/sender.c
                fd = do_open(fname, O_RDONLY, 0);
                if (fd == -1) {
                        if (errno == ENOENT) {
-@@ -361,6 +383,33 @@ void send_files(int f_in, int f_out)
+@@ -357,6 +379,33 @@ void send_files(int f_in, int f_out)
                        continue;
                }
  
@@ -458,7 +458,7 @@ diff --git a/sender.c b/sender.c
                /* map the local file */
                if (do_fstat(fd, &st) != 0) {
                        io_error |= IOERR_GENERAL;
-@@ -413,6 +462,8 @@ void send_files(int f_in, int f_out)
+@@ -408,6 +457,8 @@ void send_files(int f_in, int f_out)
                        }
                }
                close(fd);
index 419eafe74e72ccc59bed353e10daf6cb5dae3349..b0c7479fbbf9af8ba552007a4e9e5a91d9c6125c 100644 (file)
@@ -18,7 +18,7 @@ To use this patch, run these commands for a successful build:
     ./configure                               (optional if already run)
     make
 
-based-on: cdf58a7aba23e31653661c950c2c870b96de08fa
+based-on: c528f8d5c8aa7b16b20cda72a9f4119699890c28
 diff --git a/fileio.c b/fileio.c
 --- a/fileio.c
 +++ b/fileio.c
@@ -50,7 +50,7 @@ diff --git a/options.c b/options.c
  int preallocate_files = 0;
  int do_compression = 0;
  int do_compression_level = CLVL_NOT_SPECIFIED;
-@@ -850,6 +851,7 @@ static struct poptOption long_options[] = {
+@@ -849,6 +850,7 @@ static struct poptOption long_options[] = {
    {"sparse",          'S', POPT_ARG_VAL,    &sparse_files, 1, 0, 0 },
    {"no-sparse",        0,  POPT_ARG_VAL,    &sparse_files, 0, 0, 0 },
    {"no-S",             0,  POPT_ARG_VAL,    &sparse_files, 0, 0, 0 },
@@ -58,7 +58,7 @@ diff --git a/options.c b/options.c
    {"preallocate",      0,  POPT_ARG_NONE,   &preallocate_files, 0, 0, 0},
    {"inplace",          0,  POPT_ARG_VAL,    &inplace, 1, 0, 0 },
    {"no-inplace",       0,  POPT_ARG_VAL,    &inplace, 0, 0, 0 },
-@@ -2635,6 +2637,12 @@ void server_options(char **args, int *argc_p)
+@@ -2630,6 +2632,12 @@ void server_options(char **args, int *argc_p)
                args[ac++] = arg;
        }
  
index d5a82941d40e61576a6af9924a3757fbb2ae6177..00f0a81316bdaf802f3c23beded5d40a960945b8 100644 (file)
@@ -9,7 +9,7 @@ To use this patch, run these commands for a successful build:
     ./configure                              (optional if already run)
     make
 
-based-on: cdf58a7aba23e31653661c950c2c870b96de08fa
+based-on: c528f8d5c8aa7b16b20cda72a9f4119699890c28
 diff --git a/io.c b/io.c
 --- a/io.c
 +++ b/io.c
@@ -53,7 +53,7 @@ diff --git a/options.c b/options.c
  int max_delete = INT_MIN;
  OFF_T max_size = -1;
  OFF_T min_size = -1;
-@@ -739,6 +740,7 @@ enum {OPT_SERVER = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
+@@ -738,6 +739,7 @@ enum {OPT_SERVER = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
        OPT_NO_D, OPT_APPEND, OPT_NO_ICONV, OPT_INFO, OPT_DEBUG,
        OPT_USERMAP, OPT_GROUPMAP, OPT_CHOWN, OPT_BWLIMIT,
        OPT_OLD_COMPRESS, OPT_NEW_COMPRESS, OPT_NO_COMPRESS,
@@ -61,7 +61,7 @@ diff --git a/options.c b/options.c
        OPT_REFUSED_BASE = 9000};
  
  static struct poptOption long_options[] = {
-@@ -946,6 +948,8 @@ static struct poptOption long_options[] = {
+@@ -945,6 +947,8 @@ static struct poptOption long_options[] = {
    {"no-timeout",       0,  POPT_ARG_VAL,    &io_timeout, 0, 0, 0 },
    {"contimeout",       0,  POPT_ARG_INT,    &connect_timeout, 0, 0, 0 },
    {"no-contimeout",    0,  POPT_ARG_VAL,    &connect_timeout, 0, 0, 0 },
@@ -70,7 +70,7 @@ diff --git a/options.c b/options.c
    {"rsh",             'e', POPT_ARG_STRING, &shell_cmd, 0, 0, 0 },
    {"rsync-path",       0,  POPT_ARG_STRING, &rsync_path, 0, 0, 0 },
    {"temp-dir",        'T', POPT_ARG_STRING, &tmpdir, 0, 0, 0 },
-@@ -1837,6 +1841,36 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1832,6 +1836,36 @@ int parse_arguments(int *argc_p, const char ***argv_p)
                        return 0;
  #endif
  
@@ -107,7 +107,7 @@ diff --git a/options.c b/options.c
                default:
                        /* A large opt value means that set_refuse_options()
                         * turned this option off. */
-@@ -2647,6 +2681,15 @@ void server_options(char **args, int *argc_p)
+@@ -2642,6 +2676,15 @@ void server_options(char **args, int *argc_p)
                args[ac++] = arg;
        }
  
index 4644d43b3d42431124c7d80b0a4cdf266a290405..3adc58105bfacce4ce99744b3ce2859f8ec0fcf0 100644 (file)
@@ -10,7 +10,7 @@ To use this patch, run these commands for a successful build:
     ./configure                                 (optional if already run)
     make
 
-based-on: cdf58a7aba23e31653661c950c2c870b96de08fa
+based-on: c528f8d5c8aa7b16b20cda72a9f4119699890c28
 diff --git a/flist.c b/flist.c
 --- a/flist.c
 +++ b/flist.c
@@ -96,7 +96,7 @@ diff --git a/options.c b/options.c
  
  #define MAX_BATCH_NAME_LEN 256        /* Must be less than MAXPATHLEN-13 */
  char *batch_name = NULL;
-@@ -951,6 +952,7 @@ static struct poptOption long_options[] = {
+@@ -950,6 +951,7 @@ static struct poptOption long_options[] = {
    {"temp-dir",        'T', POPT_ARG_STRING, &tmpdir, 0, 0, 0 },
    {"iconv",            0,  POPT_ARG_STRING, &iconv_opt, 0, 0, 0 },
    {"no-iconv",         0,  POPT_ARG_NONE,   0, OPT_NO_ICONV, 0, 0 },
@@ -104,7 +104,7 @@ diff --git a/options.c b/options.c
    {"ipv4",            '4', POPT_ARG_VAL,    &default_af_hint, AF_INET, 0, 0 },
    {"ipv6",            '6', POPT_ARG_VAL,    &default_af_hint, AF_INET6, 0, 0 },
    {"8-bit-output",    '8', POPT_ARG_VAL,    &allow_8bit_chars, 1, 0, 0 },
-@@ -2390,6 +2392,24 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2385,6 +2387,24 @@ int parse_arguments(int *argc_p, const char ***argv_p)
                }
        }
  
@@ -129,7 +129,7 @@ diff --git a/options.c b/options.c
        am_starting_up = 0;
  
        return 1;
-@@ -2833,6 +2853,12 @@ void server_options(char **args, int *argc_p)
+@@ -2828,6 +2848,12 @@ void server_options(char **args, int *argc_p)
        if (relative_paths && !implied_dirs && (!am_sender || protocol_version >= 30))
                args[ac++] = "--no-implied-dirs";
  
@@ -178,4 +178,4 @@ diff --git a/rsync.1.md b/rsync.1.md
 +
  0. `--ipv4`, `-4` or `--ipv6`, `-6`
  
-     Tells rsync to prefer IPv4/IPv6 when creating sockets.  This only affects
+     Tells rsync to prefer IPv4/IPv6 when creating sockets or running ssh.  This
index 063b94f5b6b11fef883ca2f2be0618d7967dffa5..049e9d097b016f7f2cf260e6635b84b19d2816ca 100644 (file)
@@ -6,7 +6,7 @@ To use this patch, run these commands for a successful build:
     ./configure                          (optional if already run)
     make
 
-based-on: cdf58a7aba23e31653661c950c2c870b96de08fa
+based-on: c528f8d5c8aa7b16b20cda72a9f4119699890c28
 diff --git a/syscall.c b/syscall.c
 --- a/syscall.c
 +++ b/syscall.c
index f744ffd91c5c7d9ab7e7920bf0815538e42a949b..95334125e57221194b363369fac669fb6d9dca34 100644 (file)
@@ -14,15 +14,15 @@ based-on: patch/master/acls
 diff --git a/compat.c b/compat.c
 --- a/compat.c
 +++ b/compat.c
-@@ -529,13 +529,6 @@ void setup_protocol(int f_out,int f_in)
-       if (protocol_version < 30) {
-               if (append_mode == 1)
-                       append_mode = 2;
+@@ -543,13 +543,6 @@ void setup_protocol(int f_out,int f_in)
+                               protocol_version);
+                       exit_cleanup(RERR_PROTOCOL);
+               }
 -              if (preserve_xattrs && !local_server) {
 -                      rprintf(FERROR,
--                          "--xattrs requires protocol 30 or higher"
--                          " (negotiated %d).\n",
--                          protocol_version);
+-                              "--xattrs requires protocol 30 or higher"
+-                              " (negotiated %d).\n",
+-                              protocol_version);
 -                      exit_cleanup(RERR_PROTOCOL);
 -              }
        }
@@ -47,7 +47,7 @@ diff --git a/xattrs.c b/xattrs.c
  
  #define RSYNC_XAL_INITIAL 5
  #define RSYNC_XAL_LIST_INITIAL 100
-@@ -274,7 +276,7 @@ static int rsync_xal_get(const char *fname, item_list *xalp)
+@@ -272,7 +274,7 @@ static int rsync_xal_get(const char *fname, item_list *xalp)
                if (!(ptr = get_xattr_data(fname, name, &datum_len, 0)))
                        return -1;
  
@@ -56,7 +56,7 @@ diff --git a/xattrs.c b/xattrs.c
                        /* For large datums, we store a flag and a checksum. */
                        name_offset = 1 + MAX_DIGEST_LEN;
                        sum_init(-1, checksum_seed);
-@@ -440,7 +442,7 @@ static int find_matching_xattr(const item_list *xalp)
+@@ -438,7 +440,7 @@ static int find_matching_xattr(const item_list *xalp)
                         || rxas1[j].datum_len != rxas2[j].datum_len
                         || strcmp(rxas1[j].name, rxas2[j].name))
                                break;
@@ -65,7 +65,7 @@ diff --git a/xattrs.c b/xattrs.c
                                if (memcmp(rxas1[j].datum + 1,
                                           rxas2[j].datum + 1,
                                           MAX_DIGEST_LEN) != 0)
-@@ -510,13 +512,22 @@ int send_xattr(int f, stat_x *sxp)
+@@ -508,13 +510,22 @@ int send_xattr(int f, stat_x *sxp)
  {
        int ndx = find_matching_xattr(sxp->xattr);
  
@@ -91,7 +91,7 @@ diff --git a/xattrs.c b/xattrs.c
                for (rxa = sxp->xattr->items; count--; rxa++) {
                        size_t name_len = rxa->name_len;
                        const char *name = rxa->name;
-@@ -535,8 +546,8 @@ int send_xattr(int f, stat_x *sxp)
+@@ -533,8 +544,8 @@ int send_xattr(int f, stat_x *sxp)
                                name_len += UPRE_LEN;
                        }
  #endif
@@ -102,7 +102,7 @@ diff --git a/xattrs.c b/xattrs.c
  #ifndef HAVE_LINUX_XATTRS
                        if (name_len > rxa->name_len) {
                                write_buf(f, USER_PREFIX, UPRE_LEN);
-@@ -544,7 +555,7 @@ int send_xattr(int f, stat_x *sxp)
+@@ -542,7 +553,7 @@ int send_xattr(int f, stat_x *sxp)
                        }
  #endif
                        write_buf(f, name, name_len);
@@ -111,7 +111,7 @@ diff --git a/xattrs.c b/xattrs.c
                                write_buf(f, rxa->datum + 1, MAX_DIGEST_LEN);
                        else
                                write_bigbuf(f, rxa->datum, rxa->datum_len);
-@@ -595,7 +606,7 @@ int xattr_diff(struct file_struct *file, stat_x *sxp, int find_all)
+@@ -593,7 +604,7 @@ int xattr_diff(struct file_struct *file, stat_x *sxp, int find_all)
                cmp = rec_cnt ? strcmp(snd_rxa->name, rec_rxa->name) : -1;
                if (cmp > 0)
                        same = 0;
@@ -120,7 +120,7 @@ diff --git a/xattrs.c b/xattrs.c
                        same = cmp == 0 && snd_rxa->datum_len == rec_rxa->datum_len
                            && memcmp(snd_rxa->datum + 1, rec_rxa->datum + 1,
                                      MAX_DIGEST_LEN) == 0;
-@@ -641,6 +652,9 @@ void send_xattr_request(const char *fname, struct file_struct *file, int f_out)
+@@ -639,6 +650,9 @@ void send_xattr_request(const char *fname, struct file_struct *file, int f_out)
        int cnt, prior_req = 0;
        rsync_xa *rxa;
  
@@ -130,7 +130,7 @@ diff --git a/xattrs.c b/xattrs.c
        glst += F_XATTR(file);
        lst = &glst->xa_items;
  
-@@ -700,6 +714,9 @@ int recv_xattr_request(struct file_struct *file, int f_in)
+@@ -698,6 +712,9 @@ int recv_xattr_request(struct file_struct *file, int f_in)
        rsync_xa *rxa;
        int rel_pos, cnt, num, got_xattr_data = 0;
  
@@ -140,7 +140,7 @@ diff --git a/xattrs.c b/xattrs.c
        if (F_XATTR(file) < 0) {
                rprintf(FERROR, "recv_xattr_request: internal data error!\n");
                exit_cleanup(RERR_PROTOCOL);
-@@ -786,7 +803,22 @@ void receive_xattr(int f, struct file_struct *file)
+@@ -784,7 +801,22 @@ void receive_xattr(int f, struct file_struct *file)
  #else
        int need_sort = 1;
  #endif
@@ -164,7 +164,7 @@ diff --git a/xattrs.c b/xattrs.c
  
        if (ndx < 0 || (size_t)ndx > rsync_xal_l.count) {
                rprintf(FERROR, "receive_xattr: xa index %d out of"
-@@ -799,7 +831,7 @@ void receive_xattr(int f, struct file_struct *file)
+@@ -797,7 +829,7 @@ void receive_xattr(int f, struct file_struct *file)
                return;
        }
  
@@ -173,7 +173,7 @@ diff --git a/xattrs.c b/xattrs.c
                (void)EXPAND_ITEM_LIST(&temp_xattr, rsync_xa, count);
                temp_xattr.count = 0;
        }
-@@ -807,9 +839,10 @@ void receive_xattr(int f, struct file_struct *file)
+@@ -805,9 +837,10 @@ void receive_xattr(int f, struct file_struct *file)
        for (num = 1; num <= count; num++) {
                char *ptr, *name;
                rsync_xa *rxa;
index 304764cf489a71efb057301f67432fe37ba8b964..8df2686c692f4b930cd9efb76e58c2b08b6078ea 100644 (file)
--- a/xxh3.diff
+++ b/xxh3.diff
@@ -7,7 +7,7 @@ To use this patch, run these commands for a successful build:
     ./configure                         (optional if already run)
     make
 
-based-on: cdf58a7aba23e31653661c950c2c870b96de08fa
+based-on: c528f8d5c8aa7b16b20cda72a9f4119699890c28
 diff --git a/checksum.c b/checksum.c
 --- a/checksum.c
 +++ b/checksum.c