The patches for 3.0.4pre2.
authorWayne Davison <wayne@opencoder.net>
Sat, 2 Aug 2008 21:46:07 +0000 (14:46 -0700)
committerWayne Davison <wayne@opencoder.net>
Sat, 2 Aug 2008 21:46:07 +0000 (14:46 -0700)
37 files changed:
acls.diff
atimes.diff
backup-dir-dels.diff
catch_crash_signals.diff
checksum-reading.diff
checksum-updating.diff
checksum-xattr.diff
copy-devices.diff
crtimes.diff
date-only.diff
db.diff
detect-renamed-lax.diff
detect-renamed.diff
downdate.diff
dparam.diff
drop-cache.diff
fileflags.diff
fsync.diff
ignore-case.diff
link-by-hash.diff
log-checksum.diff
munge-links.diff
nameconverter.diff
omit-dir-changes.diff
openssl-support.diff
osx-xattr-nodev.diff
preallocate.diff
remote-option.diff
slow-down.diff
slp.diff
source-backup.diff
source-filter_dest-filter.diff
sparse-block.diff
time-limit.diff
transliterate.diff
usermap.diff
xattrs.diff

index 81d45fa..3cc4cb4 100644 (file)
--- a/acls.diff
+++ b/acls.diff
@@ -324,7 +324,7 @@ diff --git a/acls.c b/acls.c
 diff --git a/compat.c b/compat.c
 --- a/compat.c
 +++ b/compat.c
-@@ -187,13 +187,6 @@ void setup_protocol(int f_out,int f_in)
+@@ -190,13 +190,6 @@ void setup_protocol(int f_out,int f_in)
        if (protocol_version < 30) {
                if (append_mode == 1)
                        append_mode = 2;
index d84b51a..31aa1e7 100644 (file)
@@ -15,7 +15,7 @@ diff --git a/compat.c b/compat.c
  extern int preserve_acls;
  extern int preserve_xattrs;
  extern int need_messages_from_generator;
-@@ -60,7 +61,7 @@ extern iconv_t ic_send, ic_recv;
+@@ -61,7 +62,7 @@ extern char *iconv_opt;
  #endif
  
  /* These index values are for the file-list's extra-attribute array. */
@@ -23,8 +23,8 @@ diff --git a/compat.c b/compat.c
 +int uid_ndx, gid_ndx, atimes_ndx, acls_ndx, xattrs_ndx, unsort_ndx;
  
  int receiver_symlink_times = 0; /* receiver can set the time on a symlink */
-@@ -134,6 +135,8 @@ void setup_protocol(int f_out,int f_in)
+ int sender_symlink_iconv = 0; /* sender should convert symlink content */
+@@ -137,6 +138,8 @@ void setup_protocol(int f_out,int f_in)
                uid_ndx = ++file_extra_cnt;
        if (preserve_gid)
                gid_ndx = ++file_extra_cnt;
@@ -44,16 +44,16 @@ diff --git a/flist.c b/flist.c
  extern int relative_paths;
  extern int implied_dirs;
  extern int file_extra_cnt;
-@@ -388,7 +389,7 @@ int change_pathname(struct file_struct *file, const char *dir, int dirlen)
static void send_file_entry(int f, const char *fname, struct file_struct *file, int ndx, int first_ndx)
+@@ -393,7 +394,7 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
+ #endif
                          int ndx, int first_ndx)
  {
 -      static time_t modtime;
 +      static time_t modtime, atime;
        static mode_t mode;
  #ifdef SUPPORT_HARD_LINKS
        static int64 dev;
-@@ -462,6 +463,13 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
+@@ -467,6 +468,13 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
                xflags |= XMIT_SAME_TIME;
        else
                modtime = file->modtime;
@@ -67,7 +67,7 @@ diff --git a/flist.c b/flist.c
  
  #ifdef SUPPORT_HARD_LINKS
        if (tmp_dev != 0) {
-@@ -533,6 +541,8 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
+@@ -538,6 +546,8 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
        }
        if (!(xflags & XMIT_SAME_MODE))
                write_int(f, to_wire_mode(mode));
@@ -76,7 +76,7 @@ diff --git a/flist.c b/flist.c
        if (preserve_uid && !(xflags & XMIT_SAME_UID)) {
                if (protocol_version < 30)
                        write_int(f, uid);
-@@ -619,7 +629,7 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
+@@ -622,7 +632,7 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
  static struct file_struct *recv_file_entry(struct file_list *flist,
                                           int xflags, int f)
  {
@@ -85,7 +85,7 @@ diff --git a/flist.c b/flist.c
        static mode_t mode;
  #ifdef SUPPORT_HARD_LINKS
        static int64 dev;
-@@ -753,6 +763,16 @@ static struct file_struct *recv_file_entry(struct file_list *flist,
+@@ -756,6 +766,16 @@ static struct file_struct *recv_file_entry(struct file_list *flist,
        }
        if (!(xflags & XMIT_SAME_MODE))
                mode = from_wire_mode(read_int(f));
@@ -102,7 +102,7 @@ diff --git a/flist.c b/flist.c
  
        if (chmod_modes && !S_ISLNK(mode))
                mode = tweak_mode(mode, chmod_modes);
-@@ -895,6 +915,8 @@ static struct file_struct *recv_file_entry(struct file_list *flist,
+@@ -905,6 +925,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;
  
-@@ -1241,6 +1263,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1277,6 +1299,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;
@@ -131,7 +131,7 @@ diff --git a/generator.c b/generator.c
  
  extern int verbose;
  extern int dry_run;
-@@ -645,6 +646,9 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
+@@ -646,6 +647,9 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
                 : iflags & (ITEM_TRANSFER|ITEM_LOCAL_CHANGE) && !(iflags & ITEM_MATCHED)
                  && (!(iflags & ITEM_XNAME_FOLLOWS) || *xname))
                        iflags |= ITEM_REPORT_TIME;
@@ -141,7 +141,7 @@ diff --git a/generator.c b/generator.c
  #if !defined HAVE_LCHMOD && !defined HAVE_SETATTRLIST
                if (S_ISLNK(file->mode)) {
                        ;
-@@ -1015,6 +1019,8 @@ static int try_dests_reg(struct file_struct *file, char *fname, int ndx,
+@@ -1016,6 +1020,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)) {
-@@ -1200,6 +1206,7 @@ static int try_dests_non(struct file_struct *file, char *fname, int ndx,
+@@ -1201,6 +1207,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)) {
-@@ -1214,14 +1221,16 @@ static void list_file_entry(struct file_struct *f)
+@@ -1215,14 +1222,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));
        }
  }
-@@ -2056,7 +2065,7 @@ static void touch_up_dirs(struct file_list *flist, int ndx)
+@@ -2057,7 +2066,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
-@@ -656,7 +656,8 @@ static void log_formatted(enum logcode code, const char *format, const char *op,
+@@ -660,7 +660,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';
@@ -272,7 +272,7 @@ diff --git a/options.c b/options.c
 diff --git a/rsync.c b/rsync.c
 --- a/rsync.c
 +++ b/rsync.c
-@@ -380,6 +380,7 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
+@@ -393,6 +393,7 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
        int updated = 0;
        stat_x sx2;
        int change_uid, change_gid;
@@ -280,7 +280,7 @@ diff --git a/rsync.c b/rsync.c
        mode_t new_mode = file->mode;
        int inherit;
  
-@@ -423,20 +424,38 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
+@@ -436,20 +437,38 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
                set_xattr(fname, file, fnamecmp, sxp);
  #endif
  
@@ -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);
-@@ -570,7 +589,7 @@ int finish_transfer(const char *fname, const char *fnametmp,
+@@ -583,7 +602,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)
-@@ -597,7 +616,7 @@ int finish_transfer(const char *fname, const char *fnametmp,
+@@ -610,7 +629,7 @@ int finish_transfer(const char *fname, const char *fnametmp,
  
    do_set_file_attrs:
        set_file_attrs(fnametmp, file, NULL, fnamecmp,
@@ -360,7 +360,7 @@ diff --git a/rsync.h b/rsync.h
  
  #define FULL_FLUSH    1
  #define NORMAL_FLUSH  0
-@@ -630,12 +632,14 @@ extern int file_extra_cnt;
+@@ -632,12 +634,14 @@ extern int file_extra_cnt;
  extern int inc_recurse;
  extern int uid_ndx;
  extern int gid_ndx;
@@ -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
-@@ -1707,7 +1714,10 @@ quote(itemization(
+@@ -1719,7 +1726,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).
index dc0d9f1..7c41181 100644 (file)
@@ -111,7 +111,7 @@ diff --git a/backup.c b/backup.c
 diff --git a/generator.c b/generator.c
 --- a/generator.c
 +++ b/generator.c
-@@ -96,6 +96,9 @@ extern uid_t our_uid;
+@@ -97,6 +97,9 @@ extern uid_t our_uid;
  extern char *backup_dir;
  extern char *backup_suffix;
  extern int backup_suffix_len;
@@ -121,7 +121,7 @@ diff --git a/generator.c b/generator.c
  extern struct file_list *cur_flist, *first_flist, *dir_flist;
  extern struct filter_list_struct daemon_filter_list;
  
-@@ -142,10 +145,15 @@ static void handle_skipped_hlink(struct file_struct *file, int itemizing,
+@@ -143,10 +146,15 @@ static void handle_skipped_hlink(struct file_struct *file, int itemizing,
                                 enum logcode code, int f_out);
  #endif
  
@@ -138,7 +138,7 @@ diff --git a/generator.c b/generator.c
  }
  
  /* Delete a file or directory.  If DEL_RECURSE is set in the flags, this will
-@@ -193,9 +201,9 @@ static enum delret delete_item(char *fbuf, uint16 mode, uint16 flags)
+@@ -194,9 +202,9 @@ static enum delret delete_item(char *fbuf, uint16 mode, uint16 flags)
        if (S_ISDIR(mode)) {
                what = "rmdir";
                ok = do_rmdir(fbuf) == 0;
@@ -277,7 +277,7 @@ diff --git a/options.c b/options.c
  
        if (make_backups && !backup_dir) {
                omit_dir_times = 0; /* Implied, so avoid -O to sender. */
-@@ -1907,6 +1969,10 @@ void server_options(char **args, int *argc_p)
+@@ -1915,6 +1977,10 @@ void server_options(char **args, int *argc_p)
                args[ac++] = "--backup-dir";
                args[ac++] = backup_dir;
        }
@@ -288,7 +288,7 @@ diff --git a/options.c b/options.c
  
        /* Only send --suffix if it specifies a non-default value. */
        if (strcmp(backup_suffix, backup_dir ? "" : BACKUP_SUFFIX) != 0) {
-@@ -1915,7 +1981,14 @@ void server_options(char **args, int *argc_p)
+@@ -1923,7 +1989,14 @@ void server_options(char **args, int *argc_p)
                        goto oom;
                args[ac++] = arg;
        }
index b67c8cd..e752564 100644 (file)
@@ -51,7 +51,7 @@ diff --git a/log.c b/log.c
 diff --git a/main.c b/main.c
 --- a/main.c
 +++ b/main.c
-@@ -163,8 +163,11 @@ static void wait_process_with_flush(pid_t pid, int *exit_code_ptr)
+@@ -166,8 +166,11 @@ static void wait_process_with_flush(pid_t pid, int *exit_code_ptr)
                        *exit_code_ptr = RERR_TERMINATED;
                else
                        *exit_code_ptr = RERR_WAITCHILD;
@@ -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
-@@ -1315,6 +1318,14 @@ RETSIGTYPE remember_children(UNUSED(int val))
+@@ -1320,6 +1323,14 @@ RETSIGTYPE remember_children(UNUSED(int val))
                                break;
                        }
                }
@@ -79,7 +79,7 @@ diff --git a/main.c b/main.c
        }
  #endif
  #ifndef HAVE_SIGACTION
-@@ -1373,6 +1384,12 @@ static RETSIGTYPE rsync_panic_handler(UNUSED(int whatsig))
+@@ -1378,6 +1389,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[])
  {
-@@ -1395,6 +1412,11 @@ int main(int argc,char *argv[])
+@@ -1400,6 +1417,11 @@ int main(int argc,char *argv[])
        SIGACTMASK(SIGFPE, rsync_panic_handler);
        SIGACTMASK(SIGABRT, rsync_panic_handler);
        SIGACTMASK(SIGBUS, rsync_panic_handler);
index 0314d6c..a14e2ef 100644 (file)
@@ -69,15 +69,15 @@ diff --git a/flist.c b/flist.c
  extern int copy_links;
  extern int copy_unsafe_links;
  extern int protocol_version;
-@@ -68,6 +70,7 @@ extern int sanitize_paths;
- extern int munge_symlinks;
+@@ -69,6 +71,7 @@ extern int munge_symlinks;
  extern int need_unsorted_flist;
+ extern int sender_symlink_iconv;
  extern int unsort_ndx;
 +extern char *basis_dir[];
  extern struct stats stats;
  extern char *filesfrom_host;
  
-@@ -83,6 +86,12 @@ extern int filesfrom_convert;
+@@ -84,6 +87,12 @@ extern int filesfrom_convert;
  extern iconv_t ic_send, ic_recv;
  #endif
  
@@ -90,7 +90,7 @@ diff --git a/flist.c b/flist.c
  #define PTR_SIZE (sizeof (struct file_struct *))
  
  int io_error;
-@@ -124,7 +133,11 @@ static char empty_sum[MAX_DIGEST_LEN];
+@@ -125,7 +134,11 @@ static char empty_sum[MAX_DIGEST_LEN];
  static int flist_count_offset; /* for --delete --progress */
  static int dir_count = 0;
  
@@ -103,7 +103,7 @@ diff --git a/flist.c b/flist.c
  static void output_flist(struct file_list *flist);
  
  void init_flist(void)
-@@ -338,6 +351,238 @@ static void flist_done_allocating(struct file_list *flist)
+@@ -339,6 +352,238 @@ static void flist_done_allocating(struct file_list *flist)
                flist->pool_boundary = ptr;
  }
  
@@ -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
-@@ -1032,7 +1277,7 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1068,7 +1313,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];
-@@ -1171,9 +1416,16 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1207,9 +1452,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
-@@ -1250,14 +1502,18 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1286,14 +1538,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) {
-@@ -2177,7 +2433,8 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
+@@ -2253,7 +2509,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;
  }
-@@ -2279,7 +2536,7 @@ struct file_list *recv_file_list(int f)
+@@ -2355,7 +2612,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 */
-@@ -2477,7 +2734,7 @@ void flist_free(struct file_list *flist)
+@@ -2553,7 +2810,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;
-@@ -2528,7 +2785,7 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
+@@ -2604,7 +2861,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;
-@@ -2544,8 +2801,8 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
+@@ -2620,8 +2877,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);
-@@ -2567,7 +2824,7 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
+@@ -2643,7 +2900,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;
-@@ -712,7 +713,7 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
+@@ -713,7 +714,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;
-@@ -721,7 +722,10 @@ int unchanged_file(char *fn, struct file_struct *file, STRUCT_STAT *st)
+@@ -722,7 +723,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;
        }
  
-@@ -985,7 +989,7 @@ static int try_dests_reg(struct file_struct *file, char *fname, int ndx,
+@@ -986,7 +990,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;
-@@ -1258,7 +1262,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1259,7 +1263,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;
-@@ -1347,8 +1351,8 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1348,8 +1352,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);
-@@ -1356,10 +1360,15 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1357,10 +1361,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);
-@@ -1793,7 +1802,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1794,7 +1803,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
-@@ -690,6 +690,10 @@ extern int xattrs_ndx;
+@@ -692,6 +692,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)
-@@ -868,6 +872,13 @@ typedef struct {
+@@ -870,6 +874,13 @@ typedef struct {
        char fname[1]; /* has variable size */
  } relnamecache;
  
index bea59fa..3ae0047 100644 (file)
@@ -28,7 +28,7 @@ diff --git a/flist.c b/flist.c
  extern int am_root;
  extern int am_server;
  extern int am_daemon;
-@@ -94,6 +95,9 @@ extern iconv_t ic_send, ic_recv;
+@@ -95,6 +96,9 @@ extern iconv_t ic_send, ic_recv;
  
  #define PTR_SIZE (sizeof (struct file_struct *))
  
@@ -38,7 +38,7 @@ diff --git a/flist.c b/flist.c
  int io_error;
  int checksum_len;
  dev_t filesystem_dev; /* used to implement -x */
-@@ -133,8 +137,13 @@ static char empty_sum[MAX_DIGEST_LEN];
+@@ -134,8 +138,13 @@ static char empty_sum[MAX_DIGEST_LEN];
  static int flist_count_offset; /* for --delete --progress */
  static int dir_count = 0;
  
@@ -52,7 +52,7 @@ diff --git a/flist.c b/flist.c
  } *csum_cache = NULL;
  
  static void flist_sort_and_clean(struct file_list *flist, int flags);
-@@ -351,7 +360,79 @@ static void flist_done_allocating(struct file_list *flist)
+@@ -352,7 +361,79 @@ static void flist_done_allocating(struct file_list *flist)
                flist->pool_boundary = ptr;
  }
  
@@ -133,7 +133,7 @@ diff --git a/flist.c b/flist.c
  {
        int slot, slots = am_sender ? 1 : basis_dir_cnt + 1;
  
-@@ -365,6 +446,9 @@ void reset_checksum_cache()
+@@ -366,6 +447,9 @@ void reset_checksum_cache()
                struct file_list *flist = csum_cache[slot].flist;
  
                if (flist) {
@@ -143,7 +143,7 @@ diff --git a/flist.c b/flist.c
                        /* Reset the pool memory and empty the file-list array. */
                        pool_free_old(flist->file_pool,
                                      pool_boundary(flist->file_pool, 0));
-@@ -375,6 +459,10 @@ void reset_checksum_cache()
+@@ -376,6 +460,10 @@ void reset_checksum_cache()
                flist->low = 0;
                flist->high = -1;
                flist->next = NULL;
@@ -154,7 +154,7 @@ diff --git a/flist.c b/flist.c
        }
  }
  
-@@ -382,7 +470,7 @@ void reset_checksum_cache()
+@@ -383,7 +471,7 @@ void reset_checksum_cache()
  static int add_checksum(struct file_list *flist, const char *dirname,
                        const char *basename, int basename_len, OFF_T file_length,
                        time_t mtime, uint32 ctime, uint32 inode,
@@ -163,7 +163,7 @@ diff --git a/flist.c b/flist.c
  {
        struct file_struct *file;
        int alloc_len, extra_len;
-@@ -399,7 +487,7 @@ static int add_checksum(struct file_list *flist, const char *dirname,
+@@ -400,7 +488,7 @@ static int add_checksum(struct file_list *flist, const char *dirname,
        if (extra_len & (EXTRA_ROUNDING * EXTRA_LEN))
                extra_len = (extra_len | (EXTRA_ROUNDING * EXTRA_LEN)) + EXTRA_LEN;
  #endif
@@ -172,7 +172,7 @@ diff --git a/flist.c b/flist.c
        bp = pool_alloc(flist->file_pool, alloc_len, "add_checksum");
  
        memset(bp, 0, extra_len + FILE_STRUCT_LEN);
-@@ -408,7 +496,14 @@ static int add_checksum(struct file_list *flist, const char *dirname,
+@@ -409,7 +497,14 @@ static int add_checksum(struct file_list *flist, const char *dirname,
        bp += FILE_STRUCT_LEN;
  
        memcpy(bp, basename, basename_len);
@@ -187,7 +187,7 @@ diff --git a/flist.c b/flist.c
        file->mode = S_IFREG;
        file->modtime = mtime;
        file->len32 = (uint32)file_length;
-@@ -437,10 +532,11 @@ static void read_checksums(int slot, struct file_list *flist, const char *dirnam
+@@ -438,10 +533,11 @@ static void read_checksums(int slot, struct file_list *flist, const char *dirnam
        char line[MAXPATHLEN+1024], fbuf[MAXPATHLEN], sum[MAX_DIGEST_LEN];
        FILE *fp;
        char *cp;
@@ -200,7 +200,7 @@ diff --git a/flist.c b/flist.c
        int dlen = dirname ? strlcpy(fbuf, dirname, sizeof fbuf) : 0;
  
        if (dlen >= (int)(sizeof fbuf - 1 - RSYNCSUMS_LEN))
-@@ -461,7 +557,7 @@ static void read_checksums(int slot, struct file_list *flist, const char *dirnam
+@@ -462,7 +558,7 @@ static void read_checksums(int slot, struct file_list *flist, const char *dirnam
        while (fgets(line, sizeof line, fp)) {
                cp = line;
                if (protocol_version >= 30) {
@@ -209,7 +209,7 @@ diff --git a/flist.c b/flist.c
                        if (*cp == '=')
                                while (*++cp == '=') {}
                        else
-@@ -472,7 +568,14 @@ static void read_checksums(int slot, struct file_list *flist, const char *dirnam
+@@ -473,7 +569,14 @@ static void read_checksums(int slot, struct file_list *flist, const char *dirnam
                }
  
                if (*cp == '=') {
@@ -225,7 +225,7 @@ diff --git a/flist.c b/flist.c
                } else {
                        for (i = 0; i < checksum_len*2; i++, cp++) {
                                int x;
-@@ -490,13 +593,14 @@ static void read_checksums(int slot, struct file_list *flist, const char *dirnam
+@@ -491,13 +594,14 @@ static void read_checksums(int slot, struct file_list *flist, const char *dirnam
                                else
                                        sum[i/2] = x << 4;
                        }
@@ -241,7 +241,7 @@ diff --git a/flist.c b/flist.c
                        if (*cp == '=')
                                while (*++cp == '=') {}
                        else
-@@ -546,24 +650,112 @@ static void read_checksums(int slot, struct file_list *flist, const char *dirnam
+@@ -547,24 +651,112 @@ static void read_checksums(int slot, struct file_list *flist, const char *dirnam
                        continue;
  
                strlcpy(fbuf+dlen, cp, sizeof fbuf - dlen);
@@ -356,7 +356,7 @@ diff --git a/flist.c b/flist.c
                read_checksums(slot, flist, file->dirname);
        }
  
-@@ -575,12 +767,31 @@ void get_cached_checksum(int slot, const char *fname, struct file_struct *file,
+@@ -576,12 +768,31 @@ void get_cached_checksum(int slot, const char *fname, struct file_struct *file,
                 && (checksum_files & CSF_LAX
                  || (F_CTIME(fp) == (uint32)stp->st_ctime
                   && F_INODE(fp) == (uint32)stp->st_ino))) {
@@ -389,7 +389,7 @@ diff --git a/flist.c b/flist.c
  }
  
  /* Call this with EITHER (1) "file, NULL, 0" to chdir() to the file's
-@@ -1371,6 +1582,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1407,6 +1618,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++;
@@ -398,7 +398,7 @@ diff --git a/flist.c b/flist.c
                return NULL;
        }
  
-@@ -1417,13 +1630,13 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1453,13 +1666,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' */
-@@ -1509,7 +1722,7 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1545,7 +1758,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);
        }
-@@ -1839,6 +2052,9 @@ static void send_directory(int f, struct file_list *flist, char *fbuf, int len,
+@@ -1915,6 +2128,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". */
-@@ -2436,6 +2652,9 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
+@@ -2512,6 +2728,9 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
        } else
                flist_eof = 1;
  
@@ -446,7 +446,7 @@ diff --git a/flist.c b/flist.c
 diff --git a/generator.c b/generator.c
 --- a/generator.c
 +++ b/generator.c
-@@ -114,6 +114,7 @@ static int dir_tweaking;
+@@ -115,6 +115,7 @@ static int dir_tweaking;
  static int symlink_timeset_failed_flags;
  static int need_retouch_dir_times;
  static int need_retouch_dir_perms;
@@ -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(). */
-@@ -723,7 +724,7 @@ int unchanged_file(char *fn, struct file_struct *file, STRUCT_STAT *st, int slot
+@@ -724,7 +725,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;
-@@ -1366,7 +1367,8 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1367,7 +1368,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;
                }
-@@ -1516,6 +1518,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1517,6 +1519,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;
        }
  
-@@ -1808,6 +1811,8 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1809,6 +1812,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
-@@ -2250,6 +2255,7 @@ void generate_files(int f_out, const char *local_name)
+@@ -2255,6 +2260,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];
-@@ -2333,6 +2339,9 @@ void generate_files(int f_out, const char *local_name)
+@@ -2338,6 +2344,9 @@ void generate_files(int f_out, const char *local_name)
                        wait_for_receiver();
        }
  
@@ -519,7 +519,7 @@ diff --git a/io.c b/io.c
  extern int protocol_version;
  extern int remove_source_files;
  extern int preserve_hard_links;
-@@ -205,6 +206,9 @@ static void got_flist_entry_status(enum festatus status, const char *buf)
+@@ -206,6 +207,9 @@ static void got_flist_entry_status(enum festatus status, const char *buf)
                                flist_ndx_push(&hlink_list, ndx);
                                flist->in_progress++;
                        }
@@ -583,9 +583,9 @@ diff --git a/receiver.c b/receiver.c
                                 || (preserve_hard_links && F_IS_HLINKED(file)))
                                        send_msg_int(MSG_SUCCESS, ndx);
                                handle_partial_dir(partialptr, PDIR_DELETE);
-@@ -716,7 +717,7 @@ int recv_files(int f_in, char *local_name)
-               switch (recv_ok) {
+@@ -723,7 +724,7 @@ int recv_files(int f_in, char *local_name)
+               case 2:
+                       break;
                case 1:
 -                      if (remove_source_files || inc_recurse
 +                      if (remove_source_files || inc_recurse || checksum_files & CSF_UPDATE
@@ -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
-@@ -874,6 +874,8 @@ typedef struct {
+@@ -876,6 +876,8 @@ typedef struct {
  
  #define CSF_ENABLE (1<<1)
  #define CSF_LAX (1<<2)
index 62e1fbf..7ae0cef 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
-@@ -1250,7 +1250,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1286,7 +1286,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
-@@ -721,7 +721,8 @@ int unchanged_file(char *fn, struct file_struct *file, STRUCT_STAT *st)
+@@ -722,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];
index 3daa57f..026b371 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;
-@@ -1688,7 +1689,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1689,7 +1690,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                goto cleanup;
        }
  
@@ -55,16 +55,16 @@ diff --git a/options.c b/options.c
    {"specials",         0,  POPT_ARG_VAL,    &preserve_specials, 1, 0, 0 },
    {"no-specials",      0,  POPT_ARG_VAL,    &preserve_specials, 0, 0, 0 },
    {"links",           'l', POPT_ARG_VAL,    &preserve_links, 1, 0, 0 },
-@@ -2053,6 +2056,9 @@ void server_options(char **args, int *argc_p)
+@@ -2061,6 +2064,9 @@ void server_options(char **args, int *argc_p)
        else if (remove_source_files)
                args[ac++] = "--remove-sent-files";
  
 +      if (copy_devices)
 +              args[ac++] = "--copy-devices";
 +
-       *argc_p = ac;
-       return;
+       if (ac > MAX_SERVER_ARGS) { /* Not possible... */
+               rprintf(FERROR, "argc overflow in server_options().\n");
+               exit_cleanup(RERR_MALLOC);
 diff --git a/rsync.c b/rsync.c
 --- a/rsync.c
 +++ b/rsync.c
@@ -76,7 +76,7 @@ diff --git a/rsync.c b/rsync.c
  extern int am_root;
  extern int am_server;
  extern int am_sender;
-@@ -326,7 +327,8 @@ int read_ndx_and_attrs(int f_in, int *iflag_ptr, uchar *type_ptr,
+@@ -339,7 +340,8 @@ int read_ndx_and_attrs(int f_in, int *iflag_ptr, uchar *type_ptr,
  
        if (iflags & ITEM_TRANSFER) {
                int i = ndx - cur_flist->ndx_start;
index e2154b7..47730fe 100644 (file)
@@ -19,7 +19,7 @@ diff --git a/compat.c b/compat.c
  extern int preserve_fileflags;
  extern int preserve_acls;
  extern int preserve_xattrs;
-@@ -62,7 +63,7 @@ extern iconv_t ic_send, ic_recv;
+@@ -63,7 +64,7 @@ extern char *iconv_opt;
  #endif
  
  /* These index values are for the file-list's extra-attribute array. */
@@ -27,8 +27,8 @@ diff --git a/compat.c b/compat.c
 +int uid_ndx, gid_ndx, crtimes_ndx, fileflags_ndx, acls_ndx, xattrs_ndx, unsort_ndx;
  
  int receiver_symlink_times = 0; /* receiver can set the time on a symlink */
-@@ -136,6 +137,8 @@ void setup_protocol(int f_out,int f_in)
+ int sender_symlink_iconv = 0; /* sender should convert symlink content */
+@@ -139,6 +140,8 @@ void setup_protocol(int f_out,int f_in)
                uid_ndx = ++file_extra_cnt;
        if (preserve_gid)
                gid_ndx = ++file_extra_cnt;
@@ -48,16 +48,16 @@ diff --git a/flist.c b/flist.c
  extern int relative_paths;
  extern int implied_dirs;
  extern int file_extra_cnt;
-@@ -389,7 +390,7 @@ int change_pathname(struct file_struct *file, const char *dir, int dirlen)
static void send_file_entry(int f, const char *fname, struct file_struct *file, int ndx, int first_ndx)
+@@ -394,7 +395,7 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
+ #endif
                          int ndx, int first_ndx)
  {
 -      static time_t modtime;
 +      static time_t modtime, crtime;
        static mode_t mode;
  #ifdef SUPPORT_FILEFLAGS
        static uint32 fileflags;
-@@ -474,6 +475,13 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
+@@ -479,6 +480,13 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
                xflags |= XMIT_SAME_TIME;
        else
                modtime = file->modtime;
@@ -71,7 +71,7 @@ diff --git a/flist.c b/flist.c
  
  #ifdef SUPPORT_HARD_LINKS
        if (tmp_dev != 0) {
-@@ -543,6 +551,8 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
+@@ -548,6 +556,8 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
                else
                        write_int(f, modtime);
        }
@@ -80,7 +80,7 @@ diff --git a/flist.c b/flist.c
        if (!(xflags & XMIT_SAME_MODE))
                write_int(f, to_wire_mode(mode));
  #ifdef SUPPORT_FILEFLAGS
-@@ -635,7 +645,7 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
+@@ -638,7 +648,7 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
  static struct file_struct *recv_file_entry(struct file_list *flist,
                                           int xflags, int f)
  {
@@ -89,7 +89,7 @@ diff --git a/flist.c b/flist.c
        static mode_t mode;
  #ifdef SUPPORT_FILEFLAGS
        static uint32 fileflags;
-@@ -770,6 +780,19 @@ static struct file_struct *recv_file_entry(struct file_list *flist,
+@@ -773,6 +783,19 @@ static struct file_struct *recv_file_entry(struct file_list *flist,
                } else
                        modtime = read_int(f);
        }
@@ -109,7 +109,7 @@ diff --git a/flist.c b/flist.c
        if (!(xflags & XMIT_SAME_MODE))
                mode = from_wire_mode(read_int(f));
  
-@@ -922,6 +945,8 @@ static struct file_struct *recv_file_entry(struct file_list *flist,
+@@ -932,6 +955,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;
  
-@@ -1272,6 +1297,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1308,6 +1333,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;
@@ -146,7 +146,7 @@ diff --git a/generator.c b/generator.c
  extern int preserve_hard_links;
  extern int preserve_executability;
  extern int preserve_fileflags;
-@@ -620,6 +622,13 @@ int unchanged_attrs(const char *fname, struct file_struct *file, stat_x *sxp)
+@@ -621,6 +623,13 @@ int unchanged_attrs(const char *fname, struct file_struct *file, stat_x *sxp)
        if (gid_ndx && !(file->flags & FLAG_SKIP_GROUP) && sxp->st.st_gid != (gid_t)F_GROUP(file))
                return 0;
  
@@ -160,7 +160,7 @@ diff --git a/generator.c b/generator.c
  #ifdef SUPPORT_ACLS
        if (preserve_acls && !S_ISLNK(file->mode)) {
                if (!ACL_READY(*sxp))
-@@ -663,6 +672,12 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
+@@ -664,6 +673,12 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
                 : iflags & (ITEM_TRANSFER|ITEM_LOCAL_CHANGE) && !(iflags & ITEM_MATCHED)
                  && (!(iflags & ITEM_XNAME_FOLLOWS) || *xname))
                        iflags |= ITEM_REPORT_TIME;
@@ -173,7 +173,7 @@ diff --git a/generator.c b/generator.c
  #if !defined HAVE_LCHMOD && !defined HAVE_SETATTRLIST
                if (S_ISLNK(file->mode)) {
                        ;
-@@ -1223,6 +1238,7 @@ static int try_dests_non(struct file_struct *file, char *fname, int ndx,
+@@ -1224,6 +1239,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)) {
-@@ -1237,14 +1253,16 @@ static void list_file_entry(struct file_struct *f)
+@@ -1238,14 +1254,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));
        }
  }
-@@ -1336,6 +1354,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1337,6 +1355,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
-@@ -659,7 +659,8 @@ static void log_formatted(enum logcode code, const char *format, const char *op,
+@@ -663,7 +663,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';
@@ -294,7 +294,7 @@ diff --git a/options.c b/options.c
 diff --git a/rsync.c b/rsync.c
 --- a/rsync.c
 +++ b/rsync.c
-@@ -472,6 +472,14 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
+@@ -485,6 +485,14 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
                else
                        file->flags |= FLAG_TIME_FAILED;
        }
@@ -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)
-@@ -619,7 +627,7 @@ int finish_transfer(const char *fname, const char *fnametmp,
+@@ -632,7 +640,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)
-@@ -650,7 +658,7 @@ int finish_transfer(const char *fname, const char *fnametmp,
+@@ -663,7 +671,7 @@ int finish_transfer(const char *fname, const char *fnametmp,
  
    do_set_file_attrs:
        set_file_attrs(fnametmp, file, NULL, fnamecmp,
@@ -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 */
-@@ -655,6 +657,7 @@ extern int file_extra_cnt;
+@@ -657,6 +659,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;
-@@ -662,6 +665,7 @@ extern int xattrs_ndx;
+@@ -664,6 +667,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)
-@@ -920,6 +924,7 @@ typedef struct {
+@@ -922,6 +926,7 @@ typedef struct {
  
  typedef struct {
      STRUCT_STAT st;
@@ -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
-@@ -1680,7 +1684,7 @@ with older versions of rsync, but that also turns on the output of other
+@@ -1692,7 +1696,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.
-@@ -1739,6 +1743,8 @@ quote(itemization(
+@@ -1751,6 +1755,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.
index e2e5913..bdf7b96 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;
-@@ -714,6 +715,9 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
+@@ -715,6 +716,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)
  {
@@ -62,7 +62,7 @@ diff --git a/options.c b/options.c
    {"one-file-system", 'x', POPT_ARG_NONE,   0, 'x', 0, 0 },
    {"no-one-file-system",'x',POPT_ARG_VAL,   &one_file_system, 0, 0, 0 },
    {"no-x",            'x', POPT_ARG_VAL,    &one_file_system, 0, 0, 0 },
-@@ -1959,6 +1962,9 @@ void server_options(char **args, int *argc_p)
+@@ -1967,6 +1970,9 @@ void server_options(char **args, int *argc_p)
                }
        }
  
diff --git a/db.diff b/db.diff
index 7606028..515f4a0 100644 (file)
--- a/db.diff
+++ b/db.diff
@@ -768,7 +768,7 @@ diff --git a/flist.c b/flist.c
  extern int eol_nulls;
  extern int relative_paths;
  extern int implied_dirs;
-@@ -1250,14 +1251,16 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1286,14 +1287,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) {
-@@ -1877,6 +1880,9 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
+@@ -1953,6 +1956,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;
-@@ -721,7 +722,8 @@ int unchanged_file(char *fn, struct file_struct *file, STRUCT_STAT *st)
+@@ -722,7 +723,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;
        }
  
-@@ -2204,6 +2206,9 @@ void generate_files(int f_out, const char *local_name)
+@@ -2205,6 +2207,9 @@ void generate_files(int f_out, const char *local_name)
                        : "enabled");
        }
  
@@ -875,7 +875,7 @@ diff --git a/main.c b/main.c
  extern int file_total;
  extern int recurse;
  extern int xfer_dirs;
-@@ -73,6 +74,7 @@ extern char *partial_dir;
+@@ -76,6 +77,7 @@ extern char *partial_dir;
  extern char *dest_option;
  extern char *basis_dir[];
  extern char *rsync_path;
@@ -883,7 +883,7 @@ diff --git a/main.c b/main.c
  extern char *shell_cmd;
  extern char *batch_name;
  extern char *password_file;
-@@ -1491,6 +1493,9 @@ int main(int argc,char *argv[])
+@@ -1496,6 +1498,9 @@ int main(int argc,char *argv[])
                exit_cleanup(RERR_SYNTAX);
        }
  
index 9314476..7c235e9 100644 (file)
@@ -23,7 +23,7 @@ switches to --detect-moved blindly accepts the staged file.
 diff --git a/generator.c b/generator.c
 --- a/generator.c
 +++ b/generator.c
-@@ -200,7 +200,9 @@ static int fattr_find(struct file_struct *f, char *fname)
+@@ -201,7 +201,9 @@ static int fattr_find(struct file_struct *f, char *fname)
                                continue;
                        }
                }
@@ -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;
-@@ -1985,6 +1987,21 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1986,6 +1988,21 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                fnamecmp = partialptr;
                fnamecmp_type = FNAMECMP_PARTIAL_DIR;
                statret = 0;
@@ -79,7 +79,7 @@ diff --git a/options.c b/options.c
    {"fuzzy",           'y', POPT_ARG_VAL,    &fuzzy_basis, 1, 0, 0 },
    {"no-fuzzy",         0,  POPT_ARG_VAL,    &fuzzy_basis, 0, 0, 0 },
    {"no-y",             0,  POPT_ARG_VAL,    &fuzzy_basis, 0, 0, 0 },
-@@ -1955,8 +1959,14 @@ void server_options(char **args, int *argc_p)
+@@ -1963,8 +1967,14 @@ void server_options(char **args, int *argc_p)
                        args[ac++] = "--super";
                if (size_only)
                        args[ac++] = "--size-only";
@@ -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
-@@ -1496,6 +1498,17 @@ the bf(--partial-dir) option, that directory will be used instead.  These
+@@ -1503,6 +1505,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 161bafb..6b41622 100644 (file)
@@ -43,7 +43,7 @@ diff --git a/compat.c b/compat.c
  extern int protect_args;
  extern int preserve_uid;
  extern int preserve_gid;
-@@ -117,6 +118,7 @@ void set_allow_inc_recurse(void)
+@@ -120,6 +121,7 @@ void set_allow_inc_recurse(void)
                allow_inc_recurse = 0;
        else if (!am_sender
         && (delete_before || delete_after
@@ -62,7 +62,7 @@ diff --git a/flist.c b/flist.c
  extern int protocol_version;
  extern int sanitize_paths;
  extern int munge_symlinks;
-@@ -120,6 +121,8 @@ static int64 tmp_dev, tmp_ino;
+@@ -121,6 +122,8 @@ static int64 tmp_dev, tmp_ino;
  #endif
  static char tmp_sum[MAX_DIGEST_LEN];
  
@@ -71,7 +71,7 @@ diff --git a/flist.c b/flist.c
  static char empty_sum[MAX_DIGEST_LEN];
  static int flist_count_offset; /* for --delete --progress */
  static int dir_count = 0;
-@@ -287,6 +290,45 @@ static int is_excluded(const char *fname, int is_dir, int filter_level)
+@@ -288,6 +291,45 @@ static int is_excluded(const char *fname, int is_dir, int filter_level)
        return 0;
  }
  
@@ -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);
  
-@@ -2281,6 +2323,25 @@ struct file_list *recv_file_list(int f)
+@@ -2357,6 +2399,25 @@ struct file_list *recv_file_list(int f)
  
        flist_sort_and_clean(flist, relative_paths);
  
@@ -154,7 +154,7 @@ diff --git a/generator.c b/generator.c
  extern int whole_file;
  extern int list_only;
  extern int read_batch;
-@@ -98,6 +99,7 @@ extern char *backup_suffix;
+@@ -99,6 +100,7 @@ extern char *backup_suffix;
  extern int backup_suffix_len;
  extern struct file_list *cur_flist, *first_flist, *dir_flist;
  extern struct filter_list_struct daemon_filter_list;
@@ -162,7 +162,7 @@ diff --git a/generator.c b/generator.c
  
  int ignore_perishable = 0;
  int non_perishable_cnt = 0;
-@@ -105,6 +107,7 @@ int maybe_ATTRS_REPORT = 0;
+@@ -106,6 +108,7 @@ int maybe_ATTRS_REPORT = 0;
  
  static dev_t dev_zero;
  static int deletion_count = 0; /* used to implement --max-delete */
@@ -170,7 +170,7 @@ diff --git a/generator.c b/generator.c
  static int deldelay_size = 0, deldelay_cnt = 0;
  static char *deldelay_buf = NULL;
  static int deldelay_fd = -1;
-@@ -115,7 +118,7 @@ static int need_retouch_dir_times;
+@@ -116,7 +119,7 @@ static int need_retouch_dir_times;
  static int need_retouch_dir_perms;
  static const char *solo_file = NULL;
  
@@ -179,7 +179,7 @@ diff --git a/generator.c b/generator.c
  #define DEL_NO_UID_WRITE      (1<<0) /* file/dir has our uid w/o write perm */
  #define DEL_RECURSE           (1<<1) /* if dir, delete all contents */
  #define DEL_DIR_IS_EMPTY      (1<<2) /* internal delete_FUNCTIONS use only */
-@@ -124,6 +127,7 @@ static const char *solo_file = NULL;
+@@ -125,6 +128,7 @@ static const char *solo_file = NULL;
  #define DEL_FOR_SYMLINK       (1<<5) /* making room for a replacement symlink */
  #define DEL_FOR_DEVICE                (1<<6) /* making room for a replacement device */
  #define DEL_FOR_SPECIAL       (1<<7) /* making room for a replacement special */
@@ -187,7 +187,7 @@ diff --git a/generator.c b/generator.c
  
  #define DEL_MAKE_ROOM (DEL_FOR_FILE|DEL_FOR_DIR|DEL_FOR_SYMLINK|DEL_FOR_DEVICE|DEL_FOR_SPECIAL)
  
-@@ -148,11 +152,121 @@ static int is_backup_file(char *fn)
+@@ -149,11 +153,121 @@ static int is_backup_file(char *fn)
        return k > 0 && strcmp(fn+k, backup_suffix) == 0;
  }
  
@@ -309,7 +309,7 @@ diff --git a/generator.c b/generator.c
   */
  static enum delret delete_item(char *fbuf, uint16 mode, uint16 flags)
  {
-@@ -186,6 +300,8 @@ static enum delret delete_item(char *fbuf, uint16 mode, uint16 flags)
+@@ -187,6 +301,8 @@ static enum delret delete_item(char *fbuf, uint16 mode, uint16 flags)
                        goto check_ret;
                /* OK: try to delete the directory. */
        }
@@ -318,7 +318,7 @@ diff --git a/generator.c b/generator.c
  
        if (!(flags & DEL_MAKE_ROOM) && max_delete >= 0 && ++deletion_count > max_delete)
                return DR_AT_LIMIT;
-@@ -241,6 +357,8 @@ static enum delret delete_item(char *fbuf, uint16 mode, uint16 flags)
+@@ -242,6 +358,8 @@ static enum delret delete_item(char *fbuf, uint16 mode, uint16 flags)
   * its contents, otherwise just checks for content.  Returns DR_SUCCESS or
   * DR_NOT_EMPTY.  Note that fname must point to a MAXPATHLEN buffer!  (The
   * buffer is used for recursion, but returned unchanged.)
@@ -327,7 +327,7 @@ diff --git a/generator.c b/generator.c
   */
  static enum delret delete_dir_contents(char *fname, uint16 flags)
  {
-@@ -260,7 +378,9 @@ static enum delret delete_dir_contents(char *fname, uint16 flags)
+@@ -261,7 +379,9 @@ static enum delret delete_dir_contents(char *fname, uint16 flags)
        save_filters = push_local_filters(fname, dlen);
  
        non_perishable_cnt = 0;
@@ -337,7 +337,7 @@ diff --git a/generator.c b/generator.c
        ret = non_perishable_cnt ? DR_NOT_EMPTY : DR_SUCCESS;
  
        if (!dirlist->used)
-@@ -300,7 +420,8 @@ static enum delret delete_dir_contents(char *fname, uint16 flags)
+@@ -301,7 +421,8 @@ static enum delret delete_dir_contents(char *fname, uint16 flags)
                if (S_ISDIR(fp->mode)) {
                        if (delete_dir_contents(fname, flags | DEL_RECURSE) != DR_SUCCESS)
                                ret = DR_NOT_EMPTY;
@@ -347,7 +347,7 @@ diff --git a/generator.c b/generator.c
                if (delete_item(fname, fp->mode, flags) != DR_SUCCESS)
                        ret = DR_NOT_EMPTY;
        }
-@@ -465,13 +586,18 @@ static void do_delayed_deletions(char *delbuf)
+@@ -466,13 +587,18 @@ static void do_delayed_deletions(char *delbuf)
   * all the --delete-WHEN options.  Note that the fbuf pointer must point to a
   * MAXPATHLEN buffer with the name of the directory in it (the functions we
   * call will append names onto the end, but the old dir value will be restored
@@ -370,7 +370,7 @@ diff --git a/generator.c b/generator.c
        int save_uid_ndx = uid_ndx;
  
        if (!fbuf) {
-@@ -486,17 +612,22 @@ static void delete_in_dir(char *fbuf, struct file_struct *file, dev_t *fs_dev)
+@@ -487,17 +613,22 @@ static void delete_in_dir(char *fbuf, struct file_struct *file, dev_t *fs_dev)
                maybe_send_keepalive();
  
        if (io_error && !ignore_errors) {
@@ -398,7 +398,7 @@ diff --git a/generator.c b/generator.c
        if (one_file_system) {
                if (file->flags & FLAG_TOP_DIR)
                        filesystem_dev = *fs_dev;
-@@ -509,6 +640,14 @@ static void delete_in_dir(char *fbuf, struct file_struct *file, dev_t *fs_dev)
+@@ -510,6 +641,14 @@ static void delete_in_dir(char *fbuf, struct file_struct *file, dev_t *fs_dev)
  
        dirlist = get_dirlist(fbuf, dlen, 0);
  
@@ -413,7 +413,7 @@ diff --git a/generator.c b/generator.c
        /* If an item in dirlist is not found in flist, delete it
         * from the filesystem. */
        for (i = dirlist->used; i--; ) {
-@@ -521,19 +660,28 @@ static void delete_in_dir(char *fbuf, struct file_struct *file, dev_t *fs_dev)
+@@ -522,19 +661,28 @@ static void delete_in_dir(char *fbuf, struct file_struct *file, dev_t *fs_dev)
                                        f_name(fp, NULL));
                        continue;
                }
@@ -446,7 +446,7 @@ diff --git a/generator.c b/generator.c
        flist_free(dirlist);
  
        if (!save_uid_ndx) {
-@@ -571,9 +719,9 @@ static void do_delete_pass(void)
+@@ -572,9 +720,9 @@ static void do_delete_pass(void)
                 || !S_ISDIR(st.st_mode))
                        continue;
  
@@ -458,7 +458,7 @@ diff --git a/generator.c b/generator.c
  
        if (do_progress && !am_server)
                rprintf(FINFO, "                    \r");
-@@ -1226,6 +1374,7 @@ static void list_file_entry(struct file_struct *f)
+@@ -1227,6 +1375,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;
  
-@@ -1502,9 +1651,12 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1503,9 +1652,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;
-@@ -1782,8 +1934,14 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1783,8 +1935,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;
-@@ -2185,6 +2343,12 @@ void generate_files(int f_out, const char *local_name)
+@@ -2186,6 +2344,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) {
-@@ -2195,7 +2359,7 @@ void generate_files(int f_out, const char *local_name)
+@@ -2196,7 +2360,7 @@ void generate_files(int f_out, const char *local_name)
        }
        do_progress = 0;
  
@@ -520,16 +520,16 @@ diff --git a/generator.c b/generator.c
                whole_file = 0;
        if (verbose >= 2) {
                rprintf(FINFO, "delta-transmission %s\n",
-@@ -2237,7 +2401,7 @@ void generate_files(int f_out, const char *local_name)
-                                               dirdev = MAKEDEV(DEV_MAJOR(devp), DEV_MINOR(devp));
-                                       } else
-                                               dirdev = MAKEDEV(0, 0);
+@@ -2242,7 +2406,7 @@ void generate_files(int f_out, const char *local_name)
+                                        * error for this directory before we delete in it. */
+                                       while (check_for_io_err && !cur_flist->next)
+                                               wait_for_receiver();
 -                                      delete_in_dir(fbuf, fp, &dirdev);
 +                                      delete_in_dir(fbuf, fp, &dirdev, 0);
                                } else
                                        change_local_filter_dir(fbuf, strlen(fbuf), F_DEPTH(fp));
                        }
-@@ -2284,7 +2448,21 @@ void generate_files(int f_out, const char *local_name)
+@@ -2289,7 +2453,21 @@ void generate_files(int f_out, const char *local_name)
        } while ((cur_flist = cur_flist->next) != NULL);
  
        if (delete_during)
@@ -596,7 +596,7 @@ diff --git a/options.c b/options.c
                                 delay_updates ? "delay-updates" : "partial-dir");
                        return 0;
                }
-@@ -1951,6 +1955,8 @@ void server_options(char **args, int *argc_p)
+@@ -1959,6 +1963,8 @@ void server_options(char **args, int *argc_p)
                        args[ac++] = "--super";
                if (size_only)
                        args[ac++] = "--size-only";
@@ -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
-@@ -1480,6 +1481,21 @@ Note that the use of the bf(--delete) option might get rid of any potential
+@@ -1487,6 +1488,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
-@@ -1125,6 +1125,32 @@ int handle_partial_dir(const char *fname, int create)
+@@ -1129,6 +1129,32 @@ int handle_partial_dir(const char *fname, int create)
        return 1;
  }
  
index 5e790f4..a9288ab 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;
-@@ -1723,6 +1724,13 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1724,6 +1725,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;
  
-@@ -2095,6 +2103,7 @@ void check_for_finished_files(int itemizing, enum logcode code, int check_redo)
+@@ -2096,6 +2104,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;
-@@ -2120,6 +2129,7 @@ void check_for_finished_files(int itemizing, enum logcode code, int check_redo)
+@@ -2121,6 +2130,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 c944c57..0185146 100644 (file)
@@ -155,7 +155,7 @@ diff --git a/rsync.yo b/rsync.yo
       --no-detach             do not detach from the parent
       --port=PORT             listen on alternate port number
       --log-file=FILE         override the "log file" setting
-@@ -2131,6 +2132,14 @@ The default is /etc/rsyncd.conf unless the daemon is running over
+@@ -2143,6 +2144,14 @@ The default is /etc/rsyncd.conf unless the daemon is running over
  a remote shell program and the remote user is not the super-user; in that case
  the default is rsyncd.conf in the current directory (typically $HOME).
  
@@ -188,18 +188,7 @@ diff --git a/rsyncd.conf.yo b/rsyncd.conf.yo
  
  dit(bf(port)) You can override the default port the daemon will listen on
  by specifying this value (defaults to 873).  This is ignored if the daemon
-@@ -101,8 +105,8 @@ who like to tune their systems to the utmost degree. You can set all
- sorts of socket options which may make transfers faster (or
- slower!). Read the man page for the code(setsockopt()) system call for
- details on some of the options you may be able to set. By default no
--special socket options are set.  These settings are superseded by the
--bf(--sockopts) command-line option.
-+special socket options are set.  These settings can also be specified
-+via the bf(--sockopts) command-line option.
- enddit()
-@@ -260,6 +264,12 @@ If the daemon fails to open to specified file, it will fall back to
+@@ -260,6 +264,12 @@ If the daemon fails to open the specified file, it will fall back to
  using syslog and output an error about the failure.  (Note that the
  failure to open the specified log file used to be a fatal error.)
  
index 8cdebe8..de59281 100644 (file)
@@ -125,7 +125,7 @@ diff --git a/fileio.c b/fileio.c
 diff --git a/generator.c b/generator.c
 --- a/generator.c
 +++ b/generator.c
-@@ -115,6 +115,10 @@ static int need_retouch_dir_times;
+@@ -116,6 +116,10 @@ static int need_retouch_dir_times;
  static int need_retouch_dir_perms;
  static const char *solo_file = NULL;
  
index 93f7047..2f861bc 100644 (file)
@@ -44,7 +44,7 @@ diff --git a/compat.c b/compat.c
  extern int preserve_acls;
  extern int preserve_xattrs;
  extern int need_messages_from_generator;
-@@ -60,7 +62,7 @@ extern iconv_t ic_send, ic_recv;
+@@ -61,7 +63,7 @@ extern char *iconv_opt;
  #endif
  
  /* These index values are for the file-list's extra-attribute array. */
@@ -52,8 +52,8 @@ diff --git a/compat.c b/compat.c
 +int uid_ndx, gid_ndx, fileflags_ndx, acls_ndx, xattrs_ndx, unsort_ndx;
  
  int receiver_symlink_times = 0; /* receiver can set the time on a symlink */
-@@ -134,6 +136,8 @@ void setup_protocol(int f_out,int f_in)
+ int sender_symlink_iconv = 0; /* sender should convert symlink content */
+@@ -137,6 +139,8 @@ void setup_protocol(int f_out,int f_in)
                uid_ndx = ++file_extra_cnt;
        if (preserve_gid)
                gid_ndx = ++file_extra_cnt;
@@ -85,7 +85,7 @@ diff --git a/flist.c b/flist.c
  extern int uid_ndx;
  extern int gid_ndx;
  extern int eol_nulls;
-@@ -390,6 +391,9 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
+@@ -395,6 +396,9 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
  {
        static time_t modtime;
        static mode_t mode;
@@ -95,7 +95,7 @@ diff --git a/flist.c b/flist.c
  #ifdef SUPPORT_HARD_LINKS
        static int64 dev;
  #endif
-@@ -419,6 +423,14 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
+@@ -424,6 +428,14 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
                xflags |= XMIT_SAME_MODE;
        else
                mode = file->mode;
@@ -110,7 +110,7 @@ diff --git a/flist.c b/flist.c
  
        if ((preserve_devices && IS_DEVICE(mode))
         || (preserve_specials && IS_SPECIAL(mode))) {
-@@ -533,6 +545,10 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
+@@ -538,6 +550,10 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
        }
        if (!(xflags & XMIT_SAME_MODE))
                write_int(f, to_wire_mode(mode));
@@ -121,7 +121,7 @@ diff --git a/flist.c b/flist.c
        if (preserve_uid && !(xflags & XMIT_SAME_UID)) {
                if (protocol_version < 30)
                        write_int(f, uid);
-@@ -621,6 +637,9 @@ static struct file_struct *recv_file_entry(struct file_list *flist,
+@@ -624,6 +640,9 @@ static struct file_struct *recv_file_entry(struct file_list *flist,
  {
        static int64 modtime;
        static mode_t mode;
@@ -131,7 +131,7 @@ diff --git a/flist.c b/flist.c
  #ifdef SUPPORT_HARD_LINKS
        static int64 dev;
  #endif
-@@ -756,6 +775,10 @@ static struct file_struct *recv_file_entry(struct file_list *flist,
+@@ -759,6 +778,10 @@ static struct file_struct *recv_file_entry(struct file_list *flist,
  
        if (chmod_modes && !S_ISLNK(mode))
                mode = tweak_mode(mode, chmod_modes);
@@ -142,7 +142,7 @@ diff --git a/flist.c b/flist.c
  
        if (preserve_uid && !(xflags & XMIT_SAME_UID)) {
                if (protocol_version < 30)
-@@ -889,6 +912,10 @@ static struct file_struct *recv_file_entry(struct file_list *flist,
+@@ -899,6 +922,10 @@ static struct file_struct *recv_file_entry(struct file_list *flist,
        }
  #endif
        file->mode = mode;
@@ -153,7 +153,7 @@ diff --git a/flist.c b/flist.c
        if (preserve_uid)
                F_OWNER(file) = uid;
        if (preserve_gid) {
-@@ -1237,6 +1264,10 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1273,6 +1300,10 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
        }
  #endif
        file->mode = st.st_mode;
@@ -164,7 +164,7 @@ 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,
+@@ -1427,6 +1458,7 @@ static struct file_struct *send_file_name(int f, struct file_list *flist,
  #endif
  #ifdef SUPPORT_XATTRS
                if (preserve_xattrs) {
@@ -186,7 +186,7 @@ diff --git a/generator.c b/generator.c
  extern int uid_ndx;
  extern int gid_ndx;
  extern int delete_mode;
-@@ -166,7 +168,7 @@ static enum delret delete_item(char *fbuf, uint16 mode, uint16 flags)
+@@ -167,7 +169,7 @@ static enum delret delete_item(char *fbuf, uint16 mode, uint16 flags)
        }
  
        if (flags & DEL_NO_UID_WRITE)
@@ -195,7 +195,7 @@ diff --git a/generator.c b/generator.c
  
        if (S_ISDIR(mode) && !(flags & DEL_DIR_IS_EMPTY)) {
                int save_uid_ndx = uid_ndx;
-@@ -174,6 +176,13 @@ static enum delret delete_item(char *fbuf, uint16 mode, uint16 flags)
+@@ -175,6 +177,13 @@ static enum delret delete_item(char *fbuf, uint16 mode, uint16 flags)
                 * delete_dir_contents() always calls us w/DEL_DIR_IS_EMPTY. */
                if (!uid_ndx)
                        uid_ndx = ++file_extra_cnt;
@@ -209,7 +209,7 @@ diff --git a/generator.c b/generator.c
                ignore_perishable = 1;
                /* If DEL_RECURSE is not set, this just reports emptiness. */
                ret = delete_dir_contents(fbuf, flags);
-@@ -294,8 +303,12 @@ static enum delret delete_dir_contents(char *fname, uint16 flags)
+@@ -295,8 +304,12 @@ static enum delret delete_dir_contents(char *fname, uint16 flags)
                }
  
                strlcpy(p, fp->basename, remainder);
@@ -223,7 +223,7 @@ diff --git a/generator.c b/generator.c
                /* Save stack by recursing to ourself directly. */
                if (S_ISDIR(fp->mode)) {
                        if (delete_dir_contents(fname, flags | DEL_RECURSE) != DR_SUCCESS)
-@@ -596,6 +609,11 @@ int unchanged_attrs(const char *fname, struct file_struct *file, stat_x *sxp)
+@@ -597,6 +610,11 @@ int unchanged_attrs(const char *fname, struct file_struct *file, stat_x *sxp)
         && ((sxp->st.st_mode & 0111 ? 1 : 0) ^ (file->mode & 0111 ? 1 : 0)))
                return 0;
  
@@ -235,7 +235,7 @@ diff --git a/generator.c b/generator.c
        if (am_root && uid_ndx && sxp->st.st_uid != (uid_t)F_OWNER(file))
                return 0;
  
-@@ -661,6 +679,11 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
+@@ -662,6 +680,11 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
                if (gid_ndx && !(file->flags & FLAG_SKIP_GROUP)
                    && sxp->st.st_gid != (gid_t)F_GROUP(file))
                        iflags |= ITEM_REPORT_GROUP;
@@ -247,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))
-@@ -1439,6 +1462,10 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1440,6 +1463,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);
                }
@@ -258,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);
-@@ -1479,10 +1506,15 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1480,10 +1507,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. */
@@ -275,7 +275,7 @@ diff --git a/generator.c b/generator.c
                                rsyserr(FERROR_XFER, errno,
                                        "failed to modify permissions on %s",
                                        full_fname(fname));
-@@ -1517,6 +1549,10 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1518,6 +1550,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);
        }
@@ -286,7 +286,7 @@ diff --git a/generator.c b/generator.c
  
  #ifdef SUPPORT_HARD_LINKS
        if (preserve_hard_links && F_HLINK_NOT_FIRST(file)
-@@ -2051,13 +2087,17 @@ static void touch_up_dirs(struct file_list *flist, int ndx)
+@@ -2052,13 +2088,17 @@ static void touch_up_dirs(struct file_list *flist, int ndx)
                        continue;
                fname = f_name(file, NULL);
                if (!(file->mode & S_IWUSR))
@@ -309,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
-@@ -656,7 +656,7 @@ static void log_formatted(enum logcode code, const char *format, const char *op,
+@@ -660,7 +660,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';
@@ -416,7 +416,7 @@ diff --git a/options.c b/options.c
    {"ignore-errors",    0,  POPT_ARG_VAL,    &ignore_errors, 1, 0, 0 },
    {"no-ignore-errors", 0,  POPT_ARG_VAL,    &ignore_errors, 0, 0, 0 },
    {"max-delete",       0,  POPT_ARG_INT,    &max_delete, 0, 0, 0 },
-@@ -1858,6 +1884,9 @@ void server_options(char **args, int *argc_p)
+@@ -1866,6 +1892,9 @@ void server_options(char **args, int *argc_p)
        if (xfer_dirs && !recurse && delete_mode && am_sender)
                args[ac++] = "--no-r";
  
@@ -426,7 +426,7 @@ diff --git a/options.c b/options.c
        if (do_compression && def_compress_level != Z_DEFAULT_COMPRESSION) {
                if (asprintf(&arg, "--compress-level=%d", def_compress_level) < 0)
                        goto oom;
-@@ -1945,6 +1974,16 @@ void server_options(char **args, int *argc_p)
+@@ -1953,6 +1982,16 @@ void server_options(char **args, int *argc_p)
                        args[ac++] = "--delete-excluded";
                if (force_delete)
                        args[ac++] = "--force";
@@ -454,7 +454,7 @@ diff --git a/rsync.c b/rsync.c
  extern int preserve_executability;
  extern int preserve_times;
  extern int am_root;
-@@ -374,6 +375,39 @@ mode_t dest_mode(mode_t flist_mode, mode_t stat_mode, int dflt_perms,
+@@ -387,6 +388,39 @@ mode_t dest_mode(mode_t flist_mode, mode_t stat_mode, int dflt_perms,
        return new_mode;
  }
  
@@ -494,7 +494,7 @@ diff --git a/rsync.c b/rsync.c
  int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
                   const char *fnamecmp, int flags)
  {
-@@ -427,7 +461,7 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
+@@ -440,7 +474,7 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
                flags |= ATTRS_SKIP_MTIME;
        if (!(flags & ATTRS_SKIP_MTIME)
            && cmp_time(sxp->st.st_mtime, file->modtime) != 0) {
@@ -503,7 +503,7 @@ diff --git a/rsync.c b/rsync.c
                if (ret < 0) {
                        rsyserr(FERROR_XFER, errno, "failed to set times on %s",
                                full_fname(fname));
-@@ -463,7 +497,8 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
+@@ -476,7 +510,8 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
                if (am_root >= 0) {
                        if (do_lchown(fname,
                            change_uid ? (uid_t)F_OWNER(file) : sxp->st.st_uid,
@@ -513,7 +513,7 @@ diff --git a/rsync.c b/rsync.c
                                /* We shouldn't have attempted to change uid
                                 * or gid unless have the privilege. */
                                rsyserr(FERROR_XFER, errno, "%s %s failed",
-@@ -495,7 +530,7 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
+@@ -508,7 +543,7 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
  
  #ifdef HAVE_CHMOD
        if (!BITS_EQUAL(sxp->st.st_mode, new_mode, CHMOD_BITS)) {
@@ -522,7 +522,7 @@ diff --git a/rsync.c b/rsync.c
                if (ret < 0) {
                        rsyserr(FERROR_XFER, errno,
                                "failed to set permissions on %s",
-@@ -507,6 +542,19 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
+@@ -520,6 +555,19 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
        }
  #endif
  
@@ -542,7 +542,7 @@ diff --git a/rsync.c b/rsync.c
        if (verbose > 1 && flags & ATTRS_REPORT) {
                if (updated)
                        rprintf(FCLIENT, "%s\n", fname);
-@@ -570,7 +618,8 @@ int finish_transfer(const char *fname, const char *fnametmp,
+@@ -583,7 +631,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,
@@ -552,7 +552,7 @@ diff --git a/rsync.c b/rsync.c
  
        /* move tmp file over real file */
        if (verbose > 2)
-@@ -589,6 +638,10 @@ int finish_transfer(const char *fname, const char *fnametmp,
+@@ -602,6 +651,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. */
@@ -590,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)
-@@ -460,6 +463,28 @@ typedef unsigned int size_t;
+@@ -462,6 +465,28 @@ typedef unsigned int size_t;
  #endif
  #endif
  
@@ -619,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. */
-@@ -630,6 +655,7 @@ extern int file_extra_cnt;
+@@ -632,6 +657,7 @@ extern int file_extra_cnt;
  extern int inc_recurse;
  extern int uid_ndx;
  extern int gid_ndx;
@@ -627,7 +627,7 @@ diff --git a/rsync.h b/rsync.h
  extern int acls_ndx;
  extern int xattrs_ndx;
  
-@@ -667,6 +693,11 @@ extern int xattrs_ndx;
+@@ -669,6 +695,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
@@ -711,7 +711,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
-@@ -1190,12 +1218,13 @@ See bf(--delete) (which is implied) for more details on file-deletion.
+@@ -1197,12 +1225,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.
  
@@ -728,7 +728,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
-@@ -1651,7 +1680,7 @@ with older versions of rsync, but that also turns on the output of other
+@@ -1663,7 +1692,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
@@ -737,7 +737,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.
-@@ -1707,7 +1736,7 @@ quote(itemization(
+@@ -1719,7 +1748,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).
index c030199..a52c8c5 100644 (file)
@@ -34,7 +34,7 @@ diff --git a/options.c b/options.c
    {"rsh",             'e', POPT_ARG_STRING, &shell_cmd, 0, 0, 0 },
    {"rsync-path",       0,  POPT_ARG_STRING, &rsync_path, 0, 0, 0 },
    {"temp-dir",        'T', POPT_ARG_STRING, &tmpdir, 0, 0, 0 },
-@@ -2009,6 +2012,9 @@ void server_options(char **args, int *argc_p)
+@@ -2017,6 +2020,9 @@ void server_options(char **args, int *argc_p)
                        args[ac++] = tmpdir;
                }
  
index b9f3825..790e676 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;
-@@ -2718,6 +2719,7 @@ int f_name_cmp(const struct file_struct *f1, const struct file_struct *f2)
+@@ -2794,6 +2795,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;
-@@ -2828,7 +2830,15 @@ int f_name_cmp(const struct file_struct *f1, const struct file_struct *f2)
+@@ -2904,7 +2906,15 @@ int f_name_cmp(const struct file_struct *f1, const struct file_struct *f2)
                        if (type1 != type2)
                                return type1 == t_PATH ? 1 : -1;
                }
@@ -236,7 +236,7 @@ diff --git a/options.c b/options.c
    {"files-from",       0,  POPT_ARG_STRING, &files_from, 0, 0, 0 },
    {"from0",           '0', POPT_ARG_VAL,    &eol_nulls, 1, 0, 0},
    {"no-from0",         0,  POPT_ARG_VAL,    &eol_nulls, 0, 0, 0},
-@@ -1971,6 +1975,9 @@ void server_options(char **args, int *argc_p)
+@@ -1979,6 +1983,9 @@ void server_options(char **args, int *argc_p)
                args[ac++] = arg;
        }
  
@@ -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
-@@ -1438,6 +1439,10 @@ If you use this option with bf(--iconv), the args will also be translated
+@@ -1445,6 +1446,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 14db3e9..97d7f1d 100644 (file)
@@ -27,7 +27,7 @@ diff --git a/Makefile.in b/Makefile.in
 diff --git a/flist.c b/flist.c
 --- a/flist.c
 +++ b/flist.c
-@@ -70,6 +70,7 @@ extern int need_unsorted_flist;
+@@ -71,6 +71,7 @@ extern int sender_symlink_iconv;
  extern int unsort_ndx;
  extern struct stats stats;
  extern char *filesfrom_host;
@@ -35,7 +35,7 @@ diff --git a/flist.c b/flist.c
  
  extern char curr_dir[MAXPATHLEN];
  
-@@ -834,7 +835,7 @@ static struct file_struct *recv_file_entry(struct file_list *flist,
+@@ -844,7 +845,7 @@ static struct file_struct *recv_file_entry(struct file_list *flist,
                extra_len += EXTRA_LEN;
  #endif
  
@@ -443,7 +443,7 @@ diff --git a/options.c b/options.c
                default:
                        /* A large opt value means that set_refuse_options()
                         * turned this option off. */
-@@ -2028,6 +2046,11 @@ void server_options(char **args, int *argc_p)
+@@ -2036,6 +2054,11 @@ void server_options(char **args, int *argc_p)
        } else if (inplace)
                args[ac++] = "--inplace";
  
@@ -532,15 +532,15 @@ diff --git a/receiver.c b/receiver.c
 diff --git a/rsync.c b/rsync.c
 --- a/rsync.c
 +++ b/rsync.c
-@@ -48,6 +48,7 @@ extern int inplace;
- extern int flist_eof;
- extern int keep_dirlinks;
+@@ -50,6 +50,7 @@ extern int keep_dirlinks;
  extern int make_backups;
+ extern int delete_during;
+ extern int check_for_io_err;
 +extern char *link_by_hash_dir;
  extern struct file_list *cur_flist, *first_flist, *dir_flist;
  extern struct chmod_mode_struct *daemon_chmod_modes;
  #ifdef ICONV_OPTION
-@@ -575,8 +576,15 @@ int finish_transfer(const char *fname, const char *fnametmp,
+@@ -588,8 +589,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
-@@ -828,6 +828,14 @@ struct stats {
+@@ -830,6 +830,14 @@ struct stats {
        int num_transferred_files;
  };
  
index 3d36e52..b7ab815 100644 (file)
@@ -15,15 +15,15 @@ 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
-@@ -67,6 +67,7 @@ extern int protocol_version;
- extern int sanitize_paths;
+@@ -68,6 +68,7 @@ extern int sanitize_paths;
  extern int munge_symlinks;
  extern int need_unsorted_flist;
+ extern int sender_symlink_iconv;
 +extern int sender_keeps_checksum;
  extern int unsort_ndx;
  extern struct stats stats;
  extern char *filesfrom_host;
-@@ -1187,6 +1188,12 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1223,6 +1224,12 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
                extra_len += EXTRA_LEN;
  #endif
  
@@ -36,7 +36,7 @@ diff --git a/flist.c b/flist.c
  #if EXTRA_ROUNDING > 0
        if (extra_len & (EXTRA_ROUNDING * EXTRA_LEN))
                extra_len = (extra_len | (EXTRA_ROUNDING * EXTRA_LEN)) + EXTRA_LEN;
-@@ -1250,9 +1257,6 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1286,9 +1293,6 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
                memcpy(bp + basename_len, linkname, linkname_len);
  #endif
  
@@ -46,7 +46,7 @@ diff --git a/flist.c b/flist.c
        if (am_sender)
                F_PATHNAME(file) = pathname;
        else if (!pool)
-@@ -1283,6 +1287,9 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1319,6 +1323,9 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
                return NULL;
        }
  
@@ -78,7 +78,7 @@ diff --git a/log.c b/log.c
  
  static int log_initialised;
  static int logfile_was_closed;
-@@ -628,6 +631,28 @@ static void log_formatted(enum logcode code, const char *format, const char *op,
+@@ -632,6 +635,28 @@ static void log_formatted(enum logcode code, const char *format, const char *op,
                        snprintf(buf2, sizeof buf2, fmt, (double)b);
                        n = buf2;
                        break;
@@ -118,7 +118,7 @@ diff --git a/main.c b/main.c
  extern int remove_source_files;
  extern int need_messages_from_generator;
  extern int kluge_around_eof;
-@@ -68,6 +69,8 @@ extern int connect_timeout;
+@@ -71,6 +72,8 @@ extern int check_for_io_err;
  extern pid_t cleanup_child_pid;
  extern unsigned int module_dirlen;
  extern struct stats stats;
@@ -127,7 +127,7 @@ diff --git a/main.c b/main.c
  extern char *filesfrom_host;
  extern char *partial_dir;
  extern char *dest_option;
-@@ -85,6 +88,7 @@ int local_server = 0;
+@@ -88,6 +91,7 @@ int local_server = 0;
  int daemon_over_rsh = 0;
  mode_t orig_umask = 0;
  int batch_gen_fd = -1;
@@ -135,7 +135,7 @@ diff --git a/main.c b/main.c
  
  /* There's probably never more than at most 2 outstanding child processes,
   * but set it higher, just in case. */
-@@ -1003,6 +1007,12 @@ int client_run(int f_in, int f_out, pid_t pid, int argc, char *argv[])
+@@ -1008,6 +1012,12 @@ int client_run(int f_in, int f_out, pid_t pid, int argc, char *argv[])
  
        if (am_sender) {
                keep_dirlinks = 0; /* Must be disabled on the sender. */
@@ -271,27 +271,13 @@ diff --git a/receiver.c b/receiver.c
                return 0;
        return 1;
  }
-diff --git a/rsync.yo b/rsync.yo
---- a/rsync.yo
-+++ b/rsync.yo
-@@ -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.
--Note that setting NUM to 0 causes rsync to use the default of code(time())
-+Setting NUM to 0 causes rsync to use the default of code(time())
- for checksum seed.
- enddit()
 diff --git a/rsyncd.conf.yo b/rsyncd.conf.yo
 --- a/rsyncd.conf.yo
 +++ b/rsyncd.conf.yo
-@@ -509,7 +509,8 @@ quote(itemization(
-   it() %a the remote IP address
+@@ -510,6 +510,7 @@ quote(itemization(
    it() %b the number of bytes actually transferred
    it() %B the permission bits of the file (e.g. rwxrwxrwt)
--  it() %c the checksum bytes received for this file (only when sending)
-+  it() %c the total size of the block checksums received for the basis file (only when sending)
+   it() %c the total size of the block checksums received for the basis file (only when sending)
 +  it() %C the full-file MD5 checksum if bf(--checksum) is enabled or a file was transferred (only for protocol 30 or above).
    it() %f the filename (long form on sender; no trailing "/")
    it() %G the gid of the file (decimal) or "DEFAULT"
index 58a469b..cbbbfda 100644 (file)
@@ -185,7 +185,7 @@ diff --git a/rsync.yo b/rsync.yo
 diff --git a/rsyncd.conf.yo b/rsyncd.conf.yo
 --- a/rsyncd.conf.yo
 +++ b/rsyncd.conf.yo
-@@ -192,8 +192,9 @@ to translate names, and that it is not possible for a user to change those
+@@ -191,8 +191,9 @@ to translate names, and that it is not possible for a user to change those
  resources.
  
  dit(bf(munge symlinks)) This parameter tells rsync to modify
@@ -197,13 +197,3 @@ diff --git a/rsyncd.conf.yo b/rsyncd.conf.yo
  your daemon module is writable.  The default is disabled when "use chroot"
  is on and the inside-chroot path is "/", otherwise it is enabled.
  
-@@ -213,7 +214,8 @@ to the exclude setting for the module so that
- a user can't try to create it.
- Note:  rsync makes no attempt to verify that any pre-existing symlinks in
--the hierarchy are as safe as you want them to be.  If you setup an rsync
-+the module's hierarchy are as safe as you want them to be (unless, of
-+course, it just copied in the whole hierarchy).  If you setup an rsync
- daemon on a new area or locally add symlinks, you can manually protect your
- symlinks from being abused by prefixing "/rsyncd-munged/" to the start of
- every symlink's value.  There is a perl script in the support directory
index 56776c1..ec57c81 100644 (file)
@@ -176,7 +176,7 @@ diff --git a/loadparm.c b/loadparm.c
 diff --git a/rsyncd.conf.yo b/rsyncd.conf.yo
 --- a/rsyncd.conf.yo
 +++ b/rsyncd.conf.yo
-@@ -160,10 +160,11 @@ if the module is not read-only).
+@@ -159,10 +159,11 @@ if the module is not read-only).
  
  When this parameter is enabled, rsync will not attempt to map users and groups
  by name (by default), but instead copy IDs as though bf(--numeric-ids) had
index 6d4ce6e..2a832e9 100644 (file)
@@ -18,7 +18,7 @@ diff --git a/generator.c b/generator.c
  extern int uid_ndx;
  extern int gid_ndx;
  extern int delete_mode;
-@@ -627,6 +628,7 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
+@@ -628,6 +629,7 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
             const char *xname)
  {
        if (statret >= 0) { /* A from-dest-dir statret can == 1! */
@@ -26,7 +26,7 @@ diff --git a/generator.c b/generator.c
                int keep_time = !preserve_times ? 0
                    : S_ISDIR(file->mode) ? preserve_times > 1 :
  #if defined HAVE_LUTIMES && defined HAVE_UTIMES
-@@ -656,10 +658,11 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
+@@ -657,10 +659,11 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
                } else if (preserve_executability
                 && ((sxp->st.st_mode & 0111 ? 1 : 0) ^ (file->mode & 0111 ? 1 : 0)))
                        iflags |= ITEM_REPORT_PERMS;
@@ -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)) {
-@@ -1435,7 +1438,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1436,7 +1439,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                real_sx = sx;
                if (file->flags & FLAG_DIR_CREATED)
                        statret = -1;
@@ -106,7 +106,7 @@ diff --git a/rsync.c b/rsync.c
  extern int am_root;
  extern int am_server;
  extern int am_sender;
-@@ -439,9 +440,11 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
+@@ -452,9 +453,11 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
                        file->flags |= FLAG_TIME_FAILED;
        }
  
index 2b51359..f6bf1b6 100644 (file)
@@ -393,7 +393,7 @@ diff --git a/options.c b/options.c
        if (inplace) {
  #ifdef HAVE_FTRUNCATE
                if (partial_dir) {
-@@ -2072,10 +2146,27 @@ char *check_for_hostspec(char *s, char **host_ptr, int *port_ptr)
+@@ -2085,10 +2159,27 @@ char *check_for_hostspec(char *s, char **host_ptr, int *port_ptr)
        char *p;
        int not_host;
        int hostlen;
@@ -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)
-@@ -547,6 +548,11 @@ typedef unsigned int size_t;
+@@ -549,6 +550,11 @@ typedef unsigned int size_t;
  # define SIZEOF_INT64 SIZEOF_OFF_T
  #endif
  
index 9a82005..44b1926 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
-@@ -1355,6 +1355,7 @@ static struct file_struct *send_file_name(int f, struct file_list *flist,
+@@ -1427,6 +1427,7 @@ static struct file_struct *send_file_name(int f, struct file_list *flist,
  #endif
  #ifdef SUPPORT_XATTRS
                if (preserve_xattrs) {
index 41f4429..f745892 100644 (file)
@@ -20,7 +20,7 @@ diff --git a/compat.c b/compat.c
  extern int append_mode;
  extern int fuzzy_basis;
  extern int read_batch;
-@@ -184,6 +185,15 @@ void setup_protocol(int f_out,int f_in)
+@@ -187,6 +188,15 @@ void setup_protocol(int f_out,int f_in)
        if (read_batch)
                check_batch_flags();
  
@@ -139,16 +139,16 @@ diff --git a/options.c b/options.c
    {"inplace",          0,  POPT_ARG_VAL,    &inplace, 1, 0, 0 },
    {"no-inplace",       0,  POPT_ARG_VAL,    &inplace, 0, 0, 0 },
    {"append",           0,  POPT_ARG_NONE,   0, OPT_APPEND, 0, 0 },
-@@ -2053,6 +2062,9 @@ void server_options(char **args, int *argc_p)
+@@ -2061,6 +2070,9 @@ void server_options(char **args, int *argc_p)
        else if (remove_source_files)
                args[ac++] = "--remove-sent-files";
  
 +      if (preallocate_files && am_sender)
 +              args[ac++] = "--preallocate";
 +
-       *argc_p = ac;
-       return;
+       if (ac > MAX_SERVER_ARGS) { /* Not possible... */
+               rprintf(FERROR, "argc overflow in server_options().\n");
+               exit_cleanup(RERR_MALLOC);
 diff --git a/receiver.c b/receiver.c
 --- a/receiver.c
 +++ b/receiver.c
@@ -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
-@@ -612,6 +612,13 @@ struct ht_int64_node {
+@@ -614,6 +614,13 @@ struct ht_int64_node {
  #define ACLS_NEED_MASK 1
  #endif
  
index cc1ccc1..35efdbf 100644 (file)
@@ -68,7 +68,7 @@ diff --git a/options.c b/options.c
                case OPT_WRITE_BATCH:
                        /* batch_name is already set */
                        write_batch = 1;
-@@ -1832,6 +1858,11 @@ void server_options(char **args, int *argc_p)
+@@ -1840,6 +1866,11 @@ void server_options(char **args, int *argc_p)
  
        argstr[x] = '\0';
  
@@ -80,15 +80,10 @@ diff --git a/options.c b/options.c
        args[ac++] = argstr;
  
  #ifdef ICONV_OPTION
-@@ -2053,6 +2084,21 @@ void server_options(char **args, int *argc_p)
+@@ -2061,6 +2092,16 @@ void server_options(char **args, int *argc_p)
        else if (remove_source_files)
                args[ac++] = "--remove-sent-files";
  
-+      if (ac > MAX_SERVER_ARGS) { /* Not possible... */
-+              rprintf(FERROR, "argc overflow in server_options().\n");
-+              exit_cleanup(RERR_MALLOC);
-+      }
-+
 +      if (remote_option_cnt) {
 +              int j;
 +              if (ac + remote_option_cnt > MAX_SERVER_ARGS) {
@@ -99,9 +94,9 @@ diff --git a/options.c b/options.c
 +                      args[ac++] = (char*)remote_options[j];
 +      }
 +
-       *argc_p = ac;
-       return;
+       if (ac > MAX_SERVER_ARGS) { /* Not possible... */
+               rprintf(FERROR, "argc overflow in server_options().\n");
+               exit_cleanup(RERR_MALLOC);
 diff --git a/pipe.c b/pipe.c
 --- a/pipe.c
 +++ b/pipe.c
@@ -166,7 +161,7 @@ diff --git a/rsync.yo b/rsync.yo
  
  This option is overridden by both bf(--super) and bf(--no-super).
  
-@@ -1281,6 +1282,36 @@ machine for use with the bf(--relative) option.  For instance:
+@@ -1288,6 +1289,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 +198,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
-@@ -1752,7 +1783,7 @@ option if you wish to override this.
+@@ -1764,7 +1795,7 @@ option if you wish to override this.
  Here's a example command that requests the remote side to log what is
  happening:
  
index 95a4b09..b78c871 100644 (file)
@@ -17,15 +17,15 @@ 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
-@@ -68,6 +68,7 @@ extern int sanitize_paths;
- extern int munge_symlinks;
+@@ -69,6 +69,7 @@ extern int munge_symlinks;
  extern int need_unsorted_flist;
+ extern int sender_symlink_iconv;
  extern int unsort_ndx;
 +extern unsigned long sleep_asec;
  extern struct stats stats;
  extern char *filesfrom_host;
  
-@@ -1572,6 +1573,9 @@ static void send_directory(int f, struct file_list *flist, char *fbuf, int len,
+@@ -1648,6 +1649,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 1f4501a..18a0f6e 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
-@@ -1121,6 +1121,18 @@ static int start_client(int argc, char *argv[])
+@@ -1126,6 +1126,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);
@@ -220,8 +220,8 @@ diff --git a/rsyncd.conf.yo b/rsyncd.conf.yo
 --- a/rsyncd.conf.yo
 +++ b/rsyncd.conf.yo
 @@ -104,6 +104,15 @@ details on some of the options you may be able to set. By default no
- special socket options are set.  These settings are superseded by the
- bf(--sockopts) command-line option.
+ special socket options are set.  These settings can also be specified
via the bf(--sockopts) command-line option.
  
 +dit(bf(slp refresh)) This parameter is used to determine how long service
 +advertisements are valid (measured in seconds), and is only applicable if
@@ -234,7 +234,7 @@ diff --git a/rsyncd.conf.yo b/rsyncd.conf.yo
 +
  enddit()
  
+ manpagesection(MODULE PARAMETERS)
 @@ -652,6 +661,7 @@ use chroot = yes
  max connections = 4
  syslog facility = local5
index ecd813d..f12bd15 100644 (file)
@@ -36,7 +36,7 @@ diff --git a/options.c b/options.c
    {"no-backup",        0,  POPT_ARG_VAL,    &make_backups, 0, 0, 0 },
    {"backup-dir",       0,  POPT_ARG_STRING, &backup_dir, 0, 0, 0 },
    {"suffix",           0,  POPT_ARG_STRING, &backup_suffix, 0, 0, 0 },
-@@ -1957,6 +1960,8 @@ void server_options(char **args, int *argc_p)
+@@ -1965,6 +1968,8 @@ void server_options(char **args, int *argc_p)
                                goto oom;
                        args[ac++] = arg;
                }
index de0410b..384e5f3 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;
-@@ -714,7 +715,7 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
+@@ -715,7 +716,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)
  {
@@ -53,7 +53,7 @@ diff --git a/generator.c b/generator.c
 diff --git a/main.c b/main.c
 --- a/main.c
 +++ b/main.c
-@@ -136,7 +136,7 @@ pid_t wait_process(pid_t pid, int *status_ptr, int flags)
+@@ -139,7 +139,7 @@ pid_t wait_process(pid_t pid, int *status_ptr, int flags)
  }
  
  /* Wait for a process to exit, calling io_flush while waiting. */
@@ -133,7 +133,7 @@ diff --git a/options.c b/options.c
        if (files_from) {
                char *h, *p;
                int q;
-@@ -1959,6 +1978,25 @@ void server_options(char **args, int *argc_p)
+@@ -1967,6 +1986,25 @@ void server_options(char **args, int *argc_p)
                }
        }
  
@@ -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)
-@@ -2039,6 +2042,33 @@ file previously generated by bf(--write-batch).
+@@ -2051,6 +2054,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 27fa9b1..39bacb0 100644 (file)
@@ -65,7 +65,7 @@ diff --git a/options.c b/options.c
    {"inplace",          0,  POPT_ARG_VAL,    &inplace, 1, 0, 0 },
    {"no-inplace",       0,  POPT_ARG_VAL,    &inplace, 0, 0, 0 },
    {"append",           0,  POPT_ARG_NONE,   0, OPT_APPEND, 0, 0 },
-@@ -1891,6 +1894,12 @@ void server_options(char **args, int *argc_p)
+@@ -1899,6 +1902,12 @@ void server_options(char **args, int *argc_p)
                args[ac++] = arg;
        }
  
index 5226710..6c71919 100644 (file)
@@ -20,7 +20,7 @@ diff --git a/io.c b/io.c
  extern struct file_list *cur_flist;
  #ifdef ICONV_OPTION
  extern int filesfrom_convert;
-@@ -221,16 +222,24 @@ static void check_timeout(void)
+@@ -222,16 +223,24 @@ static void check_timeout(void)
  {
        time_t t;
  
@@ -123,7 +123,7 @@ diff --git a/options.c b/options.c
                default:
                        /* A large opt value means that set_refuse_options()
                         * turned this option off. */
-@@ -1903,6 +1938,15 @@ void server_options(char **args, int *argc_p)
+@@ -1911,6 +1946,15 @@ void server_options(char **args, int *argc_p)
                args[ac++] = arg;
        }
  
@@ -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
-@@ -2013,6 +2015,19 @@ transfer was too fast, it will wait before sending the next data block. The
+@@ -2025,6 +2027,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.
  
index 845317a..0ecfb6c 100644 (file)
@@ -16,7 +16,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
-@@ -83,6 +83,9 @@ extern int filesfrom_convert;
+@@ -84,6 +84,9 @@ extern int filesfrom_convert;
  extern iconv_t ic_send, ic_recv;
  #endif
  
@@ -26,7 +26,7 @@ diff --git a/flist.c b/flist.c
  #define PTR_SIZE (sizeof (struct file_struct *))
  
  int io_error;
-@@ -616,6 +619,24 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
+@@ -619,6 +622,24 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
                stats.total_size += F_LENGTH(file);
  }
  
@@ -51,7 +51,7 @@ diff --git a/flist.c b/flist.c
  static struct file_struct *recv_file_entry(struct file_list *flist,
                                           int xflags, int f)
  {
-@@ -684,6 +705,9 @@ static struct file_struct *recv_file_entry(struct file_list *flist,
+@@ -687,6 +708,9 @@ static struct file_struct *recv_file_entry(struct file_list *flist,
        }
  #endif
  
@@ -121,7 +121,7 @@ diff --git a/options.c b/options.c
        am_starting_up = 0;
  
        return 1;
-@@ -2053,6 +2082,12 @@ void server_options(char **args, int *argc_p)
+@@ -2061,6 +2090,12 @@ void server_options(char **args, int *argc_p)
        else if (remove_source_files)
                args[ac++] = "--remove-sent-files";
  
@@ -131,9 +131,9 @@ diff --git a/options.c b/options.c
 +              args[ac++] = arg;
 +      }
 +
-       *argc_p = ac;
-       return;
+       if (ac > MAX_SERVER_ARGS) { /* Not possible... */
+               rprintf(FERROR, "argc overflow in server_options().\n");
+               exit_cleanup(RERR_MALLOC);
 diff --git a/rsync.yo b/rsync.yo
 --- a/rsync.yo
 +++ b/rsync.yo
@@ -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
-@@ -2077,6 +2078,22 @@ daemon uses the charset specified in its "charset" configuration parameter
+@@ -2089,6 +2090,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 2608b15..0c30f4e 100644 (file)
@@ -10,7 +10,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
-@@ -70,6 +70,7 @@ extern int need_unsorted_flist;
+@@ -71,6 +71,7 @@ extern int sender_symlink_iconv;
  extern int unsort_ndx;
  extern struct stats stats;
  extern char *filesfrom_host;
@@ -18,7 +18,7 @@ diff --git a/flist.c b/flist.c
  
  extern char curr_dir[MAXPATHLEN];
  
-@@ -764,7 +765,7 @@ static struct file_struct *recv_file_entry(struct file_list *flist,
+@@ -767,7 +768,7 @@ static struct file_struct *recv_file_entry(struct file_list *flist,
                        uid = (uid_t)read_varint(f);
                        if (xflags & XMIT_USER_NAME_FOLLOWS)
                                uid = recv_user_name(f, uid);
@@ -27,7 +27,7 @@ diff --git a/flist.c b/flist.c
                                uid = match_uid(uid);
                }
        }
-@@ -776,7 +777,7 @@ static struct file_struct *recv_file_entry(struct file_list *flist,
+@@ -779,7 +780,7 @@ static struct file_struct *recv_file_entry(struct file_list *flist,
                        gid_flags = 0;
                        if (xflags & XMIT_GROUP_NAME_FOLLOWS)
                                gid = recv_group_name(f, gid, &gid_flags);
@@ -36,7 +36,7 @@ diff --git a/flist.c b/flist.c
                                gid = match_gid(gid, &gid_flags);
                }
        }
-@@ -2188,8 +2189,13 @@ struct file_list *recv_file_list(int f)
+@@ -2264,8 +2265,13 @@ struct file_list *recv_file_list(int f)
        int dstart, flags;
        int64 start_read;
  
@@ -115,7 +115,7 @@ diff --git a/options.c b/options.c
                case OPT_HELP:
                        usage(FINFO);
                        exit_cleanup(0);
-@@ -1997,6 +2021,18 @@ void server_options(char **args, int *argc_p)
+@@ -2005,6 +2029,18 @@ void server_options(char **args, int *argc_p)
                args[ac++] = "--use-qsort";
  
        if (am_sender) {
@@ -146,7 +146,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
-@@ -1608,6 +1610,47 @@ from the source system is used instead.  See also the comments on the
+@@ -1620,6 +1622,47 @@ 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.
  
@@ -194,6 +194,26 @@ diff --git a/rsync.yo b/rsync.yo
  dit(bf(--timeout=TIMEOUT)) This option allows you to set a maximum I/O
  timeout in seconds. If no data is transferred for the specified time
  then rsync will exit. The default is 0, which means no timeout.
+diff --git a/support/mapfrom b/support/mapfrom
+new file mode 100755
+--- /dev/null
++++ b/support/mapfrom
+@@ -0,0 +1,5 @@
++#!/usr/bin/perl
++while (<>) {
++    push @_, "$2:$1" if /^(\w+):[^:]+:(\d+)/;
++}
++print join(',', @_), "\n";
+diff --git a/support/mapto b/support/mapto
+new file mode 100755
+--- /dev/null
++++ b/support/mapto
+@@ -0,0 +1,5 @@
++#!/usr/bin/perl
++while (<>) {
++    push @_, "$1:$2" if /^(\w+):[^:]+:(\d+)/;
++}
++print join(',', @_), "\n";
 diff --git a/uidlist.c b/uidlist.c
 --- a/uidlist.c
 +++ b/uidlist.c
index cf0eab1..4446c7c 100644 (file)
@@ -13,7 +13,7 @@ To use this patch, run these commands for a successful build:
 diff --git a/compat.c b/compat.c
 --- a/compat.c
 +++ b/compat.c
-@@ -187,13 +187,6 @@ void setup_protocol(int f_out,int f_in)
+@@ -190,13 +190,6 @@ void setup_protocol(int f_out,int f_in)
        if (protocol_version < 30) {
                if (append_mode == 1)
                        append_mode = 2;