./configure (optional if already run)
make
-based-on: db5bfe67a5d022f9ad25340db6bc2cca2cbbdb65
+based-on: 8b1b81e054bdcc927ff26f20f424e034bd273175
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
diff --git a/receiver.c b/receiver.c
--- a/receiver.c
+++ b/receiver.c
-@@ -426,7 +426,7 @@ static void handle_delayed_updates(char *local_name)
+@@ -427,7 +427,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",
-@@ -747,7 +747,7 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -748,7 +748,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. */
--backup-dir=DIR make backups into hierarchy based in DIR
--suffix=SUFFIX backup suffix (default ~ w/o --backup-dir)
--update, -u skip files that are newer on the receiver
-@@ -967,6 +968,13 @@ expand it.
+@@ -970,6 +971,13 @@ expand it.
rules specify a trailing inclusion/exclusion of `*`, the auto-added rule
would never be reached).
--update, -u skip files that are newer on the receiver
--inplace update destination files in-place
--append append data onto shorter files
-@@ -989,6 +991,11 @@ expand it.
+@@ -992,6 +994,11 @@ expand it.
daemon is the receiver, the backup dir cannot go outside the module's path
hierarchy, so take extra care not to delete it or copy into it.
./configure (optional if already run)
make
-based-on: db5bfe67a5d022f9ad25340db6bc2cca2cbbdb65
+based-on: 8b1b81e054bdcc927ff26f20f424e034bd273175
diff --git a/errcode.h b/errcode.h
--- a/errcode.h
+++ b/errcode.h
./configure (optional if already run)
make
-based-on: db5bfe67a5d022f9ad25340db6bc2cca2cbbdb65
+based-on: 8b1b81e054bdcc927ff26f20f424e034bd273175
diff --git a/clientserver.c b/clientserver.c
--- a/clientserver.c
+++ b/clientserver.c
extern int io_timeout;
extern int no_detach;
extern int write_batch;
-@@ -1093,6 +1095,9 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
+@@ -1104,6 +1106,9 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
} else if (am_root < 0) /* Treat --fake-super from client as --super. */
am_root = 2;
extern int inc_recurse;
extern int always_checksum;
+extern int basis_dir_cnt;
- extern int checksum_type;
extern int module_id;
extern int ignore_errors;
-@@ -63,6 +65,7 @@ extern int implied_dirs;
+ extern int numeric_ids;
+@@ -62,6 +64,7 @@ extern int implied_dirs;
extern int ignore_perishable;
extern int non_perishable_cnt;
extern int prune_empty_dirs;
extern int copy_links;
extern int copy_unsafe_links;
extern int protocol_version;
-@@ -75,6 +78,7 @@ extern int output_needs_newline;
+@@ -74,6 +77,7 @@ extern int output_needs_newline;
extern int sender_keeps_checksum;
extern int trust_sender_filter;
extern int unsort_ndx;
extern uid_t our_uid;
extern struct stats stats;
extern char *filesfrom_host;
-@@ -91,6 +95,20 @@ extern int filesfrom_convert;
+@@ -92,6 +96,20 @@ extern int filesfrom_convert;
extern iconv_t ic_send, ic_recv;
#endif
#define PTR_SIZE (sizeof (struct file_struct *))
int io_error;
-@@ -135,8 +153,12 @@ static char empty_sum[MAX_DIGEST_LEN];
+@@ -136,8 +154,12 @@ static char empty_sum[MAX_DIGEST_LEN];
static int flist_count_offset; /* for --delete --progress */
static int show_filelist_progress;
static void output_flist(struct file_list *flist);
void init_flist(void)
-@@ -327,6 +349,235 @@ static void flist_done_allocating(struct file_list *flist)
+@@ -329,6 +351,235 @@ static void flist_done_allocating(struct file_list *flist)
flist->pool_boundary = ptr;
}
+
+ while (fgets(line, sizeof line, fp)) {
+ cp = line;
-+ if (checksum_type == 5) {
++ if (file_sum_nni->num == CSUM_MD5) {
+ char *alt_sum = cp;
+ if (*cp == '=')
+ while (*++cp == '=') {}
+ break;
+ while (*++cp == ' ') {}
+
-+ if (checksum_type != 5) {
++ if (file_sum_nni->num < CSUM_MD5) {
+ char *alt_sum = cp;
+ if (*cp == '=')
+ while (*++cp == '=') {}
/* 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
-@@ -1229,7 +1480,7 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1231,7 +1482,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];
-@@ -1375,9 +1626,16 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1377,9 +1628,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
-@@ -1407,11 +1665,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1409,11 +1667,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))
-@@ -1500,8 +1755,14 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1502,8 +1757,14 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
return NULL;
}
if (unsort_ndx)
F_NDX(file) = stats.num_dirs;
-@@ -2718,7 +2979,7 @@ struct file_list *recv_file_list(int f, int dir_ndx)
+@@ -2720,7 +2981,7 @@ struct file_list *recv_file_list(int f, int dir_ndx)
/* 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 */
-@@ -2963,7 +3224,7 @@ void flist_free(struct file_list *flist)
+@@ -2965,7 +3226,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;
-@@ -3014,7 +3275,7 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
+@@ -3016,7 +3277,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;
-@@ -3030,8 +3291,8 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
+@@ -3032,8 +3293,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);
-@@ -3053,7 +3314,7 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
+@@ -3055,7 +3316,7 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
}
flist->high = prev_i;
--archive, -a archive mode is -rlptgoD (no -A,-X,-U,-N,-H)
--no-OPTION turn off an implied OPTION (e.g. --no-D)
--recursive, -r recurse into directories
-@@ -775,6 +776,8 @@ expand it.
+@@ -778,6 +779,8 @@ expand it.
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 _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 automatic
-@@ -786,6 +789,38 @@ expand it.
+@@ -789,6 +792,38 @@ expand it.
option or an environment variable that is discussed in that option's
section.
diff --git a/rsync.h b/rsync.h
--- a/rsync.h
+++ b/rsync.h
-@@ -902,6 +902,10 @@ extern int xattrs_ndx;
+@@ -903,6 +903,10 @@ extern int file_sum_len;
#define F_SUM(f) ((char*)OPT_EXTRA(f, START_BUMP(f) + HLINK_BUMP(f) \
+ SUM_EXTRA_CNT - 1))
/* Some utility defines: */
#define F_IS_ACTIVE(f) (f)->basename[0]
#define F_IS_HLINKED(f) ((f)->flags & FLAG_HLINKED)
-@@ -1115,6 +1119,13 @@ typedef struct {
+@@ -1117,6 +1121,13 @@ typedef struct {
#define RELNAMECACHE_LEN (offsetof(relnamecache, fname))
#endif
extern int am_root;
extern int am_server;
extern int am_daemon;
-@@ -111,6 +112,9 @@ extern iconv_t ic_send, ic_recv;
+@@ -112,6 +113,9 @@ extern iconv_t ic_send, ic_recv;
#define PTR_SIZE (sizeof (struct file_struct *))
int io_error;
int flist_csum_len;
dev_t filesystem_dev; /* used to implement -x */
-@@ -153,8 +157,13 @@ static char empty_sum[MAX_DIGEST_LEN];
+@@ -154,8 +158,13 @@ static char empty_sum[MAX_DIGEST_LEN];
static int flist_count_offset; /* for --delete --progress */
static int show_filelist_progress;
} *csum_cache = NULL;
static struct file_list *flist_new(int flags, const char *msg);
-@@ -349,7 +358,79 @@ static void flist_done_allocating(struct file_list *flist)
+@@ -351,7 +360,79 @@ static void flist_done_allocating(struct file_list *flist)
flist->pool_boundary = ptr;
}
+ const char *alt_sum = file->basename + strlen(file->basename) + 1;
+ if (whole_dir && !(file->flags & FLAG_SUM_KEEP))
+ continue;
-+ if (checksum_type == 5)
++ if (file_sum_nni->num == CSUM_MD5)
+ fprintf(out_fp, "%s ", alt_sum);
+ if (file->flags & FLAG_SUM_MISSING) {
+ do {
+ fprintf(out_fp, "%02x", (int)CVAL(cp, 0));
+ } while (++cp != end);
+ }
-+ if (checksum_type != 5)
++ if (file_sum_nni->num < CSUM_MD5)
+ fprintf(out_fp, " %s", alt_sum);
+ fprintf(out_fp, " %10.0f %10.0f %10lu %10lu %s\n",
+ (double)F_LENGTH(file), (double)file->modtime,
{
int slot, slots = am_sender ? 1 : basis_dir_cnt + 1;
-@@ -360,6 +441,9 @@ void reset_checksum_cache()
+@@ -362,6 +443,9 @@ void reset_checksum_cache()
struct file_list *flist = csum_cache[slot].flist;
if (flist) {
/* Reset the pool memory and empty the file-list array. */
pool_free_old(flist->file_pool,
pool_boundary(flist->file_pool, 0));
-@@ -370,6 +454,10 @@ void reset_checksum_cache()
+@@ -372,6 +456,10 @@ void reset_checksum_cache()
flist->low = 0;
flist->high = -1;
flist->next = NULL;
}
}
-@@ -377,7 +465,7 @@ void reset_checksum_cache()
+@@ -379,7 +467,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,
{
struct file_struct *file;
int alloc_len, extra_len;
-@@ -394,7 +482,7 @@ static int add_checksum(struct file_list *flist, const char *dirname,
+@@ -396,7 +484,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
bp = pool_alloc(flist->file_pool, alloc_len, "add_checksum");
memset(bp, 0, extra_len + FILE_STRUCT_LEN);
-@@ -403,7 +491,14 @@ static int add_checksum(struct file_list *flist, const char *dirname,
+@@ -405,7 +493,14 @@ static int add_checksum(struct file_list *flist, const char *dirname,
bp += FILE_STRUCT_LEN;
memcpy(bp, basename, basename_len);
file->mode = S_IFREG;
file->modtime = mtime;
file->len32 = (uint32)file_length;
-@@ -432,10 +527,11 @@ static void read_checksums(int slot, struct file_list *flist, const char *dirnam
+@@ -434,10 +529,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;
int dlen = dirname ? strlcpy(fbuf, dirname, sizeof fbuf) : 0;
if (dlen >= (int)(sizeof fbuf - 1 - RSYNCSUMS_LEN))
-@@ -456,7 +552,7 @@ static void read_checksums(int slot, struct file_list *flist, const char *dirnam
+@@ -458,7 +554,7 @@ static void read_checksums(int slot, struct file_list *flist, const char *dirnam
while (fgets(line, sizeof line, fp)) {
cp = line;
- if (checksum_type == 5) {
+ if (file_sum_nni->num == CSUM_MD5) {
- char *alt_sum = cp;
+ alt_sum = cp;
if (*cp == '=')
while (*++cp == '=') {}
else
-@@ -467,7 +563,14 @@ static void read_checksums(int slot, struct file_list *flist, const char *dirnam
+@@ -469,7 +565,14 @@ static void read_checksums(int slot, struct file_list *flist, const char *dirnam
}
if (*cp == '=') {
} else {
for (i = 0; i < flist_csum_len*2; i++, cp++) {
int x;
-@@ -485,13 +588,14 @@ static void read_checksums(int slot, struct file_list *flist, const char *dirnam
+@@ -487,13 +590,14 @@ static void read_checksums(int slot, struct file_list *flist, const char *dirnam
else
sum[i/2] = x << 4;
}
break;
while (*++cp == ' ') {}
- if (checksum_type != 5) {
+ if (file_sum_nni->num < CSUM_MD5) {
- char *alt_sum = cp;
+ alt_sum = cp;
if (*cp == '=')
while (*++cp == '=') {}
else
-@@ -541,24 +645,112 @@ static void read_checksums(int slot, struct file_list *flist, const char *dirnam
+@@ -543,24 +647,112 @@ static void read_checksums(int slot, struct file_list *flist, const char *dirnam
continue;
strlcpy(fbuf+dlen, cp, sizeof fbuf - dlen);
+ if (!(out_fp = fopen(fbuf, "a")))
+ return;
+
-+ if (checksum_type == 5) {
++ if (file_sum_nni->num == CSUM_MD5) {
+ for (j = 0; j < flist_csum_len; j++)
+ fputs("==", out_fp);
+ fputc(' ', out_fp);
+ do {
+ fprintf(out_fp, "%02x", (int)CVAL(cp, 0));
+ } while (++cp != end);
-+ if (checksum_type != 5) {
++ if (file_sum_nni->num < CSUM_MD5) {
+ fputc(' ', out_fp);
+ for (j = 0; j < flist_csum_len; j++)
+ fputs("==", out_fp);
read_checksums(slot, flist, file->dirname);
}
-@@ -570,12 +762,31 @@ void get_cached_checksum(int slot, const char *fname, struct file_struct *file,
+@@ -572,12 +764,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))) {
}
/* Call this with EITHER (1) "file, NULL, 0" to chdir() to the file's
-@@ -1581,6 +1792,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1583,6 +1794,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;
}
-@@ -1627,13 +1840,13 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1629,13 +1842,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' */
-@@ -1757,7 +1970,7 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1759,7 +1972,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)
-@@ -2149,6 +2362,9 @@ static void send_directory(int f, struct file_list *flist, char *fbuf, int len,
+@@ -2151,6 +2364,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". */
-@@ -2814,6 +3030,9 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
+@@ -2816,6 +3032,9 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
rprintf(FINFO, "[%s] flist_eof=1\n", who_am_i());
}
extern int whole_file;
extern int inplace;
extern int inplace_partial;
-@@ -439,7 +440,8 @@ static void handle_delayed_updates(char *local_name)
+@@ -440,7 +441,8 @@ static void handle_delayed_updates(char *local_name)
"rename failed for %s (from %s)",
full_fname(fname), partialptr);
} else {
send_msg_success(fname, ndx);
handle_partial_dir(partialptr, PDIR_DELETE);
}
-@@ -925,7 +927,8 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -926,7 +928,8 @@ int recv_files(int f_in, int f_out, char *local_name)
case 2:
break;
case 1:
diff --git a/rsync.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -800,9 +800,13 @@ expand it.
+@@ -803,9 +803,13 @@ expand it.
The MODE value is either "lax", for relaxed checking (which compares size
and mtime), "strict" (which also compares ctime and inode), or "none" to
diff --git a/rsync.h b/rsync.h
--- a/rsync.h
+++ b/rsync.h
-@@ -1121,6 +1121,8 @@ typedef struct {
+@@ -1123,6 +1123,8 @@ typedef struct {
#define CSF_ENABLE (1<<1)
#define CSF_LAX (1<<2)
./configure (optional if already run)
make
-based-on: db5bfe67a5d022f9ad25340db6bc2cca2cbbdb65
+based-on: 8b1b81e054bdcc927ff26f20f424e034bd273175
diff --git a/flist.c b/flist.c
--- a/flist.c
+++ b/flist.c
-@@ -1408,7 +1408,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1410,7 +1410,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
#endif
if (always_checksum && am_sender && S_ISREG(st.st_mode)) {
+extern int flist_csum_len;
extern int saw_xattr_filter;
- #define RSYNC_XAL_INITIAL 5
-@@ -72,6 +74,10 @@ extern int saw_xattr_filter;
+ extern struct name_num_item *xattr_sum_nni;
+@@ -76,6 +78,10 @@ extern int xattr_sum_len;
#define XACC_ACL_ATTR RSYNC_PREFIX "%" XACC_ACL_SUFFIX
#define XDEF_ACL_SUFFIX "dacl"
#define XDEF_ACL_ATTR RSYNC_PREFIX "%" XDEF_ACL_SUFFIX
typedef struct {
char *datum, *name;
-@@ -259,7 +265,9 @@ static int rsync_xal_get(const char *fname, item_list *xalp)
+@@ -263,7 +269,9 @@ static int rsync_xal_get(const char *fname, item_list *xalp)
|| (am_root < 0
&& (strcmp(name+RPRE_LEN+1, XSTAT_SUFFIX) == 0
|| strcmp(name+RPRE_LEN+1, XACC_ACL_SUFFIX) == 0
continue;
}
-@@ -1129,6 +1137,38 @@ int del_def_xattr_acl(const char *fname)
+@@ -1124,6 +1132,38 @@ int del_def_xattr_acl(const char *fname)
}
#endif
./configure (optional if already run)
make
-based-on: db5bfe67a5d022f9ad25340db6bc2cca2cbbdb65
+based-on: 8b1b81e054bdcc927ff26f20f424e034bd273175
diff --git a/Makefile.in b/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
--compress, -z compress file data during the transfer
--compress-choice=STR choose the compression algorithm (aka --zc)
--compress-level=NUM explicitly set compression level (aka --zl)
-@@ -2661,6 +2662,18 @@ expand it.
+@@ -2667,6 +2668,18 @@ expand it.
this bug by avoiding the `-o` option (or using `--no-o`) when sending to an
old rsync.
./configure (optional if already run)
make
-based-on: db5bfe67a5d022f9ad25340db6bc2cca2cbbdb65
+based-on: 8b1b81e054bdcc927ff26f20f424e034bd273175
diff --git a/daemon-parm.txt b/daemon-parm.txt
--- a/daemon-parm.txt
+++ b/daemon-parm.txt
./configure (optional if already run)
make
-based-on: db5bfe67a5d022f9ad25340db6bc2cca2cbbdb65
+based-on: 8b1b81e054bdcc927ff26f20f424e034bd273175
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
--modify-window=NUM, -@ set the accuracy for mod-time comparisons
--temp-dir=DIR, -T create temporary files in directory DIR
--fuzzy, -y find similar file for basis if no dest file
-@@ -737,6 +738,14 @@ expand it.
+@@ -740,6 +741,14 @@ expand it.
after using another mirroring system which may not preserve timestamps
exactly.
./configure
make
-based-on: db5bfe67a5d022f9ad25340db6bc2cca2cbbdb65
+based-on: 8b1b81e054bdcc927ff26f20f424e034bd273175
diff --git a/.gitignore b/.gitignore
--- a/.gitignore
+++ b/.gitignore
+extern int use_db;
extern const char *checksum_choice;
- struct name_num_item valid_checksums_items[] = {
-@@ -393,6 +394,8 @@ void file_checksum(const char *fname, const STRUCT_STAT *st_p, char *sum)
+ #define NNI_BUILTIN (1<<0)
+@@ -506,6 +507,8 @@ void file_checksum(const char *fname, const STRUCT_STAT *st_p, char *sum)
md5_update(&m5, (uchar *)map_ptr(buf, i, remainder), remainder);
md5_result(&m5, (uchar *)sum);
break;
}
case CSUM_MD4:
-@@ -432,6 +435,8 @@ void file_checksum(const char *fname, const STRUCT_STAT *st_p, char *sum)
+@@ -528,6 +531,8 @@ void file_checksum(const char *fname, const STRUCT_STAT *st_p, char *sum)
mdfour_update(&m, (uchar *)map_ptr(buf, i, remainder), remainder);
mdfour_result(&m, (uchar *)sum);
extern char *bind_address;
extern char *config_file;
extern char *logfile_format;
-@@ -869,6 +872,11 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
+@@ -880,6 +883,11 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
log_init(1);
#if defined HAVE_SETENV || defined HAVE_PUTENV
if ((*lp_early_exec(module_id) || *lp_prexfer_exec(module_id)
|| *lp_postxfer_exec(module_id) || *lp_name_converter(module_id))
-@@ -1081,6 +1089,8 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
+@@ -1092,6 +1100,8 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
am_server = 1; /* Don't let someone try to be tricky. */
quiet = 0;
netdb.h malloc.h float.h limits.h iconv.h libcharset.h langinfo.h mcheck.h \
sys/acl.h acl/libacl.h attr/xattr.h sys/xattr.h sys/extattr.h dl.h \
popt.h popt/popt.h linux/falloc.h netinet/in_systm.h netgroup.h \
-@@ -1423,6 +1424,48 @@ if test x"$enable_acl_support" = x"no" || test x"$enable_xattr_support" = x"no"
+@@ -1433,6 +1434,48 @@ if test x"$enable_acl_support" = x"no" || test x"$enable_xattr_support" = x"no"
fi
fi
diff --git a/flist.c b/flist.c
--- a/flist.c
+++ b/flist.c
-@@ -55,6 +55,7 @@ extern int preserve_devices;
+@@ -54,6 +54,7 @@ extern int preserve_devices;
extern int preserve_specials;
extern int delete_during;
extern int missing_args;
extern int eol_nulls;
extern int atimes_ndx;
extern int crtimes_ndx;
-@@ -1407,11 +1408,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1409,11 +1410,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))
-@@ -1500,8 +1498,12 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1502,8 +1500,12 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
return NULL;
}
if (unsort_ndx)
F_NDX(file) = stats.num_dirs;
-@@ -2185,6 +2187,9 @@ void send_extra_file_list(int f, int at_least)
+@@ -2187,6 +2189,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[])
-@@ -2208,6 +2213,13 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
+@@ -2210,6 +2215,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_progress)
start_filelist_progress("building file list");
-@@ -2553,6 +2565,9 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
+@@ -2555,6 +2567,9 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
rprintf(FINFO, "[%s] flist_eof=1\n", who_am_i());
}
extern int am_root;
extern int am_server;
extern int inc_recurse;
-@@ -439,6 +441,11 @@ static void handle_delayed_updates(char *local_name)
+@@ -440,6 +442,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_success(fname, ndx);
handle_partial_dir(partialptr, PDIR_DELETE);
-@@ -547,6 +554,9 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -548,6 +555,9 @@ int recv_files(int f_in, int f_out, char *local_name)
if (whole_file < 0)
whole_file = 0;
progress_init();
while (1) {
-@@ -897,6 +907,8 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -898,6 +908,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 && (!one_inplace || delay_updates)) {
if (!handle_partial_dir(partialptr, PDIR_CREATE)) {
rprintf(FERROR,
-@@ -910,6 +922,8 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -911,6 +923,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);
#define NDX_DONE -1
#define NDX_FLIST_EOF -2
#define NDX_DEL_STATS -3
-@@ -1441,7 +1445,8 @@ extern short info_levels[], debug_levels[];
+@@ -1443,7 +1447,8 @@ extern short info_levels[], debug_levels[];
#define DEBUG_CHDIR (DEBUG_BIND+1)
#define DEBUG_CONNECT (DEBUG_CHDIR+1)
#define DEBUG_CMD (DEBUG_CONNECT+1)
diff --git a/usage.c b/usage.c
--- a/usage.c
+++ b/usage.c
-@@ -137,6 +137,16 @@ static void print_info_flags(enum logcode f)
+@@ -138,6 +138,16 @@ static void print_info_flags(enum logcode f)
#endif
"crtimes",
"*Optimizations",
#ifndef USE_ROLL_SIMD
-@@ -263,6 +273,14 @@ void daemon_usage(enum logcode F)
+@@ -354,6 +364,14 @@ void daemon_usage(enum logcode F)
rprintf(F,"daemon-specific rsync options. See also the rsyncd.conf(5) manpage.\n");
}
+
const char *rsync_version(void)
{
- #ifdef RSYNC_GITVER
+ char *ver;
--compare-dest=DIR also compare destination files relative to DIR
--copy-dest=DIR ... and include copies of unchanged files
--link-dest=DIR hardlink to files in DIR when unchanged
-@@ -2593,6 +2595,20 @@ expand it.
+@@ -2599,6 +2601,20 @@ expand it.
otential alternate-basis files will be removed as the transfer progresses.
This option conflicts with [`--inplace`](#opt) and [`--append`](#opt).
a file that can't use it, while missing out on giving it to a file
that could use it.
-based-on: db5bfe67a5d022f9ad25340db6bc2cca2cbbdb65
+based-on: 8b1b81e054bdcc927ff26f20f424e034bd273175
diff --git a/backup.c b/backup.c
--- a/backup.c
+++ b/backup.c
extern int protect_args;
extern int preserve_uid;
extern int preserve_gid;
-@@ -170,6 +171,7 @@ void set_allow_inc_recurse(void)
+@@ -172,6 +173,7 @@ void set_allow_inc_recurse(void)
allow_inc_recurse = 0;
else if (!am_sender
&& (delete_before || delete_after
diff --git a/flist.c b/flist.c
--- a/flist.c
+++ b/flist.c
-@@ -65,6 +65,7 @@ extern int non_perishable_cnt;
+@@ -64,6 +64,7 @@ extern int non_perishable_cnt;
extern int prune_empty_dirs;
extern int copy_links;
extern int copy_unsafe_links;
extern int protocol_version;
extern int sanitize_paths;
extern int munge_symlinks;
-@@ -131,6 +132,8 @@ static int64 tmp_dev = -1, tmp_ino;
+@@ -132,6 +133,8 @@ static int64 tmp_dev = -1, tmp_ino;
#endif
static char tmp_sum[MAX_DIGEST_LEN];
static char empty_sum[MAX_DIGEST_LEN];
static int flist_count_offset; /* for --delete --progress */
static int show_filelist_progress;
-@@ -278,6 +281,45 @@ static inline int is_excluded(const char *fname, int is_dir, int filter_level)
+@@ -280,6 +283,45 @@ static inline int is_excluded(const char *fname, int is_dir, int filter_level)
return name_is_excluded(fname, is_dir ? NAME_IS_DIR : NAME_IS_FILE, filter_level);
}
static void send_directory(int f, struct file_list *flist,
char *fbuf, int len, int flags);
-@@ -2720,6 +2762,23 @@ struct file_list *recv_file_list(int f, int dir_ndx)
+@@ -2722,6 +2764,23 @@ struct file_list *recv_file_list(int f, int dir_ndx)
* for a non-relative transfer in recv_file_entry(). */
flist_sort_and_clean(flist, relative_paths);
diff --git a/receiver.c b/receiver.c
--- a/receiver.c
+++ b/receiver.c
-@@ -218,7 +218,7 @@ int open_tmpfile(char *fnametmp, const char *fname, struct file_struct *file)
+@@ -220,7 +220,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
--compare-dest=DIR also compare destination files relative to DIR
--copy-dest=DIR ... and include copies of unchanged files
--link-dest=DIR hardlink to files in DIR when unchanged
-@@ -2576,6 +2577,22 @@ expand it.
+@@ -2582,6 +2583,22 @@ expand it.
potential fuzzy-match files, so either use [`--delete-after`](#opt) or
specify some filename exclusions if you need to prevent this.
./configure (optional if already run)
make
-based-on: db5bfe67a5d022f9ad25340db6bc2cca2cbbdb65
+based-on: 8b1b81e054bdcc927ff26f20f424e034bd273175
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
--prune-empty-dirs, -m prune empty directory chains from file-list
--numeric-ids don't map uid/gid values by user/group name
--usermap=STRING custom username mapping
-@@ -3374,6 +3375,17 @@ expand it.
+@@ -3380,6 +3381,17 @@ expand it.
update algorithm that is even more atomic (it uses [`--link-dest`](#opt)
and a parallel hierarchy of files).
./configure (optional if already run)
make
-based-on: db5bfe67a5d022f9ad25340db6bc2cca2cbbdb65
+based-on: 8b1b81e054bdcc927ff26f20f424e034bd273175
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
./configure (optional if already run)
make
-based-on: db5bfe67a5d022f9ad25340db6bc2cca2cbbdb65
+based-on: 8b1b81e054bdcc927ff26f20f424e034bd273175
diff --git a/compat.c b/compat.c
--- a/compat.c
+++ b/compat.c
extern int xfer_flags_as_varint;
extern int need_messages_from_generator;
extern int delete_mode, delete_before, delete_during, delete_after;
-@@ -80,7 +82,7 @@ int do_negotiated_strings = 0;
- int xmit_id0_names = 0;
+@@ -86,7 +88,7 @@ struct name_num_item *xattr_sum_nni;
+ int xattr_sum_len = 0;
/* These index values are for the file-list's extra-attribute array. */
-int pathname_ndx, depth_ndx, atimes_ndx, crtimes_ndx, uid_ndx, gid_ndx, acls_ndx, xattrs_ndx, unsort_ndx;
int receiver_symlink_times = 0; /* receiver can set the time on a symlink */
int sender_symlink_iconv = 0; /* sender should convert symlink content */
-@@ -578,6 +580,8 @@ void setup_protocol(int f_out,int f_in)
+@@ -588,6 +590,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_acls && !am_sender)
acls_ndx = ++file_extra_cnt;
if (preserve_xattrs)
-@@ -741,6 +745,10 @@ void setup_protocol(int f_out,int f_in)
+@@ -751,6 +755,10 @@ void setup_protocol(int f_out,int f_in)
fprintf(stderr, "Both rsync versions must be at least 3.2.0 for --crtimes.\n");
exit_cleanup(RERR_PROTOCOL);
}
diff --git a/flist.c b/flist.c
--- a/flist.c
+++ b/flist.c
-@@ -53,6 +53,7 @@ extern int preserve_links;
+@@ -52,6 +52,7 @@ extern int preserve_links;
extern int preserve_hard_links;
extern int preserve_devices;
extern int preserve_specials;
extern int delete_during;
extern int missing_args;
extern int eol_nulls;
-@@ -386,6 +387,9 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
+@@ -388,6 +389,9 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
static time_t crtime;
#endif
static mode_t mode;
#ifdef SUPPORT_HARD_LINKS
static int64 dev;
#endif
-@@ -429,6 +433,14 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
+@@ -431,6 +435,14 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
xflags |= XMIT_SAME_MODE;
else
mode = file->mode;
if (preserve_devices && IS_DEVICE(mode)) {
if (protocol_version < 28) {
-@@ -590,6 +602,10 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
+@@ -592,6 +604,10 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
#endif
if (!(xflags & XMIT_SAME_MODE))
write_int(f, to_wire_mode(mode));
if (atimes_ndx && !S_ISDIR(mode) && !(xflags & XMIT_SAME_ATIME))
write_varlong(f, atime, 4);
if (preserve_uid && !(xflags & XMIT_SAME_UID)) {
-@@ -684,6 +700,9 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
+@@ -686,6 +702,9 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
static time_t crtime;
#endif
static mode_t mode;
#ifdef SUPPORT_HARD_LINKS
static int64 dev;
#endif
-@@ -801,6 +820,10 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
+@@ -803,6 +822,10 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
#ifdef SUPPORT_CRTIMES
if (crtimes_ndx)
crtime = F_CRTIME(first);
#endif
if (preserve_uid)
uid = F_OWNER(first);
-@@ -874,6 +897,10 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
+@@ -876,6 +899,10 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
if (chmod_modes && !S_ISLNK(mode) && mode)
mode = tweak_mode(mode, chmod_modes);
if (preserve_uid && !(xflags & XMIT_SAME_UID)) {
if (protocol_version < 30)
-@@ -1055,6 +1082,10 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
+@@ -1057,6 +1084,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) {
-@@ -1468,6 +1499,10 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1470,6 +1501,10 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
}
#endif
file->mode = st.st_mode;
--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
-@@ -792,6 +796,7 @@ expand it.
+@@ -795,6 +799,7 @@ expand it.
recursion and want to preserve almost everything. Be aware that it does
**not** include preserving ACLs (`-A`), xattrs (`-X`), atimes (`-U`),
crtimes (`-N`), nor the finding and preserving of hardlinks (`-H`).
The only exception to the above equivalence is when [`--files-from`](#opt)
is specified, in which case [`-r`](#opt) is not implied.
-@@ -1251,7 +1256,7 @@ expand it.
+@@ -1254,7 +1259,7 @@ expand it.
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 [`--keep-dirlinks`](#opt) for an analogous option for the
receiving side.
-@@ -1446,6 +1451,37 @@ expand it.
+@@ -1449,6 +1454,37 @@ expand it.
those used by [`--fake-super`](#opt)) unless you repeat the option (e.g. `-XX`).
This "copy all xattrs" mode cannot be used with [`--fake-super`](#opt).
0. `--chmod=CHMOD`
This option tells rsync to apply one or more comma-separated "chmod" modes
-@@ -1963,8 +1999,8 @@ expand it.
+@@ -1969,8 +2005,8 @@ expand it.
[`--ignore-missing-args`](#opt) option a step farther: each missing arg
will become a deletion request of the corresponding destination file on the
receiving side (should it exist). If the destination file is a non-empty
independent of any other type of delete processing.
The missing source files are represented by special file-list entries which
-@@ -1975,14 +2011,14 @@ expand it.
+@@ -1981,14 +2017,14 @@ expand it.
Tells [`--delete`](#opt) to go ahead and delete files even when there are
I/O errors.
[`--recursive`](#opt) option was also enabled.
0. `--max-delete=NUM`
-@@ -3040,7 +3076,7 @@ expand it.
+@@ -3046,7 +3082,7 @@ expand it.
also turns on the output of other verbose messages).
The "%i" escape has a cryptic output that is 11 letters long. The general
+extern int fileflags_ndx;
extern int acls_ndx;
extern int xattrs_ndx;
-
-@@ -878,6 +906,11 @@ extern int xattrs_ndx;
+ extern int file_sum_len;
+@@ -879,6 +907,11 @@ extern int file_sum_len;
/* 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
diff --git a/usage.c b/usage.c
--- a/usage.c
+++ b/usage.c
-@@ -137,6 +137,11 @@ static void print_info_flags(enum logcode f)
+@@ -138,6 +138,11 @@ static void print_info_flags(enum logcode f)
#endif
"crtimes",
diff --git a/xattrs.c b/xattrs.c
--- a/xattrs.c
+++ b/xattrs.c
-@@ -1091,7 +1091,7 @@ int set_xattr(const char *fname, const struct file_struct *file, const char *fna
+@@ -1086,7 +1086,7 @@ int set_xattr(const char *fname, const struct file_struct *file, const char *fna
&& !S_ISLNK(sxp->st.st_mode)
#endif
&& access(fname, W_OK) < 0
added_write_perm = 1;
ndx = F_XATTR(file);
-@@ -1099,7 +1099,7 @@ int set_xattr(const char *fname, const struct file_struct *file, const char *fna
+@@ -1094,7 +1094,7 @@ int set_xattr(const char *fname, const struct file_struct *file, const char *fna
lst = &glst->xa_items;
int return_value = rsync_xal_set(fname, lst, fnamecmp, sxp);
if (added_write_perm) /* remove the temporary write permission */
return return_value;
}
-@@ -1216,7 +1216,7 @@ int set_stat_xattr(const char *fname, struct file_struct *file, mode_t new_mode)
+@@ -1211,7 +1211,7 @@ int set_stat_xattr(const char *fname, struct file_struct *file, mode_t new_mode)
mode = (fst.st_mode & _S_IFMT) | (fmode & ACCESSPERMS)
| (S_ISDIR(fst.st_mode) ? 0700 : 0600);
if (fst.st_mode != mode)
./configure (optional if already run)
make
-based-on: db5bfe67a5d022f9ad25340db6bc2cca2cbbdb65
+based-on: 8b1b81e054bdcc927ff26f20f424e034bd273175
diff --git a/exclude.c b/exclude.c
--- a/exclude.c
+++ b/exclude.c
#define SLASH_WILD3_SUFFIX "/***"
-@@ -135,8 +138,27 @@ static void teardown_mergelist(filter_rule *ex)
+@@ -139,8 +142,27 @@ static void teardown_mergelist(filter_rule *ex)
mergelist_cnt--;
}
if (ex->rflags & FILTRULE_PERDIR_MERGE)
teardown_mergelist(ex);
free(ex->pattern);
-@@ -998,7 +1020,9 @@ static void report_filter_result(enum logcode code, char const *name,
+@@ -1003,7 +1025,9 @@ static void report_filter_result(enum logcode code, char const *name,
/* This function is used to check if a file should be included/excluded
* from the list of files based on its name and type etc. The value of
int name_is_excluded(const char *fname, int name_flags, int filter_level)
{
if (daemon_filter_list.head && check_filter(&daemon_filter_list, FLOG, fname, name_flags) < 0) {
-@@ -1007,6 +1031,9 @@ int name_is_excluded(const char *fname, int name_flags, int filter_level)
+@@ -1012,6 +1036,9 @@ int name_is_excluded(const char *fname, int name_flags, int filter_level)
return 1;
}
if (filter_level != ALL_FILTERS)
return 0;
-@@ -1017,7 +1044,8 @@ int name_is_excluded(const char *fname, int name_flags, int filter_level)
+@@ -1031,7 +1058,8 @@ int check_server_filter(filter_rule_list *listp, enum logcode code, const char *
}
/* Return -1 if file "name" is defined to be excluded by the specified
int check_filter(filter_rule_list *listp, enum logcode code,
const char *name, int name_flags)
{
-@@ -1040,10 +1068,12 @@ int check_filter(filter_rule_list *listp, enum logcode code,
+@@ -1054,10 +1082,12 @@ int check_filter(filter_rule_list *listp, enum logcode code,
}
if (rule_matches(name, ent, name_flags)) {
report_filter_result(code, name, ent, name_flags, listp->debug_type);
return 0;
}
-@@ -1060,9 +1090,45 @@ static const uchar *rule_strcmp(const uchar *str, const char *rule, int rule_len
+@@ -1074,9 +1104,45 @@ static const uchar *rule_strcmp(const uchar *str, const char *rule, int rule_len
return NULL;
}
/* Gets the next include/exclude rule from *rulestr_ptr and advances
* *rulestr_ptr to point beyond it. Stores the pattern's start (within
-@@ -1077,6 +1143,7 @@ static filter_rule *parse_rule_tok(const char **rulestr_ptr,
+@@ -1091,6 +1157,7 @@ static filter_rule *parse_rule_tok(const char **rulestr_ptr,
const char **pat_ptr, unsigned int *pat_len_ptr)
{
const uchar *s = (const uchar *)*rulestr_ptr;
filter_rule *rule;
unsigned int len;
-@@ -1095,6 +1162,12 @@ static filter_rule *parse_rule_tok(const char **rulestr_ptr,
+@@ -1109,6 +1176,12 @@ static filter_rule *parse_rule_tok(const char **rulestr_ptr,
/* Inherit from the template. Don't inherit FILTRULES_SIDES; we check
* that later. */
rule->rflags = template->rflags & FILTRULES_FROM_CONTAINER;
/* Figure out what kind of a filter rule "s" is pointing at. Note
* that if FILTRULE_NO_PREFIXES is set, the rule is either an include
-@@ -1241,11 +1314,63 @@ static filter_rule *parse_rule_tok(const char **rulestr_ptr,
+@@ -1255,11 +1328,63 @@ static filter_rule *parse_rule_tok(const char **rulestr_ptr,
goto invalid;
rule->rflags |= FILTRULE_EXCLUDE_SELF;
break;
case 'p':
rule->rflags |= FILTRULE_PERISHABLE;
break;
-@@ -1559,6 +1684,23 @@ char *get_rule_prefix(filter_rule *rule, const char *pat, int for_xfer,
+@@ -1573,6 +1698,23 @@ char *get_rule_prefix(filter_rule *rule, const char *pat, int for_xfer,
else if (am_sender)
return NULL;
}
diff --git a/flist.c b/flist.c
--- a/flist.c
+++ b/flist.c
-@@ -85,6 +85,7 @@ extern char curr_dir[MAXPATHLEN];
+@@ -86,6 +86,7 @@ extern char curr_dir[MAXPATHLEN];
extern struct chmod_mode_struct *chmod_modes;
extern filter_rule_list filter_list, implied_filter_list, daemon_filter_list;
#ifdef ICONV_OPTION
extern int filesfrom_convert;
-@@ -1257,7 +1258,7 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1259,7 +1260,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)
-@@ -1302,6 +1303,12 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1304,6 +1305,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) {
-@@ -1534,12 +1541,23 @@ static struct file_struct *send_file_name(int f, struct file_list *flist,
+@@ -1536,12 +1543,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) {
-@@ -2441,7 +2459,7 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
+@@ -2443,7 +2461,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) {
-@@ -2455,7 +2473,7 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
+@@ -2457,7 +2475,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.1.md b/rsync.1.md
--- a/rsync.1.md
+++ b/rsync.1.md
-@@ -1469,7 +1469,9 @@ expand it.
+@@ -1472,7 +1472,9 @@ expand it.
> --chmod=D2775,F664
It is also legal to specify multiple `--chmod` options, as each additional
See the [`--perms`](#opt) and [`--executability`](#opt) options for how the
resulting permission value can be applied to the files in the transfer.
-@@ -2974,6 +2976,10 @@ expand it.
+@@ -2980,6 +2982,10 @@ expand it.
An older rsync client may need to use [`-s`](#opt) to avoid a complaint
about wildcard characters, but a modern rsync handles this automatically.
0. `--timeout=SECONDS`
This option allows you to set a maximum I/O timeout in seconds. If no data
-@@ -4124,6 +4130,15 @@ The following modifiers are accepted after an include (+) or exclude (-) rule:
+@@ -4130,6 +4136,15 @@ The following modifiers are accepted after an include (+) or exclude (-) rule:
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.
- An `x` indicates that a rule affects xattr names in xattr copy/delete
operations (and is thus ignored when matching file/dir names). If no
xattr-matching rules are specified, a default xattr filtering rule is used
-@@ -4181,6 +4196,12 @@ The following modifiers are accepted after a merge or dir-merge rule:
+@@ -4187,6 +4202,12 @@ The following modifiers are accepted after a merge or dir-merge rule:
rules in the file must not specify sides (via a modifier or a rule prefix
such as `hide`).
#define XFLG_FATAL_ERRORS (1<<0)
#define XFLG_OLD_PREFIXES (1<<1)
-@@ -987,6 +990,8 @@ struct map_struct {
+@@ -988,6 +991,8 @@ struct map_struct {
int status; /* first errno from read errors */
};
#define NAME_IS_FILE (0) /* filter name as a file */
#define NAME_IS_DIR (1<<0) /* filter name as a dir */
#define NAME_IS_XATTR (1<<2) /* filter name as an xattr */
-@@ -1012,8 +1017,18 @@ struct map_struct {
+@@ -1013,8 +1018,18 @@ struct map_struct {
#define FILTRULE_CLEAR_LIST (1<<18)/* this item is the "!" token */
#define FILTRULE_PERISHABLE (1<<19)/* perishable if parent dir goes away */
#define FILTRULE_XATTR (1<<20)/* rule only applies to xattr names */
typedef struct filter_struct {
struct filter_struct *next;
-@@ -1023,6 +1038,11 @@ typedef struct filter_struct {
+@@ -1024,6 +1039,11 @@ typedef struct filter_struct {
int slash_cnt;
struct filter_list_struct *mergelist;
} u;
+ struct filter_chmod_struct *chmod;
+ uid_t force_uid;
+ gid_t force_gid;
+ uchar elide;
} filter_rule;
- typedef struct filter_list_struct {
diff --git a/util1.c b/util1.c
--- a/util1.c
+++ b/util1.c
- Make this code handle multibyte character encodings, and honor the
--iconv setting when converting case.
-based-on: db5bfe67a5d022f9ad25340db6bc2cca2cbbdb65
+based-on: 8b1b81e054bdcc927ff26f20f424e034bd273175
diff --git a/exclude.c b/exclude.c
--- a/exclude.c
+++ b/exclude.c
-@@ -958,16 +958,15 @@ static int rule_matches(const char *fname, filter_rule *ex, int name_flags)
+@@ -963,16 +963,15 @@ static int rule_matches(const char *fname, filter_rule *ex, int name_flags)
if (litmatch_array(pattern, strings, slash_handling))
return ret_match;
} else if (anchored_match) {
diff --git a/flist.c b/flist.c
--- a/flist.c
+++ b/flist.c
-@@ -35,6 +35,7 @@ extern int inc_recurse;
+@@ -34,6 +34,7 @@ extern int am_generator;
+ extern int inc_recurse;
extern int always_checksum;
- extern int checksum_type;
extern int module_id;
+extern int ignore_case;
extern int ignore_errors;
extern int numeric_ids;
extern int quiet;
-@@ -2636,7 +2637,8 @@ struct file_list *recv_file_list(int f, int dir_ndx)
+@@ -2638,7 +2639,8 @@ struct file_list *recv_file_list(int f, int dir_ndx)
cur_dir++;
if (cur_dir != good_dirname) {
const char *d = dir_ndx >= 0 ? f_name(dir_flist->files[dir_ndx], NULL) : empty_dir;
rprintf(FERROR,
"ABORTING due to invalid path from sender: %s/%s\n",
cur_dir, file->basename);
-@@ -3203,6 +3205,7 @@ int f_name_cmp(const struct file_struct *f1, const struct file_struct *f2)
+@@ -3205,6 +3207,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;
-@@ -3313,7 +3316,15 @@ int f_name_cmp(const struct file_struct *f1, const struct file_struct *f2)
+@@ -3315,7 +3318,15 @@ int f_name_cmp(const struct file_struct *f1, const struct file_struct *f2)
if (type1 != type2)
return type1 == t_PATH ? 1 : -1;
}
--address=ADDRESS bind address for outgoing socket to daemon
--port=PORT specify double-colon alternate port number
--sockopts=OPTIONS specify custom TCP options
-@@ -2524,6 +2525,12 @@ expand it.
+@@ -2530,6 +2531,12 @@ expand it.
> sudo rsync -aive lsh -M--copy-as=joe src/ lh:dest/
./configure
make
-based-on: db5bfe67a5d022f9ad25340db6bc2cca2cbbdb65
+based-on: 8b1b81e054bdcc927ff26f20f424e034bd273175
diff --git a/Makefile.in b/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
diff --git a/clientserver.c b/clientserver.c
--- a/clientserver.c
+++ b/clientserver.c
-@@ -141,7 +141,7 @@ int start_socket_client(char *host, int remote_argc, char *remote_argv[],
+@@ -142,7 +142,7 @@ int start_socket_client(char *host, int remote_argc, char *remote_argv[],
setup_iconv();
#endif
return ret ? ret : client_run(fd, fd, -1, argc, argv);
}
-@@ -218,7 +218,7 @@ static int exchange_protocols(int f_in, int f_out, char *buf, size_t bufsiz, int
+@@ -229,7 +229,7 @@ static int exchange_protocols(int f_in, int f_out, char *buf, size_t bufsiz, int
return 0;
}
{
int i, modlen;
char line[BIGPATHBUFLEN];
-@@ -354,6 +354,17 @@ int start_inband_exchange(int f_in, int f_out, const char *user, int argc, char
+@@ -365,6 +365,17 @@ int start_inband_exchange(int f_in, int f_out, const char *user, int argc, char
continue;
}
if (strcmp(line,"@RSYNCD: OK") == 0)
break;
-@@ -745,7 +756,12 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
+@@ -756,7 +767,12 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
}
read_only = lp_read_only(i); /* may also be overridden by auth_server() */
diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
-@@ -971,6 +971,31 @@ if test x"$enable_iconv" != x"no"; then
+@@ -981,6 +981,31 @@ if test x"$enable_iconv" != x"no"; then
AC_DEFINE(UTF8_CHARSET, "UTF-8", [String to pass to iconv() for the UTF-8 charset.])
fi
./configure
make
-based-on: db5bfe67a5d022f9ad25340db6bc2cca2cbbdb65
+based-on: 8b1b81e054bdcc927ff26f20f424e034bd273175
diff --git a/Makefile.in b/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
+extern char link_by_hash_extra_sum[MAX_DIGEST_LEN];
extern const char *checksum_choice;
- struct name_num_item valid_checksums_items[] = {
-@@ -451,7 +453,7 @@ static union {
- MD4_CTX m4;
- #endif
- md5_context m5;
--} ctx;
-+} ctx, ctx2;
+ #define NNI_BUILTIN (1<<0)
+@@ -541,7 +543,7 @@ void file_checksum(const char *fname, const STRUCT_STAT *st_p, char *sum)
+ }
+
+ static int32 sumresidue;
+-static md_context ctx_md;
++static md_context ctx_md, ctx2_md;
#ifdef SUPPORT_XXHASH
static XXH64_state_t* xxh64_state;
#endif
-@@ -490,6 +492,8 @@ void sum_init(int csum_type, int seed)
+@@ -591,6 +593,8 @@ int sum_init(struct name_num_item *nni, int seed)
#endif
case CSUM_MD5:
- md5_begin(&ctx.m5);
+ md5_begin(&ctx_md);
+ if (link_by_hash_dir)
-+ md5_begin(&ctx2.m5);
++ md5_begin(&ctx2_md);
break;
case CSUM_MD4:
- #ifdef USE_OPENSSL
-@@ -540,6 +544,8 @@ void sum_update(const char *p, int32 len)
+ mdfour_begin(&ctx_md);
+@@ -644,6 +648,8 @@ void sum_update(const char *p, int32 len)
#endif
case CSUM_MD5:
- md5_update(&ctx.m5, (uchar *)p, len);
+ md5_update(&ctx_md, (uchar *)p, len);
+ if (link_by_hash_dir)
-+ md5_update(&ctx2.m5, (uchar *)p, len);
++ md5_update(&ctx2_md, (uchar *)p, len);
break;
case CSUM_MD4:
- #ifdef USE_OPENSSL
-@@ -605,6 +611,8 @@ int sum_end(char *sum)
+ case CSUM_MD4_OLD:
+@@ -710,6 +716,8 @@ void sum_end(char *sum)
#endif
case CSUM_MD5:
- md5_result(&ctx.m5, (uchar *)sum);
+ md5_result(&ctx_md, (uchar *)sum);
+ if (link_by_hash_dir)
-+ md5_result(&ctx2.m5, (uchar *)link_by_hash_extra_sum);
++ md5_result(&ctx2_md, (uchar *)link_by_hash_extra_sum);
break;
case CSUM_MD4:
- #ifdef USE_OPENSSL
+ case CSUM_MD4_OLD:
diff --git a/clientserver.c b/clientserver.c
--- a/clientserver.c
+++ b/clientserver.c
extern char *logfile_format;
extern char *files_from;
extern char *tmpdir;
-@@ -725,6 +726,9 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
+@@ -736,6 +737,9 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
return -1;
}
--compress, -z compress file data during the transfer
--compress-choice=STR choose the compression algorithm (aka --zc)
--compress-level=NUM explicitly set compression level (aka --zl)
-@@ -2661,6 +2662,50 @@ expand it.
+@@ -2667,6 +2668,50 @@ expand it.
this bug by avoiding the `-o` option (or using `--no-o`) when sending to an
old rsync.
diff --git a/rsync.h b/rsync.h
--- a/rsync.h
+++ b/rsync.h
-@@ -1450,7 +1450,8 @@ extern short info_levels[], debug_levels[];
+@@ -1452,7 +1452,8 @@ extern short info_levels[], debug_levels[];
#define DEBUG_FUZZY (DEBUG_FLIST+1)
#define DEBUG_GENR (DEBUG_FUZZY+1)
#define DEBUG_HASH (DEBUG_GENR+1)
./configure (optional if already run)
make
-based-on: db5bfe67a5d022f9ad25340db6bc2cca2cbbdb65
+based-on: 8b1b81e054bdcc927ff26f20f424e034bd273175
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
--super receiver attempts super-user activities
--fake-super store/recover privileged attrs using xattrs
--sparse, -S turn sequences of nulls into sparse blocks
-@@ -1601,6 +1602,11 @@ expand it.
+@@ -1604,6 +1605,11 @@ expand it.
This tells rsync to omit symlinks when it is preserving modification,
access, and create times.
./configure (optional if already run)
make
-based-on: db5bfe67a5d022f9ad25340db6bc2cca2cbbdb65
+based-on: 8b1b81e054bdcc927ff26f20f424e034bd273175
diff --git a/flist.c b/flist.c
--- a/flist.c
+++ b/flist.c
-@@ -75,6 +75,7 @@ extern int output_needs_newline;
+@@ -74,6 +74,7 @@ extern int output_needs_newline;
extern int sender_keeps_checksum;
extern int trust_sender_filter;
extern int unsort_ndx;
extern uid_t our_uid;
extern struct stats stats;
extern char *filesfrom_host;
-@@ -1877,6 +1878,9 @@ static void send_directory(int f, struct file_list *flist, char *fbuf, int len,
+@@ -1879,6 +1880,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: db5bfe67a5d022f9ad25340db6bc2cca2cbbdb65
+based-on: 8b1b81e054bdcc927ff26f20f424e034bd273175
diff --git a/Makefile.in b/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
diff --git a/clientserver.c b/clientserver.c
--- a/clientserver.c
+++ b/clientserver.c
-@@ -1516,6 +1516,13 @@ int daemon_main(void)
+@@ -1527,6 +1527,13 @@ int daemon_main(void)
* address too. In fact, why not just do getnameinfo on the
* local address??? */
diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
-@@ -1039,6 +1039,29 @@ if test $rsync_cv_can_hardlink_special = yes; then
+@@ -1049,6 +1049,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/usage.c b/usage.c
--- a/usage.c
+++ b/usage.c
-@@ -137,6 +137,11 @@ static void print_info_flags(enum logcode f)
+@@ -138,6 +138,11 @@ static void print_info_flags(enum logcode f)
#endif
"crtimes",
./configure (optional if already run)
make
-based-on: db5bfe67a5d022f9ad25340db6bc2cca2cbbdb65
+based-on: 8b1b81e054bdcc927ff26f20f424e034bd273175
diff --git a/syscall.c b/syscall.c
--- a/syscall.c
+++ b/syscall.c
-- Matt McCutchen <hashproduct@gmail.com>
-based-on: db5bfe67a5d022f9ad25340db6bc2cca2cbbdb65
+based-on: 8b1b81e054bdcc927ff26f20f424e034bd273175
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
--del an alias for --delete-during
--delete delete extraneous files from dest dirs
--delete-before receiver deletes before xfer, not during
-@@ -1837,6 +1838,17 @@ expand it.
+@@ -1843,6 +1844,17 @@ expand it.
not remove a file the receiver just verified, such as when the user
accidentally makes the source and destination directory the same path.
./configure (optional if already run)
make
-based-on: db5bfe67a5d022f9ad25340db6bc2cca2cbbdb65
+based-on: 8b1b81e054bdcc927ff26f20f424e034bd273175
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
diff --git a/receiver.c b/receiver.c
--- a/receiver.c
+++ b/receiver.c
-@@ -61,6 +61,7 @@ extern BOOL want_progress_now;
+@@ -60,6 +60,7 @@ extern BOOL want_progress_now;
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];
-@@ -527,6 +528,7 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -528,6 +529,7 @@ int recv_files(int f_in, int f_out, char *local_name)
char *fnametmp, fnametmpbuf[MAXPATHLEN];
char *fnamecmp, *partialptr;
char fnamecmpbuf[MAXPATHLEN];
uchar fnamecmp_type;
struct file_struct *file;
int itemizing = am_server ? logfile_format_has_i : stdout_format_has_i;
-@@ -537,6 +539,7 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -538,6 +540,7 @@ int recv_files(int f_in, int f_out, char *local_name)
const char *parent_dirname = "";
#endif
int ndx, recv_ok, one_inplace;
if (DEBUG_GTE(RECV, 1))
rprintf(FINFO, "recv_files(%d) starting\n", cur_flist->used);
-@@ -547,6 +550,23 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -548,6 +551,23 @@ int recv_files(int f_in, int f_out, char *local_name)
if (whole_file < 0)
whole_file = 0;
progress_init();
while (1) {
-@@ -872,6 +892,9 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -873,6 +893,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, file, inplace || one_inplace);
-@@ -887,6 +910,16 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -888,6 +911,16 @@ int recv_files(int f_in, int f_out, char *local_name)
exit_cleanup(RERR_FILEIO);
}
--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)
-@@ -3650,6 +3653,36 @@ expand it.
+@@ -3656,6 +3659,36 @@ expand it.
[`--write-batch`](#opt). If _FILE_ is `-`, the batch data will be read
from standard input. See the "BATCH MODE" section for details.
./configure (optional if already run)
make
-based-on: db5bfe67a5d022f9ad25340db6bc2cca2cbbdb65
+based-on: 8b1b81e054bdcc927ff26f20f424e034bd273175
diff --git a/fileio.c b/fileio.c
--- a/fileio.c
+++ b/fileio.c
--preallocate allocate dest files before writing them
--dry-run, -n perform a trial run with no changes made
--whole-file, -W copy files whole (w/o delta-xfer algorithm)
-@@ -1675,6 +1676,18 @@ expand it.
+@@ -1678,6 +1679,18 @@ expand it.
(as opposed to allocated sequences of null bytes) if the kernel version and
filesystem type support creating holes in the allocated data.
./configure (optional if already run)
make
-based-on: db5bfe67a5d022f9ad25340db6bc2cca2cbbdb65
+based-on: 8b1b81e054bdcc927ff26f20f424e034bd273175
diff --git a/flist.c b/flist.c
--- a/flist.c
+++ b/flist.c
-@@ -79,6 +79,7 @@ extern uid_t our_uid;
+@@ -78,6 +78,7 @@ extern uid_t our_uid;
extern struct stats stats;
extern char *filesfrom_host;
extern char *usermap, *groupmap;
+extern char *tr_opt;
- extern char curr_dir[MAXPATHLEN];
+ extern struct name_num_item *file_sum_nni;
-@@ -105,6 +106,8 @@ int file_old_total = 0; /* total of active items that will soon be gone */
+@@ -106,6 +107,8 @@ int file_old_total = 0; /* total of active items that will soon be gone */
int flist_eof = 0; /* all the file-lists are now known */
int xfer_flags_as_varint = 0;
#define NORMAL_NAME 0
#define SLASH_ENDING_NAME 1
#define DOTDIR_NAME 2
-@@ -677,6 +680,23 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
+@@ -679,6 +682,23 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
stats.total_size += F_LENGTH(file);
}
static struct file_struct *recv_file_entry(int f, struct file_list *flist, int xflags)
{
static int64 modtime, atime;
-@@ -748,9 +768,13 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
+@@ -750,9 +770,13 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
outbuf.len = 0;
}
thisname[outbuf.len] = '\0';
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);
-@@ -2573,6 +2597,15 @@ struct file_list *recv_file_list(int f, int dir_ndx)
+@@ -2575,6 +2599,15 @@ struct file_list *recv_file_list(int f, int dir_ndx)
parse_name_map(usermap, True);
if (groupmap)
parse_name_map(groupmap, False);
--checksum-seed=NUM set block/file checksum seed (advanced)
--ipv4, -4 prefer IPv4
--ipv6, -6 prefer IPv6
-@@ -3692,6 +3693,22 @@ expand it.
+@@ -3698,6 +3699,22 @@ expand it.
free to specify just the local charset for a daemon transfer (e.g.
`--iconv=utf8`).