#include "case_N.h"
--- old/clientserver.c
+++ new/clientserver.c
-@@ -396,6 +396,9 @@ static int rsync_module(int f_in, int f_
+@@ -397,6 +397,9 @@ static int rsync_module(int f_in, int f_
XFLG_ABS_IF_SLASH | XFLG_OLD_PREFIXES);
log_init(1);
#ifdef HAVE_PUTENV
if (*lp_prexfer_exec(i) || *lp_postxfer_exec(i)) {
-@@ -635,6 +638,9 @@ static int rsync_module(int f_in, int f_
+@@ -638,6 +641,9 @@ static int rsync_module(int f_in, int f_
rprintf(FLOG, "rsync %s %s from %s@%s (%s)\n",
am_sender ? "on" : "to",
request, auth_user, host, addr);
am_sender ? "on" : "to",
--- old/configure.in
+++ new/configure.in
-@@ -632,6 +632,12 @@ if test x"$with_included_popt" != x"yes"
+@@ -637,6 +637,12 @@ if test x"$with_included_popt" != x"yes"
AC_CHECK_LIB(popt, poptGetContext, , [with_included_popt=yes])
fi
exit_cleanup(RERR_FILEIO);
}
-@@ -298,6 +314,12 @@ static void handle_delayed_updates(struc
+@@ -298,6 +314,12 @@ static void handle_delayed_updates(char
rsyserr(FERROR, errno,
"rename failed for %s (from %s)",
full_fname(fname), partialptr);
} else {
if (remove_source_files
|| (preserve_hard_links && F_IS_HLINKED(file)))
-@@ -414,6 +436,9 @@ int recv_files(int f_in, struct file_lis
+@@ -431,6 +453,9 @@ int recv_files(int f_in, char *local_nam
if (server_filter_list.head
&& check_filter(&server_filter_list, fname, 0) < 0) {
rprintf(FERROR, "attempt to hack rsync failed.\n");
exit_cleanup(RERR_PROTOCOL);
}
-@@ -470,6 +495,11 @@ int recv_files(int f_in, struct file_lis
+@@ -487,6 +512,11 @@ int recv_files(int f_in, char *local_nam
rprintf(FERROR,
"invalid basis_dir index: %d.\n",
fnamecmp_type);
exit_cleanup(RERR_PROTOCOL);
}
pathjoin(fnamecmpbuf, sizeof fnamecmpbuf,
-@@ -518,6 +548,9 @@ int recv_files(int f_in, struct file_lis
+@@ -535,6 +565,9 @@ int recv_files(int f_in, char *local_nam
} else if (do_fstat(fd1,&st) != 0) {
rsyserr(FERROR, errno, "fstat %s failed",
full_fname(fnamecmp));
discard_receive_data(f_in, F_LENGTH(file));
close(fd1);
continue;
-@@ -531,6 +564,9 @@ int recv_files(int f_in, struct file_lis
+@@ -548,6 +581,9 @@ int recv_files(int f_in, char *local_nam
*/
rprintf(FERROR,"recv_files: %s is a directory\n",
full_fname(fnamecmp));
discard_receive_data(f_in, F_LENGTH(file));
close(fd1);
continue;
-@@ -554,6 +590,9 @@ int recv_files(int f_in, struct file_lis
+@@ -571,6 +607,9 @@ int recv_files(int f_in, char *local_nam
if (fd2 == -1) {
rsyserr(FERROR, errno, "open %s failed",
full_fname(fname));
discard_receive_data(f_in, F_LENGTH(file));
if (fd1 != -1)
close(fd1);
-@@ -587,6 +626,10 @@ int recv_files(int f_in, struct file_lis
+@@ -604,6 +643,10 @@ int recv_files(int f_in, char *local_nam
if (fd2 == -1) {
rsyserr(FERROR, errno, "mkstemp %s failed",
full_fname(fnametmp));
discard_receive_data(f_in, F_LENGTH(file));
if (fd1 != -1)
close(fd1);
-@@ -607,12 +650,19 @@ int recv_files(int f_in, struct file_lis
+@@ -624,12 +667,19 @@ int recv_files(int f_in, char *local_nam
fname, fd2, F_LENGTH(file));
log_item(log_code, file, &initial_stats, iflags, NULL);
exit_cleanup(RERR_FILEIO);
}
-@@ -669,6 +719,12 @@ int recv_files(int f_in, struct file_lis
+@@ -686,6 +736,12 @@ int recv_files(int f_in, char *local_nam
rprintf(msgtype,
"%s: %s failed verification -- update %s%s.\n",
errstr, fname, keptstr, redostr);
+ keptstr, redostr);
+#endif
}
- if (!phase)
+ if (!phase || incremental) {
send_msg_int(MSG_REDO, ndx);
--- old/sender.c
+++ new/sender.c
-@@ -305,6 +305,9 @@ void send_files(struct file_list *flist,
+@@ -326,6 +326,9 @@ void send_files(int f_in, int f_out)
end_progress(st.st_size);
log_item(log_code, file, &initial_stats, iflags, NULL);
--- old/acls.c
+++ new/acls.c
-@@ -282,6 +282,9 @@ static BOOL unpack_smb_acl(rsync_acl *ra
+@@ -281,6 +281,9 @@ static BOOL unpack_smb_acl(rsync_acl *ra
}
access = (sys_acl_get_perm(permset, SMB_ACL_READ) ? 4 : 0)
| (sys_acl_get_perm(permset, SMB_ACL_WRITE) ? 2 : 0)
| (sys_acl_get_perm(permset, SMB_ACL_EXECUTE) ? 1 : 0);
/* continue == done with entry; break == store in temporary ida list */
switch (tag_type) {
-@@ -376,6 +379,12 @@ static int store_access_in_entry(uchar a
+@@ -375,6 +378,12 @@ static int store_access_in_entry(uchar a
COE( sys_acl_get_permset,(entry, &permset) );
COE( sys_acl_clear_perms,(permset) );
if (access & 4)
COE( sys_acl_add_perm,(permset, SMB_ACL_READ) );
if (access & 2)
-@@ -409,7 +418,7 @@ static BOOL pack_smb_acl(SMB_ACL_T *smb_
+@@ -408,7 +417,7 @@ static BOOL pack_smb_acl(SMB_ACL_T *smb_
COE( sys_acl_create_entry,(smb_acl, &entry) );
COE( sys_acl_set_tag_type,(entry, SMB_ACL_USER_OBJ) );
for (ida = racl->users.idas, count = racl->users.count; count--; ida++) {
COE( sys_acl_create_entry,(smb_acl, &entry) );
-@@ -420,7 +429,7 @@ static BOOL pack_smb_acl(SMB_ACL_T *smb_
+@@ -419,7 +428,7 @@ static BOOL pack_smb_acl(SMB_ACL_T *smb_
COE( sys_acl_create_entry,(smb_acl, &entry) );
COE( sys_acl_set_tag_type,(entry, SMB_ACL_GROUP_OBJ) );
for (ida = racl->groups.idas, count = racl->groups.count; count--; ida++) {
COE( sys_acl_create_entry,(smb_acl, &entry) );
-@@ -430,7 +439,7 @@ static BOOL pack_smb_acl(SMB_ACL_T *smb_
+@@ -429,7 +438,7 @@ static BOOL pack_smb_acl(SMB_ACL_T *smb_
}
#ifdef ACLS_NEED_MASK
COE( sys_acl_create_entry,(smb_acl, &entry) );
COE( sys_acl_set_tag_type,(entry, SMB_ACL_MASK) );
COE2( store_access_in_entry,(mask_bits, entry) );
-@@ -444,7 +453,7 @@ static BOOL pack_smb_acl(SMB_ACL_T *smb_
+@@ -443,7 +452,7 @@ static BOOL pack_smb_acl(SMB_ACL_T *smb_
COE( sys_acl_create_entry,(smb_acl, &entry) );
COE( sys_acl_set_tag_type,(entry, SMB_ACL_OTHER) );
#ifdef DEBUG
if (sys_acl_valid(*smb_acl) < 0)
-@@ -649,7 +658,7 @@ static void receive_rsync_acl(rsync_acl
+@@ -646,7 +655,7 @@ static void receive_rsync_acl(rsync_acl
while (count--) {
char tag = read_byte(f);
uchar access = read_byte(f);
rprintf(FERROR, "receive_rsync_acl: bogus permset %o\n",
access);
exit_cleanup(RERR_STREAMIO);
-@@ -725,7 +734,7 @@ static void receive_rsync_acl(rsync_acl
+@@ -722,7 +731,7 @@ static void receive_rsync_acl(rsync_acl
racl->mask = NO_ENTRY;
}
} else if (racl->mask == NO_ENTRY) /* Must be non-empty with lists. */
*
--- old/log.c
+++ new/log.c
-@@ -77,6 +77,7 @@ struct {
+@@ -79,6 +79,7 @@ struct {
{ RERR_TERMINATED , "sibling process terminated abnormally" },
{ RERR_SIGNAL1 , "received SIGUSR1" },
{ RERR_SIGNAL , "received SIGINT, SIGTERM, or SIGHUP" },
{ RERR_PARTIAL , "some files could not be transferred" },
--- old/main.c
+++ new/main.c
-@@ -149,8 +149,11 @@ static void wait_process_with_flush(pid_
+@@ -155,8 +155,11 @@ static void wait_process_with_flush(pid_
*exit_code_ptr = RERR_TERMINATED;
else
*exit_code_ptr = RERR_WAITCHILD;
}
/* This function gets called from all 3 processes. We want the client side
-@@ -1211,6 +1214,14 @@ RETSIGTYPE remember_children(UNUSED(int
+@@ -1234,6 +1237,14 @@ RETSIGTYPE remember_children(UNUSED(int
break;
}
}
}
#endif
#ifndef HAVE_SIGACTION
-@@ -1269,6 +1280,12 @@ static RETSIGTYPE rsync_panic_handler(UN
+@@ -1292,6 +1303,12 @@ static RETSIGTYPE rsync_panic_handler(UN
}
#endif
int main(int argc,char *argv[])
{
-@@ -1291,6 +1308,11 @@ int main(int argc,char *argv[])
+@@ -1314,6 +1331,11 @@ int main(int argc,char *argv[])
SIGACTMASK(SIGFPE, rsync_panic_handler);
SIGACTMASK(SIGABRT, rsync_panic_handler);
SIGACTMASK(SIGBUS, rsync_panic_handler);
--- old/exclude.c
+++ new/exclude.c
-@@ -216,6 +216,8 @@ static void add_rule(struct filter_list_
+@@ -217,6 +217,8 @@ static void add_rule(struct filter_list_
if (!(lp = new_array(struct filter_list_struct, 1)))
out_of_memory("add_rule");
lp->head = lp->tail = NULL;
if (asprintf(&lp->debug_type, " [per-dir %s]", cp) < 0)
out_of_memory("add_rule");
ret->u.mergelist = lp;
-@@ -448,6 +450,14 @@ void *push_local_filters(const char *dir
+@@ -449,6 +451,14 @@ void *push_local_filters(const char *dir
set_filter_dir(dir, dirlen);
}
if (strlcpy(dirbuf + dirbuf_len, ex->pattern,
MAXPATHLEN - dirbuf_len) < MAXPATHLEN - dirbuf_len) {
parse_filter_file(lp, dirbuf, ex->match_flags,
-@@ -973,6 +983,7 @@ void parse_filter_file(struct filter_lis
+@@ -1005,6 +1015,7 @@ void parse_filter_file(struct filter_lis
char line[BIGPATHBUFLEN];
char *eob = line + sizeof line - 1;
int word_split = mflags & MATCHFLG_WORD_SPLIT;
if (!fname || !*fname)
return;
-@@ -1019,6 +1030,24 @@ void parse_filter_file(struct filter_lis
+@@ -1051,6 +1062,24 @@ void parse_filter_file(struct filter_lis
}
break;
}
if (word_split && isspace(ch))
break;
if (eol_nulls? !ch : (ch == '\n' || ch == '\r'))
-@@ -1028,13 +1057,15 @@ void parse_filter_file(struct filter_lis
+@@ -1060,13 +1089,15 @@ void parse_filter_file(struct filter_lis
else
overflow = 1;
}
break;
--- old/rsync.h
+++ new/rsync.h
-@@ -117,6 +117,7 @@
+@@ -132,6 +132,7 @@
#define XFLG_OLD_PREFIXES (1<<1)
#define XFLG_ANCHORED2ABS (1<<2)
#define XFLG_ABS_IF_SLASH (1<<3)
--- old/generator.c
+++ new/generator.c
-@@ -60,6 +60,7 @@ extern int append_mode;
+@@ -61,6 +61,7 @@ extern int append_mode;
extern int make_backups;
extern int csum_length;
extern int ignore_times;
extern int size_only;
extern OFF_T max_size;
extern OFF_T min_size;
-@@ -507,6 +508,9 @@ void itemize(struct file_struct *file, i
+@@ -571,6 +572,9 @@ void itemize(struct file_struct *file, i
/* Perform our quick-check heuristic for determining if a file is unchanged. */
int unchanged_file(char *fn, struct file_struct *file, STRUCT_STAT *st)
{
{"one-file-system", 'x', POPT_ARG_NONE, 0, 'x', 0, 0 },
{"update", 'u', POPT_ARG_NONE, &update_only, 0, 0, 0 },
{"existing", 0, POPT_ARG_NONE, &ignore_non_existing, 0, 0, 0 },
-@@ -1682,6 +1685,9 @@ void server_options(char **args,int *arg
+@@ -1692,6 +1695,9 @@ void server_options(char **args,int *arg
args[ac++] = "--size-only";
}
int preserve_links = 0;
int preserve_hard_links = 0;
int preserve_perms = 0;
-@@ -339,6 +340,7 @@ void usage(enum logcode F)
+@@ -336,6 +337,7 @@ void usage(enum logcode F)
rprintf(F," --partial-dir=DIR put a partially transferred file into DIR\n");
rprintf(F," --delay-updates put all updated files into place at transfer's end\n");
rprintf(F," -m, --prune-empty-dirs prune empty directory chains from the file-list\n");
rprintf(F," --numeric-ids don't map uid/gid values by user/group name\n");
rprintf(F," --timeout=TIME set I/O timeout in seconds\n");
rprintf(F," -I, --ignore-times don't skip files that match in size and mod-time\n");
-@@ -525,6 +527,7 @@ static struct poptOption long_options[]
+@@ -523,6 +525,7 @@ static struct poptOption long_options[]
{"only-write-batch", 0, POPT_ARG_STRING, &batch_name, OPT_ONLY_WRITE_BATCH, 0, 0 },
{"files-from", 0, POPT_ARG_STRING, &files_from, 0, 0, 0 },
{"from0", '0', POPT_ARG_NONE, &eol_nulls, 0, 0, 0},
{"numeric-ids", 0, POPT_ARG_NONE, &numeric_ids, 0, 0, 0 },
{"timeout", 0, POPT_ARG_INT, &io_timeout, 0, 0, 0 },
{"rsh", 'e', POPT_ARG_STRING, &shell_cmd, 0, 0, 0 },
-@@ -1727,6 +1730,9 @@ void server_options(char **args,int *arg
+@@ -1743,6 +1746,9 @@ void server_options(char **args,int *arg
args[ac++] = tmpdir;
}
* and it may be an older version that doesn't know this
--- old/receiver.c
+++ new/receiver.c
-@@ -37,6 +37,7 @@ extern int protocol_version;
+@@ -38,6 +38,7 @@ extern int protocol_version;
extern int relative_paths;
extern int preserve_hard_links;
extern int preserve_perms;
extern int modify_window;
extern int relative_paths;
extern int human_readable;
-@@ -314,6 +315,12 @@ int copy_file(const char *source, const
+@@ -316,6 +317,12 @@ int copy_file(const char *source, const
return -1;
}
--- old/flist.c
+++ new/flist.c
-@@ -32,6 +32,7 @@ extern int am_sender;
+@@ -34,6 +34,7 @@ extern int incremental;
extern int do_progress;
extern int always_checksum;
extern int module_id;
extern int ignore_errors;
extern int numeric_ids;
extern int recurse;
-@@ -1783,7 +1784,7 @@ int f_name_cmp(struct file_struct *f1, s
+@@ -2161,7 +2162,7 @@ int f_name_cmp(struct file_struct *f1, s
if (type1 != type2)
return type1 == t_PATH ? 1 : -1;
if (!*c1) {
switch (state1) {
case s_DIR:
-@@ -1846,7 +1847,16 @@ int f_name_cmp(struct file_struct *f1, s
+@@ -2224,7 +2225,16 @@ int f_name_cmp(struct file_struct *f1, s
if (type1 != type2)
return type1 == t_PATH ? 1 : -1;
}
int blocking_io = -1;
int checksum_seed = 0;
int inplace = 0;
-@@ -361,6 +362,7 @@ void usage(enum logcode F)
+@@ -358,6 +359,7 @@ void usage(enum logcode F)
rprintf(F," --include-from=FILE read include patterns from FILE\n");
rprintf(F," --files-from=FILE read list of source-file names from FILE\n");
rprintf(F," -0, --from0 all *-from/filter files are delimited by 0s\n");
rprintf(F," --address=ADDRESS bind address for outgoing socket to daemon\n");
rprintf(F," --port=PORT specify double-colon alternate port number\n");
rprintf(F," --sockopts=OPTIONS specify custom TCP options\n");
-@@ -525,6 +527,7 @@ static struct poptOption long_options[]
+@@ -523,6 +525,7 @@ static struct poptOption long_options[]
{"only-write-batch", 0, POPT_ARG_STRING, &batch_name, OPT_ONLY_WRITE_BATCH, 0, 0 },
{"files-from", 0, POPT_ARG_STRING, &files_from, 0, 0, 0 },
{"from0", '0', POPT_ARG_NONE, &eol_nulls, 0, 0, 0},
{"numeric-ids", 0, POPT_ARG_NONE, &numeric_ids, 0, 0, 0 },
{"timeout", 0, POPT_ARG_INT, &io_timeout, 0, 0, 0 },
{"rsh", 'e', POPT_ARG_STRING, &shell_cmd, 0, 0, 0 },
-@@ -1688,6 +1691,9 @@ void server_options(char **args,int *arg
+@@ -1704,6 +1707,9 @@ void server_options(char **args,int *arg
args[ac++] = arg;
}
--- old/flist.c
+++ new/flist.c
-@@ -41,6 +41,7 @@ extern int one_file_system;
+@@ -43,6 +43,7 @@ extern int one_file_system;
extern int copy_dirlinks;
extern int keep_dirlinks;
extern int preserve_links;
extern int preserve_hard_links;
extern int preserve_devices;
extern int preserve_specials;
-@@ -702,6 +703,30 @@ static struct file_struct *receive_file_
+@@ -852,6 +853,30 @@ static struct file_struct *recv_file_ent
return file;
}
/**
* Create a file_struct for a named file by reading its stat()
* information and performing extensive checks against global
-@@ -837,7 +862,13 @@ struct file_struct *make_file(char *fnam
+@@ -994,7 +1019,13 @@ struct file_struct *make_file(const char
basename_len = strlen(basename) + 1; /* count the '\0' */
#ifdef SUPPORT_LINKS
int preserve_hard_links = 0;
int preserve_perms = 0;
int preserve_executability = 0;
-@@ -297,6 +298,7 @@ void usage(enum logcode F)
+@@ -293,6 +294,7 @@ void usage(enum logcode F)
rprintf(F," --append append data onto shorter files\n");
rprintf(F," -d, --dirs transfer directories without recursing\n");
rprintf(F," -l, --links copy symlinks as symlinks\n");
rprintf(F," -L, --copy-links transform symlink into referent file/dir\n");
rprintf(F," --copy-unsafe-links only \"unsafe\" symlinks are transformed\n");
rprintf(F," --safe-links ignore symlinks that point outside the source tree\n");
-@@ -447,6 +449,7 @@ static struct poptOption long_options[]
+@@ -444,6 +446,7 @@ static struct poptOption long_options[]
{"links", 'l', POPT_ARG_VAL, &preserve_links, 1, 0, 0 },
{"no-links", 0, POPT_ARG_VAL, &preserve_links, 0, 0, 0 },
{"no-l", 0, POPT_ARG_VAL, &preserve_links, 0, 0, 0 },
#include "rsync.h"
+#include "lib/md5.h"
- int csum_length=2; /* initial value */
+ int csum_length = SHORT_SUM_LENGTH; /* initial value */
-@@ -28,6 +29,7 @@ int csum_length=2; /* initial value */
+@@ -28,6 +29,7 @@ int csum_length = SHORT_SUM_LENGTH; /* i
extern int checksum_seed;
extern int protocol_version;
{"checksum", 'c', POPT_ARG_NONE, &always_checksum, 0, 0, 0 },
{"block-size", 'B', POPT_ARG_LONG, &block_size, 0, 0, 0 },
{"compare-dest", 0, POPT_ARG_STRING, 0, OPT_COMPARE_DEST, 0, 0 },
-@@ -1646,6 +1649,9 @@ void server_options(char **args,int *arg
+@@ -1656,6 +1659,9 @@ void server_options(char **args,int *arg
args[ac++] = arg;
}
+extern int use_ssl;
+#endif
extern int rsync_port;
+ extern int ignore_errors;
extern int kluge_around_eof;
- extern int daemon_over_rsh;
-@@ -106,8 +109,18 @@ int start_socket_client(char *host, char
+@@ -107,8 +110,18 @@ int start_socket_client(char *host, char
set_socket_options(fd, sockopts);
ret = start_inband_exchange(user, path, fd, fd, argc);
}
int start_inband_exchange(const char *user, char *path, int f_in, int f_out,
-@@ -168,6 +181,33 @@ int start_inband_exchange(const char *us
+@@ -169,6 +182,33 @@ int start_inband_exchange(const char *us
if (verbose > 1)
print_child_argv(sargs);
p = strchr(path,'/');
if (p) *p = 0;
io_printf(f_out, "%s\n", path);
-@@ -196,6 +236,10 @@ int start_inband_exchange(const char *us
+@@ -197,6 +237,10 @@ int start_inband_exchange(const char *us
* server to terminate the listing of modules.
* We don't want to go on and transfer
* anything; just exit. */
exit(0);
}
-@@ -203,6 +247,10 @@ int start_inband_exchange(const char *us
+@@ -204,6 +248,10 @@ int start_inband_exchange(const char *us
rprintf(FERROR, "%s\n", line);
/* This is always fatal; the server will now
* close the socket. */
return -1;
}
-@@ -780,6 +828,9 @@ int start_daemon(int f_in, int f_out)
+@@ -785,6 +833,9 @@ int start_daemon(int f_in, int f_out)
if (protocol_version > remote_protocol)
protocol_version = remote_protocol;
line[0] = 0;
if (!read_line(f_in, line, sizeof line - 1))
return -1;
-@@ -791,6 +842,20 @@ int start_daemon(int f_in, int f_out)
+@@ -796,6 +847,20 @@ int start_daemon(int f_in, int f_out)
return -1;
}
*cygwin* ) AC_MSG_RESULT(yes)
--- old/options.c
+++ new/options.c
-@@ -173,6 +173,14 @@ int logfile_format_has_o_or_i = 0;
+@@ -172,6 +172,14 @@ int logfile_format_has_o_or_i = 0;
int always_checksum = 0;
int list_only = 0;
{"verbose", 'v', POPT_ARG_NONE, 0, 'v', 0, 0 },
{"no-verbose", 0, POPT_ARG_VAL, &verbose, 0, 0, 0 },
{"no-v", 0, POPT_ARG_VAL, &verbose, 0, 0, 0 },
-@@ -853,6 +894,12 @@ int parse_arguments(int *argc, const cha
+@@ -855,6 +896,12 @@ int parse_arguments(int *argc, const cha
verbose++;
break;
default:
rprintf(FERROR,
"rsync: %s: %s (in daemon mode)\n",
-@@ -876,6 +923,17 @@ int parse_arguments(int *argc, const cha
+@@ -878,6 +925,17 @@ int parse_arguments(int *argc, const cha
exit_cleanup(RERR_SYNTAX);
}
*argv = poptGetArgs(pc);
*argc = count_args(*argv);
am_starting_up = 0;
-@@ -1087,6 +1145,12 @@ int parse_arguments(int *argc, const cha
+@@ -1093,6 +1151,12 @@ int parse_arguments(int *argc, const cha
usage(FINFO);
exit_cleanup(0);
default:
/* A large opt value means that set_refuse_options()
* turned this option off. */
-@@ -1359,6 +1423,17 @@ int parse_arguments(int *argc, const cha
+@@ -1371,6 +1435,17 @@ int parse_arguments(int *argc, const cha
if (delay_updates && !partial_dir)
partial_dir = tmp_partialdir;
if (inplace) {
#ifdef HAVE_FTRUNCATE
if (partial_dir) {
-@@ -1783,10 +1858,27 @@ char *check_for_hostspec(char *s, char *
+@@ -1798,10 +1873,27 @@ char *check_for_hostspec(char *s, char *
char *p;
int not_host;
int hostlen;
#define BACKUP_SUFFIX "~"
-@@ -420,6 +421,11 @@ enum msgcode {
+@@ -473,6 +474,11 @@ enum msgcode {
# define SIZEOF_INT64 SIZEOF_OFF_T
#endif
int do_compression = 0;
int def_compress_level = Z_DEFAULT_COMPRESSION;
int am_root = 0;
-@@ -200,6 +201,7 @@ static void print_rsync_version(enum log
+@@ -201,6 +202,7 @@ static void print_rsync_version(enum log
char const *hardlinks = "no ";
char const *links = "no ";
char const *ipv6 = "no ";
STRUCT_STAT *dumstat;
#ifdef HAVE_SOCKETPAIR
-@@ -222,6 +224,10 @@ static void print_rsync_version(enum log
+@@ -223,6 +225,10 @@ static void print_rsync_version(enum log
ipv6 = "";
#endif
rprintf(f, "%s version %s protocol version %d\n",
RSYNC_NAME, RSYNC_VERSION, PROTOCOL_VERSION);
rprintf(f, "Copyright (C) 1996-2006 by Andrew Tridgell, Wayne Davison, and others.\n");
-@@ -232,8 +238,8 @@ static void print_rsync_version(enum log
+@@ -233,8 +239,8 @@ static void print_rsync_version(enum log
(int)(sizeof (int64) * 8));
rprintf(f, " %ssocketpairs, %shardlinks, %ssymlinks, %sIPv6, batchfiles, %sinplace,\n",
got_socketpair, hardlinks, links, ipv6, have_inplace);
#ifdef MAINTAINER_MODE
rprintf(f, "Panic Action: \"%s\"\n", get_panic_action());
-@@ -310,6 +316,9 @@ void usage(enum logcode F)
+@@ -311,6 +317,9 @@ void usage(enum logcode F)
rprintf(F," -O, --omit-dir-times omit directories when preserving times\n");
rprintf(F," --super receiver attempts super-user activities\n");
rprintf(F," -S, --sparse handle sparse files efficiently\n");
rprintf(F," -n, --dry-run show what would have been transferred\n");
rprintf(F," -W, --whole-file copy files whole (without rsync algorithm)\n");
rprintf(F," -x, --one-file-system don't cross filesystem boundaries\n");
-@@ -467,6 +476,7 @@ static struct poptOption long_options[]
+@@ -468,6 +477,7 @@ static struct poptOption long_options[]
{"max-size", 0, POPT_ARG_STRING, &max_size_arg, OPT_MAX_SIZE, 0, 0 },
{"min-size", 0, POPT_ARG_STRING, &min_size_arg, OPT_MIN_SIZE, 0, 0 },
{"sparse", 'S', POPT_ARG_NONE, &sparse_files, 0, 0, 0 },
{"inplace", 0, POPT_ARG_NONE, &inplace, 0, 0, 0 },
{"append", 0, POPT_ARG_VAL, &append_mode, 1, 0, 0 },
{"del", 0, POPT_ARG_NONE, &delete_during, 0, 0, 0 },
-@@ -1125,6 +1135,15 @@ int parse_arguments(int *argc, const cha
+@@ -1132,6 +1142,15 @@ int parse_arguments(int *argc, const cha
}
#endif
if (write_batch && read_batch) {
snprintf(err_buf, sizeof err_buf,
"--write-batch and --read-batch can not be used together\n");
-@@ -1763,6 +1782,9 @@ void server_options(char **args,int *arg
+@@ -1779,6 +1798,9 @@ void server_options(char **args,int *arg
else if (remove_source_files)
args[ac++] = "--remove-sent-files";
--- old/receiver.c
+++ new/receiver.c
-@@ -43,6 +43,7 @@ extern int cleanup_got_literal;
+@@ -44,6 +44,7 @@ extern int cleanup_got_literal;
extern int remove_source_files;
extern int append_mode;
extern int sparse_files;
if (do_progress)
--- old/rsync.h
+++ new/rsync.h
-@@ -532,6 +532,10 @@ struct idev_node {
+@@ -546,6 +546,10 @@ struct idev_node {
#define IN_LOOPBACKNET 127
#endif
INSTALLCMD=@INSTALL@
INSTALLMAN=@INSTALL@
-@@ -36,7 +38,7 @@ OBJS1=rsync.o generator.o receiver.o cle
- OBJS2=options.o flist.o io.o compat.o hlink.o token.o uidlist.o socket.o \
+@@ -36,7 +38,7 @@ OBJS1=flist.o rsync.o generator.o receiv
+ OBJS2=options.o io.o compat.o hlink.o token.o uidlist.o socket.o \
fileio.o batch.o clientname.o chmod.o
OBJS3=progress.o pipe.o
-DAEMON_OBJ = params.o loadparm.o clientserver.o access.o connection.o authenticate.o
--- old/clientserver.c
+++ new/clientserver.c
-@@ -849,6 +849,13 @@ int daemon_main(void)
+@@ -854,6 +854,13 @@ int daemon_main(void)
* address too. In fact, why not just do inet_ntop on the
* local address??? */
int fd;
--- old/configure.in
+++ new/configure.in
-@@ -614,6 +614,29 @@ if test $rsync_cv_can_hardlink_special =
+@@ -619,6 +619,29 @@ if test $rsync_cv_can_hardlink_special =
AC_DEFINE(CAN_HARDLINK_SPECIAL, 1, [Define to 1 if link() can hard-link special files.])
fi
FN_LOCAL_STRING(lp_comment, comment)
--- old/main.c
+++ new/main.c
-@@ -1059,6 +1059,18 @@ static int start_client(int argc, char *
+@@ -1075,6 +1075,18 @@ static int start_client(int argc, char *
if (!read_batch) { /* for read_batch, NO source is specified */
shell_path = check_for_hostspec(argv[0], &shell_machine, &rsync_port);
rprintf(f, "Panic Action: \"%s\"\n", get_panic_action());
--- old/rsync.h
+++ new/rsync.h
-@@ -158,6 +158,9 @@
+@@ -173,6 +173,9 @@
#define SIGNIFICANT_ITEM_FLAGS (~(\
ITEM_BASIS_TYPE_FOLLOWS | ITEM_XNAME_FOLLOWS | ITEM_LOCAL_CHANGE))