./configure (optional if already run)
make
-based-on: a01e3b490eb36ccf9e704840e1b6683dab867550
+based-on: 25082d1ef6712a15c52a1dacb36b7f0642c23ac8
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
-@@ -191,13 +191,6 @@ void setup_protocol(int f_out,int f_in)
+@@ -192,13 +192,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: a01e3b490eb36ccf9e704840e1b6683dab867550
+based-on: 25082d1ef6712a15c52a1dacb36b7f0642c23ac8
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: a01e3b490eb36ccf9e704840e1b6683dab867550
+based-on: 25082d1ef6712a15c52a1dacb36b7f0642c23ac8
diff --git a/compat.c b/compat.c
--- a/compat.c
+++ b/compat.c
-@@ -44,6 +44,7 @@ extern int protocol_version;
+@@ -45,6 +45,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;
-@@ -61,7 +62,7 @@ extern char *iconv_opt;
+@@ -62,7 +63,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 */
-@@ -138,6 +139,8 @@ void setup_protocol(int f_out,int f_in)
+@@ -139,6 +140,8 @@ void setup_protocol(int f_out,int f_in)
uid_ndx = ++file_extra_cnt;
if (preserve_gid)
gid_ndx = ++file_extra_cnt;
}
}
-@@ -1924,7 +1933,7 @@ static void touch_up_dirs(struct file_list *flist, int ndx)
+@@ -1926,7 +1935,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)
#define FULL_FLUSH 1
#define NORMAL_FLUSH 0
-@@ -664,12 +666,14 @@ extern int file_extra_cnt;
+@@ -668,12 +670,14 @@ extern int file_extra_cnt;
extern int inc_recurse;
extern int uid_ndx;
extern int gid_ndx;
--super receiver attempts super-user activities
--fake-super store/recover privileged attrs using xattrs
-S, --sparse handle sparse files efficiently
-@@ -1078,6 +1079,12 @@ it is preserving modification times (see bf(--times)). If NFS is sharing
+@@ -1108,6 +1109,12 @@ it is preserving modification times (see bf(--times)). If NFS is sharing
the directories on the receiving side, it is a good idea to use bf(-O).
This option is inferred if you use bf(--backup) without bf(--backup-dir).
dit(bf(--super)) This tells the receiving side to attempt super-user
activities even if the receiving rsync wasn't run by the super-user. These
activities include: preserving users via the bf(--owner) option, preserving
-@@ -1945,7 +1952,10 @@ quote(itemization(
+@@ -1975,7 +1982,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).
diff --git a/util.c b/util.c
--- a/util.c
+++ b/util.c
-@@ -123,7 +123,7 @@ NORETURN void overflow_exit(const char *str)
+@@ -122,7 +122,7 @@ NORETURN void overflow_exit(const char *str)
exit_cleanup(RERR_MALLOC);
}
{
#ifndef CAN_SET_SYMLINK_TIMES
if (S_ISLNK(mode))
-@@ -131,9 +131,13 @@ int set_modtime(const char *fname, time_t modtime, uint32 mod_nsec, mode_t mode)
+@@ -130,9 +130,13 @@ int set_modtime(const char *fname, time_t modtime, uint32 mod_nsec, mode_t mode)
#endif
if (DEBUG_GTE(TIME, 1)) {
}
if (dry_run)
-@@ -142,8 +146,8 @@ int set_modtime(const char *fname, time_t modtime, uint32 mod_nsec, mode_t mode)
+@@ -141,8 +145,8 @@ int set_modtime(const char *fname, time_t modtime, uint32 mod_nsec, mode_t mode)
{
#ifdef HAVE_UTIMENSAT
struct timespec t[2];
t[1].tv_sec = modtime;
t[1].tv_nsec = mod_nsec;
if (utimensat(AT_FDCWD, fname, t, AT_SYMLINK_NOFOLLOW) < 0)
-@@ -151,7 +155,7 @@ int set_modtime(const char *fname, time_t modtime, uint32 mod_nsec, mode_t mode)
+@@ -150,7 +154,7 @@ int set_modtime(const char *fname, time_t modtime, uint32 mod_nsec, mode_t mode)
return 0;
#elif defined HAVE_UTIMES || defined HAVE_LUTIMES
struct timeval t[2];
t[0].tv_usec = 0;
t[1].tv_sec = modtime;
t[1].tv_usec = mod_nsec / 1000;
-@@ -164,12 +168,12 @@ int set_modtime(const char *fname, time_t modtime, uint32 mod_nsec, mode_t mode)
+@@ -163,12 +167,12 @@ int set_modtime(const char *fname, time_t modtime, uint32 mod_nsec, mode_t mode)
# endif
#elif defined HAVE_STRUCT_UTIMBUF
struct utimbuf tbuf;
./configure (optional if already run)
make
-based-on: a01e3b490eb36ccf9e704840e1b6683dab867550
+based-on: 25082d1ef6712a15c52a1dacb36b7f0642c23ac8
diff --git a/backup.c b/backup.c
--- a/backup.c
+++ b/backup.c
-@@ -29,29 +29,36 @@ extern int preserve_specials;
+@@ -29,25 +29,32 @@ extern int preserve_specials;
extern int preserve_links;
extern int safe_symlinks;
extern int backup_dir_len;
+
+static BOOL deleting;
- /* Create a backup path from the given fname, putting the result into
+ /* Returns -1 on error, 0 on missing dir, and 1 on present dir. */
+-static int validate_backup_dir(void)
++static int validate_backup_dir(const char *buf)
+ {
+ STRUCT_STAT st;
+
+- if (do_lstat(backup_dir_buf, &st) < 0) {
++ if (do_lstat(buf, &st) < 0) {
+ if (errno == ENOENT)
+ return 0;
+- rsyserr(FERROR, errno, "backup lstat %s failed", backup_dir_buf);
++ rsyserr(FERROR, errno, "backup lstat %s failed", buf);
+ return -1;
+ }
+ if (!S_ISDIR(st.st_mode)) {
+ int flags = get_del_for_flag(st.st_mode) | DEL_FOR_BACKUP | DEL_RECURSE;
+- if (delete_item(backup_dir_buf, st.st_mode, flags) == 0)
++ if (delete_item(buf, st.st_mode, flags) == 0)
+ return 0;
+ return -1;
+ }
+@@ -58,20 +65,20 @@ static int validate_backup_dir(void)
* backup_dir_buf. Any new directories (compared to the prior backup
* path) are ensured to exist as directories, replacing anything else
* that may be in the way (e.g. a symlink). */
+static BOOL copy_valid_path(const char *fname, char *buf, int prefix_len, unsigned int remainder, const char *suffix)
{
const char *f;
- int flags;
+ int val;
BOOL ret = True;
stat_x sx;
- char *b, *rel = backup_dir_buf + backup_dir_len, *name = rel;
rprintf(FERROR, "backup filename too long\n");
*name = '\0';
return False;
-@@ -62,16 +69,16 @@ static BOOL copy_valid_path(const char *fname)
+@@ -82,7 +89,7 @@ static BOOL copy_valid_path(const char *fname)
return True;
*b = '\0';
-- if (do_lstat(backup_dir_buf, &sx.st) < 0) {
-+ if (do_lstat(buf, &sx.st) < 0) {
- if (errno == ENOENT)
- break;
-- rsyserr(FERROR, errno, "backup lstat %s failed", backup_dir_buf);
-+ rsyserr(FERROR, errno, "backup lstat %s failed", buf);
- *name = '\0';
- return False;
- }
- if (!S_ISDIR(sx.st.st_mode)) {
- flags = get_del_for_flag(sx.st.st_mode) | DEL_FOR_BACKUP | DEL_RECURSE;
-- if (delete_item(backup_dir_buf, sx.st.st_mode, flags) == 0)
-+ if (delete_item(buf, sx.st.st_mode, flags) == 0)
- break;
- *name = '\0';
- return False;
-@@ -85,8 +92,8 @@ static BOOL copy_valid_path(const char *fname)
+- val = validate_backup_dir();
++ val = validate_backup_dir(buf);
+ if (val == 0)
+ break;
+ if (val < 0) {
+@@ -98,9 +105,9 @@ static BOOL copy_valid_path(const char *fname)
for ( ; b; name = b + 1, b = strchr(name, '/')) {
*b = '\0';
-- if (mkdir_defmode(backup_dir_buf) < 0) {
-- rsyserr(FERROR, errno, "backup mkdir %s failed", backup_dir_buf);
-+ if (mkdir_defmode(buf) < 0) {
-+ rsyserr(FERROR, errno, "backup mkdir %s failed", buf);
- *name = '\0';
- ret = False;
- break;
-@@ -114,7 +121,7 @@ static BOOL copy_valid_path(const char *fname)
+- while (mkdir_defmode(backup_dir_buf) < 0) {
++ while (mkdir_defmode(buf) < 0) {
+ if (errno == EEXIST) {
+- val = validate_backup_dir();
++ val = validate_backup_dir(buf);
+ if (val > 0)
+ break;
+ if (val == 0)
+@@ -134,7 +141,7 @@ static BOOL copy_valid_path(const char *fname)
free_xattr(&sx);
}
#endif
unmake_file(file);
}
-@@ -134,15 +141,20 @@ static BOOL copy_valid_path(const char *fname)
+@@ -156,16 +163,21 @@ static BOOL copy_valid_path(const char *fname)
/* Make a complete pathname for backup file and verify any new path elements. */
char *get_backup_name(const char *fname)
{
- return backup_dir_buf;
+ if (copy_valid_path(fname, buf, prefix_len, remainder, suffix))
+ return buf;
+ /* copy_valid_path() has printed an error message. */
return NULL;
- } else {
- if (stringjoin(backup_dir_buf, MAXPATHLEN,
-- fname, backup_suffix, NULL) < MAXPATHLEN)
-- return backup_dir_buf;
-+ fname, suffix, NULL) < MAXPATHLEN)
-+ return buf;
}
+- if (stringjoin(backup_dir_buf, MAXPATHLEN, fname, backup_suffix, NULL) < MAXPATHLEN)
+- return backup_dir_buf;
++ if (stringjoin(backup_dir_buf, MAXPATHLEN, fname, suffix, NULL) < MAXPATHLEN)
++ return buf;
+
rprintf(FERROR, "backup filename too long\n");
-@@ -317,3 +329,13 @@ int make_backup(const char *fname, BOOL prefer_rename)
+ return NULL;
+@@ -339,3 +351,13 @@ int make_backup(const char *fname, BOOL prefer_rename)
rprintf(FINFO, "backed up %s to %s\n", fname, buf);
return ret;
}
./configure (optional if already run)
make
-based-on: a01e3b490eb36ccf9e704840e1b6683dab867550
+based-on: 25082d1ef6712a15c52a1dacb36b7f0642c23ac8
diff --git a/errcode.h b/errcode.h
--- a/errcode.h
+++ b/errcode.h
diff --git a/main.c b/main.c
--- a/main.c
+++ b/main.c
-@@ -180,8 +180,11 @@ static void wait_process_with_flush(pid_t pid, int *exit_code_ptr)
+@@ -179,8 +179,11 @@ static void wait_process_with_flush(pid_t pid, int *exit_code_ptr)
*exit_code_ptr = RERR_TERMINATED;
else
*exit_code_ptr = RERR_WAITCHILD;
}
void write_del_stats(int f)
-@@ -1432,6 +1435,14 @@ RETSIGTYPE remember_children(UNUSED(int val))
+@@ -1427,6 +1430,14 @@ RETSIGTYPE remember_children(UNUSED(int val))
break;
}
}
}
#endif
#ifndef HAVE_SIGACTION
-@@ -1490,6 +1501,12 @@ static RETSIGTYPE rsync_panic_handler(UNUSED(int whatsig))
+@@ -1485,6 +1496,12 @@ static RETSIGTYPE rsync_panic_handler(UNUSED(int whatsig))
}
#endif
int main(int argc,char *argv[])
{
-@@ -1512,6 +1529,11 @@ int main(int argc,char *argv[])
+@@ -1507,6 +1524,11 @@ int main(int argc,char *argv[])
SIGACTMASK(SIGFPE, rsync_panic_handler);
SIGACTMASK(SIGABRT, rsync_panic_handler);
SIGACTMASK(SIGBUS, rsync_panic_handler);
./configure (optional if already run)
make
-based-on: a01e3b490eb36ccf9e704840e1b6683dab867550
+based-on: 25082d1ef6712a15c52a1dacb36b7f0642c23ac8
diff --git a/checksum.c b/checksum.c
--- a/checksum.c
+++ b/checksum.c
extern int io_timeout;
extern int no_detach;
extern int write_batch;
-@@ -874,6 +876,9 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
+@@ -876,6 +878,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;
if (unsort_ndx)
F_NDX(file) = stats.num_dirs;
-@@ -2546,7 +2802,7 @@ struct file_list *recv_file_list(int f)
+@@ -2548,7 +2804,7 @@ struct file_list *recv_file_list(int f)
rprintf(FINFO, "[%s] flist_eof=1\n", who_am_i());
}
if (protocol_version < 30) {
/* Recv the io_error flag */
-@@ -2769,7 +3025,7 @@ void flist_free(struct file_list *flist)
+@@ -2771,7 +3027,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;
-@@ -2820,7 +3076,7 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
+@@ -2822,7 +3078,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;
-@@ -2836,8 +3092,8 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
+@@ -2838,8 +3094,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);
-@@ -2859,7 +3115,7 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
+@@ -2861,7 +3117,7 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
}
flist->high = prev_i;
}
statret = link_stat(fname, &sx.st, keep_dirlinks && is_dir);
-@@ -1599,7 +1608,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1601,7 +1610,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
;
else if (fnamecmp_type == FNAMECMP_FUZZY)
;
diff --git a/rsync.h b/rsync.h
--- a/rsync.h
+++ b/rsync.h
-@@ -727,6 +727,10 @@ extern int xattrs_ndx;
+@@ -731,6 +731,10 @@ extern int xattrs_ndx;
#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)
-@@ -923,6 +927,13 @@ typedef struct {
+@@ -927,6 +931,13 @@ typedef struct {
char fname[1]; /* has variable size */
} relnamecache;
else
file_checksum(thisname, st.st_size, tmp_sum);
if (sender_keeps_checksum)
-@@ -2021,6 +2234,9 @@ static void send_directory(int f, struct file_list *flist, char *fbuf, int len,
+@@ -2023,6 +2236,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". */
-@@ -2671,6 +2887,9 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
+@@ -2673,6 +2889,9 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
rprintf(FINFO, "[%s] flist_eof=1\n", who_am_i());
}
goto cleanup;
}
-@@ -1614,6 +1617,8 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1616,6 +1619,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
-@@ -2115,6 +2120,7 @@ void generate_files(int f_out, const char *local_name)
+@@ -2117,6 +2122,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];
-@@ -2209,6 +2215,9 @@ void generate_files(int f_out, const char *local_name)
+@@ -2211,6 +2217,9 @@ void generate_files(int f_out, const char *local_name)
wait_for_receiver();
}
diff --git a/io.c b/io.c
--- a/io.c
+++ b/io.c
-@@ -52,6 +52,7 @@ extern int list_only;
- extern int read_batch;
+@@ -53,6 +53,7 @@ extern int read_batch;
+ extern int compat_flags;
extern int protect_args;
extern int checksum_seed;
+extern int checksum_files;
extern int protocol_version;
extern int remove_source_files;
extern int preserve_hard_links;
-@@ -1025,6 +1026,9 @@ static void got_flist_entry_status(enum festatus status, int ndx)
+@@ -1038,6 +1039,9 @@ static void got_flist_entry_status(enum festatus status, int ndx)
flist_ndx_push(&hlink_list, ndx);
flist->in_progress++;
}
extern int checksum_seed;
+extern int checksum_files;
extern int inplace;
+ extern int allowed_lull;
extern int delay_updates;
- extern mode_t orig_umask;
-@@ -376,7 +377,7 @@ static void handle_delayed_updates(char *local_name)
+@@ -380,7 +381,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);
-@@ -829,7 +830,7 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -833,7 +834,7 @@ int recv_files(int f_in, int f_out, char *local_name)
case 2:
break;
case 1:
diff --git a/rsync.h b/rsync.h
--- a/rsync.h
+++ b/rsync.h
-@@ -929,6 +929,8 @@ typedef struct {
+@@ -933,6 +933,8 @@ typedef struct {
#define CSF_ENABLE (1<<1)
#define CSF_LAX (1<<2)
./configure (optional if already run)
make
-based-on: a01e3b490eb36ccf9e704840e1b6683dab867550
+based-on: 25082d1ef6712a15c52a1dacb36b7f0642c23ac8
diff --git a/flist.c b/flist.c
--- a/flist.c
+++ b/flist.c
./configure (optional if already run)
make
-based-on: a01e3b490eb36ccf9e704840e1b6683dab867550
+based-on: 25082d1ef6712a15c52a1dacb36b7f0642c23ac8
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;
-@@ -1494,7 +1495,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1496,7 +1497,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
goto cleanup;
}
diff --git a/sender.c b/sender.c
--- a/sender.c
+++ b/sender.c
-@@ -341,6 +341,20 @@ void send_files(int f_in, int f_out)
+@@ -340,6 +340,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
-@@ -45,6 +45,7 @@ extern int force_change;
+@@ -46,6 +46,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;
-@@ -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)
+@@ -141,6 +142,8 @@ void setup_protocol(int f_out,int f_in)
uid_ndx = ++file_extra_cnt;
if (preserve_gid)
gid_ndx = ++file_extra_cnt;
--super receiver attempts super-user activities
--fake-super store/recover privileged attrs using xattrs
-S, --sparse handle sparse files efficiently
-@@ -1110,6 +1111,9 @@ it is preserving modification times (see bf(--times)). If NFS is sharing
+@@ -1136,6 +1137,9 @@ it is preserving modification times (see bf(--times)). If NFS is sharing
the directories on the receiving side, it is a good idea to use bf(-O).
This option is inferred if you use bf(--backup) without bf(--backup-dir).
dit(bf(--super)) This tells the receiving side to attempt super-user
activities even if the receiving rsync wasn't run by the super-user. These
activities include: preserving users via the bf(--owner) option, preserving
-@@ -1922,7 +1926,7 @@ with older versions of rsync, but that also turns on the output of other
+@@ -1948,7 +1952,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.
-@@ -1981,6 +1985,8 @@ quote(itemization(
+@@ -2007,6 +2011,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: a01e3b490eb36ccf9e704840e1b6683dab867550
+based-on: 25082d1ef6712a15c52a1dacb36b7f0642c23ac8
diff --git a/exclude.c b/exclude.c
--- a/exclude.c
+++ b/exclude.c
./configure (optional if already run)
make
-based-on: a01e3b490eb36ccf9e704840e1b6683dab867550
+based-on: 25082d1ef6712a15c52a1dacb36b7f0642c23ac8
diff --git a/access.c b/access.c
--- a/access.c
+++ b/access.c
./configure (optional if already run)
make
-based-on: a01e3b490eb36ccf9e704840e1b6683dab867550
+based-on: 25082d1ef6712a15c52a1dacb36b7f0642c23ac8
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
./configure (optional if already run)
make
-based-on: a01e3b490eb36ccf9e704840e1b6683dab867550
+based-on: 25082d1ef6712a15c52a1dacb36b7f0642c23ac8
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
-@@ -42,13 +42,16 @@ extern int numeric_ids;
+@@ -42,12 +42,15 @@ extern int numeric_ids;
extern int filesfrom_fd;
extern int remote_protocol;
extern int protocol_version;
extern int default_af_hint;
extern int logfile_format_has_i;
extern int logfile_format_has_o_or_i;
- extern mode_t orig_umask;
+extern char *db_config;
extern char *bind_address;
extern char *config_file;
extern char *logfile_format;
-@@ -667,6 +670,9 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
+@@ -671,6 +674,9 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
log_init(1);
#ifdef HAVE_PUTENV
if (*lp_prexfer_exec(i) || *lp_postxfer_exec(i)) {
int status;
-@@ -862,6 +868,10 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
+@@ -864,6 +870,10 @@ 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;
if (lp_ignore_errors(module_id))
ignore_errors = 1;
if (write_batch < 0)
-diff --git a/configure.in b/configure.in
---- a/configure.in
-+++ b/configure.in
+diff --git a/configure.ac b/configure.ac
+--- a/configure.ac
++++ b/configure.ac
@@ -337,7 +337,7 @@ AC_CHECK_HEADERS(sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h \
sys/un.h sys/attr.h mcheck.h arpa/inet.h arpa/nameser.h locale.h \
netdb.h malloc.h float.h limits.h iconv.h libcharset.h langinfo.h \
if (unsort_ndx)
F_NDX(file) = stats.num_dirs;
-@@ -2075,6 +2077,9 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
+@@ -2077,6 +2079,9 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
| (eol_nulls || reading_remotely ? RL_EOL_NULLS : 0);
int implied_dot_dir = 0;
return memcmp(sum, F_SUM(file), checksum_len) == 0;
}
-@@ -2075,6 +2077,9 @@ void generate_files(int f_out, const char *local_name)
+@@ -2077,6 +2079,9 @@ void generate_files(int f_out, const char *local_name)
: "enabled");
}
extern int file_total;
extern int recurse;
extern int xfer_dirs;
-@@ -83,6 +84,7 @@ extern char *filesfrom_host;
+@@ -82,6 +83,7 @@ extern char *filesfrom_host;
extern char *partial_dir;
extern char *dest_option;
extern char *rsync_path;
extern char *shell_cmd;
extern char *batch_name;
extern char *password_file;
-@@ -1609,6 +1611,9 @@ int main(int argc,char *argv[])
+@@ -1605,6 +1607,9 @@ int main(int argc,char *argv[])
exit_cleanup(RERR_SYNTAX);
}
+extern int always_checksum;
+extern int use_db;
+extern char *db_config;
- extern mode_t orig_umask;
extern char *logfile_name;
extern int remote_option_cnt;
-@@ -143,6 +146,9 @@ pid_t local_child(int argc, char **argv, int *f_in, int *f_out,
+ extern const char **remote_options;
+@@ -141,6 +144,9 @@ pid_t local_child(int argc, char **argv, int *f_in, int *f_out,
logfile_close();
}
if (remote_option_cnt) {
int rc = remote_option_cnt + 1;
const char **rv = remote_options;
-@@ -150,6 +156,8 @@ pid_t local_child(int argc, char **argv, int *f_in, int *f_out,
+@@ -148,6 +154,8 @@ pid_t local_child(int argc, char **argv, int *f_in, int *f_out,
option_error();
exit_cleanup(RERR_SYNTAX);
}
diff = u_strcmp(fmid->basename, f->basename);
if (diff == 0) {
good_match = mid;
-@@ -1783,6 +1785,21 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1785,6 +1787,21 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
fnamecmp = partialptr;
fnamecmp_type = FNAMECMP_PARTIAL_DIR;
statret = 0;
--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
-@@ -1656,6 +1658,17 @@ the bf(--partial-dir) option, that directory will be used instead. These
+@@ -1686,6 +1688,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: a01e3b490eb36ccf9e704840e1b6683dab867550
+based-on: 25082d1ef6712a15c52a1dacb36b7f0642c23ac8
diff --git a/compat.c b/compat.c
--- a/compat.c
+++ b/compat.c
-@@ -41,6 +41,7 @@ extern int checksum_seed;
+@@ -42,6 +42,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;
-@@ -121,6 +122,7 @@ void set_allow_inc_recurse(void)
+@@ -122,6 +123,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);
-@@ -2548,6 +2590,25 @@ struct file_list *recv_file_list(int f)
+@@ -2550,6 +2592,25 @@ struct file_list *recv_file_list(int f)
flist_sort_and_clean(flist, relative_paths);
if (!fbuf) {
@@ -292,17 +302,22 @@ static void delete_in_dir(char *fbuf, struct file_struct *file, dev_t *fs_dev)
- maybe_send_keepalive(time(NULL), True);
+ maybe_send_keepalive(time(NULL), MSK_ALLOW_FLUSH);
if (io_error && !ignore_errors) {
- if (already_warned)
change_local_filter_dir(fname, strlen(fname), F_DEPTH(file));
}
goto cleanup;
-@@ -1588,8 +1732,14 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1590,8 +1734,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;
-@@ -2056,6 +2206,12 @@ void generate_files(int f_out, const char *local_name)
+@@ -2058,6 +2208,12 @@ void generate_files(int f_out, const char *local_name)
if (DEBUG_GTE(GENR, 1))
rprintf(FINFO, "generator starting pid=%ld\n", (long)getpid());
if (delete_before && !solo_file && cur_flist->used > 0)
do_delete_pass();
if (delete_during == 2) {
-@@ -2066,7 +2222,7 @@ void generate_files(int f_out, const char *local_name)
+@@ -2068,7 +2224,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",
-@@ -2102,7 +2258,7 @@ void generate_files(int f_out, const char *local_name)
+@@ -2104,7 +2260,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));
}
-@@ -2149,7 +2305,21 @@ void generate_files(int f_out, const char *local_name)
+@@ -2151,7 +2307,21 @@ void generate_files(int f_out, const char *local_name)
} while ((cur_flist = cur_flist->next) != NULL);
if (delete_during)
--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
-@@ -1640,6 +1641,21 @@ Note that the use of the bf(--delete) option might get rid of any potential
+@@ -1670,6 +1671,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.
diff --git a/util.c b/util.c
--- a/util.c
+++ b/util.c
-@@ -1088,6 +1088,32 @@ char *normalize_path(char *path, BOOL force_newbuf, unsigned int *len_ptr)
+@@ -1076,6 +1076,32 @@ char *normalize_path(char *path, BOOL force_newbuf, unsigned int *len_ptr)
return path;
}
./configure (optional if already run)
make
-based-on: a01e3b490eb36ccf9e704840e1b6683dab867550
+based-on: 25082d1ef6712a15c52a1dacb36b7f0642c23ac8
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;
-@@ -1529,6 +1530,13 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1531,6 +1532,13 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
goto cleanup;
}
fnamecmp = fname;
fnamecmp_type = FNAMECMP_FNAME;
-@@ -1962,6 +1970,7 @@ void check_for_finished_files(int itemizing, enum logcode code, int check_redo)
+@@ -1964,6 +1972,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;
-@@ -1987,6 +1996,7 @@ void check_for_finished_files(int itemizing, enum logcode code, int check_redo)
+@@ -1989,6 +1998,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 (optional if already run)
make
-based-on: a01e3b490eb36ccf9e704840e1b6683dab867550
+based-on: 25082d1ef6712a15c52a1dacb36b7f0642c23ac8
diff --git a/checksum.c b/checksum.c
--- a/checksum.c
+++ b/checksum.c
max_fd = sysconf(_SC_OPEN_MAX) - 1;
for (fd = max_fd; fd >= 0; fd--) {
if ((ret = do_fstat(fd, &st)) == 0) {
-diff --git a/configure.in b/configure.in
---- a/configure.in
-+++ b/configure.in
+diff --git a/configure.ac b/configure.ac
+--- a/configure.ac
++++ b/configure.ac
@@ -589,7 +589,7 @@ AC_CHECK_FUNCS(waitpid wait4 getcwd strdup chown chmod lchmod mknod mkfifo \
setlocale setmode open64 lseek64 mkstemp64 mtrace va_copy __va_copy \
seteuid strerror putenv iconv_open locale_charset nl_langinfo getxattr \
diff --git a/receiver.c b/receiver.c
--- a/receiver.c
+++ b/receiver.c
-@@ -64,6 +64,10 @@ static flist_ndx_list batch_redo_list;
+@@ -65,6 +65,10 @@ static flist_ndx_list batch_redo_list;
/* We're either updating the basis file or an identical copy: */
static int updating_basis_or_equiv;
-n, --dry-run perform a trial run with no changes made
-W, --whole-file copy files whole (w/o delta-xfer algorithm)
-x, --one-file-system don't cross filesystem boundaries
-@@ -1127,6 +1128,10 @@ NOTE: Don't use this option when the destination is a Solaris "tmpfs"
+@@ -1157,6 +1158,10 @@ NOTE: Don't use this option when the destination is a Solaris "tmpfs"
filesystem. It seems to have problems seeking over null regions,
and ends up corrupting the files.
diff --git a/sender.c b/sender.c
--- a/sender.c
+++ b/sender.c
-@@ -49,6 +49,10 @@ extern struct file_list *cur_flist, *first_flist, *dir_flist;
+@@ -48,6 +48,10 @@ extern struct file_list *cur_flist, *first_flist, *dir_flist;
BOOL extra_flist_sending_enabled;
extern int modify_window;
extern int relative_paths;
extern int preserve_xattrs;
-@@ -42,6 +43,131 @@ char curr_dir[MAXPATHLEN];
+@@ -41,6 +42,131 @@ char curr_dir[MAXPATHLEN];
unsigned int curr_dir_len;
int curr_dir_depth; /* This is only set for a sanitizing daemon. */
./configure
make
-based-on: afccb3d3263b4867eb0a22cf29a3bb75f4cf0d71
+based-on: 25082d1ef6712a15c52a1dacb36b7f0642c23ac8
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
-@@ -41,9 +41,11 @@ extern int checksum_seed;
+@@ -42,9 +42,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;
-@@ -61,7 +63,7 @@ extern char *iconv_opt;
+@@ -62,7 +64,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 */
-@@ -138,6 +140,8 @@ void setup_protocol(int f_out,int f_in)
+@@ -139,6 +141,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)
-diff --git a/configure.in b/configure.in
---- a/configure.in
-+++ b/configure.in
+diff --git a/configure.ac b/configure.ac
+--- a/configure.ac
++++ b/configure.ac
@@ -589,7 +589,7 @@ AC_CHECK_FUNCS(waitpid wait4 getcwd strdup chown chmod lchmod mknod mkfifo \
setlocale setmode open64 lseek64 mkstemp64 mtrace va_copy __va_copy \
seteuid strerror putenv iconv_open locale_charset nl_langinfo getxattr \
#ifdef SUPPORT_HARD_LINKS
if (preserve_hard_links && F_HLINK_NOT_FIRST(file)
-@@ -1919,13 +1944,17 @@ static void touch_up_dirs(struct file_list *flist, int ndx)
+@@ -1921,13 +1946,17 @@ static void touch_up_dirs(struct file_list *flist, int ndx)
continue;
fname = f_name(file, NULL);
if (fix_dir_perms)
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-":
-@@ -876,7 +881,7 @@ they would be using bf(--copy-links).
+@@ -885,7 +890,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.
-@@ -1017,6 +1022,29 @@ Note that this option does not copy rsyncs special xattr values (e.g. those
+@@ -1043,6 +1048,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" strings to the permission of the files in the
transfer. The resulting value is treated as though it were the permissions
-@@ -1305,12 +1333,13 @@ display as a "*missing" entry in the bf(--list-only) output.
+@@ -1331,12 +1359,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
-@@ -1893,7 +1922,7 @@ with older versions of rsync, but that also turns on the output of other
+@@ -1919,7 +1948,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.
-@@ -1949,7 +1978,7 @@ quote(itemization(
+@@ -1975,7 +2004,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).
int module_dirlen = 0;
+int force_change = 0;
int preserve_xattrs = 0;
- mode_t orig_umask = 002;
char number_separator = ',';
-@@ -84,3 +85,23 @@ filter_rule_list daemon_filter_list;
+ char *partial_dir;
+@@ -83,3 +84,23 @@ filter_rule_list daemon_filter_list;
{
return "tester";
}
+extern int force_change;
extern char *module_dir;
extern unsigned int module_dirlen;
- extern mode_t orig_umask;
-@@ -123,7 +124,7 @@ NORETURN void overflow_exit(const char *str)
+ extern char *partial_dir;
+@@ -122,7 +123,7 @@ NORETURN void overflow_exit(const char *str)
exit_cleanup(RERR_MALLOC);
}
{
#ifndef CAN_SET_SYMLINK_TIMES
if (S_ISLNK(mode))
-@@ -140,15 +141,14 @@ int set_modtime(const char *fname, time_t modtime, uint32 mod_nsec, mode_t mode)
+@@ -139,15 +140,14 @@ int set_modtime(const char *fname, time_t modtime, uint32 mod_nsec, mode_t mode)
return 0;
{
#elif defined HAVE_UTIMES || defined HAVE_LUTIMES
struct timeval t[2];
t[0].tv_sec = time(NULL);
-@@ -156,25 +156,44 @@ int set_modtime(const char *fname, time_t modtime, uint32 mod_nsec, mode_t mode)
+@@ -155,25 +155,44 @@ int set_modtime(const char *fname, time_t modtime, uint32 mod_nsec, mode_t mode)
t[1].tv_sec = modtime;
t[1].tv_usec = mod_nsec / 1000;
# ifdef HAVE_LUTIMES
./configure (optional if already run)
make
-based-on: a01e3b490eb36ccf9e704840e1b6683dab867550
+based-on: 25082d1ef6712a15c52a1dacb36b7f0642c23ac8
diff --git a/exclude.c b/exclude.c
--- a/exclude.c
+++ b/exclude.c
file->mode = tweak_mode(file->mode, chmod_modes);
if (f >= 0) {
-@@ -2300,7 +2321,7 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
+@@ -2302,7 +2323,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) {
-@@ -2314,7 +2335,7 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
+@@ -2316,7 +2337,7 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
} else
send_if_directory(f, flist, file, fbuf, len, flags);
} else
#define XFLG_FATAL_ERRORS (1<<0)
#define XFLG_OLD_PREFIXES (1<<1)
-@@ -809,6 +812,8 @@ struct map_struct {
+@@ -813,6 +816,8 @@ struct map_struct {
int status; /* first errno from read errors */
};
#define FILTRULE_WILD (1<<0) /* pattern has '*', '[', and/or '?' */
#define FILTRULE_WILD2 (1<<1) /* pattern has '**' */
#define FILTRULE_WILD2_PREFIX (1<<2) /* pattern starts with "**" */
-@@ -829,8 +834,18 @@ struct map_struct {
+@@ -833,8 +838,18 @@ struct map_struct {
#define FILTRULE_RECEIVER_SIDE (1<<17)/* rule applies to the receiving side */
#define FILTRULE_CLEAR_LIST (1<<18)/* this item is the "!" token */
#define FILTRULE_PERISHABLE (1<<19)/* perishable if parent dir goes away */
typedef struct filter_struct {
struct filter_struct *next;
-@@ -840,6 +855,11 @@ typedef struct filter_struct {
+@@ -844,6 +859,11 @@ typedef struct filter_struct {
int slash_cnt;
struct filter_list_struct *mergelist;
} u;
diff --git a/rsync.yo b/rsync.yo
--- a/rsync.yo
+++ b/rsync.yo
-@@ -1028,6 +1028,8 @@ quote(--chmod=Dg+s,ug+w,Fo-w,+X)
+@@ -1058,6 +1058,8 @@ quote(--chmod=Dg+s,ug+w,Fo-w,+X)
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.
-@@ -1846,6 +1848,10 @@ be omitted, but if USER is empty, a leading colon must be supplied.
+@@ -1876,6 +1878,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.
-@@ -2671,6 +2677,15 @@ itemization(
+@@ -2701,6 +2707,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)
-@@ -2732,6 +2747,12 @@ itemization(
+@@ -2762,6 +2777,12 @@ itemization(
a rule prefix such as bf(hide)).
)
diff --git a/util.c b/util.c
--- a/util.c
+++ b/util.c
-@@ -816,6 +816,25 @@ size_t stringjoin(char *dest, size_t destsize, ...)
+@@ -804,6 +804,25 @@ size_t stringjoin(char *dest, size_t destsize, ...)
return ret;
}
./configure (optional if already run)
make
-based-on: a01e3b490eb36ccf9e704840e1b6683dab867550
+based-on: 25082d1ef6712a15c52a1dacb36b7f0642c23ac8
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
extern int basis_dir_cnt;
extern int make_backups;
extern int cleanup_got_literal;
-@@ -337,6 +338,12 @@ static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
+@@ -341,6 +342,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... */
extern int modify_window;
extern int relative_paths;
extern int preserve_xattrs;
-@@ -382,6 +383,13 @@ int copy_file(const char *source, const char *dest, int ofd, mode_t mode)
+@@ -370,6 +371,13 @@ int copy_file(const char *source, const char *dest, int ofd, mode_t mode)
full_fname(source));
}
./configure (optional if already run)
make
-based-on: a01e3b490eb36ccf9e704840e1b6683dab867550
+based-on: 25082d1ef6712a15c52a1dacb36b7f0642c23ac8
diff --git a/authenticate.c b/authenticate.c
--- a/authenticate.c
+++ b/authenticate.c
diff --git a/clientserver.c b/clientserver.c
--- a/clientserver.c
+++ b/clientserver.c
-@@ -545,6 +545,7 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
+@@ -544,6 +544,7 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
return -1;
}
auth_user = auth_server(f_in, f_out, i, host, addr, "@RSYNCD: AUTHREQD ");
if (!auth_user) {
-@@ -555,9 +556,6 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
+@@ -554,9 +555,6 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
module_id = i;
- Make this code handle multibyte character encodings, and honor the
--iconv setting when converting case.
-based-on: a01e3b490eb36ccf9e704840e1b6683dab867550
+based-on: 25082d1ef6712a15c52a1dacb36b7f0642c23ac8
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;
-@@ -3010,6 +3011,7 @@ int f_name_cmp(const struct file_struct *f1, const struct file_struct *f2)
+@@ -3012,6 +3013,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;
-@@ -3120,7 +3122,15 @@ int f_name_cmp(const struct file_struct *f1, const struct file_struct *f2)
+@@ -3122,7 +3124,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
-@@ -1598,6 +1599,10 @@ default (with is overridden by both the environment and the command-line).
+@@ -1628,6 +1629,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: a01e3b490eb36ccf9e704840e1b6683dab867550
+based-on: 25082d1ef6712a15c52a1dacb36b7f0642c23ac8
diff --git a/Makefile.in b/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
diff --git a/receiver.c b/receiver.c
--- a/receiver.c
+++ b/receiver.c
-@@ -196,11 +196,13 @@ int open_tmpfile(char *fnametmp, const char *fname, struct file_struct *file)
+@@ -197,11 +197,13 @@ 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,
int32 len;
OFF_T offset = 0;
OFF_T offset2;
-@@ -220,6 +222,9 @@ static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
+@@ -221,6 +223,9 @@ static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
} else
mapbuf = NULL;
sum_init(checksum_seed);
if (append_mode > 0) {
-@@ -264,6 +269,8 @@ static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
+@@ -268,6 +273,8 @@ static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
cleanup_got_literal = 1;
sum_update(data, i);
if (fd != -1 && write_file(fd,data,i) != i)
goto report_write_error;
-@@ -290,6 +297,8 @@ static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
+@@ -294,6 +301,8 @@ static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
see_token(map, len);
sum_update(map, len);
}
if (updating_basis_or_equiv) {
-@@ -337,6 +346,9 @@ static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
+@@ -341,6 +350,9 @@ 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... */
if (mapbuf)
unmap_file(mapbuf);
-@@ -351,7 +363,7 @@ static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
+@@ -355,7 +367,7 @@ static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
static void discard_receive_data(int f_in, OFF_T length)
{
}
static void handle_delayed_updates(char *local_name)
-@@ -779,7 +791,7 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -783,7 +795,7 @@ int recv_files(int f_in, int f_out, char *local_name)
/* recv file data */
recv_ok = receive_data(f_in, fnamecmp, fd1, st.st_size,
diff --git a/rsync.h b/rsync.h
--- a/rsync.h
+++ b/rsync.h
-@@ -865,6 +865,14 @@ struct stats {
+@@ -869,6 +869,14 @@ struct stats {
int xferred_files;
};
./configure (optional if already run)
make
-based-on: a01e3b490eb36ccf9e704840e1b6683dab867550
+based-on: 25082d1ef6712a15c52a1dacb36b7f0642c23ac8
diff --git a/clientserver.c b/clientserver.c
--- a/clientserver.c
+++ b/clientserver.c
-@@ -66,6 +66,7 @@ extern iconv_t ic_send, ic_recv;
+@@ -65,6 +65,7 @@ extern iconv_t ic_send, ic_recv;
char *auth_user;
int read_only = 0;
int module_id = -1;
struct chmod_mode_struct *daemon_chmod_modes;
/* module_dirlen is the length of the module_dir string when in daemon
-@@ -77,6 +78,7 @@ unsigned int module_dirlen = 0;
+@@ -76,6 +77,7 @@ unsigned int module_dirlen = 0;
char *full_module_path;
static int rl_nulls = 0;
#ifdef HAVE_SIGACTION
static struct sigaction sigact;
-@@ -668,7 +670,7 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
+@@ -672,7 +674,7 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
log_init(1);
#ifdef HAVE_PUTENV
+ if (*lp_prexfer_exec(i) || *lp_postxfer_exec(i) || *lp_name_converter(i)) {
int status;
- umask(orig_umask);
-@@ -740,6 +742,44 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
+ /* For post-xfer exec, fork a new process to run the rsync
+@@ -743,6 +745,44 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
set_blocking(fds[1]);
pre_exec_fd = fds[1];
}
+ namecvt_fd_req = fds_to[1];
+ namecvt_fd_ans = fds_from[0];
+ }
- umask(0);
}
#endif
-@@ -971,6 +1011,44 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
+
+@@ -973,6 +1013,44 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
return 0;
}
diff --git a/t_stub.c b/t_stub.c
--- a/t_stub.c
+++ b/t_stub.c
-@@ -30,6 +30,7 @@ mode_t orig_umask = 002;
+@@ -29,6 +29,7 @@ int preserve_xattrs = 0;
char number_separator = ',';
char *partial_dir;
char *module_dir;
filter_rule_list daemon_filter_list;
void rprintf(UNUSED(enum logcode code), const char *format, ...)
-@@ -70,6 +71,11 @@ filter_rule_list daemon_filter_list;
+@@ -69,6 +70,11 @@ filter_rule_list daemon_filter_list;
return -1;
}
diff --git a/util.c b/util.c
--- a/util.c
+++ b/util.c
-@@ -31,9 +31,10 @@ extern int modify_window;
- extern int relative_paths;
- extern int preserve_xattrs;
+@@ -33,6 +33,8 @@ extern int preserve_xattrs;
extern char *module_dir;
--extern unsigned int module_dirlen;
- extern mode_t orig_umask;
+ extern unsigned int module_dirlen;
extern char *partial_dir;
+extern pid_t namecvt_pid;
+extern unsigned int module_dirlen;
./configure (optional if already run)
make
-based-on: a01e3b490eb36ccf9e704840e1b6683dab867550
+based-on: 25082d1ef6712a15c52a1dacb36b7f0642c23ac8
diff --git a/access.c b/access.c
--- a/access.c
+++ b/access.c
./configure (optional if already run)
make
-based-on: a01e3b490eb36ccf9e704840e1b6683dab867550
+based-on: 25082d1ef6712a15c52a1dacb36b7f0642c23ac8
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
-S, --sparse handle sparse files efficiently
-@@ -1078,6 +1079,10 @@ it is preserving modification times (see bf(--times)). If NFS is sharing
+@@ -1108,6 +1109,10 @@ it is preserving modification times (see bf(--times)). If NFS is sharing
the directories on the receiving side, it is a good idea to use bf(-O).
This option is inferred if you use bf(--backup) without bf(--backup-dir).
./configure
make
-based-on: a01e3b490eb36ccf9e704840e1b6683dab867550
+based-on: 25082d1ef6712a15c52a1dacb36b7f0642c23ac8
diff --git a/Makefile.in b/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
extern int rsync_port;
extern int protect_args;
extern int ignore_errors;
-@@ -133,8 +136,18 @@ int start_socket_client(char *host, int remote_argc, char *remote_argv[],
+@@ -132,8 +135,18 @@ int start_socket_client(char *host, int remote_argc, char *remote_argv[],
#endif
ret = start_inband_exchange(fd, fd, user, remote_argc, remote_argv);
}
static int exchange_protocols(int f_in, int f_out, char *buf, size_t bufsiz, int am_client)
-@@ -277,6 +290,32 @@ int start_inband_exchange(int f_in, int f_out, const char *user, int argc, char
+@@ -276,6 +289,32 @@ int start_inband_exchange(int f_in, int f_out, const char *user, int argc, char
if (DEBUG_GTE(CMD, 1))
print_child_argv("sending daemon args:", sargs);
io_printf(f_out, "%.*s\n", modlen, modname);
/* Old servers may just drop the connection here,
-@@ -302,6 +341,10 @@ int start_inband_exchange(int f_in, int f_out, const char *user, int argc, char
+@@ -301,6 +340,10 @@ int start_inband_exchange(int f_in, int f_out, const char *user, int argc, char
* server to terminate the listing of modules.
* We don't want to go on and transfer
* anything; just exit. */
exit(0);
}
-@@ -309,6 +352,10 @@ int start_inband_exchange(int f_in, int f_out, const char *user, int argc, char
+@@ -308,6 +351,10 @@ int start_inband_exchange(int f_in, int f_out, const char *user, int argc, char
rprintf(FERROR, "%s\n", line);
/* This is always fatal; the server will now
* close the socket. */
return -1;
}
-@@ -1028,6 +1075,9 @@ int start_daemon(int f_in, int f_out)
+@@ -1030,6 +1077,9 @@ int start_daemon(int f_in, int f_out)
if (exchange_protocols(f_in, f_out, line, sizeof line, 0) < 0)
return -1;
line[0] = 0;
if (!read_line_old(f_in, line, sizeof line))
return -1;
-@@ -1039,6 +1089,20 @@ int start_daemon(int f_in, int f_out)
+@@ -1041,6 +1091,20 @@ int start_daemon(int f_in, int f_out)
return -1;
}
if (*line == '#') {
/* it's some sort of command that I don't understand */
io_printf(f_out, "@ERROR: Unknown command '%s'\n", line);
-diff --git a/configure.in b/configure.in
---- a/configure.in
-+++ b/configure.in
+diff --git a/configure.ac b/configure.ac
+--- a/configure.ac
++++ b/configure.ac
@@ -318,6 +318,21 @@ if test x"$enable_locale" != x"no"; then
AC_DEFINE(CONFIG_LOCALE)
fi
#define SYMLINK_PREFIX "/rsyncd-munged/" /* This MUST have a trailing slash! */
#define SYMLINK_PREFIX_LEN ((int)sizeof SYMLINK_PREFIX - 1)
-@@ -581,6 +582,11 @@ typedef unsigned int size_t;
+@@ -585,6 +586,11 @@ typedef unsigned int size_t;
# define SIZEOF_INT64 SIZEOF_OFF_T
#endif
./configure (optional if already run)
make
-based-on: a01e3b490eb36ccf9e704840e1b6683dab867550
+based-on: 25082d1ef6712a15c52a1dacb36b7f0642c23ac8
./configure
make
-based-on: a01e3b490eb36ccf9e704840e1b6683dab867550
+based-on: 25082d1ef6712a15c52a1dacb36b7f0642c23ac8
diff --git a/compat.c b/compat.c
--- a/compat.c
+++ b/compat.c
-@@ -33,6 +33,7 @@ extern int inplace;
+@@ -34,6 +34,7 @@ extern int inplace;
extern int recurse;
extern int use_qsort;
extern int allow_inc_recurse;
extern int append_mode;
extern int fuzzy_basis;
extern int read_batch;
-@@ -188,6 +189,14 @@ void setup_protocol(int f_out,int f_in)
+@@ -189,6 +190,14 @@ void setup_protocol(int f_out,int f_in)
if (read_batch)
check_batch_flags();
if (protocol_version < 30) {
if (append_mode == 1)
append_mode = 2;
-diff --git a/configure.in b/configure.in
---- a/configure.in
-+++ b/configure.in
+diff --git a/configure.ac b/configure.ac
+--- a/configure.ac
++++ b/configure.ac
@@ -589,13 +589,49 @@ AC_CHECK_FUNCS(waitpid wait4 getcwd strdup chown chmod lchmod mknod mkfifo \
setlocale setmode open64 lseek64 mkstemp64 mtrace va_copy __va_copy \
seteuid strerror putenv iconv_open locale_charset nl_langinfo getxattr \
extern int keep_partial;
extern int checksum_len;
extern int checksum_seed;
-@@ -207,6 +208,22 @@ static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
+@@ -208,6 +209,22 @@ static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
char *data;
int32 i;
char *map = NULL;
read_sum_head(f_in, &sum);
-@@ -317,8 +334,14 @@ static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
+@@ -321,8 +338,14 @@ static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
goto report_write_error;
#ifdef HAVE_FTRUNCATE
diff --git a/rsync.h b/rsync.h
--- a/rsync.h
+++ b/rsync.h
-@@ -646,6 +646,21 @@ struct ht_int64_node {
+@@ -650,6 +650,21 @@ struct ht_int64_node {
#define ACLS_NEED_MASK 1
#endif
-n, --dry-run perform a trial run with no changes made
-W, --whole-file copy files whole (w/o delta-xfer algorithm)
-x, --one-file-system don't cross filesystem boundaries
-@@ -1127,6 +1128,17 @@ NOTE: Don't use this option when the destination is a Solaris "tmpfs"
+@@ -1157,6 +1158,17 @@ NOTE: Don't use this option when the destination is a Solaris "tmpfs"
filesystem. It seems to have problems seeking over null regions,
and ends up corrupting the files.
extern int dry_run;
extern int am_root;
extern int am_sender;
-@@ -325,3 +329,25 @@ OFF_T do_lseek(int fd, OFF_T offset, int whence)
+@@ -327,3 +331,25 @@ OFF_T do_lseek(int fd, OFF_T offset, int whence)
return lseek(fd, offset, whence);
#endif
}
extern int module_id;
extern int modify_window;
extern int relative_paths;
-@@ -332,6 +333,9 @@ int copy_file(const char *source, const char *dest, int ofd, mode_t mode)
+@@ -320,6 +321,9 @@ int copy_file(const char *source, const char *dest, int ofd, mode_t mode)
int ifd;
char buf[1024 * 8];
int len; /* Number of bytes read into `buf'. */
if ((ifd = do_open(source, O_RDONLY, 0)) < 0) {
int save_errno = errno;
-@@ -357,6 +361,25 @@ int copy_file(const char *source, const char *dest, int ofd, mode_t mode)
+@@ -345,6 +349,25 @@ int copy_file(const char *source, const char *dest, int ofd, mode_t mode)
}
}
while ((len = safe_read(ifd, buf, sizeof buf)) > 0) {
if (full_write(ofd, buf, len) < 0) {
int save_errno = errno;
-@@ -366,6 +389,9 @@ int copy_file(const char *source, const char *dest, int ofd, mode_t mode)
+@@ -354,6 +377,9 @@ int copy_file(const char *source, const char *dest, int ofd, mode_t mode)
errno = save_errno;
return -1;
}
}
if (len < 0) {
-@@ -382,6 +408,16 @@ int copy_file(const char *source, const char *dest, int ofd, mode_t mode)
+@@ -370,6 +396,16 @@ int copy_file(const char *source, const char *dest, int ofd, mode_t mode)
full_fname(source));
}
./configure (optional if already run)
make
-based-on: a01e3b490eb36ccf9e704840e1b6683dab867550
+based-on: 25082d1ef6712a15c52a1dacb36b7f0642c23ac8
diff --git a/flist.c b/flist.c
--- a/flist.c
+++ b/flist.c
extern struct stats stats;
extern char *filesfrom_host;
extern char *usermap, *groupmap;
-@@ -1754,6 +1755,9 @@ static void send_directory(int f, struct file_list *flist, char *fbuf, int len,
+@@ -1756,6 +1757,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: a01e3b490eb36ccf9e704840e1b6683dab867550
+based-on: 25082d1ef6712a15c52a1dacb36b7f0642c23ac8
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
-@@ -1159,6 +1159,13 @@ int daemon_main(void)
+@@ -1161,6 +1161,13 @@ int daemon_main(void)
* address too. In fact, why not just do inet_ntop on the
* local address??? */
start_accept_loop(rsync_port, start_daemon);
return -1;
}
-diff --git a/configure.in b/configure.in
---- a/configure.in
-+++ b/configure.in
+diff --git a/configure.ac b/configure.ac
+--- a/configure.ac
++++ b/configure.ac
@@ -683,6 +683,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/main.c b/main.c
--- a/main.c
+++ b/main.c
-@@ -1238,6 +1238,18 @@ static int start_client(int argc, char *argv[])
+@@ -1233,6 +1233,18 @@ static int start_client(int argc, char *argv[])
if (!read_batch) { /* for read_batch, NO source is specified */
char *path = check_for_hostspec(argv[0], &shell_machine, &rsync_port);
./configure (optional if already run)
make
-based-on: a01e3b490eb36ccf9e704840e1b6683dab867550
+based-on: 25082d1ef6712a15c52a1dacb36b7f0642c23ac8
diff --git a/syscall.c b/syscall.c
--- a/syscall.c
+++ b/syscall.c
-- Matt McCutchen <hashproduct@gmail.com>
-based-on: a01e3b490eb36ccf9e704840e1b6683dab867550
+based-on: 25082d1ef6712a15c52a1dacb36b7f0642c23ac8
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
-@@ -1198,6 +1199,14 @@ dit(bf(--remove-source-files)) This tells rsync to remove from the sending
+@@ -1228,6 +1229,14 @@ dit(bf(--remove-source-files)) This tells rsync to remove from the sending
side the files (meaning non-directories) that are a part of the transfer
and have been successfully duplicated on the receiving side.
extern int inplace;
extern int batch_fd;
extern int write_batch;
-@@ -126,6 +127,7 @@ void successful_send(int ndx)
+@@ -125,6 +126,7 @@ void successful_send(int ndx)
char fname[MAXPATHLEN];
struct file_struct *file;
struct file_list *flist;
if (!remove_source_files)
return;
-@@ -136,7 +138,11 @@ void successful_send(int ndx)
+@@ -135,7 +137,11 @@ void successful_send(int ndx)
return;
f_name(file, fname);
./configure (optional if already run)
make
-based-on: a01e3b490eb36ccf9e704840e1b6683dab867550
+based-on: 25082d1ef6712a15c52a1dacb36b7f0642c23ac8
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
diff --git a/main.c b/main.c
--- a/main.c
+++ b/main.c
-@@ -153,7 +153,7 @@ pid_t wait_process(pid_t pid, int *status_ptr, int flags)
+@@ -152,7 +152,7 @@ pid_t wait_process(pid_t pid, int *status_ptr, int flags)
}
/* Wait for a process to exit, calling io_flush while waiting. */
diff --git a/pipe.c b/pipe.c
--- a/pipe.c
+++ b/pipe.c
-@@ -180,3 +180,77 @@ pid_t local_child(int argc, char **argv, int *f_in, int *f_out,
+@@ -178,3 +178,77 @@ pid_t local_child(int argc, char **argv, int *f_in, int *f_out,
return pid;
}
diff --git a/receiver.c b/receiver.c
--- a/receiver.c
+++ b/receiver.c
-@@ -52,6 +52,7 @@ extern int delay_updates;
+@@ -53,6 +53,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];
-@@ -475,6 +476,8 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -479,6 +480,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);
-@@ -482,6 +485,23 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -486,6 +489,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();
-@@ -777,6 +797,9 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -781,6 +801,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));
-@@ -791,6 +814,16 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -795,6 +818,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)
-@@ -2335,6 +2338,33 @@ file previously generated by bf(--write-batch).
+@@ -2365,6 +2368,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.
extern int write_batch;
extern int file_old_total;
+extern char *source_filter;
- extern BOOL we_send_keepalive_messages;
extern struct stats stats;
extern struct file_list *cur_flist, *first_flist, *dir_flist;
-@@ -178,6 +179,26 @@ void send_files(int f_in, int f_out)
+
+@@ -177,6 +178,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");
-@@ -311,6 +332,7 @@ void send_files(int f_in, int f_out)
+@@ -310,6 +331,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) {
-@@ -332,6 +354,33 @@ void send_files(int f_in, int f_out)
+@@ -331,6 +353,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;
-@@ -382,6 +431,8 @@ void send_files(int f_in, int f_out)
+@@ -381,6 +430,8 @@ void send_files(int f_in, int f_out)
}
}
close(fd);
./configure (optional if already run)
make
-based-on: a01e3b490eb36ccf9e704840e1b6683dab867550
+based-on: 25082d1ef6712a15c52a1dacb36b7f0642c23ac8
diff --git a/fileio.c b/fileio.c
--- a/fileio.c
+++ b/fileio.c
-n, --dry-run perform a trial run with no changes made
-W, --whole-file copy files whole (w/o delta-xfer algorithm)
-x, --one-file-system don't cross filesystem boundaries
-@@ -1127,6 +1128,15 @@ NOTE: Don't use this option when the destination is a Solaris "tmpfs"
+@@ -1157,6 +1158,15 @@ NOTE: Don't use this option when the destination is a Solaris "tmpfs"
filesystem. It seems to have problems seeking over null regions,
and ends up corrupting the files.
./configure (optional if already run)
make
-based-on: a01e3b490eb36ccf9e704840e1b6683dab867550
+based-on: 25082d1ef6712a15c52a1dacb36b7f0642c23ac8
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
./configure (optional if already run)
make
-based-on: a01e3b490eb36ccf9e704840e1b6683dab867550
+based-on: 25082d1ef6712a15c52a1dacb36b7f0642c23ac8
diff --git a/io.c b/io.c
--- a/io.c
+++ b/io.c
-@@ -57,6 +57,7 @@ extern int remove_source_files;
+@@ -58,6 +58,7 @@ extern int remove_source_files;
extern int preserve_hard_links;
extern BOOL extra_flist_sending_enabled;
extern struct stats stats;
extern struct file_list *cur_flist;
#ifdef ICONV_OPTION
extern int filesfrom_convert;
-@@ -161,11 +162,19 @@ static void check_timeout(BOOL allow_keepalive)
- * the receiver ignores them. Note that the am_receiver flag is not
- * set until the receiver forks from the generator, so timeouts will be
- * based on receiving data on the receiving side until that event. */
-- if (!io_timeout || am_receiver)
-+ if ((!io_timeout || am_receiver) && !stop_at_utime)
+@@ -168,11 +169,19 @@ static void check_timeout(BOOL allow_keepalive)
+ * generator might be blocked trying to send checksums, it needs to
+ * know that the receiver is active). Thus, as long as one or the
+ * other is successfully doing work, the generator will not timeout. */
+- if (!io_timeout)
++ if (!io_timeout && !stop_at_utime)
return;
t = time(NULL);
+ exit_cleanup(RERR_TIMEOUT);
+ }
+
-+ if (!io_timeout || am_receiver)
++ if (!io_timeout)
+ return;
+
- if (allow_keepalive && we_send_keepalive_messages) {
+ if (allow_keepalive) {
/* This may put data into iobuf.msg w/o flushing. */
- maybe_send_keepalive(t, False);
+ maybe_send_keepalive(t, 0);
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
--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
-@@ -2309,6 +2311,19 @@ files can show up as being rapidly sent when the data is quickly buffered,
+@@ -2339,6 +2341,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.
diff --git a/util.c b/util.c
--- a/util.c
+++ b/util.c
-@@ -123,6 +123,133 @@ NORETURN void overflow_exit(const char *str)
+@@ -122,6 +122,133 @@ NORETURN void overflow_exit(const char *str)
exit_cleanup(RERR_MALLOC);
}
./configure (optional if already run)
make
-based-on: a01e3b490eb36ccf9e704840e1b6683dab867550
+based-on: 25082d1ef6712a15c52a1dacb36b7f0642c23ac8
diff --git a/flist.c b/flist.c
--- a/flist.c
+++ b/flist.c
--checksum-seed=NUM set block/file checksum seed (advanced)
-4, --ipv4 prefer IPv4
-6, --ipv6 prefer IPv6
-@@ -2373,6 +2374,22 @@ daemon uses the charset specified in its "charset" configuration parameter
+@@ -2403,6 +2404,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: a01e3b490eb36ccf9e704840e1b6683dab867550
+based-on: 25082d1ef6712a15c52a1dacb36b7f0642c23ac8
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: a01e3b490eb36ccf9e704840e1b6683dab867550
+based-on: 25082d1ef6712a15c52a1dacb36b7f0642c23ac8
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;
-@@ -1532,7 +1533,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1534,7 +1535,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
fnamecmp = fname;
fnamecmp_type = FNAMECMP_FNAME;
extern int preserve_xattrs;
extern int basis_dir_cnt;
extern int make_backups;
-@@ -198,6 +199,7 @@ int open_tmpfile(char *fnametmp, const char *fname, struct file_struct *file)
+@@ -199,6 +200,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,
const char *fname, int fd, OFF_T total_size)
{
static char file_sum1[MAX_DIGEST_LEN];
struct map_struct *mapbuf;
struct sum_struct sum;
-@@ -317,10 +319,14 @@ static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
+@@ -321,10 +323,14 @@ static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
goto report_write_error;
#ifdef HAVE_FTRUNCATE
}
#endif
-@@ -728,11 +734,25 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -732,11 +738,25 @@ int recv_files(int f_in, int f_out, char *local_name)
continue;
}
diff --git a/compat.c b/compat.c
--- a/compat.c
+++ b/compat.c
-@@ -191,13 +191,6 @@ void setup_protocol(int f_out,int f_in)
+@@ -192,13 +192,6 @@ void setup_protocol(int f_out,int f_in)
if (protocol_version < 30) {
if (append_mode == 1)
append_mode = 2;