The patches for 3.0.3pre2.
authorWayne Davison <wayned@samba.org>
Sat, 17 May 2008 17:44:56 +0000 (10:44 -0700)
committerWayne Davison <wayned@samba.org>
Sat, 17 May 2008 17:44:56 +0000 (10:44 -0700)
26 files changed:
atimes.diff
backup-dir-dels.diff
checksum-updating.diff
checksum-xattr.diff
crtimes.diff
db.diff
detect-renamed-lax.diff
detect-renamed.diff
downdate.diff
drop-cache.diff
fileflags.diff
fsync.diff
ignore-case.diff
link-by-hash.diff
log-checksum.diff
nameconverter.diff
omit-dir-changes.diff
preallocate.diff
remote-option.diff
source-backup.diff
source-filter_dest-filter.diff
sparse-block.diff
time-limit.diff
transliterate.diff
usermap.diff
xattrs.diff

index c65f3f7..f954864 100644 (file)
@@ -177,7 +177,7 @@ diff --git a/generator.c b/generator.c
                        f_name(f, NULL));
        }
  }
-@@ -2016,7 +2025,7 @@ static void touch_up_dirs(struct file_list *flist, int ndx)
+@@ -2029,7 +2038,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)
@@ -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);
-@@ -566,7 +585,7 @@ int finish_transfer(const char *fname, const char *fnametmp,
+@@ -569,7 +588,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)
-@@ -593,7 +612,7 @@ int finish_transfer(const char *fname, const char *fnametmp,
+@@ -596,7 +615,7 @@ int finish_transfer(const char *fname, const char *fnametmp,
  
    do_set_file_attrs:
        set_file_attrs(fnametmp, file, NULL, fnamecmp,
@@ -386,7 +386,7 @@ diff --git a/rsync.yo b/rsync.yo
       --super                 receiver attempts super-user activities
       --fake-super            store/recover privileged attrs using xattrs
   -S, --sparse                handle sparse files efficiently
-@@ -994,6 +995,12 @@ it is preserving modification times (see bf(--times)).  If NFS is sharing
+@@ -1000,6 +1001,12 @@ it is preserving modification times (see bf(--times)).  If NFS is sharing
  the directories on the receiving side, it is a good idea to use bf(-O).
  This option is inferred if you use bf(--backup) without bf(--backup-dir).
  
@@ -399,7 +399,7 @@ diff --git a/rsync.yo b/rsync.yo
  dit(bf(--super)) This tells the receiving side to attempt super-user
  activities even if the receiving rsync wasn't run by the super-user.  These
  activities include: preserving users via the bf(--owner) option, preserving
-@@ -1701,7 +1708,10 @@ quote(itemization(
+@@ -1707,7 +1714,10 @@ quote(itemization(
    sender's value (requires bf(--owner) and super-user privileges).
    it() A bf(g) means the group is different and is being updated to the
    sender's value (requires bf(--group) and the authority to set the group).
@@ -559,7 +559,7 @@ diff --git a/tls.c b/tls.c
 diff --git a/util.c b/util.c
 --- a/util.c
 +++ b/util.c
-@@ -122,7 +122,7 @@ NORETURN void overflow_exit(const char *str)
+@@ -123,7 +123,7 @@ NORETURN void overflow_exit(const char *str)
        exit_cleanup(RERR_MALLOC);
  }
  
@@ -568,7 +568,7 @@ diff --git a/util.c b/util.c
  {
  #if !defined HAVE_LUTIMES || !defined HAVE_UTIMES
        if (S_ISLNK(mode))
-@@ -130,9 +130,13 @@ int set_modtime(const char *fname, time_t modtime, mode_t mode)
+@@ -131,9 +131,13 @@ int set_modtime(const char *fname, time_t modtime, mode_t mode)
  #endif
  
        if (verbose > 2) {
@@ -584,7 +584,7 @@ diff --git a/util.c b/util.c
        }
  
        if (dry_run)
-@@ -141,7 +145,7 @@ int set_modtime(const char *fname, time_t modtime, mode_t mode)
+@@ -142,7 +146,7 @@ int set_modtime(const char *fname, time_t modtime, mode_t mode)
        {
  #ifdef HAVE_UTIMES
                struct timeval t[2];
@@ -593,7 +593,7 @@ diff --git a/util.c b/util.c
                t[0].tv_usec = 0;
                t[1].tv_sec = modtime;
                t[1].tv_usec = 0;
-@@ -155,12 +159,12 @@ int set_modtime(const char *fname, time_t modtime, mode_t mode)
+@@ -156,12 +160,12 @@ int set_modtime(const char *fname, time_t modtime, mode_t mode)
                return utimes(fname, t);
  #elif defined HAVE_STRUCT_UTIMBUF
                struct utimbuf tbuf;
index 82b6adc..77b84ce 100644 (file)
@@ -79,7 +79,7 @@ diff --git a/backup.c b/backup.c
        stat_x sx;
  
        while (*fullpath == '.' && fullpath[1] == '/') {
-@@ -211,7 +235,8 @@ static int keep_backup(const char *fname)
+@@ -221,7 +245,8 @@ static int keep_backup(const char *fname)
        if (!(file = make_file(fname, NULL, NULL, 0, NO_FILTERS)))
                return 1; /* the file could have disappeared */
  
@@ -89,7 +89,7 @@ diff --git a/backup.c b/backup.c
                unmake_file(file);
                return 0;
        }
-@@ -322,7 +347,17 @@ static int keep_backup(const char *fname)
+@@ -358,7 +383,17 @@ static int keep_backup(const char *fname)
  /* main backup switch routine */
  int make_backup(const char *fname)
  {
index afcf00a..dabcccd 100644 (file)
@@ -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
-@@ -2204,6 +2209,7 @@ void generate_files(int f_out, const char *local_name)
+@@ -2217,6 +2222,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];
-@@ -2284,6 +2290,9 @@ void generate_files(int f_out, const char *local_name)
+@@ -2297,6 +2303,9 @@ void generate_files(int f_out, const char *local_name)
                        wait_for_receiver();
        }
  
index f571d7f..bab3e0d 100644 (file)
@@ -191,7 +191,7 @@ diff --git a/xattrs.c b/xattrs.c
                                continue;
                }
  
-@@ -844,6 +852,39 @@ int del_def_xattr_acl(const char *fname)
+@@ -886,6 +894,39 @@ int del_def_xattr_acl(const char *fname)
  }
  #endif
  
index e625c6c..2fa2c15 100644 (file)
@@ -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)
-@@ -615,7 +623,7 @@ int finish_transfer(const char *fname, const char *fnametmp,
+@@ -618,7 +626,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)
-@@ -646,7 +654,7 @@ int finish_transfer(const char *fname, const char *fnametmp,
+@@ -649,7 +657,7 @@ int finish_transfer(const char *fname, const char *fnametmp,
  
    do_set_file_attrs:
        set_file_attrs(fnametmp, file, NULL, fnamecmp,
@@ -390,7 +390,7 @@ diff --git a/rsync.yo b/rsync.yo
       --super                 receiver attempts super-user activities
       --fake-super            store/recover privileged attrs using xattrs
   -S, --sparse                handle sparse files efficiently
-@@ -1022,6 +1023,9 @@ it is preserving modification times (see bf(--times)).  If NFS is sharing
+@@ -1028,6 +1029,9 @@ it is preserving modification times (see bf(--times)).  If NFS is sharing
  the directories on the receiving side, it is a good idea to use bf(-O).
  This option is inferred if you use bf(--backup) without bf(--backup-dir).
  
@@ -400,7 +400,7 @@ diff --git a/rsync.yo b/rsync.yo
  dit(bf(--super)) This tells the receiving side to attempt super-user
  activities even if the receiving rsync wasn't run by the super-user.  These
  activities include: preserving users via the bf(--owner) option, preserving
-@@ -1674,7 +1678,7 @@ with older versions of rsync, but that also turns on the output of other
+@@ -1680,7 +1684,7 @@ with older versions of rsync, but that also turns on the output of other
  verbose messages).
  
  The "%i" escape has a cryptic output that is 11 letters long.  The general
@@ -409,7 +409,7 @@ diff --git a/rsync.yo b/rsync.yo
  type of update being done, bf(X) is replaced by the file-type, and the
  other letters represent attributes that may be output if they are being
  modified.
-@@ -1733,6 +1737,8 @@ quote(itemization(
+@@ -1739,6 +1743,8 @@ quote(itemization(
    it() The bf(f) means that the fileflags information changed.
    it() The bf(a) means that the ACL information changed.
    it() The bf(x) means that the extended attribute information changed.
diff --git a/db.diff b/db.diff
index a4b5869..2b74384 100644 (file)
--- a/db.diff
+++ b/db.diff
@@ -819,7 +819,7 @@ diff --git a/generator.c b/generator.c
                return memcmp(sum, F_SUM(file), checksum_len) == 0;
        }
  
-@@ -2161,6 +2163,9 @@ void generate_files(int f_out, const char *local_name)
+@@ -2174,6 +2176,9 @@ void generate_files(int f_out, const char *local_name)
                        : "enabled");
        }
  
index e8ea5a8..d1ccfbc 100644 (file)
@@ -108,7 +108,7 @@ diff --git a/rsync.yo b/rsync.yo
       --compare-dest=DIR      also compare received files relative to DIR
       --copy-dest=DIR         ... and include copies of unchanged files
       --link-dest=DIR         hardlink to files in DIR when unchanged
-@@ -1490,6 +1492,17 @@ the bf(--partial-dir) option, that directory will be used instead.  These
+@@ -1496,6 +1498,17 @@ the bf(--partial-dir) option, that directory will be used instead.  These
  potential alternate-basis files will be removed as the transfer progresses.
  This option conflicts with bf(--inplace) and bf(--append).
  
index 9bff407..1bbacb4 100644 (file)
@@ -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;
-@@ -2142,6 +2300,12 @@ void generate_files(int f_out, const char *local_name)
+@@ -2155,6 +2313,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) {
-@@ -2152,7 +2316,7 @@ void generate_files(int f_out, const char *local_name)
+@@ -2165,7 +2329,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",
-@@ -2191,7 +2355,7 @@ void generate_files(int f_out, const char *local_name)
+@@ -2204,7 +2368,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));
                        }
-@@ -2235,7 +2399,21 @@ void generate_files(int f_out, const char *local_name)
+@@ -2248,7 +2412,21 @@ void generate_files(int f_out, const char *local_name)
        } while ((cur_flist = cur_flist->next) != NULL);
  
        if (delete_during)
@@ -616,7 +616,7 @@ diff --git a/rsync.yo b/rsync.yo
       --compare-dest=DIR      also compare received files relative to DIR
       --copy-dest=DIR         ... and include copies of unchanged files
       --link-dest=DIR         hardlink to files in DIR when unchanged
-@@ -1474,6 +1475,21 @@ Note that the use of the bf(--delete) option might get rid of any potential
+@@ -1480,6 +1481,21 @@ Note that the use of the bf(--delete) option might get rid of any potential
  fuzzy-match files, so either use bf(--delete-after) or specify some
  filename exclusions if you need to prevent this.
  
@@ -641,7 +641,7 @@ diff --git a/rsync.yo b/rsync.yo
 diff --git a/util.c b/util.c
 --- a/util.c
 +++ b/util.c
-@@ -1096,6 +1096,32 @@ int handle_partial_dir(const char *fname, int create)
+@@ -1125,6 +1125,32 @@ int handle_partial_dir(const char *fname, int create)
        return 1;
  }
  
index 276c98e..eafed0e 100644 (file)
@@ -32,7 +32,7 @@ diff --git a/generator.c b/generator.c
        fnamecmp = fname;
        fnamecmp_type = FNAMECMP_FNAME;
  
-@@ -2052,6 +2060,7 @@ void check_for_finished_files(int itemizing, enum logcode code, int check_redo)
+@@ -2065,6 +2073,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;
-@@ -2077,6 +2086,7 @@ void check_for_finished_files(int itemizing, enum logcode code, int check_redo)
+@@ -2090,6 +2099,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 52b53c0..c222427 100644 (file)
@@ -204,7 +204,7 @@ diff --git a/rsync.yo b/rsync.yo
   -n, --dry-run               perform a trial run with no changes made
   -W, --whole-file            copy files whole (w/o delta-xfer algorithm)
   -x, --one-file-system       don't cross filesystem boundaries
-@@ -1043,6 +1044,10 @@ NOTE: Don't use this option when the destination is a Solaris "tmpfs"
+@@ -1049,6 +1050,10 @@ NOTE: Don't use this option when the destination is a Solaris "tmpfs"
  filesystem. It doesn't seem to handle seeks over null regions
  correctly and ends up corrupting the files.
  
@@ -251,7 +251,7 @@ diff --git a/util.c b/util.c
  extern int modify_window;
  extern int relative_paths;
  extern int human_readable;
-@@ -41,6 +42,131 @@ char curr_dir[MAXPATHLEN];
+@@ -42,6 +43,131 @@ char curr_dir[MAXPATHLEN];
  unsigned int curr_dir_len;
  int curr_dir_depth; /* This is only set for a sanitizing daemon. */
  
index cdc34a9..f3acbf4 100644 (file)
@@ -278,7 +278,7 @@ diff --git a/generator.c b/generator.c
  
  #ifdef SUPPORT_HARD_LINKS
        if (preserve_hard_links && F_HLINK_NOT_FIRST(file)
-@@ -2011,13 +2047,17 @@ static void touch_up_dirs(struct file_list *flist, int ndx)
+@@ -2024,13 +2060,17 @@ static void touch_up_dirs(struct file_list *flist, int ndx)
                        continue;
                fname = f_name(file, NULL);
                if (!(file->mode & S_IWUSR))
@@ -534,7 +534,7 @@ diff --git a/rsync.c b/rsync.c
        if (verbose > 1 && flags & ATTRS_REPORT) {
                if (updated)
                        rprintf(FCLIENT, "%s\n", fname);
-@@ -566,7 +614,8 @@ int finish_transfer(const char *fname, const char *fnametmp,
+@@ -569,7 +617,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,
@@ -544,7 +544,7 @@ diff --git a/rsync.c b/rsync.c
  
        /* move tmp file over real file */
        if (verbose > 2)
-@@ -585,6 +634,10 @@ int finish_transfer(const char *fname, const char *fnametmp,
+@@ -588,6 +637,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. */
@@ -664,7 +664,7 @@ diff --git a/rsync.yo b/rsync.yo
  
  dit(--no-OPTION) You may turn off one or more implied options by prefixing
  the option name with "no-".  Not all options may be prefixed with a "no-":
-@@ -792,7 +797,7 @@ they would be using bf(--copy-links).
+@@ -798,7 +803,7 @@ they would be using bf(--copy-links).
  Without this option, if the sending side has replaced a directory with a
  symlink to a directory, the receiving side will delete anything that is in
  the way of the new symlink, including a directory hierarchy (as long as
@@ -673,7 +673,7 @@ diff --git a/rsync.yo b/rsync.yo
  
  See also bf(--keep-dirlinks) for an analogous option for the receiving
  side.
-@@ -929,6 +934,29 @@ super-user copies all namespaces except system.*.  A normal user only copies
+@@ -935,6 +940,29 @@ super-user copies all namespaces except system.*.  A normal user only copies
  the user.* namespace.  To be able to backup and restore non-user namespaces as
  a normal user, see the bf(--fake-super) option.
  
@@ -703,7 +703,7 @@ diff --git a/rsync.yo b/rsync.yo
  dit(bf(--chmod)) This option tells rsync to apply one or more
  comma-separated "chmod" strings to the permission of the files in the
  transfer.  The resulting value is treated as though it was the permissions
-@@ -1184,12 +1212,13 @@ See bf(--delete) (which is implied) for more details on file-deletion.
+@@ -1190,12 +1218,13 @@ See bf(--delete) (which is implied) for more details on file-deletion.
  dit(bf(--ignore-errors)) Tells bf(--delete) to go ahead and delete files
  even when there are I/O errors.
  
@@ -720,7 +720,7 @@ diff --git a/rsync.yo b/rsync.yo
  bf(--recursive) option was also enabled.
  
  dit(bf(--max-delete=NUM)) This tells rsync not to delete more than NUM
-@@ -1645,7 +1674,7 @@ with older versions of rsync, but that also turns on the output of other
+@@ -1651,7 +1680,7 @@ with older versions of rsync, but that also turns on the output of other
  verbose messages).
  
  The "%i" escape has a cryptic output that is 11 letters long.  The general
@@ -729,7 +729,7 @@ diff --git a/rsync.yo b/rsync.yo
  type of update being done, bf(X) is replaced by the file-type, and the
  other letters represent attributes that may be output if they are being
  modified.
-@@ -1701,7 +1730,7 @@ quote(itemization(
+@@ -1707,7 +1736,7 @@ quote(itemization(
    sender's value (requires bf(--owner) and super-user privileges).
    it() A bf(g) means the group is different and is being updated to the
    sender's value (requires bf(--group) and the authority to set the group).
@@ -940,10 +940,10 @@ diff --git a/t_stub.c b/t_stub.c
  int human_readable = 0;
  int module_dirlen = 0;
 +int force_change = 0;
+ int preserve_xattrs = 0;
  mode_t orig_umask = 002;
  char *partial_dir;
- char *module_dir;
-@@ -83,3 +84,23 @@ struct filter_list_struct daemon_filter_list;
+@@ -89,3 +90,23 @@ struct filter_list_struct daemon_filter_list;
  {
        return "tester";
  }
@@ -975,10 +975,10 @@ diff --git a/util.c b/util.c
  extern int relative_paths;
  extern int human_readable;
 +extern int force_change;
+ extern int preserve_xattrs;
  extern char *module_dir;
  extern unsigned int module_dirlen;
- extern mode_t orig_umask;
-@@ -122,7 +123,7 @@ NORETURN void overflow_exit(const char *str)
+@@ -123,7 +124,7 @@ NORETURN void overflow_exit(const char *str)
        exit_cleanup(RERR_MALLOC);
  }
  
@@ -987,7 +987,7 @@ diff --git a/util.c b/util.c
  {
  #if !defined HAVE_LUTIMES || !defined HAVE_UTIMES
        if (S_ISLNK(mode))
-@@ -139,6 +140,7 @@ int set_modtime(const char *fname, time_t modtime, mode_t mode)
+@@ -140,6 +141,7 @@ int set_modtime(const char *fname, time_t modtime, mode_t mode)
                return 0;
  
        {
@@ -995,7 +995,7 @@ diff --git a/util.c b/util.c
  #ifdef HAVE_UTIMES
                struct timeval t[2];
                t[0].tv_sec = time(NULL);
-@@ -152,20 +154,39 @@ int set_modtime(const char *fname, time_t modtime, mode_t mode)
+@@ -153,20 +155,39 @@ int set_modtime(const char *fname, time_t modtime, mode_t mode)
                        return 0;
                }
  # endif
@@ -1052,7 +1052,7 @@ diff --git a/xattrs.c b/xattrs.c
        if (rsync_xal_get(fname, sxp->xattr) < 0) {
                free_xattr(sxp);
                return -1;
-@@ -814,6 +818,11 @@ int set_xattr(const char *fname, const struct file_struct *file,
+@@ -856,6 +860,11 @@ int set_xattr(const char *fname, const struct file_struct *file,
                return -1;
        }
  
@@ -1064,7 +1064,7 @@ diff --git a/xattrs.c b/xattrs.c
        ndx = F_XATTR(file);
        return rsync_xal_set(fname, lst + ndx, fnamecmp, sxp);
  }
-@@ -930,7 +939,7 @@ int set_stat_xattr(const char *fname, struct file_struct *file, mode_t new_mode)
+@@ -972,7 +981,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 e0cdbbf..7ac11f5 100644 (file)
@@ -90,7 +90,7 @@ diff --git a/util.c b/util.c
  extern int modify_window;
  extern int relative_paths;
  extern int human_readable;
-@@ -315,6 +316,13 @@ int copy_file(const char *source, const char *dest, int ofd,
+@@ -334,6 +335,13 @@ int copy_file(const char *source, const char *dest, int ofd,
                        full_fname(source));
        }
  
@@ -102,5 +102,5 @@ diff --git a/util.c b/util.c
 +      }
 +
        if (close(ofd) < 0) {
+               int save_errno = errno;
                rsyserr(FERROR_XFER, errno, "close failed on %s",
-                       full_fname(dest));
index e7a284f..dbbe557 100644 (file)
@@ -257,7 +257,7 @@ diff --git a/rsync.yo b/rsync.yo
       --address=ADDRESS       bind address for outgoing socket to daemon
       --port=PORT             specify double-colon alternate port number
       --sockopts=OPTIONS      specify custom TCP options
-@@ -1432,6 +1433,10 @@ If you use this option with bf(--iconv), the args will also be translated
+@@ -1438,6 +1439,10 @@ If you use this option with bf(--iconv), the args will also be translated
  from the local to the remote character-set.  The translation happens before
  wild-cards are expanded.  See also the bf(--files-from) option.
  
index 014b23e..9b511db 100644 (file)
@@ -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
-@@ -571,8 +572,15 @@ int finish_transfer(const char *fname, const char *fnametmp,
+@@ -574,8 +575,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);
index 78f28f7..98830c6 100644 (file)
@@ -155,7 +155,7 @@ diff --git a/receiver.c b/receiver.c
 diff --git a/rsync.yo b/rsync.yo
 --- a/rsync.yo
 +++ b/rsync.yo
-@@ -2087,7 +2087,7 @@ by the server and defaults to the current code(time()).  This option
+@@ -2093,7 +2093,7 @@ by the server and defaults to the current code(time()).  This option
  is used to set a specific checksum seed, which is useful for
  applications that want repeatable block and file checksums, or
  in the case where the user wants a more random checksum seed.
index aae1c89..56776c1 100644 (file)
@@ -268,7 +268,7 @@ new file mode 100755
 diff --git a/t_stub.c b/t_stub.c
 --- a/t_stub.c
 +++ b/t_stub.c
-@@ -29,6 +29,7 @@ int module_dirlen = 0;
+@@ -30,6 +30,7 @@ int preserve_xattrs = 0;
  mode_t orig_umask = 002;
  char *partial_dir;
  char *module_dir;
@@ -276,7 +276,7 @@ diff --git a/t_stub.c b/t_stub.c
  struct filter_list_struct daemon_filter_list;
  
   void rprintf(UNUSED(enum logcode code), const char *format, ...)
-@@ -69,6 +70,11 @@ struct filter_list_struct daemon_filter_list;
+@@ -75,6 +76,11 @@ struct filter_list_struct daemon_filter_list;
        return -1;
  }
  
@@ -332,9 +332,9 @@ diff --git a/uidlist.c b/uidlist.c
 diff --git a/util.c b/util.c
 --- a/util.c
 +++ b/util.c
-@@ -30,9 +30,10 @@ extern int modify_window;
- extern int relative_paths;
+@@ -31,9 +31,10 @@ extern int relative_paths;
  extern int human_readable;
+ extern int preserve_xattrs;
  extern char *module_dir;
 -extern unsigned int module_dirlen;
  extern mode_t orig_umask;
@@ -344,7 +344,7 @@ diff --git a/util.c b/util.c
  extern struct filter_list_struct daemon_filter_list;
  
  int sanitize_paths = 0;
-@@ -468,24 +469,44 @@ void kill_all(int sig)
+@@ -497,24 +498,44 @@ void kill_all(int sig)
  /** Turn a user name into a uid */
  int name_to_uid(const char *name, uid_t *uid_p)
  {
index ca49a51..43c4939 100644 (file)
@@ -131,7 +131,7 @@ diff --git a/rsync.yo b/rsync.yo
       --super                 receiver attempts super-user activities
       --fake-super            store/recover privileged attrs using xattrs
   -S, --sparse                handle sparse files efficiently
-@@ -994,6 +995,10 @@ it is preserving modification times (see bf(--times)).  If NFS is sharing
+@@ -1000,6 +1001,10 @@ it is preserving modification times (see bf(--times)).  If NFS is sharing
  the directories on the receiving side, it is a good idea to use bf(-O).
  This option is inferred if you use bf(--backup) without bf(--backup-dir).
  
index a2b3868..ae870c2 100644 (file)
@@ -228,7 +228,7 @@ diff --git a/rsync.yo b/rsync.yo
   -n, --dry-run               perform a trial run with no changes made
   -W, --whole-file            copy files whole (w/o delta-xfer algorithm)
   -x, --one-file-system       don't cross filesystem boundaries
-@@ -1043,6 +1044,18 @@ NOTE: Don't use this option when the destination is a Solaris "tmpfs"
+@@ -1049,6 +1050,18 @@ NOTE: Don't use this option when the destination is a Solaris "tmpfs"
  filesystem. It doesn't seem to handle seeks over null regions
  correctly and ends up corrupting the files.
  
@@ -305,7 +305,7 @@ diff --git a/util.c b/util.c
  extern int module_id;
  extern int modify_window;
  extern int relative_paths;
-@@ -273,6 +274,10 @@ int copy_file(const char *source, const char *dest, int ofd,
+@@ -276,6 +277,10 @@ int copy_file(const char *source, const char *dest, int ofd,
        int ifd;
        char buf[1024 * 8];
        int len;   /* Number of bytes read into `buf'. */
@@ -315,8 +315,8 @@ diff --git a/util.c b/util.c
 +#endif
  
        if ((ifd = do_open(source, O_RDONLY, 0)) < 0) {
-               rsyserr(FERROR_XFER, errno, "open %s", full_fname(source));
-@@ -294,7 +299,27 @@ int copy_file(const char *source, const char *dest, int ofd,
+               int save_errno = errno;
+@@ -309,7 +314,27 @@ int copy_file(const char *source, const char *dest, int ofd,
                }
        }
  
@@ -342,9 +342,9 @@ diff --git a/util.c b/util.c
 +              offset += len;
 +#endif
                if (full_write(ofd, buf, len) < 0) {
+                       int save_errno = errno;
                        rsyserr(FERROR_XFER, errno, "write %s", full_fname(dest));
-                       close(ifd);
-@@ -315,6 +340,16 @@ int copy_file(const char *source, const char *dest, int ofd,
+@@ -334,6 +359,16 @@ int copy_file(const char *source, const char *dest, int ofd,
                        full_fname(source));
        }
  
@@ -359,5 +359,5 @@ diff --git a/util.c b/util.c
 +#endif
 +
        if (close(ofd) < 0) {
+               int save_errno = errno;
                rsyserr(FERROR_XFER, errno, "close failed on %s",
-                       full_fname(dest));
index 045d314..481361a 100644 (file)
@@ -141,7 +141,7 @@ diff --git a/rsync.yo b/rsync.yo
       --out-format=FORMAT     output updates using the specified FORMAT
       --log-file=FILE         log what we're doing to the specified FILE
       --log-file-format=FMT   log updates using the specified FMT
-@@ -1020,16 +1021,16 @@ This is a good way to backup data without using a super-user, and to store
+@@ -1026,16 +1027,16 @@ This is a good way to backup data without using a super-user, and to store
  ACLs from incompatible systems.
  
  The bf(--fake-super) option only affects the side where the option is used.
@@ -166,7 +166,7 @@ diff --git a/rsync.yo b/rsync.yo
  
  This option is overridden by both bf(--super) and bf(--no-super).
  
-@@ -1275,6 +1276,36 @@ machine for use with the bf(--relative) option.  For instance:
+@@ -1281,6 +1282,36 @@ machine for use with the bf(--relative) option.  For instance:
  
  quote(tt(    rsync -avR --rsync-path="cd /a/b && rsync" host:c/d /e/))
  
@@ -203,7 +203,7 @@ diff --git a/rsync.yo b/rsync.yo
  dit(bf(-C, --cvs-exclude)) This is a useful shorthand for excluding a
  broad range of files that you often don't want to transfer between
  systems. It uses a similar algorithm to CVS to determine if
-@@ -1746,7 +1777,7 @@ option if you wish to override this.
+@@ -1752,7 +1783,7 @@ option if you wish to override this.
  Here's a example command that requests the remote side to log what is
  happening:
  
index 367a816..ea5fbde 100644 (file)
@@ -56,7 +56,7 @@ diff --git a/rsync.yo b/rsync.yo
       --del                   an alias for --delete-during
       --delete                delete extraneous files from dest dirs
       --delete-before         receiver deletes before transfer (default)
-@@ -1105,6 +1106,14 @@ dit(bf(--remove-source-files)) This tells rsync to remove from the sending
+@@ -1111,6 +1112,14 @@ dit(bf(--remove-source-files)) This tells rsync to remove from the sending
  side the files (meaning non-directories) that are a part of the transfer
  and have been successfully duplicated on the receiving side.
  
index cfd5dbc..9fea688 100644 (file)
@@ -342,7 +342,7 @@ diff --git a/rsync.yo b/rsync.yo
       --protocol=NUM          force an older protocol version to be used
       --iconv=CONVERT_SPEC    request charset conversion of filenames
       --checksum-seed=NUM     set block/file checksum seed (advanced)
-@@ -2033,6 +2036,33 @@ file previously generated by bf(--write-batch).
+@@ -2039,6 +2042,33 @@ file previously generated by bf(--write-batch).
  If em(FILE) is bf(-), the batch data will be read from standard input.
  See the "BATCH MODE" section for details.
  
index ba5da97..12b5569 100644 (file)
@@ -89,7 +89,7 @@ diff --git a/rsync.yo b/rsync.yo
   -n, --dry-run               perform a trial run with no changes made
   -W, --whole-file            copy files whole (w/o delta-xfer algorithm)
   -x, --one-file-system       don't cross filesystem boundaries
-@@ -1043,6 +1044,15 @@ NOTE: Don't use this option when the destination is a Solaris "tmpfs"
+@@ -1049,6 +1050,15 @@ NOTE: Don't use this option when the destination is a Solaris "tmpfs"
  filesystem. It doesn't seem to handle seeks over null regions
  correctly and ends up corrupting the files.
  
index 0c76ec2..23a5769 100644 (file)
@@ -151,7 +151,7 @@ diff --git a/rsync.yo b/rsync.yo
       --write-batch=FILE      write a batched update to FILE
       --only-write-batch=FILE like --write-batch but w/o updating dest
       --read-batch=FILE       read a batched update from FILE
-@@ -2007,6 +2009,19 @@ transfer was too fast, it will wait before sending the next data block. The
+@@ -2013,6 +2015,19 @@ transfer was too fast, it will wait before sending the next data block. The
  result is an average transfer rate equaling the specified limit. A value
  of zero specifies no limit.
  
@@ -174,7 +174,7 @@ diff --git a/rsync.yo b/rsync.yo
 diff --git a/util.c b/util.c
 --- a/util.c
 +++ b/util.c
-@@ -122,6 +122,133 @@ NORETURN void overflow_exit(const char *str)
+@@ -123,6 +123,133 @@ NORETURN void overflow_exit(const char *str)
        exit_cleanup(RERR_MALLOC);
  }
  
index 3d2a803..f12cf5f 100644 (file)
@@ -145,7 +145,7 @@ diff --git a/rsync.yo b/rsync.yo
       --checksum-seed=NUM     set block/file checksum seed (advanced)
   -4, --ipv4                  prefer IPv4
   -6, --ipv6                  prefer IPv6
-@@ -2071,6 +2072,22 @@ daemon uses the charset specified in its "charset" configuration parameter
+@@ -2077,6 +2078,22 @@ daemon uses the charset specified in its "charset" configuration parameter
  regardless of the remote charset you actually pass.  Thus, you may feel free to
  specify just the local charset for a daemon transfer (e.g. bf(--iconv=utf8)).
  
index 123cd9d..3be1306 100644 (file)
@@ -112,7 +112,7 @@ diff --git a/rsync.yo b/rsync.yo
       --timeout=SECONDS       set I/O timeout in seconds
       --contimeout=SECONDS    set daemon connection timeout in seconds
   -I, --ignore-times          don't skip files that match size and time
-@@ -1602,6 +1604,46 @@ from the source system is used instead.  See also the comments on the
+@@ -1608,6 +1610,46 @@ from the source system is used instead.  See also the comments on the
  the chroot setting affects rsync's ability to look up the names of the
  users and groups and what you can do about it.
  
index 10fce12..4e5cf6c 100644 (file)
@@ -55,7 +55,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(checksum_seed);
-@@ -306,7 +308,7 @@ static int find_matching_xattr(item_list *xalp)
+@@ -348,7 +350,7 @@ static int find_matching_xattr(item_list *xalp)
                         || rxas1[j].datum_len != rxas2[j].datum_len
                         || strcmp(rxas1[j].name, rxas2[j].name))
                                break;
@@ -64,7 +64,7 @@ diff --git a/xattrs.c b/xattrs.c
                                if (memcmp(rxas1[j].datum + 1,
                                           rxas2[j].datum + 1,
                                           MAX_DIGEST_LEN) != 0)
-@@ -343,13 +345,22 @@ int send_xattr(stat_x *sxp, int f)
+@@ -385,13 +387,22 @@ int send_xattr(stat_x *sxp, int f)
  {
        int ndx = find_matching_xattr(sxp->xattr);
  
@@ -90,7 +90,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;
-@@ -368,8 +379,8 @@ int send_xattr(stat_x *sxp, int f)
+@@ -410,8 +421,8 @@ int send_xattr(stat_x *sxp, int f)
                                name_len += UPRE_LEN;
                        }
  #endif
@@ -101,7 +101,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);
-@@ -377,7 +388,7 @@ int send_xattr(stat_x *sxp, int f)
+@@ -419,7 +430,7 @@ int send_xattr(stat_x *sxp, int f)
                        }
  #endif
                        write_buf(f, name, name_len);
@@ -110,7 +110,7 @@ diff --git a/xattrs.c b/xattrs.c
                                write_buf(f, rxa->datum + 1, MAX_DIGEST_LEN);
                        else
                                write_buf(f, rxa->datum, rxa->datum_len);
-@@ -427,7 +438,7 @@ int xattr_diff(struct file_struct *file, stat_x *sxp, int find_all)
+@@ -469,7 +480,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;
@@ -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;
-@@ -470,6 +481,9 @@ void send_xattr_request(const char *fname, struct file_struct *file, int f_out)
+@@ -512,6 +523,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)
-@@ -524,6 +538,9 @@ int recv_xattr_request(struct file_struct *file, int f_in)
+@@ -566,6 +580,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);
-@@ -585,7 +602,22 @@ void receive_xattr(struct file_struct *file, int f)
+@@ -627,7 +644,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"
-@@ -598,7 +630,7 @@ void receive_xattr(struct file_struct *file, int f)
+@@ -640,7 +672,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;
        }
-@@ -606,9 +638,10 @@ void receive_xattr(struct file_struct *file, int f)
+@@ -648,9 +680,10 @@ void receive_xattr(struct file_struct *file, int f)
        for (num = 1; num <= count; num++) {
                char *ptr, *name;
                rsync_xa *rxa;