./configure (optional if already run)
make
-based-on: f8d2ecd223eedabdf3174762b64c77cb01cc403b
+based-on: 16b49716d55a50f2e985b879b720b2c53c892a3a
diff --git a/acls.c b/acls.c
--- a/acls.c
+++ b/acls.c
Fix a bug that could lose some bits when stripping some (supposedly)
superfluous ACL info.
-based-on: f8d2ecd223eedabdf3174762b64c77cb01cc403b
+based-on: 16b49716d55a50f2e985b879b720b2c53c892a3a
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: f8d2ecd223eedabdf3174762b64c77cb01cc403b
+based-on: 16b49716d55a50f2e985b879b720b2c53c892a3a
diff --git a/compat.c b/compat.c
--- a/compat.c
+++ b/compat.c
#if !defined HAVE_LCHMOD && !defined HAVE_SETATTRLIST
if (S_ISLNK(file->mode)) {
;
-@@ -917,6 +920,8 @@ static int try_dests_reg(struct file_struct *file, char *fname, int ndx,
+@@ -915,6 +918,8 @@ static int try_dests_reg(struct file_struct *file, char *fname, int ndx,
if (link_dest) {
if (!hard_link_one(file, fname, cmpbuf, 1))
goto try_a_copy;
diff --git a/log.c b/log.c
--- a/log.c
+++ b/log.c
-@@ -720,7 +720,8 @@ static void log_formatted(enum logcode code, const char *format, const char *op,
+@@ -709,7 +709,8 @@ static void log_formatted(enum logcode code, const char *format, const char *op,
c[5] = !(iflags & ITEM_REPORT_PERMS) ? '.' : 'p';
c[6] = !(iflags & ITEM_REPORT_OWNER) ? '.' : 'o';
c[7] = !(iflags & ITEM_REPORT_GROUP) ? '.' : 'g';
int update_only = 0;
int cvs_exclude = 0;
int dry_run = 0;
-@@ -709,6 +710,7 @@ void usage(enum logcode F)
+@@ -707,6 +708,7 @@ void usage(enum logcode F)
rprintf(F," --specials preserve special files\n");
rprintf(F," -D same as --devices --specials\n");
rprintf(F," -t, --times preserve modification times\n");
rprintf(F," -O, --omit-dir-times omit directories from --times\n");
rprintf(F," -J, --omit-link-times omit symlinks from --times\n");
rprintf(F," --super receiver attempts super-user activities\n");
-@@ -867,6 +869,9 @@ static struct poptOption long_options[] = {
+@@ -865,6 +867,9 @@ static struct poptOption long_options[] = {
{"times", 't', POPT_ARG_VAL, &preserve_times, 1, 0, 0 },
{"no-times", 0, POPT_ARG_VAL, &preserve_times, 0, 0, 0 },
{"no-t", 0, POPT_ARG_VAL, &preserve_times, 0, 0, 0 },
{"omit-dir-times", 'O', POPT_ARG_VAL, &omit_dir_times, 1, 0, 0 },
{"no-omit-dir-times",0, POPT_ARG_VAL, &omit_dir_times, 0, 0, 0 },
{"no-O", 0, POPT_ARG_VAL, &omit_dir_times, 0, 0, 0 },
-@@ -2439,6 +2444,8 @@ void server_options(char **args, int *argc_p)
+@@ -2437,6 +2442,8 @@ void server_options(char **args, int *argc_p)
argstr[x++] = 'D';
if (preserve_times)
argstr[x++] = 't';
./configure (optional if already run)
make
-based-on: f8d2ecd223eedabdf3174762b64c77cb01cc403b
+based-on: 16b49716d55a50f2e985b879b720b2c53c892a3a
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
-@@ -679,6 +679,7 @@ void usage(enum logcode F)
+@@ -677,6 +677,7 @@ void usage(enum logcode F)
rprintf(F," -R, --relative use relative path names\n");
rprintf(F," --no-implied-dirs don't send implied dirs with --relative\n");
rprintf(F," -b, --backup make backups (see --suffix & --backup-dir)\n");
rprintf(F," --backup-dir=DIR make backups into hierarchy based in DIR\n");
rprintf(F," --suffix=SUFFIX set backup suffix (default %s w/o --backup-dir)\n",BACKUP_SUFFIX);
rprintf(F," -u, --update skip files that are newer on the receiver\n");
-@@ -993,7 +994,8 @@ static struct poptOption long_options[] = {
+@@ -991,7 +992,8 @@ static struct poptOption long_options[] = {
{"no-i", 0, POPT_ARG_VAL, &itemize_changes, 0, 0, 0 },
{"bwlimit", 0, POPT_ARG_STRING, &bwlimit_arg, OPT_BWLIMIT, 0, 0 },
{"no-bwlimit", 0, POPT_ARG_VAL, &bwlimit, 0, 0, 0 },
{"no-backup", 0, POPT_ARG_VAL, &make_backups, 0, 0, 0 },
{"backup-dir", 0, POPT_ARG_STRING, &backup_dir, 0, 0, 0 },
{"suffix", 0, POPT_ARG_STRING, &backup_suffix, 0, 0, 0 },
-@@ -2600,6 +2602,10 @@ void server_options(char **args, int *argc_p)
+@@ -2598,6 +2600,10 @@ void server_options(char **args, int *argc_p)
}
if (am_sender) {
continue;
if (DEBUG_GTE(RECV, 1)) {
rprintf(FINFO, "renaming %s to %s\n",
-@@ -736,7 +736,7 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -735,7 +735,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. */
unmake_file(file);
}
-@@ -156,16 +163,21 @@ static BOOL copy_valid_path(const char *fname)
+@@ -156,7 +163,12 @@ 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)
{
if (backup_dir) {
+ int prefix_len = deleting ? backup_dir_dels_len : backup_dir_len;
+ unsigned int remainder = deleting ? backup_dir_dels_remainder : backup_dir_remainder;
+ static int initialized = 0;
+ if (!initialized) {
+ int ret;
+@@ -170,14 +182,14 @@ char *get_backup_name(const char *fname)
+ initialized = 1;
+ }
/* copy fname into backup_dir_buf while validating the dirs. */
- if (copy_valid_path(fname))
- return backup_dir_buf;
rprintf(FERROR, "backup filename too long\n");
return NULL;
-@@ -340,3 +352,13 @@ int make_backup(const char *fname, BOOL prefer_rename)
+@@ -352,3 +364,13 @@ int make_backup(const char *fname, BOOL prefer_rename)
rprintf(FINFO, "backed up %s to %s\n", fname, buf);
return ret;
}
char *sockopts = NULL;
char *usermap = NULL;
char *groupmap = NULL;
-@@ -682,6 +688,8 @@ void usage(enum logcode F)
+@@ -680,6 +686,8 @@ void usage(enum logcode F)
rprintf(F," --backup-deleted make backups only of deleted files\n");
rprintf(F," --backup-dir=DIR make backups into hierarchy based in DIR\n");
rprintf(F," --suffix=SUFFIX set backup suffix (default %s w/o --backup-dir)\n",BACKUP_SUFFIX);
rprintf(F," -u, --update skip files that are newer on the receiver\n");
rprintf(F," --inplace update destination files in-place (SEE MAN PAGE)\n");
rprintf(F," --append append data onto shorter files\n");
-@@ -998,7 +1006,9 @@ static struct poptOption long_options[] = {
+@@ -996,7 +1004,9 @@ static struct poptOption long_options[] = {
{"backup-deleted", 0, POPT_ARG_VAL, &make_backups, 1, 0, 0 },
{"no-backup", 0, POPT_ARG_VAL, &make_backups, 0, 0, 0 },
{"backup-dir", 0, POPT_ARG_STRING, &backup_dir, 0, 0, 0 },
{"list-only", 0, POPT_ARG_VAL, &list_only, 2, 0, 0 },
{"read-batch", 0, POPT_ARG_STRING, &batch_name, OPT_READ_BATCH, 0, 0 },
{"write-batch", 0, POPT_ARG_STRING, &batch_name, OPT_WRITE_BATCH, 0, 0 },
-@@ -2091,6 +2101,8 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2089,6 +2099,8 @@ int parse_arguments(int *argc_p, const char ***argv_p)
tmpdir = sanitize_path(NULL, tmpdir, NULL, 0, SP_DEFAULT);
if (backup_dir)
backup_dir = sanitize_path(NULL, backup_dir, NULL, 0, SP_DEFAULT);
}
if (daemon_filter_list.head && !am_sender) {
filter_rule_list *elp = &daemon_filter_list;
-@@ -2112,6 +2124,14 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2110,6 +2122,14 @@ int parse_arguments(int *argc_p, const char ***argv_p)
if (check_filter(elp, FLOG, dir, 1) < 0)
goto options_rejected;
}
}
if (!backup_suffix)
-@@ -2123,6 +2143,20 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2121,6 +2141,20 @@ int parse_arguments(int *argc_p, const char ***argv_p)
backup_suffix);
return 0;
}
if (backup_dir) {
size_t len;
while (*backup_dir == '.' && backup_dir[1] == '/')
-@@ -2158,6 +2192,34 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2156,6 +2190,34 @@ int parse_arguments(int *argc_p, const char ***argv_p)
"P *%s", backup_suffix);
parse_filter_str(&filter_list, backup_dir_buf, rule_template(0), 0);
}
if (preserve_times) {
preserve_times = PRESERVE_FILE_TIMES;
-@@ -2592,6 +2654,10 @@ void server_options(char **args, int *argc_p)
+@@ -2590,6 +2652,10 @@ void server_options(char **args, int *argc_p)
args[ac++] = "--backup-dir";
args[ac++] = backup_dir;
}
/* Only send --suffix if it specifies a non-default value. */
if (strcmp(backup_suffix, backup_dir ? "" : BACKUP_SUFFIX) != 0) {
-@@ -2600,7 +2666,14 @@ void server_options(char **args, int *argc_p)
+@@ -2598,7 +2664,14 @@ void server_options(char **args, int *argc_p)
goto oom;
args[ac++] = arg;
}
./configure (optional if already run)
make
-based-on: f8d2ecd223eedabdf3174762b64c77cb01cc403b
+based-on: 16b49716d55a50f2e985b879b720b2c53c892a3a
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
-@@ -181,8 +181,11 @@ static void wait_process_with_flush(pid_t pid, int *exit_code_ptr)
+@@ -182,8 +182,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)
-@@ -1445,6 +1448,14 @@ void remember_children(UNUSED(int val))
+@@ -1458,6 +1461,14 @@ void remember_children(UNUSED(int val))
break;
}
}
}
#endif
#ifndef HAVE_SIGACTION
-@@ -1502,6 +1513,12 @@ static void rsync_panic_handler(UNUSED(int whatsig))
+@@ -1515,6 +1526,12 @@ static void rsync_panic_handler(UNUSED(int whatsig))
}
#endif
int main(int argc,char *argv[])
{
-@@ -1524,6 +1541,11 @@ int main(int argc,char *argv[])
+@@ -1537,6 +1554,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: f8d2ecd223eedabdf3174762b64c77cb01cc403b
+based-on: 16b49716d55a50f2e985b879b720b2c53c892a3a
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;
-@@ -908,6 +910,9 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
+@@ -902,6 +904,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;
int max_delete = INT_MIN;
OFF_T max_size = -1;
OFF_T min_size = -1;
-@@ -673,6 +674,7 @@ void usage(enum logcode F)
+@@ -671,6 +672,7 @@ void usage(enum logcode F)
rprintf(F," -q, --quiet suppress non-error messages\n");
rprintf(F," --no-motd suppress daemon-mode MOTD (see manpage caveat)\n");
rprintf(F," -c, --checksum skip based on checksum, not mod-time & size\n");
rprintf(F," -a, --archive archive mode; equals -rlptgoD (no -H,-A,-X)\n");
rprintf(F," --no-OPTION turn off an implied OPTION (e.g. --no-D)\n");
rprintf(F," -r, --recursive recurse into directories\n");
-@@ -819,7 +821,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
+@@ -817,7 +819,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
OPT_FILTER, OPT_COMPARE_DEST, OPT_COPY_DEST, OPT_LINK_DEST, OPT_HELP,
OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW, OPT_MIN_SIZE, OPT_CHMOD,
OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_ONLY_WRITE_BATCH, OPT_MAX_SIZE,
OPT_USERMAP, OPT_GROUPMAP, OPT_CHOWN, OPT_BWLIMIT,
OPT_SERVER, OPT_REFUSED_BASE = 9000};
-@@ -959,6 +961,7 @@ static struct poptOption long_options[] = {
+@@ -957,6 +959,7 @@ static struct poptOption long_options[] = {
{"checksum", 'c', POPT_ARG_VAL, &always_checksum, 1, 0, 0 },
{"no-checksum", 0, POPT_ARG_VAL, &always_checksum, 0, 0, 0 },
{"no-c", 0, POPT_ARG_VAL, &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 },
{"copy-dest", 0, POPT_ARG_STRING, 0, OPT_COPY_DEST, 0, 0 },
-@@ -1675,6 +1678,23 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1673,6 +1676,23 @@ int parse_arguments(int *argc_p, const char ***argv_p)
}
break;
case OPT_INFO:
arg = poptGetOptArg(pc);
parse_output_words(info_words, info_levels, arg, USER_PRIORITY);
-@@ -1943,6 +1963,9 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1941,6 +1961,9 @@ int parse_arguments(int *argc_p, const char ***argv_p)
}
#endif
diff --git a/rsyncd.conf.yo b/rsyncd.conf.yo
--- a/rsyncd.conf.yo
+++ b/rsyncd.conf.yo
-@@ -335,6 +335,17 @@ locking on this file to ensure that the max connections limit is not
+@@ -334,6 +334,17 @@ locking on this file to ensure that the max connections limit is not
exceeded for the modules sharing the lock file.
The default is tt(/var/run/rsyncd.lock).
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
-@@ -1680,7 +1680,15 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1678,7 +1678,15 @@ int parse_arguments(int *argc_p, const char ***argv_p)
case OPT_SUMFILES:
arg = poptGetOptArg(pc);
|| (preserve_hard_links && F_IS_HLINKED(file)))
send_msg_int(MSG_SUCCESS, ndx);
handle_partial_dir(partialptr, PDIR_DELETE);
-@@ -898,7 +899,7 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -897,7 +898,7 @@ int recv_files(int f_in, int f_out, char *local_name)
case 2:
break;
case 1:
diff --git a/rsyncd.conf.yo b/rsyncd.conf.yo
--- a/rsyncd.conf.yo
+++ b/rsyncd.conf.yo
-@@ -338,13 +338,15 @@ The default is tt(/var/run/rsyncd.lock).
+@@ -337,13 +337,15 @@ The default is tt(/var/run/rsyncd.lock).
dit(bf(checksum files)) This parameter tells rsync to make use of any cached
checksum information it finds in per-directory .rsyncsums files when the
current transfer is using the bf(--checksum) option. The value can be set
./configure (optional if already run)
make
-based-on: f8d2ecd223eedabdf3174762b64c77cb01cc403b
+based-on: 16b49716d55a50f2e985b879b720b2c53c892a3a
diff --git a/flist.c b/flist.c
--- a/flist.c
+++ b/flist.c
./configure (optional if already run)
make
-based-on: f8d2ecd223eedabdf3174762b64c77cb01cc403b
+based-on: 16b49716d55a50f2e985b879b720b2c53c892a3a
diff --git a/loadparm.c b/loadparm.c
--- a/loadparm.c
+++ b/loadparm.c
int remove_source_files = 0;
int one_file_system = 0;
int protocol_version = PROTOCOL_VERSION;
-@@ -780,6 +782,8 @@ void usage(enum logcode F)
+@@ -778,6 +780,8 @@ void usage(enum logcode F)
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");
rprintf(F," --blocking-io use blocking I/O for the remote shell\n");
rprintf(F," --stats give some file-transfer stats\n");
rprintf(F," -8, --8-bit-output leave high-bit chars unescaped in output\n");
-@@ -1040,6 +1044,8 @@ static struct poptOption long_options[] = {
+@@ -1038,6 +1042,8 @@ static struct poptOption long_options[] = {
#endif
{"remote-option", 'M', POPT_ARG_STRING, 0, 'M', 0, 0 },
{"protocol", 0, POPT_ARG_INT, &protocol_version, 0, 0, 0 },
{"checksum-seed", 0, POPT_ARG_INT, &checksum_seed, 0, 0, 0 },
{"server", 0, POPT_ARG_NONE, 0, OPT_SERVER, 0, 0 },
{"sender", 0, POPT_ARG_NONE, 0, OPT_SENDER, 0, 0 },
-@@ -1067,6 +1073,8 @@ static void daemon_usage(enum logcode F)
+@@ -1065,6 +1071,8 @@ static void daemon_usage(enum logcode F)
rprintf(F," --log-file=FILE override the \"log file\" setting\n");
rprintf(F," --log-file-format=FMT override the \"log format\" setting\n");
rprintf(F," --sockopts=OPTIONS specify custom TCP options\n");
./configure (optional if already run)
make
-based-on: f8d2ecd223eedabdf3174762b64c77cb01cc403b
+based-on: 16b49716d55a50f2e985b879b720b2c53c892a3a
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
int preserve_links = 0;
int preserve_hard_links = 0;
int preserve_acls = 0;
-@@ -706,6 +707,7 @@ void usage(enum logcode F)
+@@ -704,6 +705,7 @@ void usage(enum logcode F)
rprintf(F," -o, --owner preserve owner (super-user only)\n");
rprintf(F," -g, --group preserve group\n");
rprintf(F," --devices preserve device files (super-user only)\n");
rprintf(F," --specials preserve special files\n");
rprintf(F," -D same as --devices --specials\n");
rprintf(F," -t, --times preserve modification times\n");
-@@ -887,6 +889,7 @@ static struct poptOption long_options[] = {
+@@ -885,6 +887,7 @@ static struct poptOption long_options[] = {
{"no-D", 0, POPT_ARG_NONE, 0, OPT_NO_D, 0, 0 },
{"devices", 0, POPT_ARG_VAL, &preserve_devices, 1, 0, 0 },
{"no-devices", 0, POPT_ARG_VAL, &preserve_devices, 0, 0, 0 },
{"specials", 0, POPT_ARG_VAL, &preserve_specials, 1, 0, 0 },
{"no-specials", 0, POPT_ARG_VAL, &preserve_specials, 0, 0, 0 },
{"links", 'l', POPT_ARG_VAL, &preserve_links, 1, 0, 0 },
-@@ -2764,6 +2767,9 @@ void server_options(char **args, int *argc_p)
+@@ -2762,6 +2765,9 @@ void server_options(char **args, int *argc_p)
else if (remove_source_files)
args[ac++] = "--remove-sent-files";
diff --git a/sender.c b/sender.c
--- a/sender.c
+++ b/sender.c
-@@ -366,6 +366,20 @@ void send_files(int f_in, int f_out)
+@@ -365,6 +365,20 @@ void send_files(int f_in, int f_out)
exit_cleanup(RERR_FILEIO);
}
diff --git a/log.c b/log.c
--- a/log.c
+++ b/log.c
-@@ -723,7 +723,8 @@ static void log_formatted(enum logcode code, const char *format, const char *op,
+@@ -712,7 +712,8 @@ static void log_formatted(enum logcode code, const char *format, const char *op,
c[8] = !(iflags & ITEM_REPORT_FFLAGS) ? '.' : 'f';
c[9] = !(iflags & ITEM_REPORT_ACL) ? '.' : 'a';
c[10] = !(iflags & ITEM_REPORT_XATTR) ? '.' : 'x';
int update_only = 0;
int cvs_exclude = 0;
int dry_run = 0;
-@@ -718,6 +719,7 @@ void usage(enum logcode F)
+@@ -716,6 +717,7 @@ void usage(enum logcode F)
rprintf(F," --specials preserve special files\n");
rprintf(F," -D same as --devices --specials\n");
rprintf(F," -t, --times preserve modification times\n");
rprintf(F," -O, --omit-dir-times omit directories from --times\n");
rprintf(F," -J, --omit-link-times omit symlinks from --times\n");
rprintf(F," --super receiver attempts super-user activities\n");
-@@ -885,6 +887,9 @@ static struct poptOption long_options[] = {
+@@ -883,6 +885,9 @@ static struct poptOption long_options[] = {
{"times", 't', POPT_ARG_VAL, &preserve_times, 1, 0, 0 },
{"no-times", 0, POPT_ARG_VAL, &preserve_times, 0, 0, 0 },
{"no-t", 0, POPT_ARG_VAL, &preserve_times, 0, 0, 0 },
{"omit-dir-times", 'O', POPT_ARG_VAL, &omit_dir_times, 1, 0, 0 },
{"no-omit-dir-times",0, POPT_ARG_VAL, &omit_dir_times, 0, 0, 0 },
{"no-O", 0, POPT_ARG_VAL, &omit_dir_times, 0, 0, 0 },
-@@ -2465,6 +2470,8 @@ void server_options(char **args, int *argc_p)
+@@ -2463,6 +2468,8 @@ void server_options(char **args, int *argc_p)
argstr[x++] = 'D';
if (preserve_times)
argstr[x++] = 't';
./configure (optional if already run)
make
-based-on: f8d2ecd223eedabdf3174762b64c77cb01cc403b
+based-on: 16b49716d55a50f2e985b879b720b2c53c892a3a
diff --git a/exclude.c b/exclude.c
--- a/exclude.c
+++ b/exclude.c
./configure (optional if already run)
make
-based-on: f8d2ecd223eedabdf3174762b64c77cb01cc403b
+based-on: 16b49716d55a50f2e985b879b720b2c53c892a3a
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
int daemon_bwlimit = 0;
int bwlimit = 0;
int fuzzy_basis = 0;
-@@ -757,6 +758,7 @@ void usage(enum logcode F)
+@@ -755,6 +756,7 @@ void usage(enum logcode F)
rprintf(F," -I, --ignore-times don't skip files that match in size and mod-time\n");
rprintf(F," -M, --remote-option=OPTION send OPTION to the remote side only\n");
rprintf(F," --size-only skip files that match in size\n");
rprintf(F," --modify-window=NUM compare mod-times with reduced accuracy\n");
rprintf(F," -T, --temp-dir=DIR create temporary files in directory DIR\n");
rprintf(F," -y, --fuzzy find similar file for basis if no dest file\n");
-@@ -912,6 +914,7 @@ static struct poptOption long_options[] = {
+@@ -910,6 +912,7 @@ static struct poptOption long_options[] = {
{"chmod", 0, POPT_ARG_STRING, 0, OPT_CHMOD, 0, 0 },
{"ignore-times", 'I', POPT_ARG_NONE, &ignore_times, 0, 0, 0 },
{"size-only", 0, POPT_ARG_NONE, &size_only, 0, 0, 0 },
{"one-file-system", 'x', POPT_ARG_NONE, 0, 'x', 0, 0 },
{"no-one-file-system",0, POPT_ARG_VAL, &one_file_system, 0, 0, 0 },
{"no-x", 0, POPT_ARG_VAL, &one_file_system, 0, 0, 0 },
-@@ -2651,6 +2654,9 @@ void server_options(char **args, int *argc_p)
+@@ -2649,6 +2652,9 @@ void server_options(char **args, int *argc_p)
else if (missing_args == 1 && !am_sender)
args[ac++] = "--ignore-missing-args";
./configure
make
-based-on: f8d2ecd223eedabdf3174762b64c77cb01cc403b
+based-on: 16b49716d55a50f2e985b879b720b2c53c892a3a
diff --git a/.gitignore b/.gitignore
--- a/.gitignore
+++ b/.gitignore
extern char *bind_address;
extern char *config_file;
extern char *logfile_format;
-@@ -692,6 +695,11 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
+@@ -685,6 +688,11 @@ 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;
-@@ -896,6 +904,8 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
+@@ -890,6 +898,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;
extern int file_total;
extern int recurse;
extern int xfer_dirs;
-@@ -84,6 +86,7 @@ extern char *filesfrom_host;
+@@ -85,6 +87,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;
-@@ -1079,6 +1082,9 @@ void start_server(int f_in, int f_out, int argc, char *argv[])
+@@ -1092,6 +1095,9 @@ void start_server(int f_in, int f_out, int argc, char *argv[])
if (am_daemon && io_timeout && protocol_version >= 31)
send_msg_int(MSG_IO_TIMEOUT, io_timeout);
if (am_sender) {
keep_dirlinks = 0; /* Must be disabled on the sender. */
if (need_messages_from_generator)
-@@ -1360,6 +1366,9 @@ static int start_client(int argc, char *argv[])
+@@ -1373,6 +1379,9 @@ static int start_client(int argc, char *argv[])
}
}
DEBUG_WORD(DEL, W_REC, "Debug delete actions (levels 1-3)"),
DEBUG_WORD(DELTASUM, W_SND|W_REC, "Debug delta-transfer checksumming (levels 1-4)"),
DEBUG_WORD(DUP, W_REC, "Debug weeding of duplicate names"),
-@@ -574,6 +580,7 @@ static void print_rsync_version(enum logcode f)
+@@ -572,6 +578,7 @@ static void print_rsync_version(enum logcode f)
char const *links = "no ";
char const *iconv = "no ";
char const *ipv6 = "no ";
STRUCT_STAT *dumstat;
#if SUBPROTOCOL_VERSION != 0
-@@ -610,6 +617,11 @@ static void print_rsync_version(enum logcode f)
+@@ -608,6 +615,11 @@ static void print_rsync_version(enum logcode f)
#ifdef CAN_SET_SYMLINK_TIMES
symtimes = "";
#endif
rprintf(f, "%s version %s protocol version %d%s\n",
RSYNC_NAME, RSYNC_VERSION, PROTOCOL_VERSION, subprotocol);
-@@ -623,8 +635,8 @@ static void print_rsync_version(enum logcode f)
+@@ -621,8 +633,8 @@ static void print_rsync_version(enum logcode f)
(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());
-@@ -673,6 +685,9 @@ void usage(enum logcode F)
+@@ -671,6 +683,9 @@ void usage(enum logcode F)
rprintf(F," -q, --quiet suppress non-error messages\n");
rprintf(F," --no-motd suppress daemon-mode MOTD (see manpage caveat)\n");
rprintf(F," -c, --checksum skip based on checksum, not mod-time & size\n");
rprintf(F," -a, --archive archive mode; equals -rlptgoD (no -H,-A,-X)\n");
rprintf(F," --no-OPTION turn off an implied OPTION (e.g. --no-D)\n");
rprintf(F," -r, --recursive recurse into directories\n");
-@@ -820,6 +835,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
+@@ -818,6 +833,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW, OPT_MIN_SIZE, OPT_CHMOD,
OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_ONLY_WRITE_BATCH, OPT_MAX_SIZE,
OPT_NO_D, OPT_APPEND, OPT_NO_ICONV, OPT_INFO, OPT_DEBUG,
OPT_USERMAP, OPT_GROUPMAP, OPT_CHOWN, OPT_BWLIMIT,
OPT_SERVER, OPT_REFUSED_BASE = 9000};
-@@ -959,6 +975,10 @@ static struct poptOption long_options[] = {
+@@ -957,6 +973,10 @@ static struct poptOption long_options[] = {
{"checksum", 'c', POPT_ARG_VAL, &always_checksum, 1, 0, 0 },
{"no-checksum", 0, POPT_ARG_VAL, &always_checksum, 0, 0, 0 },
{"no-c", 0, POPT_ARG_VAL, &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 },
{"copy-dest", 0, POPT_ARG_STRING, 0, OPT_COPY_DEST, 0, 0 },
-@@ -1049,6 +1069,9 @@ static struct poptOption long_options[] = {
+@@ -1047,6 +1067,9 @@ static struct poptOption long_options[] = {
{"dparam", 0, POPT_ARG_STRING, 0, OPT_DAEMON, 0, 0 },
{"detach", 0, POPT_ARG_NONE, 0, OPT_DAEMON, 0, 0 },
{"no-detach", 0, POPT_ARG_NONE, 0, OPT_DAEMON, 0, 0 },
{0,0,0,0, 0, 0, 0}
};
-@@ -1102,6 +1125,50 @@ static struct poptOption long_daemon_options[] = {
+@@ -1100,6 +1123,50 @@ static struct poptOption long_daemon_options[] = {
{0,0,0,0, 0, 0, 0}
};
static char err_buf[200];
-@@ -1280,6 +1347,100 @@ static void create_refuse_error(int which)
+@@ -1278,6 +1345,100 @@ static void create_refuse_error(int which)
}
}
/**
* Process command line arguments. Called on both local and remote.
-@@ -1297,10 +1458,18 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1295,10 +1456,18 @@ int parse_arguments(int *argc_p, const char ***argv_p)
int argc = *argc_p;
int opt;
#ifdef ICONV_OPTION
if (!*lp_charset(module_id))
set_refuse_options("iconv");
-@@ -1423,6 +1592,12 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1421,6 +1590,12 @@ int parse_arguments(int *argc_p, const char ***argv_p)
am_daemon = 1;
return 1;
case OPT_MODIFY_WINDOW:
/* The value has already been set by popt, but
* we need to remember that we're using a
-@@ -1497,6 +1672,10 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1495,6 +1670,10 @@ int parse_arguments(int *argc_p, const char ***argv_p)
preserve_devices = preserve_specials = 0;
break;
while (1) {
cleanup_disable();
-@@ -870,6 +880,8 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -869,6 +879,8 @@ int recv_files(int f_in, int f_out, char *local_name)
do_unlink(partialptr);
handle_partial_dir(partialptr, PDIR_DELETE);
}
} else if (keep_partial && partialptr) {
if (!handle_partial_dir(partialptr, PDIR_CREATE)) {
rprintf(FERROR,
-@@ -883,6 +895,8 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -882,6 +894,8 @@ int recv_files(int f_in, int f_out, char *local_name)
recv_ok = -1;
else if (delay_updates && recv_ok) {
bitbag_set_bit(delayed_bits, ndx);
diff --git a/rsyncd.conf.yo b/rsyncd.conf.yo
--- a/rsyncd.conf.yo
+++ b/rsyncd.conf.yo
-@@ -317,6 +317,22 @@ is daemon. This setting has no effect if the "log file" setting is a
+@@ -316,6 +316,22 @@ is daemon. This setting has no effect if the "log file" setting is a
non-empty string (either set in the per-modules settings, or inherited
from the global settings).
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
-@@ -762,6 +762,8 @@ void usage(enum logcode F)
+@@ -760,6 +760,8 @@ void usage(enum logcode F)
rprintf(F," -T, --temp-dir=DIR create temporary files in directory DIR\n");
rprintf(F," -y, --fuzzy find similar file for basis if no dest file\n");
rprintf(F," --detect-renamed try to find renamed files to speed up the transfer\n");
rprintf(F," --compare-dest=DIR also compare destination files relative to DIR\n");
rprintf(F," --copy-dest=DIR ... and include copies of unchanged files\n");
rprintf(F," --link-dest=DIR hardlink to files in DIR when unchanged\n");
-@@ -965,7 +967,9 @@ static struct poptOption long_options[] = {
+@@ -963,7 +965,9 @@ static struct poptOption long_options[] = {
{"compare-dest", 0, POPT_ARG_STRING, 0, OPT_COMPARE_DEST, 0, 0 },
{"copy-dest", 0, POPT_ARG_STRING, 0, OPT_COPY_DEST, 0, 0 },
{"link-dest", 0, POPT_ARG_STRING, 0, OPT_LINK_DEST, 0, 0 },
{"fuzzy", 'y', POPT_ARG_NONE, 0, 'y', 0, 0 },
{"no-fuzzy", 0, POPT_ARG_VAL, &fuzzy_basis, 0, 0, 0 },
{"no-y", 0, POPT_ARG_VAL, &fuzzy_basis, 0, 0, 0 },
-@@ -2638,8 +2642,14 @@ void server_options(char **args, int *argc_p)
+@@ -2636,8 +2640,14 @@ void server_options(char **args, int *argc_p)
args[ac++] = "--super";
if (size_only)
args[ac++] = "--size-only";
a file that can't use it, while missing out on giving it to a file
that could use it.
-based-on: f8d2ecd223eedabdf3174762b64c77cb01cc403b
+based-on: 16b49716d55a50f2e985b879b720b2c53c892a3a
+diff --git a/backup.c b/backup.c
+--- a/backup.c
++++ b/backup.c
+@@ -162,7 +162,7 @@ char *get_backup_name(const char *fname)
+ int ret;
+ if (backup_dir_len > 1)
+ backup_dir_buf[backup_dir_len-1] = '\0';
+- ret = make_path(backup_dir_buf, 0);
++ ret = make_path(backup_dir_buf, ACCESSPERMS, 0);
+ if (backup_dir_len > 1)
+ backup_dir_buf[backup_dir_len-1] = '/';
+ if (ret < 0)
diff --git a/compat.c b/compat.c
--- a/compat.c
+++ b/compat.c
phase++;
if (DEBUG_GTE(GENR, 1))
rprintf(FINFO, "generate_files phase=%d\n", phase);
-diff --git a/main.c b/main.c
---- a/main.c
-+++ b/main.c
-@@ -850,7 +850,7 @@ static int do_recv(int f_in, int f_out, char *local_name)
- }
-
- if (backup_dir) {
-- int ret = make_path(backup_dir_buf, MKP_DROP_NAME); /* drops trailing slash */
-+ int ret = make_path(backup_dir_buf, ACCESSPERMS, MKP_DROP_NAME); /* drops trailing slash */
- if (ret < 0)
- exit_cleanup(RERR_SYNTAX);
- if (ret)
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
int implied_dirs = 1;
int missing_args = 0; /* 0 = FERROR_XFER, 1 = ignore, 2 = delete */
int numeric_ids = 0;
-@@ -760,6 +761,7 @@ void usage(enum logcode F)
+@@ -758,6 +759,7 @@ void usage(enum logcode F)
rprintf(F," --modify-window=NUM compare mod-times with reduced accuracy\n");
rprintf(F," -T, --temp-dir=DIR create temporary files in directory DIR\n");
rprintf(F," -y, --fuzzy find similar file for basis if no dest file\n");
rprintf(F," --compare-dest=DIR also compare destination files relative to DIR\n");
rprintf(F," --copy-dest=DIR ... and include copies of unchanged files\n");
rprintf(F," --link-dest=DIR hardlink to files in DIR when unchanged\n");
-@@ -963,6 +965,7 @@ static struct poptOption long_options[] = {
+@@ -961,6 +963,7 @@ static struct poptOption long_options[] = {
{"compare-dest", 0, POPT_ARG_STRING, 0, OPT_COMPARE_DEST, 0, 0 },
{"copy-dest", 0, POPT_ARG_STRING, 0, OPT_COPY_DEST, 0, 0 },
{"link-dest", 0, POPT_ARG_STRING, 0, OPT_LINK_DEST, 0, 0 },
{"fuzzy", 'y', POPT_ARG_NONE, 0, 'y', 0, 0 },
{"no-fuzzy", 0, POPT_ARG_VAL, &fuzzy_basis, 0, 0, 0 },
{"no-y", 0, POPT_ARG_VAL, &fuzzy_basis, 0, 0, 0 },
-@@ -2248,7 +2251,7 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2246,7 +2249,7 @@ int parse_arguments(int *argc_p, const char ***argv_p)
inplace = 1;
}
partial_dir = tmp_partialdir;
if (inplace) {
-@@ -2257,6 +2260,7 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2255,6 +2258,7 @@ int parse_arguments(int *argc_p, const char ***argv_p)
snprintf(err_buf, sizeof err_buf,
"--%s cannot be used with --%s\n",
append_mode ? "append" : "inplace",
delay_updates ? "delay-updates" : "partial-dir");
return 0;
}
-@@ -2634,6 +2638,8 @@ void server_options(char **args, int *argc_p)
+@@ -2632,6 +2636,8 @@ void server_options(char **args, int *argc_p)
args[ac++] = "--super";
if (size_only)
args[ac++] = "--size-only";
ret++;
break;
}
-@@ -243,7 +243,7 @@ int make_path(char *fname, int flags)
+@@ -245,7 +245,7 @@ int make_path(char *fname, int flags)
p += strlen(p);
if (ret < 0) /* Skip mkdir on error, but keep restoring the path. */
continue;
ret = -ret - 1;
else
ret++;
-@@ -1131,6 +1131,32 @@ char *normalize_path(char *path, BOOL force_newbuf, unsigned int *len_ptr)
+@@ -1133,6 +1133,32 @@ char *normalize_path(char *path, BOOL force_newbuf, unsigned int *len_ptr)
return path;
}
/**
* Return a quoted string with the full pathname of the indicated filename.
* The string " (in MODNAME)" may also be appended. The returned pointer
-@@ -1224,7 +1250,7 @@ int handle_partial_dir(const char *fname, int create)
+@@ -1226,7 +1252,7 @@ int handle_partial_dir(const char *fname, int create)
}
statret = -1;
}
./configure (optional if already run)
make
-based-on: f8d2ecd223eedabdf3174762b64c77cb01cc403b
+based-on: 16b49716d55a50f2e985b879b720b2c53c892a3a
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
extern int module_id;
extern int local_server;
extern int sanitize_paths;
-@@ -747,6 +748,7 @@ void usage(enum logcode F)
+@@ -745,6 +746,7 @@ void usage(enum logcode F)
rprintf(F," --partial keep partially transferred files\n");
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," --usermap=STRING custom username mapping\n");
-@@ -981,6 +983,8 @@ static struct poptOption long_options[] = {
+@@ -979,6 +981,8 @@ static struct poptOption long_options[] = {
{"partial-dir", 0, POPT_ARG_STRING, &partial_dir, 0, 0, 0 },
{"delay-updates", 0, POPT_ARG_VAL, &delay_updates, 1, 0, 0 },
{"no-delay-updates", 0, POPT_ARG_VAL, &delay_updates, 0, 0, 0 },
./configure (optional if already run)
make
-based-on: f8d2ecd223eedabdf3174762b64c77cb01cc403b
+based-on: 16b49716d55a50f2e985b879b720b2c53c892a3a
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
int cvs_exclude = 0;
int dry_run = 0;
int do_xfers = 1;
-@@ -682,6 +683,7 @@ void usage(enum logcode F)
+@@ -680,6 +681,7 @@ void usage(enum logcode F)
rprintf(F," --backup-dir=DIR make backups into hierarchy based in DIR\n");
rprintf(F," --suffix=SUFFIX set backup suffix (default %s w/o --backup-dir)\n",BACKUP_SUFFIX);
rprintf(F," -u, --update skip files that are newer on the receiver\n");
rprintf(F," --inplace update destination files in-place (SEE MAN PAGE)\n");
rprintf(F," --append append data onto shorter files\n");
rprintf(F," --append-verify like --append, but with old data in file checksum\n");
-@@ -916,6 +918,7 @@ static struct poptOption long_options[] = {
+@@ -914,6 +916,7 @@ static struct poptOption long_options[] = {
{"no-one-file-system",0, POPT_ARG_VAL, &one_file_system, 0, 0, 0 },
{"no-x", 0, POPT_ARG_VAL, &one_file_system, 0, 0, 0 },
{"update", 'u', POPT_ARG_NONE, &update_only, 0, 0, 0 },
./configure
make
-based-on: f8d2ecd223eedabdf3174762b64c77cb01cc403b
+based-on: 16b49716d55a50f2e985b879b720b2c53c892a3a
diff --git a/Makefile.in b/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
diff --git a/log.c b/log.c
--- a/log.c
+++ b/log.c
-@@ -720,7 +720,7 @@ static void log_formatted(enum logcode code, const char *format, const char *op,
+@@ -709,7 +709,7 @@ static void log_formatted(enum logcode code, const char *format, const char *op,
c[5] = !(iflags & ITEM_REPORT_PERMS) ? '.' : 'p';
c[6] = !(iflags & ITEM_REPORT_OWNER) ? '.' : 'o';
c[7] = !(iflags & ITEM_REPORT_GROUP) ? '.' : 'g';
extern int file_total;
extern int recurse;
extern int xfer_dirs;
-@@ -839,6 +843,22 @@ static int do_recv(int f_in, int f_out, char *local_name)
+@@ -840,6 +844,22 @@ static int do_recv(int f_in, int f_out, char *local_name)
* points to an identical file won't be replaced by the referent. */
copy_links = copy_dirlinks = copy_unsafe_links = 0;
int io_timeout = 0;
int prune_empty_dirs = 0;
int use_qsort = 0;
-@@ -574,6 +576,7 @@ static void print_rsync_version(enum logcode f)
+@@ -572,6 +574,7 @@ static void print_rsync_version(enum logcode f)
char const *links = "no ";
char const *iconv = "no ";
char const *ipv6 = "no ";
STRUCT_STAT *dumstat;
#if SUBPROTOCOL_VERSION != 0
-@@ -610,6 +613,9 @@ static void print_rsync_version(enum logcode f)
+@@ -608,6 +611,9 @@ static void print_rsync_version(enum logcode f)
#ifdef CAN_SET_SYMLINK_TIMES
symtimes = "";
#endif
rprintf(f, "%s version %s protocol version %d%s\n",
RSYNC_NAME, RSYNC_VERSION, PROTOCOL_VERSION, subprotocol);
-@@ -623,8 +629,8 @@ static void print_rsync_version(enum logcode f)
+@@ -621,8 +627,8 @@ static void print_rsync_version(enum logcode f)
(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());
-@@ -695,6 +701,9 @@ void usage(enum logcode F)
+@@ -693,6 +699,9 @@ void usage(enum logcode F)
rprintf(F," -K, --keep-dirlinks treat symlinked dir on receiver as dir\n");
rprintf(F," -H, --hard-links preserve hard links\n");
rprintf(F," -p, --perms preserve permissions\n");
rprintf(F," -E, --executability preserve the file's executability\n");
rprintf(F," --chmod=CHMOD affect file and/or directory permissions\n");
#ifdef SUPPORT_ACLS
-@@ -740,7 +749,12 @@ void usage(enum logcode F)
+@@ -738,7 +747,12 @@ void usage(enum logcode F)
rprintf(F," --ignore-missing-args ignore missing source args without error\n");
rprintf(F," --delete-missing-args delete missing source args from destination\n");
rprintf(F," --ignore-errors delete even if there are I/O errors\n");
rprintf(F," --max-delete=NUM don't delete more than NUM files\n");
rprintf(F," --max-size=SIZE don't transfer any file larger than SIZE\n");
rprintf(F," --min-size=SIZE don't transfer any file smaller than SIZE\n");
-@@ -857,6 +871,10 @@ static struct poptOption long_options[] = {
+@@ -855,6 +869,10 @@ static struct poptOption long_options[] = {
{"perms", 'p', POPT_ARG_VAL, &preserve_perms, 1, 0, 0 },
{"no-perms", 0, POPT_ARG_VAL, &preserve_perms, 0, 0, 0 },
{"no-p", 0, POPT_ARG_VAL, &preserve_perms, 0, 0, 0 },
{"executability", 'E', POPT_ARG_NONE, &preserve_executability, 0, 0, 0 },
{"acls", 'A', POPT_ARG_NONE, 0, 'A', 0, 0 },
{"no-acls", 0, POPT_ARG_VAL, &preserve_acls, 0, 0, 0 },
-@@ -943,6 +961,14 @@ static struct poptOption long_options[] = {
+@@ -941,6 +959,14 @@ static struct poptOption long_options[] = {
{"remove-source-files",0,POPT_ARG_VAL, &remove_source_files, 1, 0, 0 },
{"force", 0, POPT_ARG_VAL, &force_delete, 1, 0, 0 },
{"no-force", 0, POPT_ARG_VAL, &force_delete, 0, 0, 0 },
{"ignore-errors", 0, POPT_ARG_VAL, &ignore_errors, 1, 0, 0 },
{"no-ignore-errors", 0, POPT_ARG_VAL, &ignore_errors, 0, 0, 0 },
{"max-delete", 0, POPT_ARG_INT, &max_delete, 0, 0, 0 },
-@@ -2541,6 +2567,9 @@ void server_options(char **args, int *argc_p)
+@@ -2539,6 +2565,9 @@ void server_options(char **args, int *argc_p)
if (xfer_dirs && !recurse && delete_mode && am_sender)
args[ac++] = "--no-r";
if (do_compression && def_compress_level != Z_DEFAULT_COMPRESSION) {
if (asprintf(&arg, "--compress-level=%d", def_compress_level) < 0)
goto oom;
-@@ -2628,6 +2657,16 @@ void server_options(char **args, int *argc_p)
+@@ -2626,6 +2655,16 @@ void server_options(char **args, int *argc_p)
args[ac++] = "--delete-excluded";
if (force_delete)
args[ac++] = "--force";
./configure (optional if already run)
make
-based-on: f8d2ecd223eedabdf3174762b64c77cb01cc403b
+based-on: 16b49716d55a50f2e985b879b720b2c53c892a3a
diff --git a/exclude.c b/exclude.c
--- a/exclude.c
+++ b/exclude.c
diff --git a/util.c b/util.c
--- a/util.c
+++ b/util.c
-@@ -850,6 +850,25 @@ size_t stringjoin(char *dest, size_t destsize, ...)
+@@ -852,6 +852,25 @@ size_t stringjoin(char *dest, size_t destsize, ...)
return ret;
}
./configure (optional if already run)
make
-based-on: f8d2ecd223eedabdf3174762b64c77cb01cc403b
+based-on: 16b49716d55a50f2e985b879b720b2c53c892a3a
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
int preserve_links = 0;
int preserve_hard_links = 0;
int preserve_acls = 0;
-@@ -748,6 +749,7 @@ void usage(enum logcode F)
+@@ -746,6 +747,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," --usermap=STRING custom username mapping\n");
rprintf(F," --groupmap=STRING custom groupname mapping\n");
-@@ -1016,6 +1018,7 @@ static struct poptOption long_options[] = {
+@@ -1014,6 +1016,7 @@ static struct poptOption long_options[] = {
{"no-timeout", 0, POPT_ARG_VAL, &io_timeout, 0, 0, 0 },
{"contimeout", 0, POPT_ARG_INT, &connect_timeout, 0, 0, 0 },
{"no-contimeout", 0, POPT_ARG_VAL, &connect_timeout, 0, 0, 0 },
{"rsh", 'e', POPT_ARG_STRING, &shell_cmd, 0, 0, 0 },
{"rsync-path", 0, POPT_ARG_STRING, &rsync_path, 0, 0, 0 },
{"temp-dir", 'T', POPT_ARG_STRING, &tmpdir, 0, 0, 0 },
-@@ -2713,6 +2716,9 @@ void server_options(char **args, int *argc_p)
+@@ -2711,6 +2714,9 @@ void server_options(char **args, int *argc_p)
args[ac++] = tmpdir;
}
extern int protect_args;
extern int modify_window;
extern int relative_paths;
-@@ -411,6 +412,13 @@ int copy_file(const char *source, const char *dest, int ofd, mode_t mode)
+@@ -413,6 +414,13 @@ int copy_file(const char *source, const char *dest, int ofd, mode_t mode)
}
#endif
extern int protocol_version;
extern int force_change;
extern int file_total;
-@@ -107,6 +112,7 @@ int daemon_over_rsh = 0;
+@@ -108,6 +113,7 @@ int daemon_over_rsh = 0;
mode_t orig_umask = 0;
int batch_gen_fd = -1;
int sender_keeps_checksum = 0;
/* There's probably never more than at most 2 outstanding child processes,
* but set it higher, just in case. */
-@@ -559,6 +565,43 @@ static pid_t do_cmd(char *cmd, char *machine, char *user, char **remote_argv, in
+@@ -560,6 +566,43 @@ static pid_t do_cmd(char *cmd, char *machine, char *user, char **remote_argv, in
return 0; /* not reached */
}
/* The receiving side operates in one of two modes:
*
* 1. it receives any number of files into a destination directory,
-@@ -617,6 +660,9 @@ static char *get_local_name(struct file_list *flist, char *dest_path)
+@@ -618,6 +661,9 @@ static char *get_local_name(struct file_list *flist, char *dest_path)
exit_cleanup(RERR_FILESELECT);
}
filesystem_dev = st.st_dev; /* ensures --force works right w/-x */
return NULL;
}
if (file_total > 1) {
-@@ -677,7 +723,9 @@ static char *get_local_name(struct file_list *flist, char *dest_path)
+@@ -678,7 +724,9 @@ static char *get_local_name(struct file_list *flist, char *dest_path)
full_fname(dest_path));
exit_cleanup(RERR_FILESELECT);
}
return NULL;
}
-@@ -697,6 +745,9 @@ static char *get_local_name(struct file_list *flist, char *dest_path)
+@@ -698,6 +746,9 @@ static char *get_local_name(struct file_list *flist, char *dest_path)
full_fname(dest_path));
exit_cleanup(RERR_FILESELECT);
}
int preserve_perms = 0;
int preserve_fileflags = 0;
int preserve_executability = 0;
-@@ -713,6 +714,10 @@ void usage(enum logcode F)
+@@ -711,6 +712,10 @@ void usage(enum logcode F)
#ifdef SUPPORT_XATTRS
rprintf(F," -X, --xattrs preserve extended attributes\n");
#endif
rprintf(F," -o, --owner preserve owner (super-user only)\n");
rprintf(F," -g, --group preserve group\n");
rprintf(F," --devices preserve device files (super-user only)\n");
-@@ -974,6 +979,12 @@ static struct poptOption long_options[] = {
+@@ -972,6 +977,12 @@ static struct poptOption long_options[] = {
{"force-uchange", 0, POPT_ARG_VAL, &force_change, USR_IMMUTABLE, 0, 0 },
{"force-schange", 0, POPT_ARG_VAL, &force_change, SYS_IMMUTABLE, 0, 0 },
#endif
{"ignore-errors", 0, POPT_ARG_VAL, &ignore_errors, 1, 0, 0 },
{"no-ignore-errors", 0, POPT_ARG_VAL, &ignore_errors, 0, 0, 0 },
{"max-delete", 0, POPT_ARG_INT, &max_delete, 0, 0, 0 },
-@@ -1974,6 +1985,15 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1972,6 +1983,15 @@ int parse_arguments(int *argc_p, const char ***argv_p)
}
#endif
if (block_size > MAX_BLOCK_SIZE) {
snprintf(err_buf, sizeof err_buf,
"--block-size=%lu is too large (max: %u)\n", block_size, MAX_BLOCK_SIZE);
-@@ -2577,6 +2597,11 @@ void server_options(char **args, int *argc_p)
+@@ -2575,6 +2595,11 @@ void server_options(char **args, int *argc_p)
if (preserve_fileflags)
args[ac++] = "--fileflags";
- Make this code handle multibyte character encodings, and honor the
--iconv setting when converting case.
-based-on: f8d2ecd223eedabdf3174762b64c77cb01cc403b
+based-on: 16b49716d55a50f2e985b879b720b2c53c892a3a
diff --git a/exclude.c b/exclude.c
--- a/exclude.c
+++ b/exclude.c
int blocking_io = -1;
int checksum_seed = 0;
int inplace = 0;
-@@ -777,6 +778,7 @@ void usage(enum logcode F)
+@@ -775,6 +776,7 @@ void usage(enum logcode F)
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," -s, --protect-args no space-splitting; only wildcard special-chars\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");
-@@ -1001,6 +1003,8 @@ static struct poptOption long_options[] = {
+@@ -999,6 +1001,8 @@ static struct poptOption long_options[] = {
{"read-batch", 0, POPT_ARG_STRING, &batch_name, OPT_READ_BATCH, 0, 0 },
{"write-batch", 0, POPT_ARG_STRING, &batch_name, OPT_WRITE_BATCH, 0, 0 },
{"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_VAL, &eol_nulls, 1, 0, 0},
{"no-from0", 0, POPT_ARG_VAL, &eol_nulls, 0, 0, 0},
-@@ -2663,6 +2667,9 @@ void server_options(char **args, int *argc_p)
+@@ -2661,6 +2665,9 @@ void server_options(char **args, int *argc_p)
args[ac++] = arg;
}
./configure
make
-based-on: f8d2ecd223eedabdf3174762b64c77cb01cc403b
+based-on: 16b49716d55a50f2e985b879b720b2c53c892a3a
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
-@@ -131,7 +131,7 @@ int start_socket_client(char *host, int remote_argc, char *remote_argv[],
+@@ -128,7 +128,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);
}
-@@ -210,7 +210,7 @@ static int exchange_protocols(int f_in, int f_out, char *buf, size_t bufsiz, int
+@@ -207,7 +207,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];
-@@ -296,6 +296,17 @@ int start_inband_exchange(int f_in, int f_out, const char *user, int argc, char
+@@ -293,6 +293,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;
-@@ -568,7 +579,12 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
+@@ -561,7 +572,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/main.c b/main.c
--- a/main.c
+++ b/main.c
-@@ -1397,7 +1397,7 @@ static int start_client(int argc, char *argv[])
+@@ -1410,7 +1410,7 @@ static int start_client(int argc, char *argv[])
* remote shell command, we need to do the RSYNCD protocol first */
if (daemon_over_rsh) {
int tmpret;
./configure
make
-based-on: f8d2ecd223eedabdf3174762b64c77cb01cc403b
+based-on: 16b49716d55a50f2e985b879b720b2c53c892a3a
diff --git a/Makefile.in b/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
extern char *logfile_format;
extern char *files_from;
extern char *tmpdir;
-@@ -548,6 +549,9 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
+@@ -541,6 +542,9 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
return -1;
}
DEBUG_WORD(HLINK, W_SND|W_REC, "Debug hard-link actions (levels 1-3)"),
DEBUG_WORD(ICONV, W_CLI|W_SRV, "Debug iconv character conversions (levels 1-2)"),
DEBUG_WORD(IO, W_CLI|W_SRV, "Debug I/O routines (levels 1-4)"),
-@@ -763,6 +765,7 @@ void usage(enum logcode F)
+@@ -761,6 +763,7 @@ void usage(enum logcode F)
rprintf(F," --compare-dest=DIR also compare destination files relative to DIR\n");
rprintf(F," --copy-dest=DIR ... and include copies of unchanged files\n");
rprintf(F," --link-dest=DIR hardlink to files in DIR when unchanged\n");
rprintf(F," -z, --compress compress file data during the transfer\n");
rprintf(F," --compress-level=NUM explicitly set compression level\n");
rprintf(F," --skip-compress=LIST skip compressing files with a suffix in LIST\n");
-@@ -819,7 +822,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
+@@ -817,7 +820,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
OPT_FILTER, OPT_COMPARE_DEST, OPT_COPY_DEST, OPT_LINK_DEST, OPT_HELP,
OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW, OPT_MIN_SIZE, OPT_CHMOD,
OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_ONLY_WRITE_BATCH, OPT_MAX_SIZE,
OPT_USERMAP, OPT_GROUPMAP, OPT_CHOWN, OPT_BWLIMIT,
OPT_SERVER, OPT_REFUSED_BASE = 9000};
-@@ -963,6 +966,7 @@ static struct poptOption long_options[] = {
+@@ -961,6 +964,7 @@ static struct poptOption long_options[] = {
{"compare-dest", 0, POPT_ARG_STRING, 0, OPT_COMPARE_DEST, 0, 0 },
{"copy-dest", 0, POPT_ARG_STRING, 0, OPT_COPY_DEST, 0, 0 },
{"link-dest", 0, POPT_ARG_STRING, 0, OPT_LINK_DEST, 0, 0 },
{"fuzzy", 'y', POPT_ARG_NONE, 0, 'y', 0, 0 },
{"no-fuzzy", 0, POPT_ARG_VAL, &fuzzy_basis, 0, 0, 0 },
{"no-y", 0, POPT_ARG_VAL, &fuzzy_basis, 0, 0, 0 },
-@@ -1312,6 +1316,9 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1310,6 +1314,9 @@ int parse_arguments(int *argc_p, const char ***argv_p)
iconv_opt = strdup(arg);
#endif
/* TODO: Call poptReadDefaultConfig; handle errors. */
/* The context leaks in case of an error, but if there's a
-@@ -1787,6 +1794,21 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1785,6 +1792,21 @@ int parse_arguments(int *argc_p, const char ***argv_p)
return 0;
#endif
default:
/* A large opt value means that set_refuse_options()
* turned this option off. */
-@@ -2089,6 +2111,8 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2087,6 +2109,8 @@ int parse_arguments(int *argc_p, const char ***argv_p)
tmpdir = sanitize_path(NULL, tmpdir, NULL, 0, SP_DEFAULT);
if (backup_dir)
backup_dir = sanitize_path(NULL, backup_dir, NULL, 0, SP_DEFAULT);
}
if (daemon_filter_list.head && !am_sender) {
filter_rule_list *elp = &daemon_filter_list;
-@@ -2742,6 +2766,12 @@ void server_options(char **args, int *argc_p)
+@@ -2740,6 +2764,12 @@ void server_options(char **args, int *argc_p)
} else if (inplace)
args[ac++] = "--inplace";
diff --git a/rsyncd.conf.yo b/rsyncd.conf.yo
--- a/rsyncd.conf.yo
+++ b/rsyncd.conf.yo
-@@ -288,6 +288,21 @@ message telling them to try later. The default is 0, which means no limit.
+@@ -287,6 +287,21 @@ message telling them to try later. The default is 0, which means no limit.
A negative value disables the module.
See also the "lock file" parameter.
./configure (optional if already run)
make
-based-on: f8d2ecd223eedabdf3174762b64c77cb01cc403b
+based-on: 16b49716d55a50f2e985b879b720b2c53c892a3a
diff --git a/authenticate.c b/authenticate.c
--- a/authenticate.c
+++ b/authenticate.c
int auth_uid_groups_cnt = -1;
const char *err = NULL;
int group_match = -1;
-@@ -286,7 +286,7 @@ char *auth_server(int f_in, int f_out, int module, const char *host,
- || getallgroups(auth_uid, gid_list, &auth_uid_groups_cnt) != NULL)
- auth_uid_groups_cnt = 0;
+@@ -287,7 +287,7 @@ char *auth_server(int f_in, int f_out, int module, const char *host,
else {
+ gid_t *gid_array = gid_list.items;
+ auth_uid_groups_cnt = gid_list.count;
- if ((auth_uid_groups = new_array(char *, auth_uid_groups_cnt)) == NULL)
+ if ((auth_uid_groups = new_array(const char *, auth_uid_groups_cnt)) == NULL)
out_of_memory("auth_server");
for (j = 0; j < auth_uid_groups_cnt; j++)
- auth_uid_groups[j] = gid_to_group(gid_list[j]);
-@@ -313,7 +313,7 @@ char *auth_server(int f_in, int f_out, int module, const char *host,
+ auth_uid_groups[j] = gid_to_group(gid_array[j]);
+@@ -314,7 +314,7 @@ char *auth_server(int f_in, int f_out, int module, const char *host,
else if (opt_ch == 'd')
err = "denied by rule";
else {
err = check_secret(module, line, group, challenge, pass);
}
-@@ -324,7 +324,7 @@ char *auth_server(int f_in, int f_out, int module, const char *host,
+@@ -325,7 +325,7 @@ char *auth_server(int f_in, int f_out, int module, const char *host,
int j;
for (j = 0; j < auth_uid_groups_cnt; j++) {
if (auth_uid_groups[j])
diff --git a/clientserver.c b/clientserver.c
--- a/clientserver.c
+++ b/clientserver.c
-@@ -65,6 +65,7 @@ extern iconv_t ic_send, ic_recv;
+@@ -63,6 +63,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
-@@ -76,6 +77,7 @@ unsigned int module_dirlen = 0;
+@@ -74,6 +75,7 @@ unsigned int module_dirlen = 0;
char *full_module_path;
static int rl_nulls = 0;
#ifdef HAVE_SIGACTION
static struct sigaction sigact;
-@@ -693,7 +695,7 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
+@@ -686,7 +688,7 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
log_init(1);
#ifdef HAVE_PUTENV
int status;
/* For post-xfer exec, fork a new process to run the rsync
-@@ -775,6 +777,44 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
+@@ -768,6 +770,44 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
set_blocking(pre_exec_arg_fd);
set_blocking(pre_exec_error_fd);
}
}
#endif
-@@ -1011,6 +1051,44 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
+@@ -1005,6 +1045,44 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
return 0;
}
diff --git a/rsyncd.conf.yo b/rsyncd.conf.yo
--- a/rsyncd.conf.yo
+++ b/rsyncd.conf.yo
-@@ -199,10 +199,11 @@ if the module is not read-only).
-
- When this parameter is enabled, rsync will not attempt to map users and groups
- by name (by default), but instead copy IDs as though bf(--numeric-ids) had
--been specified. In order to enable name-mapping, rsync needs to be able to
-+been specified. In order to enable name-mapping, rsync needs either the
-+bf(name converter) parameter to specify a conversion program, or it needs to
- use the standard library functions for looking up names and IDs (i.e.
- code(getpwuid()), code(getgrgid()), code(getpwname()), and code(getgrnam())).
--This means the rsync
-+The latter choice means the rsync
- process in the chroot hierarchy will need to have access to the resources
- used by these library functions (traditionally /etc/passwd and
- /etc/group, but perhaps additional dynamic libraries as well).
-@@ -268,6 +269,27 @@ path elements that rsync believes will allow a symlink to escape the module's
+@@ -267,6 +267,27 @@ path elements that rsync believes will allow a symlink to escape the module's
hierarchy. There are tricky ways to work around this, though, so you had
better trust your users if you choose this combination of parameters.
./configure (optional if already run)
make
-based-on: f8d2ecd223eedabdf3174762b64c77cb01cc403b
+based-on: 16b49716d55a50f2e985b879b720b2c53c892a3a
diff --git a/access.c b/access.c
--- a/access.c
+++ b/access.c
./configure (optional if already run)
make
-based-on: f8d2ecd223eedabdf3174762b64c77cb01cc403b
+based-on: 16b49716d55a50f2e985b879b720b2c53c892a3a
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
int update_only = 0;
int cvs_exclude = 0;
int dry_run = 0;
-@@ -711,6 +712,7 @@ void usage(enum logcode F)
+@@ -709,6 +710,7 @@ void usage(enum logcode F)
rprintf(F," -t, --times preserve modification times\n");
rprintf(F," -O, --omit-dir-times omit directories from --times\n");
rprintf(F," -J, --omit-link-times omit symlinks from --times\n");
rprintf(F," --super receiver attempts super-user activities\n");
#ifdef SUPPORT_XATTRS
rprintf(F," --fake-super store/recover privileged attrs using xattrs\n");
-@@ -873,6 +875,7 @@ static struct poptOption long_options[] = {
+@@ -871,6 +873,7 @@ static struct poptOption long_options[] = {
{"omit-link-times", 'J', POPT_ARG_VAL, &omit_link_times, 1, 0, 0 },
{"no-omit-link-times",0, POPT_ARG_VAL, &omit_link_times, 0, 0, 0 },
{"no-J", 0, POPT_ARG_VAL, &omit_link_times, 0, 0, 0 },
{"modify-window", 0, POPT_ARG_INT, &modify_window, OPT_MODIFY_WINDOW, 0, 0 },
{"super", 0, POPT_ARG_VAL, &am_root, 2, 0, 0 },
{"no-super", 0, POPT_ARG_VAL, &am_root, 0, 0, 0 },
-@@ -2157,6 +2160,9 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2155,6 +2158,9 @@ int parse_arguments(int *argc_p, const char ***argv_p)
parse_filter_str(&filter_list, backup_dir_buf, rule_template(0), 0);
}
if (preserve_times) {
preserve_times = PRESERVE_FILE_TIMES;
if (!omit_dir_times)
-@@ -2408,6 +2414,8 @@ void server_options(char **args, int *argc_p)
+@@ -2406,6 +2412,8 @@ void server_options(char **args, int *argc_p)
argstr[x++] = 'O';
if (omit_link_times)
argstr[x++] = 'J';
./configure (optional if already run)
make
-based-on: f8d2ecd223eedabdf3174762b64c77cb01cc403b
+based-on: 16b49716d55a50f2e985b879b720b2c53c892a3a
diff --git a/flist.c b/flist.c
--- a/flist.c
+++ b/flist.c
size_t bwlimit_writemax = 0;
int ignore_existing = 0;
int ignore_non_existing = 0;
-@@ -793,6 +794,7 @@ void usage(enum logcode F)
+@@ -791,6 +792,7 @@ void usage(enum logcode F)
rprintf(F," --password-file=FILE read daemon-access password from FILE\n");
rprintf(F," --list-only list the files instead of copying them\n");
rprintf(F," --bwlimit=RATE limit socket I/O bandwidth\n");
#ifdef HAVE_SETVBUF
rprintf(F," --outbuf=N|L|B set output buffering to None, Line, or Block\n");
#endif
-@@ -991,6 +993,7 @@ static struct poptOption long_options[] = {
+@@ -989,6 +991,7 @@ static struct poptOption long_options[] = {
{"itemize-changes", 'i', POPT_ARG_NONE, 0, 'i', 0, 0 },
{"no-itemize-changes",0, POPT_ARG_VAL, &itemize_changes, 0, 0, 0 },
{"no-i", 0, POPT_ARG_VAL, &itemize_changes, 0, 0, 0 },
TODO: the configure changes should abort if the user requests --enable-slp
and we can't honor that request.
-based-on: f8d2ecd223eedabdf3174762b64c77cb01cc403b
+based-on: 16b49716d55a50f2e985b879b720b2c53c892a3a
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
-@@ -1199,6 +1199,13 @@ int daemon_main(void)
+@@ -1193,6 +1193,13 @@ int daemon_main(void)
* address too. In fact, why not just do getnameinfo on the
* local address??? */
diff --git a/main.c b/main.c
--- a/main.c
+++ b/main.c
-@@ -1246,6 +1246,18 @@ static int start_client(int argc, char *argv[])
+@@ -1259,6 +1259,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);
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
-@@ -574,6 +574,7 @@ static void print_rsync_version(enum logcode f)
+@@ -572,6 +572,7 @@ static void print_rsync_version(enum logcode f)
char const *links = "no ";
char const *iconv = "no ";
char const *ipv6 = "no ";
STRUCT_STAT *dumstat;
#if SUBPROTOCOL_VERSION != 0
-@@ -610,6 +611,9 @@ static void print_rsync_version(enum logcode f)
+@@ -608,6 +609,9 @@ static void print_rsync_version(enum logcode f)
#ifdef CAN_SET_SYMLINK_TIMES
symtimes = "";
#endif
rprintf(f, "%s version %s protocol version %d%s\n",
RSYNC_NAME, RSYNC_VERSION, PROTOCOL_VERSION, subprotocol);
-@@ -623,8 +627,8 @@ static void print_rsync_version(enum logcode f)
+@@ -621,8 +625,8 @@ static void print_rsync_version(enum logcode f)
(int)(sizeof (int64) * 8));
rprintf(f, " %ssocketpairs, %shardlinks, %ssymlinks, %sIPv6, batchfiles, %sinplace,\n",
got_socketpair, hardlinks, links, ipv6, have_inplace);
enddit()
manpagesection(MODULE PARAMETERS)
-@@ -857,6 +866,7 @@ use chroot = yes
+@@ -856,6 +865,7 @@ use chroot = yes
max connections = 4
syslog facility = local5
pid file = /var/run/rsyncd.pid
./configure (optional if already run)
make
-based-on: f8d2ecd223eedabdf3174762b64c77cb01cc403b
+based-on: 16b49716d55a50f2e985b879b720b2c53c892a3a
diff --git a/syscall.c b/syscall.c
--- a/syscall.c
+++ b/syscall.c
-- Matt McCutchen <hashproduct@gmail.com>
-based-on: f8d2ecd223eedabdf3174762b64c77cb01cc403b
+based-on: 16b49716d55a50f2e985b879b720b2c53c892a3a
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
/**
* If 1, send the whole file as literal data rather than trying to
-@@ -730,6 +731,7 @@ void usage(enum logcode F)
+@@ -728,6 +729,7 @@ void usage(enum logcode F)
rprintf(F," --existing skip creating new files on receiver\n");
rprintf(F," --ignore-existing skip updating files that already exist on receiver\n");
rprintf(F," --remove-source-files sender removes synchronized files (non-dirs)\n");
rprintf(F," --del an alias for --delete-during\n");
rprintf(F," --delete delete extraneous files from destination dirs\n");
rprintf(F," --delete-before receiver deletes before transfer, not during\n");
-@@ -994,6 +996,7 @@ static struct poptOption long_options[] = {
+@@ -992,6 +994,7 @@ static struct poptOption long_options[] = {
{"bwlimit", 0, POPT_ARG_STRING, &bwlimit_arg, OPT_BWLIMIT, 0, 0 },
{"no-bwlimit", 0, POPT_ARG_VAL, &bwlimit, 0, 0, 0 },
{"backup", 'b', POPT_ARG_VAL, &make_backups, 1, 0, 0 },
{"no-backup", 0, POPT_ARG_VAL, &make_backups, 0, 0, 0 },
{"backup-dir", 0, POPT_ARG_STRING, &backup_dir, 0, 0, 0 },
{"suffix", 0, POPT_ARG_STRING, &backup_suffix, 0, 0, 0 },
-@@ -2642,6 +2645,8 @@ void server_options(char **args, int *argc_p)
+@@ -2640,6 +2643,8 @@ void server_options(char **args, int *argc_p)
goto oom;
args[ac++] = arg;
}
./configure (optional if already run)
make
-based-on: f8d2ecd223eedabdf3174762b64c77cb01cc403b
+based-on: 16b49716d55a50f2e985b879b720b2c53c892a3a
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
-@@ -154,7 +154,7 @@ pid_t wait_process(pid_t pid, int *status_ptr, int flags)
+@@ -155,7 +155,7 @@ pid_t wait_process(pid_t pid, int *status_ptr, int flags)
}
/* Wait for a process to exit, calling io_flush while waiting. */
char *rsync_path = RSYNC_PATH;
char *backup_dir = NULL;
char backup_dir_buf[MAXPATHLEN];
-@@ -757,6 +760,7 @@ void usage(enum logcode F)
+@@ -755,6 +758,7 @@ void usage(enum logcode F)
rprintf(F," -I, --ignore-times don't skip files that match in size and mod-time\n");
rprintf(F," -M, --remote-option=OPTION send OPTION to the remote side only\n");
rprintf(F," --size-only skip files that match in size\n");
rprintf(F," --modify-window=NUM compare mod-times with reduced accuracy\n");
rprintf(F," -T, --temp-dir=DIR create temporary files in directory DIR\n");
rprintf(F," -y, --fuzzy find similar file for basis if no dest file\n");
-@@ -799,6 +803,8 @@ void usage(enum logcode F)
+@@ -797,6 +801,8 @@ void usage(enum logcode F)
rprintf(F," --write-batch=FILE write a batched update to FILE\n");
rprintf(F," --only-write-batch=FILE like --write-batch but w/o updating destination\n");
rprintf(F," --read-batch=FILE read a batched update from FILE\n");
rprintf(F," --protocol=NUM force an older protocol version to be used\n");
#ifdef ICONV_OPTION
rprintf(F," --iconv=CONVERT_SPEC request charset conversion of filenames\n");
-@@ -912,6 +918,7 @@ static struct poptOption long_options[] = {
+@@ -910,6 +916,7 @@ static struct poptOption long_options[] = {
{"chmod", 0, POPT_ARG_STRING, 0, OPT_CHMOD, 0, 0 },
{"ignore-times", 'I', POPT_ARG_NONE, &ignore_times, 0, 0, 0 },
{"size-only", 0, POPT_ARG_NONE, &size_only, 0, 0, 0 },
{"one-file-system", 'x', POPT_ARG_NONE, 0, 'x', 0, 0 },
{"no-one-file-system",0, POPT_ARG_VAL, &one_file_system, 0, 0, 0 },
{"no-x", 0, POPT_ARG_VAL, &one_file_system, 0, 0, 0 },
-@@ -1035,6 +1042,8 @@ static struct poptOption long_options[] = {
+@@ -1033,6 +1040,8 @@ static struct poptOption long_options[] = {
{"password-file", 0, POPT_ARG_STRING, &password_file, 0, 0, 0 },
{"blocking-io", 0, POPT_ARG_VAL, &blocking_io, 1, 0, 0 },
{"no-blocking-io", 0, POPT_ARG_VAL, &blocking_io, 0, 0, 0 },
#ifdef HAVE_SETVBUF
{"outbuf", 0, POPT_ARG_STRING, &outbuf_mode, 0, 0, 0 },
#endif
-@@ -2292,6 +2301,16 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2290,6 +2299,16 @@ int parse_arguments(int *argc_p, const char ***argv_p)
}
}
if (files_from) {
char *h, *p;
int q;
-@@ -2651,6 +2670,25 @@ void server_options(char **args, int *argc_p)
+@@ -2649,6 +2668,25 @@ void server_options(char **args, int *argc_p)
else if (missing_args == 1 && !am_sender)
args[ac++] = "--ignore-missing-args";
while (1) {
cleanup_disable();
-@@ -846,6 +866,9 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -845,6 +865,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));
-@@ -860,6 +883,16 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -859,6 +882,16 @@ int recv_files(int f_in, int f_out, char *local_name)
exit_cleanup(RERR_FILEIO);
}
if (DEBUG_GTE(SEND, 1))
rprintf(FINFO, "send_files starting\n");
-@@ -336,6 +357,7 @@ void send_files(int f_in, int f_out)
+@@ -335,6 +356,7 @@ void send_files(int f_in, int f_out)
exit_cleanup(RERR_PROTOCOL);
}
fd = do_open(fname, O_RDONLY, 0);
if (fd == -1) {
if (errno == ENOENT) {
-@@ -357,6 +379,33 @@ void send_files(int f_in, int f_out)
+@@ -356,6 +378,33 @@ void send_files(int f_in, int f_out)
continue;
}
/* map the local file */
if (do_fstat(fd, &st) != 0) {
io_error |= IOERR_GENERAL;
-@@ -407,6 +456,8 @@ void send_files(int f_in, int f_out)
+@@ -406,6 +455,8 @@ void send_files(int f_in, int f_out)
}
}
close(fd);
./configure (optional if already run)
make
-based-on: f8d2ecd223eedabdf3174762b64c77cb01cc403b
+based-on: 16b49716d55a50f2e985b879b720b2c53c892a3a
diff --git a/fileio.c b/fileio.c
--- a/fileio.c
+++ b/fileio.c
int preallocate_files = 0;
int do_compression = 0;
int def_compress_level = NOT_SPECIFIED;
-@@ -716,6 +717,7 @@ void usage(enum logcode F)
+@@ -714,6 +715,7 @@ void usage(enum logcode F)
rprintf(F," --fake-super store/recover privileged attrs using xattrs\n");
#endif
rprintf(F," -S, --sparse handle sparse files efficiently\n");
#ifdef SUPPORT_PREALLOCATION
rprintf(F," --preallocate allocate dest files before writing them\n");
#else
-@@ -924,6 +926,7 @@ static struct poptOption long_options[] = {
+@@ -922,6 +924,7 @@ static struct poptOption long_options[] = {
{"sparse", 'S', POPT_ARG_VAL, &sparse_files, 1, 0, 0 },
{"no-sparse", 0, POPT_ARG_VAL, &sparse_files, 0, 0, 0 },
{"no-S", 0, POPT_ARG_VAL, &sparse_files, 0, 0, 0 },
{"preallocate", 0, POPT_ARG_NONE, &preallocate_files, 0, 0, 0},
{"inplace", 0, POPT_ARG_VAL, &inplace, 1, 0, 0 },
{"no-inplace", 0, POPT_ARG_VAL, &inplace, 0, 0, 0 },
-@@ -2574,6 +2577,12 @@ void server_options(char **args, int *argc_p)
+@@ -2572,6 +2575,12 @@ void server_options(char **args, int *argc_p)
args[ac++] = arg;
}
./configure (optional if already run)
make
-based-on: bb853b32055a16e983267c6f5b8244aac311fdf9
+based-on: 16b49716d55a50f2e985b879b720b2c53c892a3a
diff --git a/main.c b/main.c
--- a/main.c
+++ b/main.c
./configure (optional if already run)
make
-based-on: f8d2ecd223eedabdf3174762b64c77cb01cc403b
+based-on: 16b49716d55a50f2e985b879b720b2c53c892a3a
diff --git a/io.c b/io.c
--- a/io.c
+++ b/io.c
int max_delete = INT_MIN;
OFF_T max_size = -1;
OFF_T min_size = -1;
-@@ -793,6 +794,8 @@ void usage(enum logcode F)
+@@ -791,6 +792,8 @@ void usage(enum logcode F)
rprintf(F," --password-file=FILE read daemon-access password from FILE\n");
rprintf(F," --list-only list the files instead of copying them\n");
rprintf(F," --bwlimit=RATE limit socket I/O bandwidth\n");
#ifdef HAVE_SETVBUF
rprintf(F," --outbuf=N|L|B set output buffering to None, Line, or Block\n");
#endif
-@@ -821,6 +824,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
+@@ -819,6 +822,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_ONLY_WRITE_BATCH, OPT_MAX_SIZE,
OPT_NO_D, OPT_APPEND, OPT_NO_ICONV, OPT_INFO, OPT_DEBUG,
OPT_USERMAP, OPT_GROUPMAP, OPT_CHOWN, OPT_BWLIMIT,
OPT_SERVER, OPT_REFUSED_BASE = 9000};
static struct poptOption long_options[] = {
-@@ -1016,6 +1020,8 @@ static struct poptOption long_options[] = {
+@@ -1014,6 +1018,8 @@ static struct poptOption long_options[] = {
{"no-timeout", 0, POPT_ARG_VAL, &io_timeout, 0, 0, 0 },
{"contimeout", 0, POPT_ARG_INT, &connect_timeout, 0, 0, 0 },
{"no-contimeout", 0, POPT_ARG_VAL, &connect_timeout, 0, 0, 0 },
{"rsh", 'e', POPT_ARG_STRING, &shell_cmd, 0, 0, 0 },
{"rsync-path", 0, POPT_ARG_STRING, &rsync_path, 0, 0, 0 },
{"temp-dir", 'T', POPT_ARG_STRING, &tmpdir, 0, 0, 0 },
-@@ -1787,6 +1793,36 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1785,6 +1791,36 @@ int parse_arguments(int *argc_p, const char ***argv_p)
return 0;
#endif
default:
/* A large opt value means that set_refuse_options()
* turned this option off. */
-@@ -2586,6 +2622,15 @@ void server_options(char **args, int *argc_p)
+@@ -2584,6 +2620,15 @@ void server_options(char **args, int *argc_p)
args[ac++] = arg;
}
./configure (optional if already run)
make
-based-on: f8d2ecd223eedabdf3174762b64c77cb01cc403b
+based-on: 16b49716d55a50f2e985b879b720b2c53c892a3a
diff --git a/flist.c b/flist.c
--- a/flist.c
+++ b/flist.c
#define MAX_BATCH_NAME_LEN 256 /* Must be less than MAXPATHLEN-13 */
char *batch_name = NULL;
-@@ -803,6 +804,7 @@ void usage(enum logcode F)
+@@ -801,6 +802,7 @@ void usage(enum logcode F)
#ifdef ICONV_OPTION
rprintf(F," --iconv=CONVERT_SPEC request charset conversion of filenames\n");
#endif
rprintf(F," --checksum-seed=NUM set block/file checksum seed (advanced)\n");
rprintf(F," -4, --ipv4 prefer IPv4\n");
rprintf(F," -6, --ipv6 prefer IPv6\n");
-@@ -1023,6 +1025,7 @@ static struct poptOption long_options[] = {
+@@ -1021,6 +1023,7 @@ static struct poptOption long_options[] = {
{"iconv", 0, POPT_ARG_STRING, &iconv_opt, 0, 0, 0 },
{"no-iconv", 0, POPT_ARG_NONE, 0, OPT_NO_ICONV, 0, 0 },
#endif
{"ipv4", '4', POPT_ARG_VAL, &default_af_hint, AF_INET, 0, 0 },
{"ipv6", '6', POPT_ARG_VAL, &default_af_hint, AF_INET6, 0, 0 },
{"8-bit-output", '8', POPT_ARG_VAL, &allow_8bit_chars, 1, 0, 0 },
-@@ -2338,6 +2341,24 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2336,6 +2339,24 @@ int parse_arguments(int *argc_p, const char ***argv_p)
}
}
am_starting_up = 0;
return 1;
-@@ -2759,6 +2780,12 @@ void server_options(char **args, int *argc_p)
+@@ -2757,6 +2778,12 @@ void server_options(char **args, int *argc_p)
if (relative_paths && !implied_dirs && (!am_sender || protocol_version >= 30))
args[ac++] = "--no-implied-dirs";
./configure (optional if already run)
make
-based-on: f8d2ecd223eedabdf3174762b64c77cb01cc403b
+based-on: 16b49716d55a50f2e985b879b720b2c53c892a3a
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: f8d2ecd223eedabdf3174762b64c77cb01cc403b
+based-on: 16b49716d55a50f2e985b879b720b2c53c892a3a
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
int preserve_links = 0;
int preserve_hard_links = 0;
int preserve_acls = 0;
-@@ -706,6 +707,7 @@ void usage(enum logcode F)
+@@ -704,6 +705,7 @@ void usage(enum logcode F)
rprintf(F," -o, --owner preserve owner (super-user only)\n");
rprintf(F," -g, --group preserve group\n");
rprintf(F," --devices preserve device files (super-user only)\n");
rprintf(F," --specials preserve special files\n");
rprintf(F," -D same as --devices --specials\n");
rprintf(F," -t, --times preserve modification times\n");
-@@ -887,6 +889,7 @@ static struct poptOption long_options[] = {
+@@ -885,6 +887,7 @@ static struct poptOption long_options[] = {
{"no-D", 0, POPT_ARG_NONE, 0, OPT_NO_D, 0, 0 },
{"devices", 0, POPT_ARG_VAL, &preserve_devices, 1, 0, 0 },
{"no-devices", 0, POPT_ARG_VAL, &preserve_devices, 0, 0, 0 },
{"specials", 0, POPT_ARG_VAL, &preserve_specials, 1, 0, 0 },
{"no-specials", 0, POPT_ARG_VAL, &preserve_specials, 0, 0, 0 },
{"links", 'l', POPT_ARG_VAL, &preserve_links, 1, 0, 0 },
-@@ -1787,6 +1790,11 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1785,6 +1788,11 @@ int parse_arguments(int *argc_p, const char ***argv_p)
return 0;
#endif
default:
/* A large opt value means that set_refuse_options()
* turned this option off. */
-@@ -2759,6 +2767,9 @@ void server_options(char **args, int *argc_p)
+@@ -2757,6 +2765,9 @@ void server_options(char **args, int *argc_p)
if (relative_paths && !implied_dirs && (!am_sender || protocol_version >= 30))
args[ac++] = "--no-implied-dirs";
file->flags |= FLAG_FILE_SENT;
continue;
}
-@@ -678,13 +679,13 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -677,13 +678,13 @@ int recv_files(int f_in, int f_out, char *local_name)
if (!do_xfers) { /* log the transfer */
log_item(FCLIENT, file, iflags, NULL);
if (read_batch)
if (inc_recurse)
send_msg_int(MSG_SUCCESS, ndx);
continue;
-@@ -774,7 +775,7 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -773,7 +774,7 @@ int recv_files(int f_in, int f_out, char *local_name)
} else if (do_fstat(fd1,&st) != 0) {
rsyserr(FERROR_XFER, errno, "fstat %s failed",
full_fname(fnamecmp));
close(fd1);
if (inc_recurse)
send_msg_int(MSG_NO_SEND, ndx);
-@@ -789,18 +790,32 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -788,18 +789,32 @@ int recv_files(int f_in, int f_out, char *local_name)
*/
rprintf(FERROR_XFER, "recv_files: %s is a directory\n",
full_fname(fnamecmp));
/* If we're not preserving permissions, change the file-list's
* mode based on the local permissions and some heuristics. */
if (!preserve_perms) {
-@@ -832,7 +847,7 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -831,7 +846,7 @@ int recv_files(int f_in, int f_out, char *local_name)
}
if (fd2 == -1) {
if (fd1 != -1)
close(fd1);
if (inc_recurse)
-@@ -847,8 +862,7 @@ int recv_files(int f_in, int f_out, char *local_name)
+@@ -846,8 +861,7 @@ int recv_files(int f_in, int f_out, char *local_name)
rprintf(FINFO, "%s\n", fname);
/* recv file data */