The patches for 3.0.3pre3.
authorWayne Davison <wayned@samba.org>
Mon, 23 Jun 2008 02:16:59 +0000 (19:16 -0700)
committerWayne Davison <wayned@samba.org>
Mon, 23 Jun 2008 02:16:59 +0000 (19:16 -0700)
27 files changed:
atimes.diff
backup-dir-dels.diff
catch_crash_signals.diff
checksum-reading.diff
checksum-updating.diff
checksum-xattr.diff
copy-devices.diff
crtimes.diff
cvs-entries.diff
date-only.diff
db.diff
detect-renamed-lax.diff
detect-renamed.diff
downdate.diff
drop-cache.diff
fileflags.diff
ignore-case.diff
link-by-hash.diff
log-checksum.diff
omit-dir-changes.diff
openssl-support.diff
preallocate.diff
slow-down.diff
slp.diff
source-filter_dest-filter.diff
usermap.diff
xattrs.diff

index f954864..320d618 100644 (file)
@@ -102,7 +102,7 @@ diff --git a/flist.c b/flist.c
  
        if (chmod_modes && !S_ISLNK(mode))
                mode = tweak_mode(mode, chmod_modes);
-@@ -882,6 +902,8 @@ static struct file_struct *recv_file_entry(struct file_list *flist,
+@@ -895,6 +915,8 @@ static struct file_struct *recv_file_entry(struct file_list *flist,
                F_GROUP(file) = gid;
                file->flags |= gid_flags;
        }
@@ -111,7 +111,7 @@ diff --git a/flist.c b/flist.c
        if (unsort_ndx)
                F_NDX(file) = flist->used + flist->ndx_start;
  
-@@ -1230,6 +1252,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1241,6 +1263,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
                F_OWNER(file) = st.st_uid;
        if (gid_ndx) /* Check gid_ndx instead of preserve_gid for del support */
                F_GROUP(file) = st.st_gid;
@@ -141,7 +141,7 @@ diff --git a/generator.c b/generator.c
  #if !defined HAVE_LCHMOD && !defined HAVE_SETATTRLIST
                if (S_ISLNK(file->mode)) {
                        ;
-@@ -1002,6 +1006,8 @@ static int try_dests_reg(struct file_struct *file, char *fname, int ndx,
+@@ -1014,6 +1018,8 @@ static int try_dests_reg(struct file_struct *file, char *fname, int ndx,
                if (link_dest) {
                        if (!hard_link_one(file, fname, cmpbuf, 1))
                                goto try_a_copy;
@@ -150,7 +150,7 @@ diff --git a/generator.c b/generator.c
                        if (preserve_hard_links && F_IS_HLINKED(file))
                                finish_hard_link(file, fname, ndx, &sxp->st, itemizing, code, j);
                        if (!maybe_ATTRS_REPORT && (verbose > 1 || stdout_format_has_i > 1)) {
-@@ -1187,6 +1193,7 @@ static int try_dests_non(struct file_struct *file, char *fname, int ndx,
+@@ -1199,6 +1205,7 @@ static int try_dests_non(struct file_struct *file, char *fname, int ndx,
  static void list_file_entry(struct file_struct *f)
  {
        char permbuf[PERMSTRING_SIZE];
@@ -158,7 +158,7 @@ diff --git a/generator.c b/generator.c
        double len;
  
        if (!F_IS_ACTIVE(f)) {
-@@ -1201,14 +1208,16 @@ static void list_file_entry(struct file_struct *f)
+@@ -1213,14 +1220,16 @@ static void list_file_entry(struct file_struct *f)
  
  #ifdef SUPPORT_LINKS
        if (preserve_links && S_ISLNK(f->mode)) {
@@ -177,7 +177,7 @@ diff --git a/generator.c b/generator.c
                        f_name(f, NULL));
        }
  }
-@@ -2029,7 +2038,7 @@ static void touch_up_dirs(struct file_list *flist, int ndx)
+@@ -2052,7 +2061,7 @@ static void touch_up_dirs(struct file_list *flist, int ndx)
                        STRUCT_STAT st;
                        if (link_stat(fname, &st, 0) == 0
                         && cmp_time(st.st_mtime, file->modtime) != 0)
@@ -221,7 +221,7 @@ diff --git a/ifuncs.h b/ifuncs.h
 diff --git a/log.c b/log.c
 --- a/log.c
 +++ b/log.c
-@@ -650,7 +650,8 @@ static void log_formatted(enum logcode code, const char *format, const char *op,
+@@ -656,7 +656,8 @@ static void log_formatted(enum logcode code, const char *format, const char *op,
                        c[5] = !(iflags & ITEM_REPORT_PERMS) ? '.' : 'p';
                        c[6] = !(iflags & ITEM_REPORT_OWNER) ? '.' : 'o';
                        c[7] = !(iflags & ITEM_REPORT_GROUP) ? '.' : 'g';
@@ -323,7 +323,7 @@ diff --git a/rsync.c b/rsync.c
        }
  
        change_uid = am_root && uid_ndx && sxp->st.st_uid != (uid_t)F_OWNER(file);
-@@ -569,7 +588,7 @@ int finish_transfer(const char *fname, const char *fnametmp,
+@@ -570,7 +589,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,
@@ -332,7 +332,7 @@ diff --git a/rsync.c b/rsync.c
  
        /* move tmp file over real file */
        if (verbose > 2)
-@@ -596,7 +615,7 @@ int finish_transfer(const char *fname, const char *fnametmp,
+@@ -597,7 +616,7 @@ int finish_transfer(const char *fname, const char *fnametmp,
  
    do_set_file_attrs:
        set_file_attrs(fnametmp, file, NULL, fnamecmp,
@@ -352,7 +352,7 @@ diff --git a/rsync.h b/rsync.h
  
  /* These flags are used in the live flist data. */
  
-@@ -152,6 +153,7 @@
+@@ -151,6 +152,7 @@
  
  #define ATTRS_REPORT          (1<<0)
  #define ATTRS_SKIP_MTIME      (1<<1)
@@ -360,7 +360,7 @@ diff --git a/rsync.h b/rsync.h
  
  #define FULL_FLUSH    1
  #define NORMAL_FLUSH  0
-@@ -626,12 +628,14 @@ extern int file_extra_cnt;
+@@ -627,12 +629,14 @@ extern int file_extra_cnt;
  extern int inc_recurse;
  extern int uid_ndx;
  extern int gid_ndx;
@@ -436,7 +436,7 @@ new file mode 100644
 diff --git a/testsuite/rsync.fns b/testsuite/rsync.fns
 --- a/testsuite/rsync.fns
 +++ b/testsuite/rsync.fns
-@@ -192,6 +192,10 @@ checkit() {
+@@ -215,6 +215,10 @@ checkit() {
      # We can just write everything to stdout/stderr, because the
      # wrapper hides it unless there is a problem.
  
@@ -447,7 +447,7 @@ diff --git a/testsuite/rsync.fns b/testsuite/rsync.fns
      echo "Running: \"$1\""  
      eval "$1" 
      status=$?
-@@ -199,10 +203,13 @@ checkit() {
+@@ -222,10 +226,13 @@ checkit() {
        failed="YES";
      fi
  
index 77b84ce..0b8d322 100644 (file)
@@ -89,7 +89,7 @@ diff --git a/backup.c b/backup.c
                unmake_file(file);
                return 0;
        }
-@@ -358,7 +383,17 @@ static int keep_backup(const char *fname)
+@@ -356,7 +381,17 @@ static int keep_backup(const char *fname)
  /* main backup switch routine */
  int make_backup(const char *fname)
  {
index bdab91f..751eeaa 100644 (file)
@@ -40,7 +40,7 @@ diff --git a/errcode.h b/errcode.h
 diff --git a/log.c b/log.c
 --- a/log.c
 +++ b/log.c
-@@ -82,6 +82,7 @@ struct {
+@@ -83,6 +83,7 @@ struct {
        { RERR_TERMINATED , "sibling process terminated abnormally" },
        { RERR_SIGNAL1    , "received SIGUSR1" },
        { RERR_SIGNAL     , "received SIGINT, SIGTERM, or SIGHUP" },
@@ -64,7 +64,7 @@ diff --git a/main.c b/main.c
  }
  
  /* This function gets called from all 3 processes.  We want the client side
-@@ -1314,6 +1317,14 @@ RETSIGTYPE remember_children(UNUSED(int val))
+@@ -1315,6 +1318,14 @@ RETSIGTYPE remember_children(UNUSED(int val))
                                break;
                        }
                }
@@ -79,7 +79,7 @@ diff --git a/main.c b/main.c
        }
  #endif
  #ifndef HAVE_SIGACTION
-@@ -1372,6 +1383,12 @@ static RETSIGTYPE rsync_panic_handler(UNUSED(int whatsig))
+@@ -1373,6 +1384,12 @@ static RETSIGTYPE rsync_panic_handler(UNUSED(int whatsig))
  }
  #endif
  
@@ -92,7 +92,7 @@ diff --git a/main.c b/main.c
  
  int main(int argc,char *argv[])
  {
-@@ -1394,6 +1411,11 @@ int main(int argc,char *argv[])
+@@ -1395,6 +1412,11 @@ int main(int argc,char *argv[])
        SIGACTMASK(SIGFPE, rsync_panic_handler);
        SIGACTMASK(SIGABRT, rsync_panic_handler);
        SIGACTMASK(SIGBUS, rsync_panic_handler);
index 43c0865..dea3167 100644 (file)
@@ -342,7 +342,7 @@ diff --git a/flist.c b/flist.c
  /* Call this with EITHER (1) "file, NULL, 0" to chdir() to the file's
   * F_PATHNAME(), or (2) "NULL, dir, dirlen" to chdir() to the supplied dir,
   * with dir == NULL taken to be the starting directory, and dirlen < 0
-@@ -1014,7 +1259,7 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1032,7 +1277,7 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
                              STRUCT_STAT *stp, int flags, int filter_level)
  {
        static char *lastdir;
@@ -351,7 +351,7 @@ diff --git a/flist.c b/flist.c
        struct file_struct *file;
        char thisname[MAXPATHLEN];
        char linkname[MAXPATHLEN];
-@@ -1164,9 +1409,16 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1171,9 +1416,16 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
                        memcpy(lastdir, thisname, len);
                        lastdir[len] = '\0';
                        lastdir_len = len;
@@ -369,7 +369,7 @@ diff --git a/flist.c b/flist.c
        basename_len = strlen(basename) + 1; /* count the '\0' */
  
  #ifdef SUPPORT_LINKS
-@@ -1239,14 +1491,18 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1250,14 +1502,18 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
                memcpy(bp + basename_len, linkname, linkname_len);
  #endif
  
@@ -391,7 +391,7 @@ diff --git a/flist.c b/flist.c
        /* This code is only used by the receiver when it is building
         * a list of files for a delete pass. */
        if (keep_dirlinks && linkname_len && flist) {
-@@ -2159,7 +2415,8 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
+@@ -2177,7 +2433,8 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
                         * file-list to check if this is a 1-file xfer. */
                        send_extra_file_list(f, 1);
                }
@@ -401,7 +401,7 @@ diff --git a/flist.c b/flist.c
  
        return flist;
  }
-@@ -2261,7 +2518,7 @@ struct file_list *recv_file_list(int f)
+@@ -2279,7 +2536,7 @@ struct file_list *recv_file_list(int f)
        else if (f >= 0)
                recv_id_list(f, flist);
  
@@ -410,7 +410,7 @@ diff --git a/flist.c b/flist.c
  
        if (protocol_version < 30) {
                /* Recv the io_error flag */
-@@ -2459,7 +2716,7 @@ void flist_free(struct file_list *flist)
+@@ -2477,7 +2734,7 @@ void flist_free(struct file_list *flist)
  
  /* This routine ensures we don't have any duplicate names in our file list.
   * duplicate names can cause corruption because of the pipelining. */
@@ -419,7 +419,7 @@ diff --git a/flist.c b/flist.c
  {
        char fbuf[MAXPATHLEN];
        int i, prev_i;
-@@ -2510,7 +2767,7 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
+@@ -2528,7 +2785,7 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
                        /* If one is a dir and the other is not, we want to
                         * keep the dir because it might have contents in the
                         * list.  Otherwise keep the first one. */
@@ -428,7 +428,7 @@ diff --git a/flist.c b/flist.c
                                struct file_struct *fp = flist->sorted[j];
                                if (!S_ISDIR(fp->mode))
                                        keep = i, drop = j;
-@@ -2526,8 +2783,8 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
+@@ -2544,8 +2801,8 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
                        } else
                                keep = j, drop = i;
  
@@ -439,7 +439,7 @@ diff --git a/flist.c b/flist.c
                                        rprintf(FINFO,
                                            "removing duplicate name %s from file list (%d)\n",
                                            f_name(file, fbuf), drop + flist->ndx_start);
-@@ -2549,7 +2806,7 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
+@@ -2567,7 +2824,7 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
        }
        flist->high = prev_i;
  
@@ -459,7 +459,7 @@ diff --git a/generator.c b/generator.c
  extern int remove_source_files;
  extern int delay_updates;
  extern int update_only;
-@@ -709,7 +710,7 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
+@@ -712,7 +713,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. */
@@ -468,7 +468,7 @@ diff --git a/generator.c b/generator.c
  {
        if (st->st_size != F_LENGTH(file))
                return 0;
-@@ -718,7 +719,10 @@ int unchanged_file(char *fn, struct file_struct *file, STRUCT_STAT *st)
+@@ -721,7 +722,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];
@@ -480,7 +480,7 @@ diff --git a/generator.c b/generator.c
                return memcmp(sum, F_SUM(file), checksum_len) == 0;
        }
  
-@@ -972,7 +976,7 @@ static int try_dests_reg(struct file_struct *file, char *fname, int ndx,
+@@ -984,7 +988,7 @@ static int try_dests_reg(struct file_struct *file, char *fname, int ndx,
                        match_level = 1;
                        /* FALL THROUGH */
                case 1:
@@ -489,7 +489,7 @@ diff --git a/generator.c b/generator.c
                                continue;
                        best_match = j;
                        match_level = 2;
-@@ -1245,7 +1249,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1257,7 +1261,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 = NULL;
@@ -498,7 +498,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;
-@@ -1334,8 +1338,8 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1346,8 +1350,8 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                                flist_free(fuzzy_dirlist);
                                fuzzy_dirlist = NULL;
                        }
@@ -509,7 +509,7 @@ diff --git a/generator.c b/generator.c
  #ifdef SUPPORT_ACLS
                        if (!preserve_perms)
                                dflt_perms = default_perms_for_dir(dn);
-@@ -1343,10 +1347,15 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1355,10 +1359,15 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                }
                parent_dirname = dn;
  
@@ -529,7 +529,7 @@ diff --git a/generator.c b/generator.c
                }
  
                statret = link_stat(fname, &sx.st, keep_dirlinks && is_dir);
-@@ -1775,7 +1784,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1792,7 +1801,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                ;
        else if (fnamecmp_type == FNAMECMP_FUZZY)
                ;
@@ -687,7 +687,7 @@ diff --git a/options.c b/options.c
 diff --git a/rsync.h b/rsync.h
 --- a/rsync.h
 +++ b/rsync.h
-@@ -686,6 +686,10 @@ extern int xattrs_ndx;
+@@ -687,6 +687,10 @@ extern int xattrs_ndx;
  #define F_SUM(f) ((char*)OPT_EXTRA(f, LEN64_BUMP(f) + HLINK_BUMP(f) \
                                    + SUM_EXTRA_CNT - 1))
  
@@ -698,7 +698,7 @@ diff --git a/rsync.h b/rsync.h
  /* Some utility defines: */
  #define F_IS_ACTIVE(f) (f)->basename[0]
  #define F_IS_HLINKED(f) ((f)->flags & FLAG_HLINKED)
-@@ -864,6 +868,13 @@ typedef struct {
+@@ -865,6 +869,13 @@ typedef struct {
        char fname[1]; /* has variable size */
  } relnamecache;
  
index dabcccd..dab490a 100644 (file)
@@ -389,8 +389,8 @@ diff --git a/flist.c b/flist.c
  }
  
  /* Call this with EITHER (1) "file, NULL, 0" to chdir() to the file's
-@@ -1364,6 +1575,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
-       if (excl_ret) {
+@@ -1371,6 +1582,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+       if (is_excluded(thisname, S_ISDIR(st.st_mode) != 0, filter_level)) {
                if (ignore_perishable)
                        non_perishable_cnt++;
 +              if (S_ISREG(st.st_mode))
@@ -398,7 +398,7 @@ diff --git a/flist.c b/flist.c
                return NULL;
        }
  
-@@ -1410,13 +1623,13 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1417,13 +1630,13 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
                        lastdir[len] = '\0';
                        lastdir_len = len;
                        if (checksum_files && am_sender && flist)
@@ -414,7 +414,7 @@ diff --git a/flist.c b/flist.c
                }
        }
        basename_len = strlen(basename) + 1; /* count the '\0' */
-@@ -1498,7 +1711,7 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1509,7 +1722,7 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
  
        if (always_checksum && am_sender && S_ISREG(st.st_mode)) {
                if (flist && checksum_files)
@@ -423,7 +423,7 @@ diff --git a/flist.c b/flist.c
                else
                        file_checksum(thisname, st.st_size, tmp_sum);
        }
-@@ -1824,6 +2037,9 @@ static void send_directory(int f, struct file_list *flist, char *fbuf, int len,
+@@ -1839,6 +2052,9 @@ static void send_directory(int f, struct file_list *flist, char *fbuf, int len,
  
        closedir(d);
  
@@ -433,7 +433,7 @@ diff --git a/flist.c b/flist.c
        if (f >= 0 && recurse && !divert_dirs) {
                int i, end = flist->used - 1;
                /* send_if_directory() bumps flist->used, so use "end". */
-@@ -2417,6 +2633,9 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
+@@ -2435,6 +2651,9 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
                }
        } else
                flist_eof = 1;
@@ -454,7 +454,7 @@ diff --git a/generator.c b/generator.c
  static const char *solo_file = NULL;
  
  /* For calling delete_item() and delete_dir_contents(). */
-@@ -720,7 +721,7 @@ int unchanged_file(char *fn, struct file_struct *file, STRUCT_STAT *st, int slot
+@@ -723,7 +724,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)
@@ -463,7 +463,7 @@ diff --git a/generator.c b/generator.c
                else
                        file_checksum(fn, st->st_size, sum);
                return memcmp(sum, F_SUM(file), checksum_len) == 0;
-@@ -1353,7 +1354,8 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1365,7 +1366,8 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                                fuzzy_dirlist = get_dirlist(fnamecmpbuf, -1, 1);
                        }
                        if (checksum_files) {
@@ -473,7 +473,7 @@ diff --git a/generator.c b/generator.c
                        }
                        need_new_dirscan = 0;
                }
-@@ -1498,6 +1500,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1515,6 +1517,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                        else
                                change_local_filter_dir(fname, strlen(fname), F_DEPTH(file));
                }
@@ -481,7 +481,7 @@ diff --git a/generator.c b/generator.c
                goto cleanup;
        }
  
-@@ -1790,6 +1793,8 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1807,6 +1810,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);
@@ -490,7 +490,7 @@ diff --git a/generator.c b/generator.c
                if (itemizing)
                        itemize(fnamecmp, file, ndx, statret, &sx, 0, 0, NULL);
  #ifdef SUPPORT_HARD_LINKS
-@@ -2217,6 +2222,7 @@ void generate_files(int f_out, const char *local_name)
+@@ -2243,6 +2248,7 @@ void generate_files(int f_out, const char *local_name)
                                } else
                                        change_local_filter_dir(fbuf, strlen(fbuf), F_DEPTH(fp));
                        }
@@ -498,7 +498,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];
-@@ -2297,6 +2303,9 @@ void generate_files(int f_out, const char *local_name)
+@@ -2323,6 +2329,9 @@ void generate_files(int f_out, const char *local_name)
                        wait_for_receiver();
        }
  
@@ -595,7 +595,7 @@ diff --git a/receiver.c b/receiver.c
 diff --git a/rsync.h b/rsync.h
 --- a/rsync.h
 +++ b/rsync.h
-@@ -870,6 +870,8 @@ typedef struct {
+@@ -871,6 +871,8 @@ typedef struct {
  
  #define CSF_ENABLE (1<<1)
  #define CSF_LAX (1<<2)
index bab3e0d..53d1319 100644 (file)
@@ -11,7 +11,7 @@ To use this patch, run these commands for a successful build:
 diff --git a/flist.c b/flist.c
 --- a/flist.c
 +++ b/flist.c
-@@ -1239,7 +1239,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1250,7 +1250,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
                memcpy(bp + basename_len, linkname, linkname_len);
  #endif
  
@@ -24,7 +24,7 @@ diff --git a/flist.c b/flist.c
 diff --git a/generator.c b/generator.c
 --- a/generator.c
 +++ b/generator.c
-@@ -718,7 +718,8 @@ int unchanged_file(char *fn, struct file_struct *file, STRUCT_STAT *st)
+@@ -721,7 +721,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];
@@ -191,7 +191,7 @@ diff --git a/xattrs.c b/xattrs.c
                                continue;
                }
  
-@@ -886,6 +894,39 @@ int del_def_xattr_acl(const char *fname)
+@@ -891,6 +899,39 @@ int del_def_xattr_acl(const char *fname)
  }
  #endif
  
index 60aca11..37244d7 100644 (file)
@@ -19,7 +19,7 @@ diff --git a/generator.c b/generator.c
  extern int preserve_specials;
  extern int preserve_hard_links;
  extern int preserve_executability;
-@@ -1670,7 +1671,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1687,7 +1688,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                goto cleanup;
        }
  
index 2fa2c15..46d6f80 100644 (file)
@@ -109,7 +109,7 @@ diff --git a/flist.c b/flist.c
        if (!(xflags & XMIT_SAME_MODE))
                mode = from_wire_mode(read_int(f));
  
-@@ -909,6 +932,8 @@ static struct file_struct *recv_file_entry(struct file_list *flist,
+@@ -922,6 +945,8 @@ static struct file_struct *recv_file_entry(struct file_list *flist,
                F_GROUP(file) = gid;
                file->flags |= gid_flags;
        }
@@ -118,7 +118,7 @@ diff --git a/flist.c b/flist.c
        if (unsort_ndx)
                F_NDX(file) = flist->used + flist->ndx_start;
  
-@@ -1261,6 +1286,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1272,6 +1297,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
                F_OWNER(file) = st.st_uid;
        if (gid_ndx) /* Check gid_ndx instead of preserve_gid for del support */
                F_GROUP(file) = st.st_gid;
@@ -173,7 +173,7 @@ diff --git a/generator.c b/generator.c
  #if !defined HAVE_LCHMOD && !defined HAVE_SETATTRLIST
                if (S_ISLNK(file->mode)) {
                        ;
-@@ -1210,6 +1225,7 @@ static int try_dests_non(struct file_struct *file, char *fname, int ndx,
+@@ -1222,6 +1237,7 @@ static int try_dests_non(struct file_struct *file, char *fname, int ndx,
  static void list_file_entry(struct file_struct *f)
  {
        char permbuf[PERMSTRING_SIZE];
@@ -181,7 +181,7 @@ diff --git a/generator.c b/generator.c
        double len;
  
        if (!F_IS_ACTIVE(f)) {
-@@ -1224,14 +1240,16 @@ static void list_file_entry(struct file_struct *f)
+@@ -1236,14 +1252,16 @@ static void list_file_entry(struct file_struct *f)
  
  #ifdef SUPPORT_LINKS
        if (preserve_links && S_ISLNK(f->mode)) {
@@ -200,7 +200,7 @@ diff --git a/generator.c b/generator.c
                        f_name(f, NULL));
        }
  }
-@@ -1323,6 +1341,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1335,6 +1353,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                        return;
                }
        }
@@ -243,7 +243,7 @@ diff --git a/ifuncs.h b/ifuncs.h
 diff --git a/log.c b/log.c
 --- a/log.c
 +++ b/log.c
-@@ -653,7 +653,8 @@ static void log_formatted(enum logcode code, const char *format, const char *op,
+@@ -659,7 +659,8 @@ static void log_formatted(enum logcode code, const char *format, const char *op,
                        c[8] = !(iflags & ITEM_REPORT_FFLAGS) ? '.' : 'f';
                        c[9] = !(iflags & ITEM_REPORT_ACL) ? '.' : 'a';
                        c[10] = !(iflags & ITEM_REPORT_XATTR) ? '.' : 'x';
@@ -309,7 +309,7 @@ diff --git a/rsync.c b/rsync.c
  
        change_uid = am_root && uid_ndx && sxp->st.st_uid != (uid_t)F_OWNER(file);
        change_gid = gid_ndx && !(file->flags & FLAG_SKIP_GROUP)
-@@ -618,7 +626,7 @@ int finish_transfer(const char *fname, const char *fnametmp,
+@@ -619,7 +627,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
@@ -318,7 +318,7 @@ diff --git a/rsync.c b/rsync.c
  
        /* move tmp file over real file */
        if (verbose > 2)
-@@ -649,7 +657,7 @@ int finish_transfer(const char *fname, const char *fnametmp,
+@@ -650,7 +658,7 @@ int finish_transfer(const char *fname, const char *fnametmp,
  
    do_set_file_attrs:
        set_file_attrs(fnametmp, file, NULL, fnamecmp,
@@ -338,7 +338,7 @@ diff --git a/rsync.h b/rsync.h
  #define XMIT_SAME_FLAGS (1<<14)               /* protocols ?? - now */
  
  /* These flags are used in the live flist data. */
-@@ -154,6 +155,7 @@
+@@ -153,6 +154,7 @@
  #define ATTRS_REPORT          (1<<0)
  #define ATTRS_SKIP_MTIME      (1<<1)
  #define ATTRS_DELAY_IMMUTABLE (1<<2)
@@ -346,7 +346,7 @@ diff --git a/rsync.h b/rsync.h
  
  #define FULL_FLUSH    1
  #define NORMAL_FLUSH  0
-@@ -170,7 +172,7 @@
+@@ -169,7 +171,7 @@
  #define FNAMECMP_FUZZY                0x83
  
  /* For use by the itemize_changes code */
@@ -355,7 +355,7 @@ diff --git a/rsync.h b/rsync.h
  #define ITEM_REPORT_CHANGE (1<<1)
  #define ITEM_REPORT_SIZE (1<<2)     /* regular files only */
  #define ITEM_REPORT_TIMEFAIL (1<<2) /* symlinks only */
-@@ -651,6 +653,7 @@ extern int file_extra_cnt;
+@@ -652,6 +654,7 @@ extern int file_extra_cnt;
  extern int inc_recurse;
  extern int uid_ndx;
  extern int gid_ndx;
@@ -363,7 +363,7 @@ diff --git a/rsync.h b/rsync.h
  extern int fileflags_ndx;
  extern int acls_ndx;
  extern int xattrs_ndx;
-@@ -658,6 +661,7 @@ extern int xattrs_ndx;
+@@ -659,6 +662,7 @@ extern int xattrs_ndx;
  #define FILE_STRUCT_LEN (offsetof(struct file_struct, basename))
  #define EXTRA_LEN (sizeof (union file_extras))
  #define PTR_EXTRA_CNT ((sizeof (char *) + EXTRA_LEN - 1) / EXTRA_LEN)
@@ -371,7 +371,7 @@ diff --git a/rsync.h b/rsync.h
  #define DEV_EXTRA_CNT 2
  #define DIRNODE_EXTRA_CNT 3
  #define SUM_EXTRA_CNT ((MAX_DIGEST_LEN + EXTRA_LEN - 1) / EXTRA_LEN)
-@@ -916,6 +920,7 @@ typedef struct {
+@@ -917,6 +921,7 @@ typedef struct {
  
  typedef struct {
      STRUCT_STAT st;
index 0fb1fbe..d566a48 100644 (file)
@@ -88,7 +88,7 @@ diff --git a/exclude.c b/exclude.c
 diff --git a/rsync.h b/rsync.h
 --- a/rsync.h
 +++ b/rsync.h
-@@ -149,6 +149,7 @@
+@@ -148,6 +148,7 @@
  #define XFLG_ANCHORED2ABS     (1<<2) /* leading slash indicates absolute */
  #define XFLG_ABS_IF_SLASH     (1<<3) /* leading or interior slash is absolute */
  #define XFLG_DIR2WILD3                (1<<4) /* dir/ match gets trailing *** added */
@@ -155,9 +155,9 @@ diff --git a/testsuite/exclude.test b/testsuite/exclude.test
 +makepath "$chkdir/bar/down/to/CVS"
  rm "$chkdir"/foo/file1
  rm "$chkdir"/bar/down/to/bar/baz/*.deep
-+cp -p "$fromdir"/bar/down/to/D "$chkdir"/bar/down/to/D
-+cp -p "$fromdir"/bar/down/to/not.good "$chkdir"/bar/down/to/not.good
-+cp -p "$fromdir"/bar/down/to/CVS/Entries "$chkdir"/bar/down/to/CVS/Entries
- cp -p "$fromdir"/bar/down/to/foo/*.junk "$chkdir"/bar/down/to/foo
- cp -p "$fromdir"/bar/down/to/foo/to "$chkdir"/bar/down/to/foo
++cp_touch "$fromdir"/bar/down/to/D "$chkdir"/bar/down/to/D
++cp_touch "$fromdir"/bar/down/to/not.good "$chkdir"/bar/down/to/not.good
++cp_touch "$fromdir"/bar/down/to/CVS/Entries "$chkdir"/bar/down/to/CVS/Entries
+ cp_touch "$fromdir"/bar/down/to/foo/*.junk "$chkdir"/bar/down/to/foo
+ cp_touch "$fromdir"/bar/down/to/foo/to "$chkdir"/bar/down/to/foo
  
index 4b211dd..d6a7d3b 100644 (file)
@@ -25,7 +25,7 @@ diff --git a/generator.c b/generator.c
  extern int size_only;
  extern OFF_T max_size;
  extern OFF_T min_size;
-@@ -711,6 +712,9 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
+@@ -714,6 +715,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)
  {
diff --git a/db.diff b/db.diff
index 2b74384..f116d05 100644 (file)
--- a/db.diff
+++ b/db.diff
@@ -87,10 +87,10 @@ diff --git a/cleanup.c b/cleanup.c
  extern int keep_partial;
  extern int got_xfer_error;
 +extern int use_db;
- extern int progress_is_active;
  extern char *partial_dir;
  extern char *logfile_name;
-@@ -128,6 +129,12 @@ NORETURN void _exit_cleanup(int code, const char *file, int line)
+@@ -124,6 +125,12 @@ NORETURN void _exit_cleanup(int code, const char *file, int line)
                /* FALLTHROUGH */
  #include "case_N.h"
  
@@ -768,7 +768,7 @@ diff --git a/flist.c b/flist.c
  extern int eol_nulls;
  extern int relative_paths;
  extern int implied_dirs;
-@@ -1239,14 +1240,16 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1250,14 +1251,16 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
                memcpy(bp + basename_len, linkname, linkname_len);
  #endif
  
@@ -788,7 +788,7 @@ diff --git a/flist.c b/flist.c
        /* This code is only used by the receiver when it is building
         * a list of files for a delete pass. */
        if (keep_dirlinks && linkname_len && flist) {
-@@ -1862,6 +1865,9 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
+@@ -1877,6 +1880,9 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
                     | (eol_nulls || reading_remotely ? RL_EOL_NULLS : 0);
        int implied_dot_dir = 0;
  
@@ -809,7 +809,7 @@ diff --git a/generator.c b/generator.c
  extern int append_mode;
  extern int make_backups;
  extern int csum_length;
-@@ -718,7 +719,8 @@ int unchanged_file(char *fn, struct file_struct *file, STRUCT_STAT *st)
+@@ -721,7 +722,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];
@@ -819,7 +819,7 @@ diff --git a/generator.c b/generator.c
                return memcmp(sum, F_SUM(file), checksum_len) == 0;
        }
  
-@@ -2174,6 +2176,9 @@ void generate_files(int f_out, const char *local_name)
+@@ -2197,6 +2199,9 @@ void generate_files(int f_out, const char *local_name)
                        : "enabled");
        }
  
@@ -883,7 +883,7 @@ diff --git a/main.c b/main.c
  extern char *shell_cmd;
  extern char *batch_name;
  extern char *password_file;
-@@ -1490,6 +1492,9 @@ int main(int argc,char *argv[])
+@@ -1491,6 +1493,9 @@ int main(int argc,char *argv[])
                exit_cleanup(RERR_SYNTAX);
        }
  
index d1ccfbc..b062705 100644 (file)
@@ -34,7 +34,7 @@ diff --git a/generator.c b/generator.c
                diff = u_strcmp(fmid->basename, f->basename);
                if (diff == 0) {
                        good_match = mid;
-@@ -1967,6 +1969,21 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1984,6 +1986,21 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                fnamecmp = partialptr;
                fnamecmp_type = FNAMECMP_PARTIAL_DIR;
                statret = 0;
index 1bbacb4..5f23f6a 100644 (file)
@@ -117,7 +117,7 @@ diff --git a/flist.c b/flist.c
  static void send_directory(int f, struct file_list *flist,
                           char *fbuf, int len, int flags);
  
-@@ -2263,6 +2305,25 @@ struct file_list *recv_file_list(int f)
+@@ -2281,6 +2323,25 @@ struct file_list *recv_file_list(int f)
  
        flist_sort_and_clean(flist, relative_paths);
  
@@ -458,7 +458,7 @@ diff --git a/generator.c b/generator.c
  
        if (do_progress && !am_server)
                rprintf(FINFO, "                    \r");
-@@ -1213,6 +1361,7 @@ static void list_file_entry(struct file_struct *f)
+@@ -1225,6 +1373,7 @@ static void list_file_entry(struct file_struct *f)
        }
  }
  
@@ -466,7 +466,7 @@ diff --git a/generator.c b/generator.c
  static int phase = 0;
  static int dflt_perms;
  
-@@ -1484,9 +1633,12 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1501,9 +1650,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)) {
@@ -482,7 +482,7 @@ diff --git a/generator.c b/generator.c
                                change_local_filter_dir(fname, strlen(fname), F_DEPTH(file));
                }
                goto cleanup;
-@@ -1764,8 +1916,14 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1781,8 +1933,14 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                        goto cleanup;
                }
  #endif
@@ -498,7 +498,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;
-@@ -2155,6 +2313,12 @@ void generate_files(int f_out, const char *local_name)
+@@ -2178,6 +2336,12 @@ void generate_files(int f_out, const char *local_name)
        if (verbose > 2)
                rprintf(FINFO, "generator starting pid=%ld\n", (long)getpid());
  
@@ -511,7 +511,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) {
-@@ -2165,7 +2329,7 @@ void generate_files(int f_out, const char *local_name)
+@@ -2188,7 +2352,7 @@ void generate_files(int f_out, const char *local_name)
        }
        do_progress = 0;
  
@@ -520,7 +520,7 @@ diff --git a/generator.c b/generator.c
                whole_file = 0;
        if (verbose >= 2) {
                rprintf(FINFO, "delta-transmission %s\n",
-@@ -2204,7 +2368,7 @@ void generate_files(int f_out, const char *local_name)
+@@ -2230,7 +2394,7 @@ void generate_files(int f_out, const char *local_name)
                                                dirdev = MAKEDEV(DEV_MAJOR(devp), DEV_MINOR(devp));
                                        } else
                                                dirdev = MAKEDEV(0, 0);
@@ -529,7 +529,7 @@ diff --git a/generator.c b/generator.c
                                } else
                                        change_local_filter_dir(fbuf, strlen(fbuf), F_DEPTH(fp));
                        }
-@@ -2248,7 +2412,21 @@ void generate_files(int f_out, const char *local_name)
+@@ -2274,7 +2438,21 @@ void generate_files(int f_out, const char *local_name)
        } while ((cur_flist = cur_flist->next) != NULL);
  
        if (delete_during)
index eafed0e..fb01979 100644 (file)
@@ -18,7 +18,7 @@ diff --git a/generator.c b/generator.c
  extern int ignore_existing;
  extern int ignore_non_existing;
  extern int inplace;
-@@ -1705,6 +1706,13 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1722,6 +1723,13 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                goto cleanup;
        }
  
@@ -32,7 +32,7 @@ diff --git a/generator.c b/generator.c
        fnamecmp = fname;
        fnamecmp_type = FNAMECMP_FNAME;
  
-@@ -2065,6 +2073,7 @@ void check_for_finished_files(int itemizing, enum logcode code, int check_redo)
+@@ -2088,6 +2096,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;
-@@ -2090,6 +2099,7 @@ void check_for_finished_files(int itemizing, enum logcode code, int check_redo)
+@@ -2113,6 +2122,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;
index c222427..14fd1b0 100644 (file)
@@ -80,7 +80,7 @@ diff --git a/checksum.c b/checksum.c
 diff --git a/cleanup.c b/cleanup.c
 --- a/cleanup.c
 +++ b/cleanup.c
-@@ -47,7 +47,13 @@ void close_all(void)
+@@ -46,7 +46,13 @@ void close_all(void)
        int fd;
        int ret;
        STRUCT_STAT st;
index 11661db..f2f7ca5 100644 (file)
@@ -142,9 +142,9 @@ diff --git a/flist.c b/flist.c
  
        if (preserve_uid && !(xflags & XMIT_SAME_UID)) {
                if (protocol_version < 30)
-@@ -876,6 +899,10 @@ static struct file_struct *recv_file_entry(struct file_list *flist,
-               OPT_EXTRA(file, 0)->unum = (uint32)(file_length >> 32);
+@@ -889,6 +912,10 @@ static struct file_struct *recv_file_entry(struct file_list *flist,
        }
+ #endif
        file->mode = mode;
 +#ifdef SUPPORT_FILEFLAGS
 +      if (preserve_fileflags)
@@ -153,9 +153,9 @@ diff --git a/flist.c b/flist.c
        if (preserve_uid)
                F_OWNER(file) = uid;
        if (preserve_gid) {
-@@ -1226,6 +1253,10 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
-               OPT_EXTRA(file, 0)->unum = (uint32)(st.st_size >> 32);
+@@ -1237,6 +1264,10 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
        }
+ #endif
        file->mode = st.st_mode;
 +#if defined SUPPORT_FILEFLAGS || defined SUPPORT_FORCE_CHANGE
 +      if (fileflags_ndx)
@@ -164,6 +164,14 @@ diff --git a/flist.c b/flist.c
        if (uid_ndx) /* Check uid_ndx instead of preserve_uid for del support */
                F_OWNER(file) = st.st_uid;
        if (gid_ndx) /* Check gid_ndx instead of preserve_gid for del support */
+@@ -1355,6 +1386,7 @@ static struct file_struct *send_file_name(int f, struct file_list *flist,
+ #endif
+ #ifdef SUPPORT_XATTRS
+               if (preserve_xattrs) {
++                      sx.st.st_mode = file->mode;
+                       sx.xattr = NULL;
+                       if (get_xattr(fname, &sx) < 0) {
+                               io_error |= IOERR_GENERAL;
 diff --git a/generator.c b/generator.c
 --- a/generator.c
 +++ b/generator.c
@@ -239,7 +247,7 @@ diff --git a/generator.c b/generator.c
  #ifdef SUPPORT_ACLS
                if (preserve_acls && !S_ISLNK(file->mode)) {
                        if (!ACL_READY(*sxp))
-@@ -1429,6 +1452,10 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1438,6 +1461,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);
                }
@@ -250,7 +258,7 @@ diff --git a/generator.c b/generator.c
                if (statret != 0 && basis_dir[0] != NULL) {
                        int j = try_dests_non(file, fname, ndx, fnamecmpbuf, &sx,
                                              itemizing, code);
-@@ -1464,10 +1491,15 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1478,10 +1505,15 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                /* We need to ensure that the dirs in the transfer have writable
                 * permissions during the time we are putting files within them.
                 * This is then fixed after the transfer is done. */
@@ -267,7 +275,7 @@ diff --git a/generator.c b/generator.c
                                rsyserr(FERROR_XFER, errno,
                                        "failed to modify permissions on %s",
                                        full_fname(fname));
-@@ -1502,6 +1534,10 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1516,6 +1548,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);
        }
@@ -278,7 +286,7 @@ diff --git a/generator.c b/generator.c
  
  #ifdef SUPPORT_HARD_LINKS
        if (preserve_hard_links && F_HLINK_NOT_FIRST(file)
-@@ -2028,13 +2064,17 @@ static void touch_up_dirs(struct file_list *flist, int ndx)
+@@ -2047,13 +2083,17 @@ static void touch_up_dirs(struct file_list *flist, int ndx)
                        continue;
                fname = f_name(file, NULL);
                if (!(file->mode & S_IWUSR))
@@ -301,7 +309,7 @@ diff --git a/generator.c b/generator.c
 diff --git a/log.c b/log.c
 --- a/log.c
 +++ b/log.c
-@@ -650,7 +650,7 @@ static void log_formatted(enum logcode code, const char *format, const char *op,
+@@ -656,7 +656,7 @@ static void log_formatted(enum logcode code, const char *format, const char *op,
                        c[5] = !(iflags & ITEM_REPORT_PERMS) ? '.' : 'p';
                        c[6] = !(iflags & ITEM_REPORT_OWNER) ? '.' : 'o';
                        c[7] = !(iflags & ITEM_REPORT_GROUP) ? '.' : 'g';
@@ -566,7 +574,7 @@ diff --git a/rsync.h b/rsync.h
  
  /* These flags are used in the live flist data. */
  
-@@ -152,6 +153,7 @@
+@@ -151,6 +152,7 @@
  
  #define ATTRS_REPORT          (1<<0)
  #define ATTRS_SKIP_MTIME      (1<<1)
@@ -574,7 +582,7 @@ diff --git a/rsync.h b/rsync.h
  
  #define FULL_FLUSH    1
  #define NORMAL_FLUSH  0
-@@ -178,6 +180,7 @@
+@@ -177,6 +179,7 @@
  #define ITEM_REPORT_GROUP (1<<6)
  #define ITEM_REPORT_ACL (1<<7)
  #define ITEM_REPORT_XATTR (1<<8)
@@ -582,7 +590,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)
-@@ -458,6 +461,28 @@ typedef unsigned int size_t;
+@@ -457,6 +460,28 @@ typedef unsigned int size_t;
  #endif
  #endif
  
@@ -611,7 +619,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. */
-@@ -626,6 +651,7 @@ extern int file_extra_cnt;
+@@ -627,6 +652,7 @@ extern int file_extra_cnt;
  extern int inc_recurse;
  extern int uid_ndx;
  extern int gid_ndx;
@@ -619,7 +627,7 @@ diff --git a/rsync.h b/rsync.h
  extern int acls_ndx;
  extern int xattrs_ndx;
  
-@@ -663,6 +689,11 @@ extern int xattrs_ndx;
+@@ -664,6 +690,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
@@ -1041,7 +1049,30 @@ diff --git a/util.c b/util.c
 diff --git a/xattrs.c b/xattrs.c
 --- a/xattrs.c
 +++ b/xattrs.c
-@@ -972,7 +981,7 @@ int set_stat_xattr(const char *fname, struct file_struct *file, mode_t new_mode)
+@@ -281,6 +281,10 @@ int get_xattr(const char *fname, stat_x *sxp)
+ {
+       sxp->xattr = new(item_list);
+       *sxp->xattr = empty_xattr;
++
++      if (IS_SPECIAL(sxp->st.st_mode) || IS_DEVICE(sxp->st.st_mode))
++              return 0;
++
+       if (rsync_xal_get(fname, sxp->xattr) < 0) {
+               free_xattr(sxp);
+               return -1;
+@@ -861,6 +865,11 @@ int set_xattr(const char *fname, const struct file_struct *file,
+               return -1;
+       }
++      if (IS_SPECIAL(sxp->st.st_mode) || IS_DEVICE(sxp->st.st_mode)) {
++              errno = ENOTSUP;
++              return -1;
++      }
++
+       ndx = F_XATTR(file);
+       return rsync_xal_set(fname, lst + ndx, fnamecmp, sxp);
+ }
+@@ -977,7 +986,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 dbbe557..903ddc4 100644 (file)
@@ -55,7 +55,7 @@ diff --git a/flist.c b/flist.c
  extern int ignore_errors;
  extern int numeric_ids;
  extern int recurse;
-@@ -2700,6 +2701,7 @@ int f_name_cmp(const struct file_struct *f1, const struct file_struct *f2)
+@@ -2718,6 +2719,7 @@ int f_name_cmp(const struct file_struct *f1, const struct file_struct *f2)
  {
        int dif;
        const uchar *c1, *c2;
@@ -63,7 +63,7 @@ diff --git a/flist.c b/flist.c
        enum fnc_state state1, state2;
        enum fnc_type type1, type2;
        enum fnc_type t_path = protocol_version >= 29 ? t_PATH : t_ITEM;
-@@ -2810,7 +2812,15 @@ int f_name_cmp(const struct file_struct *f1, const struct file_struct *f2)
+@@ -2828,7 +2830,15 @@ int f_name_cmp(const struct file_struct *f1, const struct file_struct *f2)
                        if (type1 != type2)
                                return type1 == t_PATH ? 1 : -1;
                }
index 9b511db..9460d71 100644 (file)
@@ -43,7 +43,7 @@ diff --git a/flist.c b/flist.c
 +      if ((always_checksum || link_by_hash_dir) && S_ISREG(mode))
                extra_len += SUM_EXTRA_CNT * EXTRA_LEN;
  
-       if (file_length > 0xFFFFFFFFu && S_ISREG(mode))
+ #if SIZEOF_INT64 >= 8
 diff --git a/hashlink.c b/hashlink.c
 new file mode 100644
 --- /dev/null
@@ -540,7 +540,7 @@ diff --git a/rsync.c b/rsync.c
  extern struct file_list *cur_flist, *first_flist, *dir_flist;
  extern struct chmod_mode_struct *daemon_chmod_modes;
  #ifdef ICONV_OPTION
-@@ -574,8 +575,15 @@ int finish_transfer(const char *fname, const char *fnametmp,
+@@ -575,8 +576,15 @@ int finish_transfer(const char *fname, const char *fnametmp,
        /* move tmp file over real file */
        if (verbose > 2)
                rprintf(FINFO, "renaming %s to %s\n", fnametmp, fname);
@@ -561,7 +561,7 @@ diff --git a/rsync.c b/rsync.c
 diff --git a/rsync.h b/rsync.h
 --- a/rsync.h
 +++ b/rsync.h
-@@ -824,6 +824,14 @@ struct stats {
+@@ -825,6 +825,14 @@ struct stats {
        int num_transferred_files;
  };
  
index 98830c6..1eac37f 100644 (file)
@@ -9,7 +9,7 @@ compute them.
 diff --git a/log.c b/log.c
 --- a/log.c
 +++ b/log.c
-@@ -57,6 +57,9 @@ extern char curr_dir[];
+@@ -58,6 +58,9 @@ extern char curr_dir[];
  extern char *module_dir;
  extern unsigned int module_dirlen;
  
@@ -19,7 +19,7 @@ diff --git a/log.c b/log.c
  static int log_initialised;
  static int logfile_was_closed;
  static FILE *logfile_fp;
-@@ -622,6 +625,19 @@ static void log_formatted(enum logcode code, const char *format, const char *op,
+@@ -628,6 +631,19 @@ static void log_formatted(enum logcode code, const char *format, const char *op,
                        snprintf(buf2, sizeof buf2, fmt, (double)b);
                        n = buf2;
                        break;
index 43c4939..e5a2472 100644 (file)
@@ -41,7 +41,7 @@ diff --git a/generator.c b/generator.c
                        iflags |= ITEM_REPORT_GROUP;
  #ifdef SUPPORT_ACLS
                if (preserve_acls && !S_ISLNK(file->mode)) {
-@@ -1422,7 +1425,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1434,7 +1437,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                real_sx = sx;
                if (file->flags & FLAG_DIR_CREATED)
                        statret = -1;
index ed673be..0a1bafb 100644 (file)
@@ -59,8 +59,8 @@ diff --git a/cleanup.c b/cleanup.c
 +#endif
  extern int keep_partial;
  extern int got_xfer_error;
- extern int progress_is_active;
-@@ -125,6 +128,14 @@ NORETURN void _exit_cleanup(int code, const char *file, int line)
+ extern char *partial_dir;
+@@ -121,6 +124,14 @@ NORETURN void _exit_cleanup(int code, const char *file, int line)
                                code, file, line);
                }
  
@@ -435,7 +435,7 @@ diff --git a/rsync.h b/rsync.h
  
  #define SYMLINK_PREFIX "/rsyncd-munged/"
  #define SYMLINK_PREFIX_LEN ((int)sizeof SYMLINK_PREFIX - 1)
-@@ -543,6 +544,11 @@ typedef unsigned int size_t;
+@@ -544,6 +545,11 @@ typedef unsigned int size_t;
  # define SIZEOF_INT64 SIZEOF_OFF_T
  #endif
  
index ae870c2..fa3ecbc 100644 (file)
@@ -203,7 +203,7 @@ diff --git a/receiver.c b/receiver.c
 diff --git a/rsync.h b/rsync.h
 --- a/rsync.h
 +++ b/rsync.h
-@@ -608,6 +608,13 @@ struct ht_int64_node {
+@@ -609,6 +609,13 @@ struct ht_int64_node {
  #define ACLS_NEED_MASK 1
  #endif
  
index 5aa0c39..95a4b09 100644 (file)
@@ -25,7 +25,7 @@ diff --git a/flist.c b/flist.c
  extern struct stats stats;
  extern char *filesfrom_host;
  
-@@ -1557,6 +1558,9 @@ static void send_directory(int f, struct file_list *flist, char *fbuf, int len,
+@@ -1572,6 +1573,9 @@ static void send_directory(int f, struct file_list *flist, char *fbuf, int len,
                }
  
                send_file_name(f, flist, fbuf, NULL, flags, filter_level);
index 6a7e227..c73996d 100644 (file)
--- a/slp.diff
+++ b/slp.diff
@@ -126,7 +126,7 @@ diff --git a/loadparm.c b/loadparm.c
 diff --git a/main.c b/main.c
 --- a/main.c
 +++ b/main.c
-@@ -1120,6 +1120,18 @@ static int start_client(int argc, char *argv[])
+@@ -1121,6 +1121,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);
@@ -180,7 +180,7 @@ diff --git a/options.c b/options.c
 diff --git a/rsync.h b/rsync.h
 --- a/rsync.h
 +++ b/rsync.h
-@@ -191,6 +191,10 @@
+@@ -190,6 +190,10 @@
  #define SIGNIFICANT_ITEM_FLAGS (~(\
        ITEM_BASIS_TYPE_FOLLOWS | ITEM_XNAME_FOLLOWS | ITEM_LOCAL_CHANGE))
  
index 9fea688..588d9b0 100644 (file)
@@ -41,7 +41,7 @@ diff --git a/generator.c b/generator.c
  extern int size_only;
  extern OFF_T max_size;
  extern OFF_T min_size;
-@@ -711,7 +712,7 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
+@@ -714,7 +715,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)
  {
@@ -314,7 +314,7 @@ diff --git a/receiver.c b/receiver.c
 diff --git a/rsync.h b/rsync.h
 --- a/rsync.h
 +++ b/rsync.h
-@@ -135,6 +135,7 @@
+@@ -134,6 +134,7 @@
  #define IOERR_DEL_LIMIT (1<<2)
  
  #define MAX_ARGS 1000
index 3be1306..e23bb5e 100644 (file)
@@ -36,7 +36,7 @@ diff --git a/flist.c b/flist.c
                                gid = match_gid(gid, &gid_flags);
                }
        }
-@@ -2170,8 +2171,13 @@ struct file_list *recv_file_list(int f)
+@@ -2188,8 +2189,13 @@ struct file_list *recv_file_list(int f)
        int dstart, flags;
        int64 start_read;
  
index 4e5cf6c..cf0eab1 100644 (file)
@@ -119,7 +119,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;
-@@ -512,6 +523,9 @@ void send_xattr_request(const char *fname, struct file_struct *file, int f_out)
+@@ -514,6 +525,9 @@ void send_xattr_request(const char *fname, struct file_struct *file, int f_out)
        int cnt, prior_req = 0;
        rsync_xa *rxa;
  
@@ -129,7 +129,7 @@ diff --git a/xattrs.c b/xattrs.c
        lst += F_XATTR(file);
        for (rxa = lst->items, cnt = lst->count; cnt--; rxa++) {
                if (rxa->datum_len <= MAX_FULL_DATUM)
-@@ -566,6 +580,9 @@ int recv_xattr_request(struct file_struct *file, int f_in)
+@@ -570,6 +584,9 @@ int recv_xattr_request(struct file_struct *file, int f_in)
        rsync_xa *rxa;
        int rel_pos, cnt, num, got_xattr_data = 0;
  
@@ -139,7 +139,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_STREAMIO);
-@@ -627,7 +644,22 @@ void receive_xattr(struct file_struct *file, int f)
+@@ -632,7 +649,22 @@ void receive_xattr(struct file_struct *file, int f)
  #else
        int need_sort = 1;
  #endif
@@ -163,7 +163,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"
-@@ -640,7 +672,7 @@ void receive_xattr(struct file_struct *file, int f)
+@@ -645,7 +677,7 @@ void receive_xattr(struct file_struct *file, int f)
                return;
        }
        
@@ -172,7 +172,7 @@ diff --git a/xattrs.c b/xattrs.c
                (void)EXPAND_ITEM_LIST(&temp_xattr, rsync_xa, count);
                temp_xattr.count = 0;
        }
-@@ -648,9 +680,10 @@ void receive_xattr(struct file_struct *file, int f)
+@@ -653,9 +685,10 @@ void receive_xattr(struct file_struct *file, int f)
        for (num = 1; num <= count; num++) {
                char *ptr, *name;
                rsync_xa *rxa;