./configure (optional if already run)
make
-based-on: 25082d1ef6712a15c52a1dacb36b7f0642c23ac8
+based-on: d64bda1c1e79dc385f194d74f7957ce7cd118654
diff --git a/Makefile.in b/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
extern int keep_partial;
extern int got_xfer_error;
extern int protocol_version;
-@@ -140,6 +141,12 @@ NORETURN void _exit_cleanup(int code, const char *file, int line)
- /* FALLTHROUGH */
+@@ -142,6 +143,12 @@ NORETURN void _exit_cleanup(int code, const char *file, int line)
#include "case_N.h"
+ switch_step++;
+ if (use_db)
+ db_disconnect();
#ifdef HAVE_PUTENV
if (*lp_prexfer_exec(i) || *lp_postxfer_exec(i)) {
int status;
-@@ -864,6 +870,10 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
+@@ -867,6 +873,10 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
am_server = 1; /* Don't let someone try to be tricky. */
quiet = 0;
extern int eol_nulls;
extern int relative_paths;
extern int implied_dirs;
-@@ -1309,11 +1310,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1311,11 +1312,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
extra_len += EXTRA_LEN;
#endif
#if EXTRA_ROUNDING > 0
if (extra_len & (EXTRA_ROUNDING * EXTRA_LEN))
-@@ -1396,8 +1394,12 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1398,8 +1396,12 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
return NULL;
}
if (unsort_ndx)
F_NDX(file) = stats.num_dirs;
-@@ -2077,6 +2079,9 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
+@@ -2079,6 +2081,9 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
| (eol_nulls || reading_remotely ? RL_EOL_NULLS : 0);
int implied_dot_dir = 0;
extern int append_mode;
extern int make_backups;
extern int csum_length;
-@@ -530,7 +531,8 @@ int unchanged_file(char *fn, struct file_struct *file, STRUCT_STAT *st)
+@@ -524,7 +525,8 @@ int unchanged_file(char *fn, struct file_struct *file, STRUCT_STAT *st)
of the file time to determine whether to sync */
if (always_checksum > 0 && S_ISREG(st->st_mode)) {
char sum[MAX_DIGEST_LEN];
return memcmp(sum, F_SUM(file), checksum_len) == 0;
}
-@@ -2077,6 +2079,9 @@ void generate_files(int f_out, const char *local_name)
+@@ -2078,6 +2080,9 @@ void generate_files(int f_out, const char *local_name)
: "enabled");
}
extern char *shell_cmd;
extern char *batch_name;
extern char *password_file;
-@@ -1605,6 +1607,9 @@ int main(int argc,char *argv[])
+@@ -1609,6 +1611,9 @@ int main(int argc,char *argv[])
exit_cleanup(RERR_SYNTAX);
}
int eol_nulls = 0;
int protect_args = -1;
int human_readable = 1;
-@@ -567,6 +568,7 @@ static void print_rsync_version(enum logcode f)
+@@ -568,6 +569,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
-@@ -600,6 +602,11 @@ static void print_rsync_version(enum logcode f)
+@@ -601,6 +603,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);
-@@ -613,8 +620,8 @@ static void print_rsync_version(enum logcode f)
+@@ -614,8 +621,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());
-@@ -662,6 +669,7 @@ void usage(enum logcode F)
+@@ -663,6 +670,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");
-@@ -934,6 +942,7 @@ static struct poptOption long_options[] = {
+@@ -939,6 +947,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 },
-a, --archive archive mode; equals -rlptgoD (no -H,-A,-X)
--no-OPTION turn off an implied OPTION (e.g. --no-D)
-r, --recursive recurse into directories
-@@ -587,6 +588,47 @@ option's before-the-transfer "Does this file need to be updated?" check.
+@@ -588,6 +589,47 @@ option's before-the-transfer "Does this file need to be updated?" check.
For protocol 30 and beyond (first supported in 3.0.0), the checksum used is
MD5. For older protocols, the checksum used is MD4.
diff --git a/rsyncd.conf.yo b/rsyncd.conf.yo
--- a/rsyncd.conf.yo
+++ b/rsyncd.conf.yo
-@@ -301,6 +301,18 @@ is daemon. This setting has no effect if the "log file" setting is a
+@@ -303,6 +303,18 @@ 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).