./configure (optional if already run)
make
-based-on: 4c8eb5f9511dd1393b147c4e993ee15448faedf5
+based-on: 7cb0de6326c915a72253fd103dae93308031ec3f
diff --git a/acls.c b/acls.c
--- a/acls.c
+++ b/acls.c
diff --git a/compat.c b/compat.c
--- a/compat.c
+++ b/compat.c
-@@ -201,13 +201,6 @@ void setup_protocol(int f_out,int f_in)
+@@ -203,13 +203,6 @@ void setup_protocol(int f_out,int f_in)
if (protocol_version < 30) {
if (append_mode == 1)
append_mode = 2;
Fix a bug that could lose some bits when stripping some (supposedly)
superfluous ACL info.
-based-on: 4c8eb5f9511dd1393b147c4e993ee15448faedf5
+based-on: 7cb0de6326c915a72253fd103dae93308031ec3f
diff --git a/lib/sysacls.c b/lib/sysacls.c
--- a/lib/sysacls.c
+++ b/lib/sysacls.c
./configure (optional if already run)
make
-based-on: 4c8eb5f9511dd1393b147c4e993ee15448faedf5
+based-on: 7cb0de6326c915a72253fd103dae93308031ec3f
diff --git a/compat.c b/compat.c
--- a/compat.c
+++ b/compat.c
-@@ -46,6 +46,7 @@ extern int protocol_version;
+@@ -47,6 +47,7 @@ extern int protocol_version;
extern int protect_args;
extern int preserve_uid;
extern int preserve_gid;
extern int preserve_acls;
extern int preserve_xattrs;
extern int need_messages_from_generator;
-@@ -63,7 +64,7 @@ extern char *iconv_opt;
+@@ -64,7 +65,7 @@ extern char *iconv_opt;
#endif
/* These index values are for the file-list's extra-attribute array. */
int receiver_symlink_times = 0; /* receiver can set the time on a symlink */
int sender_symlink_iconv = 0; /* sender should convert symlink content */
-@@ -140,6 +141,8 @@ void setup_protocol(int f_out,int f_in)
+@@ -142,6 +143,8 @@ void setup_protocol(int f_out,int f_in)
uid_ndx = ++file_extra_cnt;
if (preserve_gid)
gid_ndx = ++file_extra_cnt;
if (chmod_modes && !S_ISLNK(mode) && mode)
mode = tweak_mode(mode, chmod_modes);
-@@ -977,6 +997,8 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
+@@ -984,6 +1004,8 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
F_GROUP(file) = gid;
file->flags |= gid_flags;
}
if (unsort_ndx)
F_NDX(file) = flist->used + flist->ndx_start;
-@@ -1374,6 +1396,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1381,6 +1403,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
F_GROUP(file) = st.st_gid;
if (am_generator && st.st_uid == our_uid)
file->flags |= FLAG_OWNED_BY_US;
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
-@@ -499,6 +499,9 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
+@@ -500,6 +500,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;
#if !defined HAVE_LCHMOD && !defined HAVE_SETATTRLIST
if (S_ISLNK(file->mode)) {
;
-@@ -914,6 +917,8 @@ static int try_dests_reg(struct file_struct *file, char *fname, int ndx,
+@@ -917,6 +920,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;
if (preserve_hard_links && F_IS_HLINKED(file))
finish_hard_link(file, fname, ndx, &sxp->st, itemizing, code, j);
if (!maybe_ATTRS_REPORT && (INFO_GTE(NAME, 2) || stdout_format_has_i > 1)) {
-@@ -1116,6 +1121,7 @@ static int try_dests_non(struct file_struct *file, char *fname, int ndx,
+@@ -1119,6 +1124,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];
int64 len;
int colwidth = human_readable ? 14 : 11;
-@@ -1131,10 +1137,12 @@ static void list_file_entry(struct file_struct *f)
+@@ -1134,10 +1140,12 @@ static void list_file_entry(struct file_struct *f)
#ifdef SUPPORT_LINKS
if (preserve_links && S_ISLNK(f->mode)) {
} else
#endif
if (missing_args == 2 && f->mode == 0) {
-@@ -1142,9 +1150,12 @@ static void list_file_entry(struct file_struct *f)
+@@ -1145,9 +1153,12 @@ static void list_file_entry(struct file_struct *f)
colwidth + 31, "*missing",
f_name(f, NULL));
} else {
}
}
-@@ -2048,7 +2059,7 @@ static void touch_up_dirs(struct file_list *flist, int ndx)
+@@ -2050,7 +2061,7 @@ static void touch_up_dirs(struct file_list *flist, int ndx)
STRUCT_STAT st;
if (link_stat(fname, &st, 0) == 0
&& cmp_time(st.st_mtime, file->modtime) != 0)
diff --git a/rsync.yo b/rsync.yo
--- a/rsync.yo
+++ b/rsync.yo
-@@ -369,6 +369,7 @@ to the detailed description below for a complete description. verb(
+@@ -372,6 +372,7 @@ to the detailed description below for a complete description. verb(
--specials preserve special files
-D same as --devices --specials
-t, --times preserve modification times
-O, --omit-dir-times omit directories from --times
-J, --omit-link-times omit symlinks from --times
--super receiver attempts super-user activities
-@@ -1170,6 +1171,12 @@ cause the next transfer to behave as if it used bf(-I), causing all files to be
+@@ -1173,6 +1174,12 @@ cause the next transfer to behave as if it used bf(-I), causing all files to be
updated (though rsync's delta-transfer algorithm will make the update fairly efficient
if the files haven't actually changed, you're much better off using bf(-t)).
dit(bf(-O, --omit-dir-times)) This tells rsync to omit directories when
it is preserving modification times (see bf(--times)). If NFS is sharing
the directories on the receiving side, it is a good idea to use bf(-O).
-@@ -2127,7 +2134,10 @@ quote(itemization(
+@@ -2130,7 +2137,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).
./configure (optional if already run)
make
-based-on: 4c8eb5f9511dd1393b147c4e993ee15448faedf5
+based-on: 7cb0de6326c915a72253fd103dae93308031ec3f
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
-@@ -1777,7 +1777,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1780,7 +1780,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
goto notify_others;
if (read_batch || whole_file) {
if (!(backupptr = get_backup_name(fname)))
goto cleanup;
if (!(back_file = make_file(fname, NULL, NULL, 0, NO_FILTERS)))
-@@ -1813,7 +1813,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1816,7 +1816,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
goto notify_others;
}
if (!(backupptr = get_backup_name(fname))) {
close(fd);
goto cleanup;
-@@ -1937,7 +1937,7 @@ int atomic_create(struct file_struct *file, char *fname, const char *lnk,
+@@ -1940,7 +1940,7 @@ int atomic_create(struct file_struct *file, char *fname, const char *slnk, const
skip_atomic = 0;
if (del_for_flag) {
{"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 },
-@@ -2595,6 +2597,10 @@ void server_options(char **args, int *argc_p)
+@@ -2596,6 +2598,10 @@ void server_options(char **args, int *argc_p)
}
if (am_sender) {
diff --git a/receiver.c b/receiver.c
--- a/receiver.c
+++ b/receiver.c
-@@ -421,7 +421,7 @@ static void handle_delayed_updates(char *local_name)
+@@ -422,7 +422,7 @@ static void handle_delayed_updates(char *local_name)
struct file_struct *file = cur_flist->files[ndx];
fname = local_name ? local_name : f_name(file, NULL);
if ((partialptr = partial_dir_fname(fname)) != NULL) {
continue;
if (DEBUG_GTE(RECV, 1)) {
rprintf(FINFO, "renaming %s to %s\n",
-@@ -733,7 +733,7 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -736,7 +736,7 @@ int recv_files(int f_in, int f_out, char *local_name)
} else {
/* Reminder: --inplace && --partial-dir are never
* enabled at the same time. */
diff --git a/rsync.yo b/rsync.yo
--- a/rsync.yo
+++ b/rsync.yo
-@@ -343,6 +343,7 @@ to the detailed description below for a complete description. verb(
+@@ -346,6 +346,7 @@ to the detailed description below for a complete description. verb(
-R, --relative use relative path names
--no-implied-dirs don't send implied dirs with --relative
-b, --backup make backups (see --suffix & --backup-dir)
--backup-dir=DIR make backups into hierarchy based in DIR
--suffix=SUFFIX backup suffix (default ~ w/o --backup-dir)
-u, --update skip files that are newer on the receiver
-@@ -775,6 +776,11 @@ in the list so that it has a high enough priority to be effective (e.g., if
+@@ -778,6 +779,11 @@ in the list so that it has a high enough priority to be effective (e.g., if
your rules specify a trailing inclusion/exclusion of '*', the auto-added
rule would never be reached).
if (preserve_times) {
preserve_times = PRESERVE_FILE_TIMES;
-@@ -2587,6 +2649,10 @@ void server_options(char **args, int *argc_p)
+@@ -2588,6 +2650,10 @@ void server_options(char **args, int *argc_p)
args[ac++] = "--backup-dir";
args[ac++] = backup_dir;
}
/* Only send --suffix if it specifies a non-default value. */
if (strcmp(backup_suffix, backup_dir ? "" : BACKUP_SUFFIX) != 0) {
-@@ -2595,7 +2661,14 @@ void server_options(char **args, int *argc_p)
+@@ -2596,7 +2662,14 @@ void server_options(char **args, int *argc_p)
goto oom;
args[ac++] = arg;
}
./configure (optional if already run)
make
-based-on: 4c8eb5f9511dd1393b147c4e993ee15448faedf5
+based-on: 7cb0de6326c915a72253fd103dae93308031ec3f
diff --git a/errcode.h b/errcode.h
--- a/errcode.h
+++ b/errcode.h
./configure (optional if already run)
make
-based-on: 4c8eb5f9511dd1393b147c4e993ee15448faedf5
+based-on: 7cb0de6326c915a72253fd103dae93308031ec3f
diff --git a/clientserver.c b/clientserver.c
--- a/clientserver.c
+++ b/clientserver.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
-@@ -1139,7 +1393,7 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1146,7 +1400,7 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
STRUCT_STAT *stp, int flags, int filter_level)
{
static char *lastdir;
struct file_struct *file;
char thisname[MAXPATHLEN];
char linkname[MAXPATHLEN];
-@@ -1285,9 +1539,16 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1292,9 +1546,16 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
memcpy(lastdir, thisname, len);
lastdir[len] = '\0';
lastdir_len = len;
basename_len = strlen(basename) + 1; /* count the '\0' */
#ifdef SUPPORT_LINKS
-@@ -1305,11 +1566,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1312,11 +1573,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
extra_len += EXTRA_LEN;
#endif
#if EXTRA_ROUNDING > 0
if (extra_len & (EXTRA_ROUNDING * EXTRA_LEN))
-@@ -1394,8 +1652,14 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1401,8 +1659,14 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
return NULL;
}
if (unsort_ndx)
F_NDX(file) = stats.num_dirs;
-@@ -2559,7 +2823,7 @@ struct file_list *recv_file_list(int f)
+@@ -2566,7 +2830,7 @@ struct file_list *recv_file_list(int f)
/* The --relative option sends paths with a leading slash, so we need
* to specify the strip_root option here. We rejected leading slashes
* for a non-relative transfer in recv_file_entry(). */
if (protocol_version < 30) {
/* Recv the io_error flag */
-@@ -2782,7 +3046,7 @@ void flist_free(struct file_list *flist)
+@@ -2789,7 +3053,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. */
{
char fbuf[MAXPATHLEN];
int i, prev_i;
-@@ -2833,7 +3097,7 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
+@@ -2840,7 +3104,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. */
struct file_struct *fp = flist->sorted[j];
if (!S_ISDIR(fp->mode))
keep = i, drop = j;
-@@ -2849,8 +3113,8 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
+@@ -2856,8 +3120,8 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
} else
keep = j, drop = i;
rprintf(FINFO,
"removing duplicate name %s from file list (%d)\n",
f_name(file, fbuf), drop + flist->ndx_start);
-@@ -2872,7 +3136,7 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
+@@ -2879,7 +3143,7 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
}
flist->high = prev_i;
extern int remove_source_files;
extern int delay_updates;
extern int update_only;
-@@ -566,7 +567,7 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
+@@ -569,7 +570,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. */
{
if (st->st_size != F_LENGTH(file))
return 0;
-@@ -575,7 +576,10 @@ int unchanged_file(char *fn, struct file_struct *file, STRUCT_STAT *st)
+@@ -578,7 +579,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];
return memcmp(sum, F_SUM(file), checksum_len) == 0;
}
-@@ -874,7 +878,7 @@ static int try_dests_reg(struct file_struct *file, char *fname, int ndx,
+@@ -877,7 +881,7 @@ static int try_dests_reg(struct file_struct *file, char *fname, int ndx,
match_level = 1;
/* FALL THROUGH */
case 1:
continue;
best_match = j;
match_level = 2;
-@@ -1180,7 +1184,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1183,7 +1187,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
* --ignore-non-existing, daemon exclude, or mkdir failure. */
static struct file_struct *skip_dir = NULL;
static struct file_list *fuzzy_dirlist[MAX_BASIS_DIRS+1];
struct file_struct *fuzzy_file = NULL;
int fd = -1, f_copy = -1;
stat_x sx, real_sx;
-@@ -1271,8 +1275,9 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1274,8 +1278,9 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
fuzzy_dirlist[i] = NULL;
}
}
#ifdef SUPPORT_ACLS
if (!preserve_perms)
dflt_perms = default_perms_for_dir(dn);
-@@ -1280,7 +1285,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1283,7 +1288,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
}
parent_dirname = dn;
int i;
strlcpy(fnamecmpbuf, dn, sizeof fnamecmpbuf);
for (i = 0; i < fuzzy_basis; i++) {
-@@ -1292,7 +1297,10 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1295,7 +1300,10 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
fuzzy_dirlist[i] = NULL;
}
}
}
statret = link_stat(fname, &sx.st, keep_dirlinks && is_dir);
-@@ -1737,7 +1745,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1740,7 +1748,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
;
else if (fnamecmp_type == FNAMECMP_FUZZY)
;
diff --git a/rsync.yo b/rsync.yo
--- a/rsync.yo
+++ b/rsync.yo
-@@ -337,6 +337,7 @@ to the detailed description below for a complete description. verb(
+@@ -340,6 +340,7 @@ to the detailed description below for a complete description. verb(
-q, --quiet suppress non-error messages
--no-motd suppress daemon-mode MOTD (see caveat)
-c, --checksum skip based on checksum, not mod-time & size
-a, --archive archive mode; equals -rlptgoD (no -H,-A,-X)
--no-OPTION turn off an implied OPTION (e.g. --no-D)
-r, --recursive recurse into directories
-@@ -614,9 +615,9 @@ uses a "quick check" that (by default) checks if each file's size and time
+@@ -617,9 +618,9 @@ uses a "quick check" that (by default) checks if each file's size and time
of last modification match between the sender and receiver. This option
changes this to compare a 128-bit checksum for each file that has a
matching size. Generating the checksums means that both sides will expend
The sending side generates its checksums while it is doing the file-system
scan that builds the list of the available files. The receiver generates
-@@ -624,6 +625,8 @@ its checksums when it is scanning for changed files, and will checksum any
+@@ -627,6 +628,8 @@ its checksums when it is scanning for changed files, and will checksum any
file that has the same size as the corresponding sender's file: files with
either a changed size or a changed checksum are selected for transfer.
Note that rsync always verifies that each em(transferred) file was
correctly reconstructed on the receiving side by checking a whole-file
checksum that is generated as the file is transferred, but that
-@@ -633,6 +636,36 @@ option's before-the-transfer "Does this file need to be updated?" check.
+@@ -636,6 +639,36 @@ option's before-the-transfer "Does this file need to be updated?" check.
For protocol 30 and beyond (first supported in 3.0.0), the checksum used is
MD5. For older protocols, the checksum used is MD4.
}
/* Call this with EITHER (1) "file, NULL, 0" to chdir() to the file's
-@@ -1494,6 +1705,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1501,6 +1712,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++;
return NULL;
}
-@@ -1540,13 +1753,13 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1547,13 +1760,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)
}
}
basename_len = strlen(basename) + 1; /* count the '\0' */
-@@ -1654,7 +1867,7 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1661,7 +1874,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)
else
file_checksum(thisname, &st, tmp_sum);
if (sender_keeps_checksum)
-@@ -2030,6 +2243,9 @@ static void send_directory(int f, struct file_list *flist, char *fbuf, int len,
+@@ -2037,6 +2250,9 @@ static void send_directory(int f, struct file_list *flist, char *fbuf, int len,
closedir(d);
if (f >= 0 && recurse && !divert_dirs) {
int i, end = flist->used - 1;
/* send_if_directory() bumps flist->used, so use "end". */
-@@ -2689,6 +2905,9 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
+@@ -2696,6 +2912,9 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
rprintf(FINFO, "[%s] flist_eof=1\n", who_am_i());
}
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
-@@ -109,6 +109,7 @@ static int dir_tweaking;
+@@ -110,6 +110,7 @@ static int dir_tweaking;
static int symlink_timeset_failed_flags;
static int need_retouch_dir_times;
static int need_retouch_dir_perms;
static const char *solo_file = NULL;
enum nonregtype {
-@@ -577,7 +578,7 @@ int unchanged_file(char *fn, struct file_struct *file, STRUCT_STAT *st, int slot
+@@ -580,7 +581,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)
else
file_checksum(fn, st, sum);
return memcmp(sum, F_SUM(file), checksum_len) == 0;
-@@ -1298,7 +1299,8 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1301,7 +1302,8 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
}
}
if (checksum_files) {
}
need_new_dirscan = 0;
}
-@@ -1472,6 +1474,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1475,6 +1477,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
else
change_local_filter_dir(fname, strlen(fname), F_DEPTH(file));
}
goto cleanup;
}
-@@ -1751,6 +1754,8 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1754,6 +1757,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);
if (itemizing)
itemize(fnamecmp, file, ndx, statret, &sx, 0, 0, NULL);
#ifdef SUPPORT_HARD_LINKS
-@@ -2246,6 +2251,7 @@ void generate_files(int f_out, const char *local_name)
+@@ -2248,6 +2253,7 @@ void generate_files(int f_out, const char *local_name)
} else
change_local_filter_dir(fbuf, strlen(fbuf), F_DEPTH(fp));
}
}
for (i = cur_flist->low; i <= cur_flist->high; i++) {
struct file_struct *file = cur_flist->sorted[i];
-@@ -2340,6 +2346,9 @@ void generate_files(int f_out, const char *local_name)
+@@ -2342,6 +2348,9 @@ void generate_files(int f_out, const char *local_name)
wait_for_receiver();
}
diff --git a/receiver.c b/receiver.c
--- a/receiver.c
+++ b/receiver.c
-@@ -49,6 +49,7 @@ extern int preallocate_files;
+@@ -50,6 +50,7 @@ extern int preallocate_files;
extern int keep_partial;
extern int checksum_len;
extern int checksum_seed;
extern int inplace;
extern int allowed_lull;
extern int delay_updates;
-@@ -434,7 +435,7 @@ static void handle_delayed_updates(char *local_name)
+@@ -435,7 +436,7 @@ static void handle_delayed_updates(char *local_name)
"rename failed for %s (from %s)",
full_fname(fname), partialptr);
} else {
|| (preserve_hard_links && F_IS_HLINKED(file)))
send_msg_int(MSG_SUCCESS, ndx);
handle_partial_dir(partialptr, PDIR_DELETE);
-@@ -895,7 +896,7 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -898,7 +899,7 @@ int recv_files(int f_in, int f_out, char *local_name)
case 2:
break;
case 1:
diff --git a/rsync.yo b/rsync.yo
--- a/rsync.yo
+++ b/rsync.yo
-@@ -645,9 +645,13 @@ computed just as it would be if bf(--sumfiles) was not specified.
+@@ -648,9 +648,13 @@ computed just as it would be if bf(--sumfiles) was not specified.
The MODE value is either "lax", for relaxed checking (which compares size
and mtime), "strict" (which also compares ctime and inode), or "none" to
./configure (optional if already run)
make
-based-on: 4c8eb5f9511dd1393b147c4e993ee15448faedf5
+based-on: 7cb0de6326c915a72253fd103dae93308031ec3f
diff --git a/flist.c b/flist.c
--- a/flist.c
+++ b/flist.c
-@@ -1306,7 +1306,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1313,7 +1313,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
#endif
if (always_checksum && am_sender && S_ISREG(st.st_mode)) {
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
-@@ -575,7 +575,8 @@ int unchanged_file(char *fn, struct file_struct *file, STRUCT_STAT *st)
+@@ -578,7 +578,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];
./configure (optional if already run)
make
-based-on: 4c8eb5f9511dd1393b147c4e993ee15448faedf5
+based-on: 7cb0de6326c915a72253fd103dae93308031ec3f
diff --git a/loadparm.c b/loadparm.c
--- a/loadparm.c
+++ b/loadparm.c
./configure (optional if already run)
make
-based-on: 4c8eb5f9511dd1393b147c4e993ee15448faedf5
+based-on: 7cb0de6326c915a72253fd103dae93308031ec3f
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
extern int preserve_specials;
extern int preserve_hard_links;
extern int preserve_executability;
-@@ -1633,7 +1634,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1636,7 +1637,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
goto cleanup;
}
{"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 },
-@@ -2759,6 +2762,9 @@ void server_options(char **args, int *argc_p)
+@@ -2760,6 +2763,9 @@ void server_options(char **args, int *argc_p)
else if (remove_source_files)
args[ac++] = "--remove-sent-files";
diff --git a/sender.c b/sender.c
--- a/sender.c
+++ b/sender.c
-@@ -363,6 +363,20 @@ void send_files(int f_in, int f_out)
+@@ -365,6 +365,20 @@ void send_files(int f_in, int f_out)
exit_cleanup(RERR_FILEIO);
}
diff --git a/compat.c b/compat.c
--- a/compat.c
+++ b/compat.c
-@@ -47,6 +47,7 @@ extern int force_change;
+@@ -48,6 +48,7 @@ extern int force_change;
extern int protect_args;
extern int preserve_uid;
extern int preserve_gid;
extern int preserve_fileflags;
extern int preserve_acls;
extern int preserve_xattrs;
-@@ -65,7 +66,7 @@ extern char *iconv_opt;
+@@ -66,7 +67,7 @@ extern char *iconv_opt;
#endif
/* These index values are for the file-list's extra-attribute array. */
int receiver_symlink_times = 0; /* receiver can set the time on a symlink */
int sender_symlink_iconv = 0; /* sender should convert symlink content */
-@@ -142,6 +143,8 @@ void setup_protocol(int f_out,int f_in)
+@@ -144,6 +145,8 @@ void setup_protocol(int f_out,int f_in)
uid_ndx = ++file_extra_cnt;
if (preserve_gid)
gid_ndx = ++file_extra_cnt;
if (!(xflags & XMIT_SAME_MODE))
mode = from_wire_mode(read_int(f));
-@@ -1008,6 +1031,8 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
+@@ -1015,6 +1038,8 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
F_GROUP(file) = gid;
file->flags |= gid_flags;
}
if (unsort_ndx)
F_NDX(file) = flist->used + flist->ndx_start;
-@@ -1409,6 +1434,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1416,6 +1441,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
F_GROUP(file) = st.st_gid;
if (am_generator && st.st_uid == our_uid)
file->flags |= FLAG_OWNED_BY_US;
extern int preserve_hard_links;
extern int preserve_executability;
extern int preserve_fileflags;
-@@ -383,8 +384,15 @@ static void do_delete_pass(void)
+@@ -384,8 +385,15 @@ static void do_delete_pass(void)
rprintf(FINFO, " \r");
}
return cmp_time(sxp->st.st_mtime, file->modtime);
}
-@@ -442,7 +450,7 @@ int unchanged_attrs(const char *fname, struct file_struct *file, stat_x *sxp)
+@@ -443,7 +451,7 @@ int unchanged_attrs(const char *fname, struct file_struct *file, stat_x *sxp)
{
if (S_ISLNK(file->mode)) {
#ifdef CAN_SET_SYMLINK_TIMES
return 0;
#endif
#ifdef CAN_CHMOD_SYMLINK
-@@ -462,7 +470,7 @@ int unchanged_attrs(const char *fname, struct file_struct *file, stat_x *sxp)
+@@ -463,7 +471,7 @@ int unchanged_attrs(const char *fname, struct file_struct *file, stat_x *sxp)
return 0;
#endif
} else {
return 0;
if (perms_differ(file, sxp))
return 0;
-@@ -505,6 +513,12 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
+@@ -506,6 +514,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;
#if !defined HAVE_LCHMOD && !defined HAVE_SETATTRLIST
if (S_ISLNK(file->mode)) {
;
-@@ -1127,6 +1141,7 @@ static int try_dests_non(struct file_struct *file, char *fname, int ndx,
+@@ -1130,6 +1144,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];
int64 len;
int colwidth = human_readable ? 14 : 11;
-@@ -1142,10 +1157,12 @@ static void list_file_entry(struct file_struct *f)
+@@ -1145,10 +1160,12 @@ static void list_file_entry(struct file_struct *f)
#ifdef SUPPORT_LINKS
if (preserve_links && S_ISLNK(f->mode)) {
} else
#endif
if (missing_args == 2 && f->mode == 0) {
-@@ -1153,9 +1170,12 @@ static void list_file_entry(struct file_struct *f)
+@@ -1156,9 +1173,12 @@ static void list_file_entry(struct file_struct *f)
colwidth + 31, "*missing",
f_name(f, NULL));
} else {
}
}
-@@ -1247,6 +1267,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1250,6 +1270,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
return;
}
}
diff --git a/rsync.yo b/rsync.yo
--- a/rsync.yo
+++ b/rsync.yo
-@@ -370,6 +370,7 @@ to the detailed description below for a complete description. verb(
+@@ -373,6 +373,7 @@ to the detailed description below for a complete description. verb(
--specials preserve special files
-D same as --devices --specials
-t, --times preserve modification times
-O, --omit-dir-times omit directories from --times
-J, --omit-link-times omit symlinks from --times
--super receiver attempts super-user activities
-@@ -1198,6 +1199,9 @@ cause the next transfer to behave as if it used bf(-I), causing all files to be
+@@ -1201,6 +1202,9 @@ cause the next transfer to behave as if it used bf(-I), causing all files to be
updated (though rsync's delta-transfer algorithm will make the update fairly efficient
if the files haven't actually changed, you're much better off using bf(-t)).
dit(bf(-O, --omit-dir-times)) This tells rsync to omit directories when
it is preserving modification times (see bf(--times)). If NFS is sharing
the directories on the receiving side, it is a good idea to use bf(-O).
-@@ -2100,7 +2104,7 @@ with older versions of rsync, but that also turns on the output of other
+@@ -2103,7 +2107,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
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.
-@@ -2159,6 +2163,8 @@ quote(itemization(
+@@ -2162,6 +2166,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.
./configure (optional if already run)
make
-based-on: 4c8eb5f9511dd1393b147c4e993ee15448faedf5
+based-on: 7cb0de6326c915a72253fd103dae93308031ec3f
diff --git a/exclude.c b/exclude.c
--- a/exclude.c
+++ b/exclude.c
./configure (optional if already run)
make
-based-on: 4c8eb5f9511dd1393b147c4e993ee15448faedf5
+based-on: 7cb0de6326c915a72253fd103dae93308031ec3f
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
-@@ -62,6 +62,7 @@ extern int append_mode;
+@@ -63,6 +63,7 @@ extern int append_mode;
extern int make_backups;
extern int csum_length;
extern int ignore_times;
extern int size_only;
extern OFF_T max_size;
extern OFF_T min_size;
-@@ -568,6 +569,9 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
+@@ -571,6 +572,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)
{
{"one-file-system", 'x', POPT_ARG_NONE, 0, 'x', 0, 0 },
{"no-one-file-system",0, POPT_ARG_VAL, &one_file_system, 0, 0, 0 },
{"no-x", 0, POPT_ARG_VAL, &one_file_system, 0, 0, 0 },
-@@ -2646,6 +2649,9 @@ void server_options(char **args, int *argc_p)
+@@ -2647,6 +2650,9 @@ void server_options(char **args, int *argc_p)
else if (missing_args == 1 && !am_sender)
args[ac++] = "--ignore-missing-args";
diff --git a/rsync.yo b/rsync.yo
--- a/rsync.yo
+++ b/rsync.yo
-@@ -410,6 +410,7 @@ to the detailed description below for a complete description. verb(
+@@ -413,6 +413,7 @@ to the detailed description below for a complete description. verb(
--contimeout=SECONDS set daemon connection timeout in seconds
-I, --ignore-times don't skip files that match size and time
--size-only skip files that match in size
--modify-window=NUM compare mod-times with reduced accuracy
-T, --temp-dir=DIR create temporary files in directory DIR
-y, --fuzzy find similar file for basis if no dest file
-@@ -600,6 +601,12 @@ time to just looking for files that have changed in size. This is useful
+@@ -603,6 +604,12 @@ time to just looking for files that have changed in size. This is useful
when starting to use rsync after using another mirroring system which may
not preserve timestamps exactly.
./configure
make
-based-on: 4c8eb5f9511dd1393b147c4e993ee15448faedf5
+based-on: 7cb0de6326c915a72253fd103dae93308031ec3f
diff --git a/.gitignore b/.gitignore
--- a/.gitignore
+++ b/.gitignore
netdb.h malloc.h float.h limits.h iconv.h libcharset.h langinfo.h \
sys/acl.h acl/libacl.h attr/xattr.h sys/xattr.h sys/extattr.h \
popt.h popt/popt.h linux/falloc.h netinet/in_systm.h netinet/ip.h \
-@@ -1098,6 +1099,48 @@ if test x"$enable_acl_support" = x"no" -o x"$enable_xattr_support" = x"no" -o x"
+@@ -1100,6 +1101,48 @@ if test x"$enable_acl_support" = x"no" -o x"$enable_xattr_support" = x"no" -o x"
fi
fi
+ rprintf(FCLIENT, "[%s] SQL being run: %s\n", who_am_i(), query);
+
+ switch (use_db) {
-+ case DB_TYPE_MYSQL:
+#ifdef USE_MYSQL
++ case DB_TYPE_MYSQL:
+ if (mysql_query(dbh.mysql, query) < 0) {
+ rprintf(FERROR, "Failed to run sql: %s\n", mysql_error(dbh.mysql));
+ rprintf(FERROR, "%s\n", query);
extern int eol_nulls;
extern int relative_paths;
extern int implied_dirs;
-@@ -1305,11 +1306,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1312,11 +1313,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
extra_len += EXTRA_LEN;
#endif
#if EXTRA_ROUNDING > 0
if (extra_len & (EXTRA_ROUNDING * EXTRA_LEN))
-@@ -1394,8 +1392,12 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1401,8 +1399,12 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
return NULL;
}
if (unsort_ndx)
F_NDX(file) = stats.num_dirs;
-@@ -2056,6 +2058,9 @@ void send_extra_file_list(int f, int at_least)
+@@ -2063,6 +2065,9 @@ void send_extra_file_list(int f, int at_least)
finish:
if (io_error != save_io_error && protocol_version == 30 && !ignore_errors)
send_msg_int(MSG_IO_ERROR, io_error);
}
struct file_list *send_file_list(int f, int argc, char *argv[])
-@@ -2079,6 +2084,13 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
+@@ -2086,6 +2091,13 @@ 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;
rprintf(FLOG, "building file list\n");
if (show_filelist_p())
start_filelist_progress("building file list");
-@@ -2425,6 +2437,9 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
+@@ -2432,6 +2444,9 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
rprintf(FINFO, "[%s] flist_eof=1\n", who_am_i());
}
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
-@@ -58,6 +58,7 @@ extern int human_readable;
- extern int ignore_existing;
+@@ -59,6 +59,7 @@ extern int ignore_existing;
extern int ignore_non_existing;
+ extern int want_xattr_optim;
extern int inplace;
+extern int use_db;
extern int append_mode;
extern int make_backups;
extern int csum_length;
-@@ -575,7 +576,8 @@ int unchanged_file(char *fn, struct file_struct *file, STRUCT_STAT *st)
+@@ -578,7 +579,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];
return memcmp(sum, F_SUM(file), checksum_len) == 0;
}
-@@ -2207,6 +2209,13 @@ void generate_files(int f_out, const char *local_name)
+@@ -2209,6 +2211,13 @@ void generate_files(int f_out, const char *local_name)
: "enabled");
}
dflt_perms = (ACCESSPERMS & ~orig_umask);
do {
-@@ -2332,6 +2341,9 @@ void generate_files(int f_out, const char *local_name)
+@@ -2334,6 +2343,9 @@ void generate_files(int f_out, const char *local_name)
wait_for_receiver();
}
extern int am_root;
extern int am_server;
extern int inc_recurse;
-@@ -434,6 +436,11 @@ static void handle_delayed_updates(char *local_name)
+@@ -435,6 +437,11 @@ static void handle_delayed_updates(char *local_name)
"rename failed for %s (from %s)",
full_fname(fname), partialptr);
} else {
if (remove_source_files
|| (preserve_hard_links && F_IS_HLINKED(file)))
send_msg_int(MSG_SUCCESS, ndx);
-@@ -540,6 +547,9 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -541,6 +548,9 @@ int recv_files(int f_in, int f_out, char *local_name)
if (delay_updates)
delayed_bits = bitbag_create(cur_flist->used + 1);
while (1) {
cleanup_disable();
-@@ -867,6 +877,8 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -870,6 +880,8 @@ int recv_files(int f_in, int f_out, char *local_name)
do_unlink(partialptr);
handle_partial_dir(partialptr, PDIR_DELETE);
}
} else if (keep_partial && partialptr) {
if (!handle_partial_dir(partialptr, PDIR_CREATE)) {
rprintf(FERROR,
-@@ -880,6 +892,8 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -883,6 +895,8 @@ int recv_files(int f_in, int f_out, char *local_name)
recv_ok = -1;
else if (delay_updates && recv_ok) {
bitbag_set_bit(delayed_bits, ndx);
diff --git a/rsync.yo b/rsync.yo
--- a/rsync.yo
+++ b/rsync.yo
-@@ -337,6 +337,9 @@ to the detailed description below for a complete description. verb(
+@@ -340,6 +340,9 @@ to the detailed description below for a complete description. verb(
-q, --quiet suppress non-error messages
--no-motd suppress daemon-mode MOTD (see caveat)
-c, --checksum skip based on checksum, not mod-time & size
-a, --archive archive mode; equals -rlptgoD (no -H,-A,-X)
--no-OPTION turn off an implied OPTION (e.g. --no-D)
-r, --recursive recurse into directories
-@@ -633,6 +636,67 @@ option's before-the-transfer "Does this file need to be updated?" check.
+@@ -636,6 +639,67 @@ option's before-the-transfer "Does this file need to be updated?" check.
For protocol 30 and beyond (first supported in 3.0.0), the checksum used is
MD5. For older protocols, the checksum used is MD4.
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
-@@ -462,7 +462,9 @@ static int fattr_find(struct file_struct *f, char *fname)
+@@ -463,7 +463,9 @@ static int fattr_find(struct file_struct *f, char *fname)
continue;
}
}
diff = u_strcmp(fmid->basename, f->basename);
if (diff == 0) {
good_match = mid;
-@@ -1922,6 +1924,21 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1925,6 +1927,21 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
fnamecmp = partialptr;
fnamecmp_type = FNAMECMP_PARTIAL_DIR;
statret = 0;
{"fuzzy", 'y', POPT_ARG_NONE, 0, 'y', 0, 0 },
{"no-fuzzy", 0, POPT_ARG_VAL, &fuzzy_basis, 0, 0, 0 },
{"no-y", 0, POPT_ARG_VAL, &fuzzy_basis, 0, 0, 0 },
-@@ -2633,8 +2637,14 @@ void server_options(char **args, int *argc_p)
+@@ -2634,8 +2638,14 @@ void server_options(char **args, int *argc_p)
args[ac++] = "--super";
if (size_only)
args[ac++] = "--size-only";
diff --git a/rsync.yo b/rsync.yo
--- a/rsync.yo
+++ b/rsync.yo
-@@ -414,6 +414,8 @@ to the detailed description below for a complete description. verb(
+@@ -417,6 +417,8 @@ to the detailed description below for a complete description. verb(
-T, --temp-dir=DIR create temporary files in directory DIR
-y, --fuzzy find similar file for basis if no dest file
--detect-renamed try to find renamed files to speed the xfer
--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
-@@ -1806,6 +1808,17 @@ the bf(--partial-dir) option, that directory will be used instead. These
+@@ -1809,6 +1811,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).
a file that can't use it, while missing out on giving it to a file
that could use it.
-based-on: 4c8eb5f9511dd1393b147c4e993ee15448faedf5
+based-on: 7cb0de6326c915a72253fd103dae93308031ec3f
diff --git a/compat.c b/compat.c
--- a/compat.c
+++ b/compat.c
-@@ -43,6 +43,7 @@ extern int checksum_seed;
+@@ -44,6 +44,7 @@ extern int checksum_seed;
extern int basis_dir_cnt;
extern int prune_empty_dirs;
extern int protocol_version;
extern int protect_args;
extern int preserve_uid;
extern int preserve_gid;
-@@ -123,6 +124,7 @@ void set_allow_inc_recurse(void)
+@@ -125,6 +126,7 @@ void set_allow_inc_recurse(void)
allow_inc_recurse = 0;
else if (!am_sender
&& (delete_before || delete_after
static void send_directory(int f, struct file_list *flist,
char *fbuf, int len, int flags);
-@@ -2561,6 +2603,25 @@ struct file_list *recv_file_list(int f)
+@@ -2568,6 +2610,25 @@ struct file_list *recv_file_list(int f)
* for a non-relative transfer in recv_file_entry(). */
flist_sort_and_clean(flist, relative_paths);
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
-@@ -78,6 +78,7 @@ extern char *partial_dir;
+@@ -79,6 +79,7 @@ extern char *partial_dir;
extern int compare_dest;
extern int copy_dest;
extern int link_dest;
extern int whole_file;
extern int list_only;
extern int read_batch;
-@@ -96,10 +97,12 @@ extern char *tmpdir;
+@@ -97,10 +98,12 @@ extern char *tmpdir;
extern char *basis_dir[MAX_BASIS_DIRS+1];
extern struct file_list *cur_flist, *first_flist, *dir_flist;
extern filter_rule_list filter_list, daemon_filter_list;
static int deldelay_size = 0, deldelay_cnt = 0;
static char *deldelay_buf = NULL;
static int deldelay_fd = -1;
-@@ -270,13 +273,18 @@ static void do_delayed_deletions(char *delbuf)
+@@ -271,13 +274,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
if (!fbuf) {
change_local_filter_dir(NULL, 0, 0);
-@@ -290,17 +298,22 @@ static void delete_in_dir(char *fbuf, struct file_struct *file, dev_t *fs_dev)
+@@ -291,17 +299,22 @@ static void delete_in_dir(char *fbuf, struct file_struct *file, dev_t *fs_dev)
maybe_send_keepalive(time(NULL), MSK_ALLOW_FLUSH);
if (io_error & IOERR_GENERAL && !ignore_errors) {
if (one_file_system) {
if (file->flags & FLAG_TOP_DIR)
filesystem_dev = *fs_dev;
-@@ -310,6 +323,14 @@ static void delete_in_dir(char *fbuf, struct file_struct *file, dev_t *fs_dev)
+@@ -311,6 +324,14 @@ static void delete_in_dir(char *fbuf, struct file_struct *file, dev_t *fs_dev)
dirlist = get_dirlist(fbuf, dlen, 0);
/* If an item in dirlist is not found in flist, delete it
* from the filesystem. */
for (i = dirlist->used; i--; ) {
-@@ -322,6 +343,10 @@ static void delete_in_dir(char *fbuf, struct file_struct *file, dev_t *fs_dev)
+@@ -323,6 +344,10 @@ static void delete_in_dir(char *fbuf, struct file_struct *file, dev_t *fs_dev)
f_name(fp, NULL));
continue;
}
/* Here we want to match regardless of file type. Replacement
* of a file with one of another type is handled separately by
* a delete_item call with a DEL_MAKE_ROOM flag. */
-@@ -330,14 +355,19 @@ static void delete_in_dir(char *fbuf, struct file_struct *file, dev_t *fs_dev)
+@@ -331,14 +356,19 @@ static void delete_in_dir(char *fbuf, struct file_struct *file, dev_t *fs_dev)
if (!(fp->mode & S_IWUSR) && !am_root && fp->flags & FLAG_OWNED_BY_US)
flags |= DEL_NO_UID_WRITE;
f_name(fp, delbuf);
flist_free(dirlist);
}
-@@ -373,14 +403,125 @@ static void do_delete_pass(void)
+@@ -374,14 +404,125 @@ static void do_delete_pass(void)
|| !S_ISDIR(st.st_mode))
continue;
static inline int time_differs(struct file_struct *file, stat_x *sxp)
{
return cmp_time(sxp->st.st_mtime, file->modtime);
-@@ -1148,6 +1289,7 @@ static void list_file_entry(struct file_struct *f)
+@@ -1151,6 +1292,7 @@ static void list_file_entry(struct file_struct *f)
}
}
static int phase = 0;
static int dflt_perms;
-@@ -1257,7 +1399,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1260,7 +1402,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
&& do_stat(dn, &sx.st) < 0) {
if (dry_run)
goto parent_is_dry_missing;
rsyserr(FERROR_XFER, errno,
"recv_generator: mkdir %s failed",
full_fname(dn));
-@@ -1410,7 +1552,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1413,7 +1555,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
}
if (real_ret != 0 && do_mkdir(fname,file->mode|added_perms) < 0 && errno != EEXIST) {
if (!relative_paths || errno != ENOENT
|| (do_mkdir(fname, file->mode|added_perms) < 0 && errno != EEXIST)) {
rsyserr(FERROR_XFER, errno,
"recv_generator: mkdir %s failed",
-@@ -1459,9 +1601,12 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1462,9 +1604,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)) {
change_local_filter_dir(fname, strlen(fname), F_DEPTH(file));
}
goto cleanup;
-@@ -1726,8 +1871,14 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1729,8 +1874,14 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
goto cleanup;
}
#endif
rsyserr(FERROR_XFER, stat_errno, "recv_generator: failed to stat %s",
full_fname(fname));
goto cleanup;
-@@ -2188,6 +2339,12 @@ void generate_files(int f_out, const char *local_name)
+@@ -2190,6 +2341,12 @@ void generate_files(int f_out, const char *local_name)
if (DEBUG_GTE(GENR, 1))
rprintf(FINFO, "generator starting pid=%d\n", (int)getpid());
if (delete_before && !solo_file && cur_flist->used > 0)
do_delete_pass();
if (delete_during == 2) {
-@@ -2198,7 +2355,7 @@ void generate_files(int f_out, const char *local_name)
+@@ -2200,7 +2357,7 @@ void generate_files(int f_out, const char *local_name)
}
info_levels[INFO_FLIST] = info_levels[INFO_PROGRESS] = 0;
whole_file = 0;
if (DEBUG_GTE(FLIST, 1)) {
rprintf(FINFO, "delta-transmission %s\n",
-@@ -2234,7 +2391,7 @@ void generate_files(int f_out, const char *local_name)
+@@ -2236,7 +2393,7 @@ void generate_files(int f_out, const char *local_name)
dirdev = MAKEDEV(DEV_MAJOR(devp), DEV_MINOR(devp));
} else
dirdev = MAKEDEV(0, 0);
} else
change_local_filter_dir(fbuf, strlen(fbuf), F_DEPTH(fp));
}
-@@ -2281,7 +2438,21 @@ void generate_files(int f_out, const char *local_name)
+@@ -2283,7 +2440,21 @@ void generate_files(int f_out, const char *local_name)
} while ((cur_flist = cur_flist->next) != NULL);
if (delete_during)
delay_updates ? "delay-updates" : "partial-dir");
return 0;
}
-@@ -2629,6 +2633,8 @@ void server_options(char **args, int *argc_p)
+@@ -2630,6 +2634,8 @@ void server_options(char **args, int *argc_p)
args[ac++] = "--super";
if (size_only)
args[ac++] = "--size-only";
diff --git a/receiver.c b/receiver.c
--- a/receiver.c
+++ b/receiver.c
-@@ -211,7 +211,7 @@ int open_tmpfile(char *fnametmp, const char *fname, struct file_struct *file)
+@@ -212,7 +212,7 @@ int open_tmpfile(char *fnametmp, const char *fname, struct file_struct *file)
* information should have been previously transferred, but that may
* not be the case with -R */
if (fd == -1 && relative_paths && errno == ENOENT
diff --git a/rsync.yo b/rsync.yo
--- a/rsync.yo
+++ b/rsync.yo
-@@ -413,6 +413,7 @@ to the detailed description below for a complete description. verb(
+@@ -416,6 +416,7 @@ to the detailed description below for a complete description. verb(
--modify-window=NUM compare mod-times with reduced accuracy
-T, --temp-dir=DIR create temporary files in directory DIR
-y, --fuzzy find similar file for basis if no dest file
--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
-@@ -1790,6 +1791,21 @@ Note that the use of the bf(--delete) option might get rid of any potential
+@@ -1793,6 +1794,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.
./configure (optional if already run)
make
-based-on: 4c8eb5f9511dd1393b147c4e993ee15448faedf5
+based-on: 7cb0de6326c915a72253fd103dae93308031ec3f
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
diff --git a/rsync.yo b/rsync.yo
--- a/rsync.yo
+++ b/rsync.yo
-@@ -401,6 +401,7 @@ to the detailed description below for a complete description. verb(
+@@ -404,6 +404,7 @@ to the detailed description below for a complete description. verb(
--partial keep partially transferred files
--partial-dir=DIR put a partially transferred file into DIR
--delay-updates put all updated files into place at end
-m, --prune-empty-dirs prune empty directory chains from file-list
--numeric-ids don't map uid/gid values by user/group name
--usermap=STRING custom username mapping
-@@ -2359,6 +2360,14 @@ See also the "atomic-rsync" perl script in the "support" subdir for an
+@@ -2362,6 +2363,14 @@ See also the "atomic-rsync" perl script in the "support" subdir for an
update algorithm that is even more atomic (it uses bf(--link-dest) and a
parallel hierarchy of files).
./configure (optional if already run)
make
-based-on: 4c8eb5f9511dd1393b147c4e993ee15448faedf5
+based-on: 7cb0de6326c915a72253fd103dae93308031ec3f
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
extern int human_readable;
extern int ignore_existing;
extern int ignore_non_existing;
-@@ -1668,6 +1669,13 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1671,6 +1672,13 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
goto cleanup;
}
fnamecmp_type = FNAMECMP_FNAME;
if (statret == 0 && !S_ISREG(sx.st.st_mode)) {
-@@ -2094,6 +2102,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;
always_checksum = -always_checksum;
size_only = -size_only;
append_mode = -append_mode;
-@@ -2119,6 +2128,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;
./configure
make
-based-on: 4c8eb5f9511dd1393b147c4e993ee15448faedf5
+based-on: 7cb0de6326c915a72253fd103dae93308031ec3f
diff --git a/Makefile.in b/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
diff --git a/compat.c b/compat.c
--- a/compat.c
+++ b/compat.c
-@@ -43,9 +43,11 @@ extern int checksum_seed;
+@@ -44,9 +44,11 @@ extern int checksum_seed;
extern int basis_dir_cnt;
extern int prune_empty_dirs;
extern int protocol_version;
extern int preserve_acls;
extern int preserve_xattrs;
extern int need_messages_from_generator;
-@@ -63,7 +65,7 @@ extern char *iconv_opt;
+@@ -64,7 +66,7 @@ extern char *iconv_opt;
#endif
/* These index values are for the file-list's extra-attribute array. */
int receiver_symlink_times = 0; /* receiver can set the time on a symlink */
int sender_symlink_iconv = 0; /* sender should convert symlink content */
-@@ -140,6 +142,8 @@ void setup_protocol(int f_out,int f_in)
+@@ -142,6 +144,8 @@ void setup_protocol(int f_out,int f_in)
uid_ndx = ++file_extra_cnt;
if (preserve_gid)
gid_ndx = ++file_extra_cnt;
if (preserve_uid && !(xflags & XMIT_SAME_UID)) {
if (protocol_version < 30)
-@@ -971,6 +998,10 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
+@@ -978,6 +1005,10 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
}
#endif
file->mode = mode;
if (preserve_uid)
F_OWNER(file) = uid;
if (preserve_gid) {
-@@ -1368,6 +1399,10 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1375,6 +1406,10 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
}
#endif
file->mode = st.st_mode;
extern int delete_mode;
extern int delete_before;
extern int delete_during;
-@@ -464,6 +466,10 @@ int unchanged_attrs(const char *fname, struct file_struct *file, stat_x *sxp)
+@@ -465,6 +467,10 @@ int unchanged_attrs(const char *fname, struct file_struct *file, stat_x *sxp)
return 0;
if (perms_differ(file, sxp))
return 0;
if (ownership_differs(file, sxp))
return 0;
#ifdef SUPPORT_ACLS
-@@ -515,6 +521,11 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
+@@ -516,6 +522,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;
#ifdef SUPPORT_ACLS
if (preserve_acls && !S_ISLNK(file->mode)) {
if (!ACL_READY(*sxp))
-@@ -1392,6 +1403,10 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1395,6 +1406,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);
}
if (statret != 0 && basis_dir[0] != NULL) {
int j = try_dests_non(file, fname, ndx, fnamecmpbuf, &sx,
itemizing, code);
-@@ -1436,10 +1451,15 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1439,10 +1454,15 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
* readable and writable permissions during the time we are
* putting files within them. This is then restored to the
* former permissions after the transfer is done. */
rsyserr(FERROR_XFER, errno,
"failed to modify permissions on %s",
full_fname(fname));
-@@ -1474,6 +1494,10 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1477,6 +1497,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);
}
#ifdef SUPPORT_HARD_LINKS
if (preserve_hard_links && F_HLINK_NOT_FIRST(file)
-@@ -2043,13 +2067,17 @@ static void touch_up_dirs(struct file_list *flist, int ndx)
+@@ -2045,13 +2069,17 @@ static void touch_up_dirs(struct file_list *flist, int ndx)
continue;
fname = f_name(file, NULL);
if (fix_dir_perms)
{"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 },
-@@ -2536,6 +2562,9 @@ void server_options(char **args, int *argc_p)
+@@ -2537,6 +2563,9 @@ void server_options(char **args, int *argc_p)
if (xfer_dirs && !recurse && delete_mode && am_sender)
args[ac++] = "--no-r";
if (do_compression && def_compress_level != Z_DEFAULT_COMPRESSION) {
if (asprintf(&arg, "--compress-level=%d", def_compress_level) < 0)
goto oom;
-@@ -2623,6 +2652,16 @@ void server_options(char **args, int *argc_p)
+@@ -2624,6 +2653,16 @@ void server_options(char **args, int *argc_p)
args[ac++] = "--delete-excluded";
if (force_delete)
args[ac++] = "--force";
diff --git a/rsync.yo b/rsync.yo
--- a/rsync.yo
+++ b/rsync.yo
-@@ -359,6 +359,7 @@ to the detailed description below for a complete description. verb(
+@@ -362,6 +362,7 @@ to the detailed description below for a complete description. verb(
-K, --keep-dirlinks treat symlinked dir on receiver as dir
-H, --hard-links preserve hard links
-p, --perms preserve permissions
-E, --executability preserve executability
--chmod=CHMOD affect file and/or directory permissions
-A, --acls preserve ACLs (implies -p)
-@@ -394,7 +395,10 @@ to the detailed description below for a complete description. verb(
+@@ -397,7 +398,10 @@ to the detailed description below for a complete description. verb(
--ignore-missing-args ignore missing source args without error
--delete-missing-args delete missing source args from destination
--ignore-errors delete even if there are I/O errors
--max-delete=NUM don't delete more than NUM files
--max-size=SIZE don't transfer any file larger than SIZE
--min-size=SIZE don't transfer any file smaller than SIZE
-@@ -641,7 +645,8 @@ specified, in which case bf(-r) is not implied.
+@@ -644,7 +648,8 @@ specified, in which case bf(-r) is not implied.
Note that bf(-a) bf(does not preserve hardlinks), because
finding multiply-linked files is expensive. You must separately
dit(--no-OPTION) You may turn off one or more implied options by prefixing
the option name with "no-". Not all options may be prefixed with a "no-":
-@@ -940,7 +945,7 @@ they would be using bf(--copy-links).
+@@ -943,7 +948,7 @@ they would be using bf(--copy-links).
Without this option, if the sending side has replaced a directory with a
symlink to a directory, the receiving side will delete anything that is in
the way of the new symlink, including a directory hierarchy (as long as
See also bf(--keep-dirlinks) for an analogous option for the receiving
side.
-@@ -1103,6 +1108,29 @@ Note that this option does not copy rsyncs special xattr values (e.g. those
+@@ -1106,6 +1111,29 @@ Note that this option does not copy rsyncs special xattr values (e.g. those
used by bf(--fake-super)) unless you repeat the option (e.g. -XX). This
"copy all xattrs" mode cannot be used with bf(--fake-super).
dit(bf(--chmod)) This option tells rsync to apply one or more
comma-separated "chmod" modes to the permission of the files in the
transfer. The resulting value is treated as though it were the permissions
-@@ -1432,12 +1460,13 @@ display as a "*missing" entry in the bf(--list-only) output.
+@@ -1435,12 +1463,13 @@ display as a "*missing" entry in the bf(--list-only) output.
dit(bf(--ignore-errors)) Tells bf(--delete) to go ahead and delete files
even when there are I/O errors.
bf(--recursive) option was also enabled.
dit(bf(--max-delete=NUM)) This tells rsync not to delete more than NUM
-@@ -2071,7 +2100,7 @@ with older versions of rsync, but that also turns on the output of other
+@@ -2074,7 +2103,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
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.
-@@ -2127,7 +2156,7 @@ quote(itemization(
+@@ -2130,7 +2159,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).
./configure (optional if already run)
make
-based-on: 4c8eb5f9511dd1393b147c4e993ee15448faedf5
+based-on: 7cb0de6326c915a72253fd103dae93308031ec3f
diff --git a/exclude.c b/exclude.c
--- a/exclude.c
+++ b/exclude.c
if (filter_level != ALL_FILTERS)
return 0;
if (filter_list.head
-@@ -1167,7 +1171,7 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1174,7 +1178,7 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
} else if (readlink_stat(thisname, &st, linkname) != 0) {
int save_errno = errno;
/* See if file is excluded before reporting an error. */
&& (is_excluded(thisname, 0, filter_level)
|| is_excluded(thisname, 1, filter_level))) {
if (ignore_perishable && save_errno != ENOENT)
-@@ -1212,6 +1216,12 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1219,6 +1223,12 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
if (filter_level == NO_FILTERS)
goto skip_filters;
if (S_ISDIR(st.st_mode)) {
if (!xfer_dirs) {
-@@ -1414,12 +1424,23 @@ static struct file_struct *send_file_name(int f, struct file_list *flist,
+@@ -1421,12 +1431,23 @@ static struct file_struct *send_file_name(int f, struct file_list *flist,
int flags, int filter_level)
{
struct file_struct *file;
file->mode = tweak_mode(file->mode, chmod_modes);
if (f >= 0) {
-@@ -2310,7 +2331,7 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
+@@ -2317,7 +2338,7 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
struct file_struct *file;
file = send_file_name(f, flist, fbuf, &st,
FLAG_TOP_DIR | FLAG_CONTENT_DIR | flags,
if (!file)
continue;
if (inc_recurse) {
-@@ -2324,7 +2345,7 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
+@@ -2331,7 +2352,7 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
} else
send_if_directory(f, flist, file, fbuf, len, flags);
} else
diff --git a/rsync.yo b/rsync.yo
--- a/rsync.yo
+++ b/rsync.yo
-@@ -1125,6 +1125,8 @@ quote(--chmod=D2775,F664)
+@@ -1128,6 +1128,8 @@ quote(--chmod=D2775,F664)
It is also legal to specify multiple bf(--chmod) options, as each
additional option is just appended to the list of changes to make.
See the bf(--perms) and bf(--executability) options for how the resulting
permission value can be applied to the files in the transfer.
-@@ -2021,6 +2023,10 @@ be omitted, but if USER is empty, a leading colon must be supplied.
+@@ -2024,6 +2026,10 @@ be omitted, but if USER is empty, a leading colon must be supplied.
If you specify "--chown=foo:bar, this is exactly the same as specifying
"--usermap=*:foo --groupmap=*:bar", only easier.
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.
-@@ -2880,6 +2886,15 @@ itemization(
+@@ -2883,6 +2889,15 @@ itemization(
option's default rules that exclude things like "CVS" and "*.o" are
marked as perishable, and will not prevent a directory that was removed
on the source from being deleted on the destination.
)
manpagesection(MERGE-FILE FILTER RULES)
-@@ -2941,6 +2956,12 @@ itemization(
+@@ -2944,6 +2959,12 @@ itemization(
a rule prefix such as bf(hide)).
)
./configure (optional if already run)
make
-based-on: 4c8eb5f9511dd1393b147c4e993ee15448faedf5
+based-on: 7cb0de6326c915a72253fd103dae93308031ec3f
diff --git a/options.c b/options.c
--- 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 },
-@@ -2708,6 +2711,9 @@ void server_options(char **args, int *argc_p)
+@@ -2709,6 +2712,9 @@ void server_options(char **args, int *argc_p)
args[ac++] = tmpdir;
}
diff --git a/receiver.c b/receiver.c
--- a/receiver.c
+++ b/receiver.c
-@@ -39,6 +39,7 @@ extern int relative_paths;
+@@ -40,6 +40,7 @@ extern int relative_paths;
extern int preserve_hard_links;
extern int preserve_perms;
extern int preserve_xattrs;
extern int basis_dir_cnt;
extern int make_backups;
extern int cleanup_got_literal;
-@@ -395,6 +396,12 @@ static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
+@@ -396,6 +397,12 @@ static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
if (sum_end(file_sum1) != checksum_len)
overflow_exit("checksum_len"); /* Impossible... */
diff --git a/flist.c b/flist.c
--- a/flist.c
+++ b/flist.c
-@@ -1576,6 +1576,9 @@ static struct file_struct *send_file_name(int f, struct file_list *flist,
+@@ -1583,6 +1583,9 @@ static struct file_struct *send_file_name(int f, struct file_list *flist,
#ifdef SUPPORT_XATTRS
if (preserve_xattrs) {
sx.st.st_mode = file->mode;
extern int preserve_links;
extern int preserve_devices;
extern int preserve_specials;
-@@ -1759,6 +1760,14 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1762,6 +1763,14 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
fname, fnamecmpbuf);
}
sx.st.st_size = F_LENGTH(fuzzy_file);
statret = 0;
fnamecmp = fnamecmpbuf;
}
-@@ -1926,6 +1935,18 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1929,6 +1938,18 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
if (read_batch)
goto cleanup;
if (block_size > MAX_BLOCK_SIZE) {
snprintf(err_buf, sizeof err_buf,
"--block-size=%lu is too large (max: %u)\n", block_size, MAX_BLOCK_SIZE);
-@@ -2572,6 +2592,11 @@ void server_options(char **args, int *argc_p)
+@@ -2573,6 +2593,11 @@ void server_options(char **args, int *argc_p)
if (preserve_fileflags)
args[ac++] = "--fileflags";
diff --git a/rsync.yo b/rsync.yo
--- a/rsync.yo
+++ b/rsync.yo
-@@ -364,6 +364,8 @@ to the detailed description below for a complete description. verb(
+@@ -367,6 +367,8 @@ to the detailed description below for a complete description. verb(
--chmod=CHMOD affect file and/or directory permissions
-A, --acls preserve ACLs (implies -p)
-X, --xattrs preserve extended attributes
-o, --owner preserve owner (super-user only)
-g, --group preserve group
--devices preserve device files (super-user only)
-@@ -1132,6 +1134,42 @@ flags on files and directories that are being updated or deleted on the
+@@ -1135,6 +1137,42 @@ flags on files and directories that are being updated or deleted on the
receiving side. It does not try to affect user flags. This option overrides
bf(--force-change) and bf(--force-uchange).
- Make this code handle multibyte character encodings, and honor the
--iconv setting when converting case.
-based-on: 4c8eb5f9511dd1393b147c4e993ee15448faedf5
+based-on: 7cb0de6326c915a72253fd103dae93308031ec3f
diff --git a/exclude.c b/exclude.c
--- a/exclude.c
+++ b/exclude.c
extern int ignore_errors;
extern int numeric_ids;
extern int recurse;
-@@ -3023,6 +3024,7 @@ int f_name_cmp(const struct file_struct *f1, const struct file_struct *f2)
+@@ -3030,6 +3031,7 @@ int f_name_cmp(const struct file_struct *f1, const struct file_struct *f2)
{
int dif;
const uchar *c1, *c2;
enum fnc_state state1, state2;
enum fnc_type type1, type2;
enum fnc_type t_path = protocol_version >= 29 ? t_PATH : t_ITEM;
-@@ -3133,7 +3135,15 @@ int f_name_cmp(const struct file_struct *f1, const struct file_struct *f2)
+@@ -3140,7 +3142,15 @@ int f_name_cmp(const struct file_struct *f1, const struct file_struct *f2)
if (type1 != type2)
return type1 == t_PATH ? 1 : -1;
}
{"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},
-@@ -2658,6 +2662,9 @@ void server_options(char **args, int *argc_p)
+@@ -2659,6 +2663,9 @@ void server_options(char **args, int *argc_p)
args[ac++] = arg;
}
diff --git a/rsync.yo b/rsync.yo
--- a/rsync.yo
+++ b/rsync.yo
-@@ -430,6 +430,7 @@ to the detailed description below for a complete description. verb(
+@@ -433,6 +433,7 @@ to the detailed description below for a complete description. verb(
--files-from=FILE read list of source-file names from FILE
-0, --from0 all *from/filter files are delimited by 0s
-s, --protect-args no space-splitting; wildcard chars only
--address=ADDRESS bind address for outgoing socket to daemon
--port=PORT specify double-colon alternate port number
--sockopts=OPTIONS specify custom TCP options
-@@ -1741,6 +1742,10 @@ default (with is overridden by both the environment and the command-line).
+@@ -1744,6 +1745,10 @@ default (with is overridden by both the environment and the command-line).
This option will eventually become a new default setting at some
as-yet-undetermined point in the future.
./configure
make
-based-on: 4c8eb5f9511dd1393b147c4e993ee15448faedf5
+based-on: 7cb0de6326c915a72253fd103dae93308031ec3f
diff --git a/Makefile.in b/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
diff --git a/compat.c b/compat.c
--- a/compat.c
+++ b/compat.c
-@@ -55,6 +55,7 @@ extern char *partial_dir;
+@@ -56,6 +56,7 @@ extern char *partial_dir;
extern char *dest_option;
extern char *files_from;
extern char *filesfrom_host;
}
if (daemon_filter_list.head && !am_sender) {
filter_rule_list *elp = &daemon_filter_list;
-@@ -2737,6 +2761,12 @@ void server_options(char **args, int *argc_p)
+@@ -2738,6 +2762,12 @@ void server_options(char **args, int *argc_p)
} else if (inplace)
args[ac++] = "--inplace";
diff --git a/rsync.yo b/rsync.yo
--- a/rsync.yo
+++ b/rsync.yo
-@@ -416,6 +416,7 @@ to the detailed description below for a complete description. verb(
+@@ -419,6 +419,7 @@ to the detailed description below for a complete description. verb(
--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
-z, --compress compress file data during the transfer
--compress-level=NUM explicitly set compression level
--skip-compress=LIST skip compressing files with suffix in LIST
-@@ -1871,6 +1872,48 @@ bf(--link-dest) from working properly for a non-super-user when bf(-o) was
+@@ -1874,6 +1875,48 @@ bf(--link-dest) from working properly for a non-super-user when bf(-o) was
specified (or implied by bf(-a)). You can work-around this bug by avoiding
the bf(-o) option when sending to an old rsync.
./configure (optional if already run)
make
-based-on: 4c8eb5f9511dd1393b147c4e993ee15448faedf5
+based-on: 7cb0de6326c915a72253fd103dae93308031ec3f
diff --git a/authenticate.c b/authenticate.c
--- a/authenticate.c
+++ b/authenticate.c
./configure (optional if already run)
make
-based-on: 4c8eb5f9511dd1393b147c4e993ee15448faedf5
+based-on: 7cb0de6326c915a72253fd103dae93308031ec3f
diff --git a/access.c b/access.c
--- a/access.c
+++ b/access.c
./configure (optional if already run)
make
-based-on: 4c8eb5f9511dd1393b147c4e993ee15448faedf5
+based-on: 7cb0de6326c915a72253fd103dae93308031ec3f
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
extern int delete_mode;
extern int delete_before;
extern int delete_during;
-@@ -484,6 +485,7 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
+@@ -485,6 +486,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! */
int keep_time = !preserve_times ? 0
: S_ISDIR(file->mode) ? preserve_times & PRESERVE_DIR_TIMES
: S_ISLNK(file->mode) ? preserve_times & PRESERVE_LINK_TIMES
-@@ -510,10 +512,11 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
+@@ -511,10 +513,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;
iflags |= ITEM_REPORT_GROUP;
#ifdef SUPPORT_ACLS
if (preserve_acls && !S_ISLNK(file->mode)) {
-@@ -1388,7 +1391,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1391,7 +1394,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
real_ret = statret;
if (file->flags & FLAG_DIR_CREATED)
statret = -1;
diff --git a/rsync.yo b/rsync.yo
--- a/rsync.yo
+++ b/rsync.yo
-@@ -371,6 +371,7 @@ to the detailed description below for a complete description. verb(
+@@ -374,6 +374,7 @@ to the detailed description below for a complete description. verb(
-t, --times preserve modification times
-O, --omit-dir-times omit directories from --times
-J, --omit-link-times omit symlinks from --times
--super receiver attempts super-user activities
--fake-super store/recover privileged attrs using xattrs
-S, --sparse handle sparse files efficiently
-@@ -1189,6 +1190,10 @@ directories.
+@@ -1192,6 +1193,10 @@ directories.
dit(bf(-J, --omit-link-times)) This tells rsync to omit symlinks when
it is preserving modification times (see bf(--times)).
./configure (optional if already run)
make
-based-on: 4c8eb5f9511dd1393b147c4e993ee15448faedf5
+based-on: 7cb0de6326c915a72253fd103dae93308031ec3f
diff --git a/flist.c b/flist.c
--- a/flist.c
+++ b/flist.c
extern uid_t our_uid;
extern struct stats stats;
extern char *filesfrom_host;
-@@ -1755,6 +1756,9 @@ static void send_directory(int f, struct file_list *flist, char *fbuf, int len,
+@@ -1762,6 +1763,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);
TODO: the configure changes should abort if the user requests --enable-slp
and we can't honor that request.
-based-on: 4c8eb5f9511dd1393b147c4e993ee15448faedf5
+based-on: 7cb0de6326c915a72253fd103dae93308031ec3f
diff --git a/Makefile.in b/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
-@@ -732,6 +732,29 @@ if test $rsync_cv_can_hardlink_special = yes; then
+@@ -734,6 +734,29 @@ if test $rsync_cv_can_hardlink_special = yes; then
AC_DEFINE(CAN_HARDLINK_SPECIAL, 1, [Define to 1 if link() can hard-link special files.])
fi
diff --git a/rsync.yo b/rsync.yo
--- a/rsync.yo
+++ b/rsync.yo
-@@ -148,7 +148,12 @@ particular rsync daemon by leaving off the module name:
+@@ -151,7 +151,12 @@ particular rsync daemon by leaving off the module name:
quote(tt(rsync somehost.mydomain.com::))
./configure (optional if already run)
make
-based-on: 4c8eb5f9511dd1393b147c4e993ee15448faedf5
+based-on: 7cb0de6326c915a72253fd103dae93308031ec3f
diff --git a/syscall.c b/syscall.c
--- a/syscall.c
+++ b/syscall.c
-- Matt McCutchen <hashproduct@gmail.com>
-based-on: 4c8eb5f9511dd1393b147c4e993ee15448faedf5
+based-on: 7cb0de6326c915a72253fd103dae93308031ec3f
diff --git a/options.c b/options.c
--- 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 },
-@@ -2637,6 +2640,8 @@ void server_options(char **args, int *argc_p)
+@@ -2638,6 +2641,8 @@ void server_options(char **args, int *argc_p)
goto oom;
args[ac++] = arg;
}
diff --git a/rsync.yo b/rsync.yo
--- a/rsync.yo
+++ b/rsync.yo
-@@ -384,6 +384,7 @@ to the detailed description below for a complete description. verb(
+@@ -387,6 +387,7 @@ to the detailed description below for a complete description. verb(
--existing skip creating new files on receiver
--ignore-existing skip updating files that exist on receiver
--remove-source-files sender removes synchronized files (non-dir)
--del an alias for --delete-during
--delete delete extraneous files from dest dirs
--delete-before receiver deletes before xfer, not during
-@@ -1329,6 +1330,14 @@ bf(--exclude='*.new') for the rsync transfer).
+@@ -1332,6 +1333,14 @@ bf(--exclude='*.new') for the rsync transfer).
Starting with 3.1.0, rsync will skip the sender-side removal (and output an
error) if the file's size or modify time has not stayed unchanged.
diff --git a/sender.c b/sender.c
--- a/sender.c
+++ b/sender.c
-@@ -39,6 +39,7 @@ extern int protocol_version;
+@@ -40,6 +40,7 @@ extern int protocol_version;
extern int remove_source_files;
extern int updating_basis_file;
extern int make_backups;
extern int inplace;
extern int batch_fd;
extern int write_batch;
-@@ -127,6 +128,7 @@ void successful_send(int ndx)
+@@ -128,6 +129,7 @@ void successful_send(int ndx)
struct file_struct *file;
struct file_list *flist;
STRUCT_STAT st;
if (!remove_source_files)
return;
-@@ -151,7 +153,11 @@ void successful_send(int ndx)
+@@ -152,7 +154,11 @@ void successful_send(int ndx)
return;
}
./configure (optional if already run)
make
-based-on: 4c8eb5f9511dd1393b147c4e993ee15448faedf5
+based-on: 7cb0de6326c915a72253fd103dae93308031ec3f
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
-@@ -62,6 +62,7 @@ extern int append_mode;
+@@ -63,6 +63,7 @@ extern int append_mode;
extern int make_backups;
extern int csum_length;
extern int ignore_times;
extern int size_only;
extern OFF_T max_size;
extern OFF_T min_size;
-@@ -568,7 +569,7 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
+@@ -571,7 +572,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)
{
if (files_from) {
char *h, *p;
int q;
-@@ -2646,6 +2665,25 @@ void server_options(char **args, int *argc_p)
+@@ -2647,6 +2666,25 @@ void server_options(char **args, int *argc_p)
else if (missing_args == 1 && !am_sender)
args[ac++] = "--ignore-missing-args";
diff --git a/receiver.c b/receiver.c
--- a/receiver.c
+++ b/receiver.c
-@@ -55,6 +55,7 @@ extern int delay_updates;
+@@ -56,6 +56,7 @@ extern int delay_updates;
extern mode_t orig_umask;
extern struct stats stats;
extern char *tmpdir;
extern char *partial_dir;
extern char *basis_dir[MAX_BASIS_DIRS+1];
extern char sender_file_sum[MAX_DIGEST_LEN];
-@@ -533,6 +534,8 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -534,6 +535,8 @@ int recv_files(int f_in, int f_out, char *local_name)
const char *parent_dirname = "";
#endif
int ndx, recv_ok;
if (DEBUG_GTE(RECV, 1))
rprintf(FINFO, "recv_files(%d) starting\n", cur_flist->used);
-@@ -540,6 +543,23 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -541,6 +544,23 @@ int recv_files(int f_in, int f_out, char *local_name)
if (delay_updates)
delayed_bits = bitbag_create(cur_flist->used + 1);
while (1) {
cleanup_disable();
-@@ -843,6 +863,9 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -846,6 +866,9 @@ int recv_files(int f_in, int f_out, char *local_name)
else if (!am_server && INFO_GTE(NAME, 1) && INFO_EQ(PROGRESS, 1))
rprintf(FINFO, "%s\n", fname);
/* recv file data */
recv_ok = receive_data(f_in, fnamecmp, fd1, st.st_size,
fname, fd2, F_LENGTH(file));
-@@ -857,6 +880,16 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -860,6 +883,16 @@ int recv_files(int f_in, int f_out, char *local_name)
exit_cleanup(RERR_FILEIO);
}
diff --git a/rsync.yo b/rsync.yo
--- a/rsync.yo
+++ b/rsync.yo
-@@ -410,6 +410,7 @@ to the detailed description below for a complete description. verb(
+@@ -413,6 +413,7 @@ to the detailed description below for a complete description. verb(
--contimeout=SECONDS set daemon connection timeout in seconds
-I, --ignore-times don't skip files that match size and time
--size-only skip files that match in size
--modify-window=NUM compare mod-times with reduced accuracy
-T, --temp-dir=DIR create temporary files in directory DIR
-y, --fuzzy find similar file for basis if no dest file
-@@ -451,6 +452,8 @@ to the detailed description below for a complete description. verb(
+@@ -454,6 +455,8 @@ to the detailed description below for a complete description. verb(
--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
--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)
-@@ -2540,6 +2543,33 @@ file previously generated by bf(--write-batch).
+@@ -2543,6 +2546,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.
diff --git a/sender.c b/sender.c
--- a/sender.c
+++ b/sender.c
-@@ -43,6 +43,7 @@ extern int inplace;
+@@ -44,6 +44,7 @@ extern int inplace;
extern int batch_fd;
extern int write_batch;
extern int file_old_total;
extern struct stats stats;
extern struct file_list *cur_flist, *first_flist, *dir_flist;
-@@ -199,6 +200,26 @@ void send_files(int f_in, int f_out)
+@@ -201,6 +202,26 @@ void send_files(int f_in, int f_out)
int f_xfer = write_batch < 0 ? batch_fd : f_out;
int save_io_error = io_error;
int ndx, j;
if (DEBUG_GTE(SEND, 1))
rprintf(FINFO, "send_files starting\n");
-@@ -333,6 +354,7 @@ void send_files(int f_in, int f_out)
+@@ -335,6 +356,7 @@ void send_files(int f_in, int f_out)
exit_cleanup(RERR_PROTOCOL);
}
fd = do_open(fname, O_RDONLY, 0);
if (fd == -1) {
if (errno == ENOENT) {
-@@ -354,6 +376,33 @@ void send_files(int f_in, int f_out)
+@@ -356,6 +378,33 @@ void send_files(int f_in, int f_out)
continue;
}
/* map the local file */
if (do_fstat(fd, &st) != 0) {
io_error |= IOERR_GENERAL;
-@@ -404,6 +453,8 @@ void send_files(int f_in, int f_out)
+@@ -406,6 +455,8 @@ void send_files(int f_in, int f_out)
}
}
close(fd);
./configure (optional if already run)
make
-based-on: 4c8eb5f9511dd1393b147c4e993ee15448faedf5
+based-on: 7cb0de6326c915a72253fd103dae93308031ec3f
diff --git a/fileio.c b/fileio.c
--- a/fileio.c
+++ b/fileio.c
{"preallocate", 0, POPT_ARG_NONE, &preallocate_files, 0, 0, 0},
{"inplace", 0, POPT_ARG_VAL, &inplace, 1, 0, 0 },
{"no-inplace", 0, POPT_ARG_VAL, &inplace, 0, 0, 0 },
-@@ -2569,6 +2572,12 @@ void server_options(char **args, int *argc_p)
+@@ -2570,6 +2573,12 @@ void server_options(char **args, int *argc_p)
args[ac++] = arg;
}
diff --git a/rsync.yo b/rsync.yo
--- a/rsync.yo
+++ b/rsync.yo
-@@ -374,6 +374,7 @@ to the detailed description below for a complete description. verb(
+@@ -377,6 +377,7 @@ to the detailed description below for a complete description. verb(
--super receiver attempts super-user activities
--fake-super store/recover privileged attrs using xattrs
-S, --sparse handle sparse files efficiently
--preallocate allocate dest files before writing
-n, --dry-run perform a trial run with no changes made
-W, --whole-file copy files whole (w/o delta-xfer algorithm)
-@@ -1245,6 +1246,15 @@ filesystem, but with this option rsync will probably copy more slowly. If the
+@@ -1248,6 +1249,15 @@ filesystem, but with this option rsync will probably copy more slowly. If the
destination is not an extent-supporting filesystem (such as ext4, xfs, NTFS,
etc.), this option may have no positive effect at all.
./configure (optional if already run)
make
-based-on: 4c8eb5f9511dd1393b147c4e993ee15448faedf5
+based-on: 7cb0de6326c915a72253fd103dae93308031ec3f
diff --git a/io.c b/io.c
--- a/io.c
+++ b/io.c
default:
/* A large opt value means that set_refuse_options()
* turned this option off. */
-@@ -2581,6 +2617,15 @@ void server_options(char **args, int *argc_p)
+@@ -2582,6 +2618,15 @@ void server_options(char **args, int *argc_p)
args[ac++] = arg;
}
diff --git a/rsync.yo b/rsync.yo
--- a/rsync.yo
+++ b/rsync.yo
-@@ -448,6 +448,8 @@ to the detailed description below for a complete description. verb(
+@@ -451,6 +451,8 @@ to the detailed description below for a complete description. verb(
--password-file=FILE read daemon-access password from FILE
--list-only list the files instead of copying them
--bwlimit=RATE limit socket I/O bandwidth
--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
-@@ -2514,6 +2516,19 @@ files can show up as being rapidly sent when the data is quickly buffered,
+@@ -2517,6 +2519,19 @@ files can show up as being rapidly sent when the data is quickly buffered,
while other can show up as very slow when the flushing of the output buffer
occurs. This may be fixed in a future version.
./configure (optional if already run)
make
-based-on: 4c8eb5f9511dd1393b147c4e993ee15448faedf5
+based-on: 7cb0de6326c915a72253fd103dae93308031ec3f
diff --git a/flist.c b/flist.c
--- a/flist.c
+++ b/flist.c
if (*thisname
&& (clean_fname(thisname, CFN_REFUSE_DOT_DOT_DIRS) < 0 || (!relative_paths && *thisname == '/'))) {
rprintf(FERROR, "ABORTING due to unsafe pathname from sender: %s\n", thisname);
-@@ -2444,6 +2468,15 @@ struct file_list *recv_file_list(int f)
+@@ -2451,6 +2475,15 @@ struct file_list *recv_file_list(int f)
parse_name_map(usermap, True);
if (groupmap)
parse_name_map(groupmap, False);
am_starting_up = 0;
return 1;
-@@ -2754,6 +2775,12 @@ void server_options(char **args, int *argc_p)
+@@ -2755,6 +2776,12 @@ void server_options(char **args, int *argc_p)
if (relative_paths && !implied_dirs && (!am_sender || protocol_version >= 30))
args[ac++] = "--no-implied-dirs";
diff --git a/rsync.yo b/rsync.yo
--- a/rsync.yo
+++ b/rsync.yo
-@@ -453,6 +453,7 @@ to the detailed description below for a complete description. verb(
+@@ -456,6 +456,7 @@ to the detailed description below for a complete description. verb(
--read-batch=FILE read a batched update from FILE
--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)
-4, --ipv4 prefer IPv4
-6, --ipv6 prefer IPv6
-@@ -2578,6 +2579,22 @@ daemon uses the charset specified in its "charset" configuration parameter
+@@ -2581,6 +2582,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)).
./configure (optional if already run)
make
-based-on: 4c8eb5f9511dd1393b147c4e993ee15448faedf5
+based-on: 7cb0de6326c915a72253fd103dae93308031ec3f
diff --git a/syscall.c b/syscall.c
--- a/syscall.c
+++ b/syscall.c
This patch has not yet been tested by me (Wayne), but was provided
Darryl Dixon. Thanks!
-based-on: 4c8eb5f9511dd1393b147c4e993ee15448faedf5
+based-on: 7cb0de6326c915a72253fd103dae93308031ec3f
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
extern int preserve_specials;
extern int preserve_hard_links;
extern int preserve_executability;
-@@ -1670,7 +1671,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1673,7 +1674,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
fnamecmp_type = FNAMECMP_FNAME;
default:
/* A large opt value means that set_refuse_options()
* turned this option off. */
-@@ -2754,6 +2762,9 @@ void server_options(char **args, int *argc_p)
+@@ -2755,6 +2763,9 @@ void server_options(char **args, int *argc_p)
if (relative_paths && !implied_dirs && (!am_sender || protocol_version >= 30))
args[ac++] = "--no-implied-dirs";
diff --git a/receiver.c b/receiver.c
--- a/receiver.c
+++ b/receiver.c
-@@ -38,6 +38,7 @@ extern int protocol_version;
+@@ -39,6 +39,7 @@ extern int protocol_version;
extern int relative_paths;
extern int preserve_hard_links;
extern int preserve_perms;
extern int preserve_xattrs;
extern int basis_dir_cnt;
extern int make_backups;
-@@ -228,7 +229,7 @@ int open_tmpfile(char *fnametmp, const char *fname, struct file_struct *file)
+@@ -229,7 +230,7 @@ int open_tmpfile(char *fnametmp, const char *fname, struct file_struct *file)
}
static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
{
static char file_sum1[MAX_DIGEST_LEN];
struct map_struct *mapbuf;
-@@ -244,12 +245,12 @@ static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
+@@ -245,12 +246,12 @@ static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
OFF_T preallocated_len = 0;
#endif
#endif
} else
rsyserr(FWARNING, errno, "do_fallocate %s", full_fname(fname));
-@@ -278,7 +279,7 @@ static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
+@@ -279,7 +280,7 @@ static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
if (append_mode == 2 && mapbuf) {
for (j = CHUNK_SIZE; j < sum.flength; j += CHUNK_SIZE) {
if (INFO_GTE(PROGRESS, 1))
sum_update(map_ptr(mapbuf, offset, CHUNK_SIZE),
CHUNK_SIZE);
offset = j;
-@@ -286,7 +287,7 @@ static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
+@@ -287,7 +288,7 @@ static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
if (offset < sum.flength) {
int32 len = (int32)(sum.flength - offset);
if (INFO_GTE(PROGRESS, 1))
sum_update(map_ptr(mapbuf, offset, len), len);
}
}
-@@ -300,7 +301,7 @@ static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
+@@ -301,7 +302,7 @@ static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
while ((i = recv_token(f_in, &data)) != 0) {
if (INFO_GTE(PROGRESS, 1))
if (allowed_lull)
maybe_send_keepalive(time(NULL), MSK_ALLOW_FLUSH | MSK_ACTIVE_RECEIVER);
-@@ -370,20 +371,20 @@ static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
+@@ -371,20 +372,20 @@ static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
#ifdef HAVE_FTRUNCATE
/* inplace: New data could be shorter than old data.
if (fd != -1 && offset > 0 && sparse_end(fd, offset) != 0) {
report_write_error:
-@@ -407,9 +408,9 @@ static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
+@@ -408,9 +409,9 @@ static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
}
}
static void handle_delayed_updates(char *local_name)
-@@ -663,7 +664,7 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -666,7 +667,7 @@ int recv_files(int f_in, int f_out, char *local_name)
"(Skipping batched update for%s \"%s\")\n",
redoing ? " resend of" : "",
fname);
file->flags |= FLAG_FILE_SENT;
continue;
}
-@@ -675,13 +676,13 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -678,13 +679,13 @@ int recv_files(int f_in, int f_out, char *local_name)
if (!do_xfers) { /* log the transfer */
log_item(FCLIENT, file, iflags, NULL);
if (read_batch)
if (inc_recurse)
send_msg_int(MSG_SUCCESS, ndx);
continue;
-@@ -771,7 +772,7 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -774,7 +775,7 @@ int recv_files(int f_in, int f_out, char *local_name)
} else if (do_fstat(fd1,&st) != 0) {
rsyserr(FERROR_XFER, errno, "fstat %s failed",
full_fname(fnamecmp));
close(fd1);
if (inc_recurse)
send_msg_int(MSG_NO_SEND, ndx);
-@@ -786,18 +787,32 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -789,18 +790,32 @@ int recv_files(int f_in, int f_out, char *local_name)
*/
rprintf(FERROR_XFER, "recv_files: %s is a directory\n",
full_fname(fnamecmp));
/* If we're not preserving permissions, change the file-list's
* mode based on the local permissions and some heuristics. */
if (!preserve_perms) {
-@@ -829,7 +844,7 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -832,7 +847,7 @@ int recv_files(int f_in, int f_out, char *local_name)
}
if (fd2 == -1) {
if (fd1 != -1)
close(fd1);
if (inc_recurse)
-@@ -844,8 +859,7 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -847,8 +862,7 @@ int recv_files(int f_in, int f_out, char *local_name)
rprintf(FINFO, "%s\n", fname);
/* recv file data */
diff --git a/compat.c b/compat.c
--- a/compat.c
+++ b/compat.c
-@@ -201,13 +201,6 @@ void setup_protocol(int f_out,int f_in)
+@@ -203,13 +203,6 @@ void setup_protocol(int f_out,int f_in)
if (protocol_version < 30) {
if (append_mode == 1)
append_mode = 2;