am_sender ? "on" : "to",
--- old/configure.in
+++ new/configure.in
-@@ -536,6 +536,12 @@ if test x"$with_included_popt" != x"yes"
+@@ -540,6 +540,12 @@ if test x"$with_included_popt" != x"yes"
AC_CHECK_LIB(popt, poptGetContext, , [with_included_popt=yes])
fi
FN_LOCAL_BOOL(lp_list, list)
--- old/log.c
+++ new/log.c
-@@ -93,7 +93,7 @@ struct {
+@@ -94,7 +94,7 @@ struct {
/*
* Map from rsync error code to name, or return NULL.
*/
}
--- old/receiver.c
+++ new/receiver.c
-@@ -174,6 +174,10 @@ static int get_tmpname(char *fnametmp, c
+@@ -113,6 +113,10 @@ static int get_tmpname(char *fnametmp, c
if (maxname < 1) {
rprintf(FERROR, "temporary filename too long: %s\n", fname);
fnametmp[0] = '\0';
return 0;
}
-@@ -290,6 +294,11 @@ static int receive_data(int f_in, char *
+@@ -229,6 +233,11 @@ static int receive_data(int f_in, char *
rsyserr(FERROR, errno,
"lseek failed on %s",
full_fname(fname));
exit_cleanup(RERR_FILEIO);
}
continue;
-@@ -315,6 +324,9 @@ static int receive_data(int f_in, char *
+@@ -254,6 +263,9 @@ static int receive_data(int f_in, char *
report_write_error:
rsyserr(FERROR, errno, "write failed on %s",
full_fname(fname));
exit_cleanup(RERR_FILEIO);
}
-@@ -358,6 +370,12 @@ static void handle_delayed_updates(struc
+@@ -297,6 +309,12 @@ static void handle_delayed_updates(struc
rsyserr(FERROR, errno,
"rename failed for %s (from %s)",
full_fname(fname), partialptr);
} else {
if (remove_sent_files
|| (preserve_hard_links
-@@ -480,6 +498,9 @@ int recv_files(int f_in, struct file_lis
+@@ -419,6 +437,9 @@ int recv_files(int f_in, struct file_lis
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);
}
-@@ -535,6 +556,11 @@ int recv_files(int f_in, struct file_lis
+@@ -474,6 +495,11 @@ int recv_files(int f_in, struct file_lis
rprintf(FERROR,
"invalid basis_dir index: %d.\n",
fnamecmp_type);
exit_cleanup(RERR_PROTOCOL);
}
pathjoin(fnamecmpbuf, sizeof fnamecmpbuf,
-@@ -580,6 +606,9 @@ int recv_files(int f_in, struct file_lis
+@@ -519,6 +545,9 @@ int recv_files(int f_in, struct file_lis
if (fd1 != -1 && do_fstat(fd1,&st) != 0) {
rsyserr(FERROR, errno, "fstat %s failed",
full_fname(fnamecmp));
discard_receive_data(f_in, file->length);
close(fd1);
continue;
-@@ -593,6 +622,9 @@ int recv_files(int f_in, struct file_lis
+@@ -532,6 +561,9 @@ int recv_files(int f_in, struct file_lis
*/
rprintf(FERROR,"recv_files: %s is a directory\n",
full_fname(fnamecmp));
discard_receive_data(f_in, file->length);
close(fd1);
continue;
-@@ -616,6 +648,9 @@ int recv_files(int f_in, struct file_lis
+@@ -555,6 +587,9 @@ int recv_files(int f_in, struct file_lis
if (fd2 == -1) {
rsyserr(FERROR, errno, "open %s failed",
full_fname(fname));
discard_receive_data(f_in, file->length);
if (fd1 != -1)
close(fd1);
-@@ -649,6 +684,10 @@ int recv_files(int f_in, struct file_lis
+@@ -588,6 +623,10 @@ int recv_files(int f_in, struct file_lis
if (fd2 == -1) {
rsyserr(FERROR, errno, "mkstemp %s failed",
full_fname(fnametmp));
discard_receive_data(f_in, file->length);
if (fd1 != -1)
close(fd1);
-@@ -671,12 +710,19 @@ int recv_files(int f_in, struct file_lis
+@@ -610,12 +649,19 @@ int recv_files(int f_in, struct file_lis
if (!log_before_transfer)
log_item(file, &initial_stats, iflags, NULL);
exit_cleanup(RERR_FILEIO);
}
-@@ -730,6 +776,12 @@ int recv_files(int f_in, struct file_lis
+@@ -669,6 +715,12 @@ int recv_files(int f_in, struct file_lis
rprintf(msgtype,
"%s: %s failed verification -- update %s%s.\n",
errstr, fname, keptstr, redostr);
if (verbose > 1) {
--- old/configure.in
+++ new/configure.in
-@@ -478,6 +478,11 @@ if test x"$ac_cv_func_strcasecmp" = x"no
+@@ -482,6 +482,11 @@ if test x"$ac_cv_func_strcasecmp" = x"no
AC_CHECK_LIB(resolv, strcasecmp)
fi
dnl At the moment we don't test for a broken memcmp(), because all we
dnl need to do is test for equality, not comparison, and it seems that
dnl every platform has a memcmp that can do at least that.
-@@ -734,6 +739,77 @@ AC_SUBST(OBJ_RESTORE)
+@@ -738,6 +743,77 @@ AC_SUBST(OBJ_RESTORE)
AC_SUBST(CC_SHOBJ_FLAG)
AC_SUBST(BUILD_POPT)
int preserve_perms = 0;
int preserve_executability = 0;
int preserve_devices = 0;
-@@ -193,6 +194,7 @@ static void print_rsync_version(enum log
+@@ -194,6 +195,7 @@ static void print_rsync_version(enum log
char const *got_socketpair = "no ";
char const *have_inplace = "no ";
char const *hardlinks = "no ";
char const *links = "no ";
char const *ipv6 = "no ";
STRUCT_STAT *dumstat;
-@@ -209,6 +211,10 @@ static void print_rsync_version(enum log
+@@ -210,6 +212,10 @@ static void print_rsync_version(enum log
hardlinks = "";
#endif
#ifdef SUPPORT_LINKS
links = "";
#endif
-@@ -222,9 +228,9 @@ static void print_rsync_version(enum log
+@@ -223,9 +229,9 @@ static void print_rsync_version(enum log
rprintf(f, "Copyright (C) 1996-2006 by Andrew Tridgell, Wayne Davison, and others.\n");
rprintf(f, "<http://rsync.samba.org/>\n");
rprintf(f, "Capabilities: %d-bit files, %ssocketpairs, "
/* Note that this field may not have type ino_t. It depends
* on the complicated interaction between largefile feature
-@@ -293,6 +299,9 @@ void usage(enum logcode F)
+@@ -294,6 +300,9 @@ void usage(enum logcode F)
rprintf(F," -K, --keep-dirlinks treat symlinked dir on receiver as dir\n");
rprintf(F," -p, --perms preserve permissions\n");
rprintf(F," -E, --executability preserve the file's executability\n");
rprintf(F," --chmod=CHMOD change destination permissions\n");
rprintf(F," -o, --owner preserve owner (super-user only)\n");
rprintf(F," -g, --group preserve group\n");
-@@ -409,6 +418,9 @@ static struct poptOption long_options[]
+@@ -411,6 +420,9 @@ static struct poptOption long_options[]
{"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 },
{"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 },
-@@ -1057,6 +1069,23 @@ int parse_arguments(int *argc, const cha
+@@ -1060,6 +1072,23 @@ 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. */
-@@ -1497,6 +1526,10 @@ void server_options(char **args,int *arg
+@@ -1499,6 +1528,10 @@ void server_options(char **args,int *arg
if (preserve_hard_links)
argstr[x++] = 'H';
if (preserve_gid)
--- old/receiver.c
+++ new/receiver.c
-@@ -410,6 +410,10 @@ int recv_files(int f_in, struct file_lis
+@@ -349,6 +349,10 @@ int recv_files(int f_in, struct file_lis
int itemizing = am_daemon ? daemon_log_format_has_i
: !am_server && log_format_has_i;
int max_phase = protocol_version >= 29 ? 2 : 1;
int i, recv_ok;
if (verbose > 2)
-@@ -607,7 +611,16 @@ int recv_files(int f_in, struct file_lis
+@@ -546,7 +550,16 @@ int recv_files(int f_in, struct file_lis
* mode based on the local permissions and some heuristics. */
if (!preserve_perms) {
int exists = fd1 != -1;
/* We now check to see if we are writing file "inplace" */
--- old/rsync.c
+++ new/rsync.c
-@@ -91,7 +91,8 @@ void free_sums(struct sum_struct *s)
+@@ -100,7 +100,8 @@ void free_sums(struct sum_struct *s)
/* This is only called when we aren't preserving permissions. Figure out what
* the permissions should be and return them merged back into the mode. */
{
/* If the file already exists, we'll return the local permissions,
* possibly tweaked by the --executability option. */
-@@ -106,7 +107,7 @@ mode_t dest_mode(mode_t flist_mode, mode
+@@ -115,7 +116,7 @@ mode_t dest_mode(mode_t flist_mode, mode
dest_mode |= (dest_mode & 0444) >> 2;
}
} else
return (flist_mode & ~CHMOD_BITS) | (dest_mode & CHMOD_BITS);
}
-@@ -205,6 +206,14 @@ int set_file_attrs(char *fname, struct f
+@@ -214,6 +215,14 @@ int set_file_attrs(char *fname, struct f
}
#endif
--chmod=CHMOD change destination permissions
-o, --owner preserve owner (super-user only)
-g, --group preserve group
-@@ -691,7 +692,9 @@ quote(itemize(
+@@ -692,7 +693,9 @@ quote(itemize(
permissions, though the bf(--executability) option might change just
the execute permission for the file.
it() New files get their "normal" permission bits set to the source
their special permission bits disabled except in the case where a new
directory inherits a setgid bit from its parent directory.
))
-@@ -722,9 +725,11 @@ The preservation of the destination's se
+@@ -723,9 +726,11 @@ The preservation of the destination's se
directories when bf(--perms) is off was added in rsync 2.6.7. Older rsync
versions erroneously preserved the three special permission bits for
newly-created files when bf(--perms) was off, while overriding the
dit(bf(-E, --executability)) This option causes rsync to preserve the
executability (or non-executability) of regular files when bf(--perms) is
-@@ -742,6 +747,10 @@ quote(itemize(
+@@ -743,6 +748,10 @@ quote(itemize(
If bf(--perms) is enabled, this option is ignored.
{"omit-dir-times", 'O', POPT_ARG_VAL, &omit_dir_times, 2, 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 },
-@@ -1508,6 +1513,8 @@ void server_options(char **args,int *arg
+@@ -1507,6 +1512,8 @@ void server_options(char **args,int *arg
argstr[x++] = 'D';
if (preserve_times)
argstr[x++] = 't';
if (ok) {
--- old/options.c
+++ new/options.c
-@@ -137,10 +137,14 @@ int no_detach
+@@ -138,10 +138,14 @@ int no_detach
int write_batch = 0;
int read_batch = 0;
int backup_dir_len = 0;
char *tmpdir = NULL;
char *partial_dir = NULL;
char *basis_dir[MAX_BASIS_DIRS+1];
-@@ -150,7 +154,9 @@ char *log_format = NULL;
+@@ -151,7 +155,9 @@ char *log_format = NULL;
char *password_file = NULL;
char *rsync_path = RSYNC_PATH;
char *backup_dir = NULL;
char *sockopts = NULL;
int rsync_port = 0;
int compare_dest = 0;
-@@ -281,6 +287,8 @@ void usage(enum logcode F)
+@@ -282,6 +288,8 @@ void usage(enum logcode F)
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");
rprintf(F," --inplace update destination files in-place (SEE MAN PAGE)\n");
rprintf(F," --append append data onto shorter files\n");
-@@ -494,7 +502,9 @@ static struct poptOption long_options[]
+@@ -496,7 +504,9 @@ static struct poptOption long_options[]
{"bwlimit", 0, POPT_ARG_INT, &bwlimit, 0, 0, 0 },
{"backup", 'b', POPT_ARG_NONE, &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 },
-@@ -1202,6 +1212,8 @@ int parse_arguments(int *argc, const cha
+@@ -1205,6 +1215,8 @@ int parse_arguments(int *argc, const cha
partial_dir = sanitize_path(NULL, partial_dir, NULL, 0);
if (backup_dir)
backup_dir = sanitize_path(NULL, backup_dir, NULL, 0);
}
if (server_filter_list.head && !am_sender) {
struct filter_list_struct *elp = &server_filter_list;
-@@ -1236,6 +1248,14 @@ int parse_arguments(int *argc, const cha
+@@ -1239,6 +1251,14 @@ int parse_arguments(int *argc, const cha
return 0;
}
}
}
if (!backup_suffix)
-@@ -1247,6 +1267,16 @@ int parse_arguments(int *argc, const cha
+@@ -1250,6 +1270,16 @@ int parse_arguments(int *argc, const cha
backup_suffix);
return 0;
}
if (backup_dir) {
backup_dir_len = strlcpy(backup_dir_buf, backup_dir, sizeof backup_dir_buf);
backup_dir_remainder = sizeof backup_dir_buf - backup_dir_len;
-@@ -1270,6 +1300,31 @@ int parse_arguments(int *argc, const cha
+@@ -1273,6 +1303,31 @@ int parse_arguments(int *argc, const cha
"P *%s", backup_suffix);
parse_rule(&filter_list, backup_dir_buf, 0, 0);
}
if (make_backups && !backup_dir)
omit_dir_times = 1;
-@@ -1612,6 +1667,10 @@ void server_options(char **args,int *arg
+@@ -1614,6 +1669,10 @@ void server_options(char **args,int *arg
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) {
-@@ -1620,7 +1679,13 @@ void server_options(char **args,int *arg
+@@ -1622,7 +1681,13 @@ void server_options(char **args,int *arg
goto oom;
args[ac++] = arg;
}
--- old/options.c
+++ new/options.c
-@@ -98,6 +98,7 @@ int keep_partial = 0;
+@@ -99,6 +99,7 @@ int keep_partial = 0;
int safe_symlinks = 0;
int copy_unsafe_links = 0;
int size_only = 0;
int daemon_bwlimit = 0;
int bwlimit = 0;
int fuzzy_basis = 0;
-@@ -331,6 +332,7 @@ void usage(enum logcode F)
+@@ -332,6 +333,7 @@ void usage(enum logcode F)
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");
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");
-@@ -443,6 +445,7 @@ static struct poptOption long_options[]
+@@ -445,6 +447,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 },
{"update", 'u', POPT_ARG_NONE, &update_only, 0, 0, 0 },
{"existing", 0, POPT_ARG_NONE, &ignore_non_existing, 0, 0, 0 },
-@@ -1643,6 +1646,9 @@ void server_options(char **args,int *arg
+@@ -1645,6 +1648,9 @@ void server_options(char **args,int *arg
if (size_only)
args[ac++] = "--size-only";
--modify-window=NUM compare mod-times with reduced accuracy
-T, --temp-dir=DIR create temporary files in directory DIR
-y, --fuzzy find similar file for basis if no dest file
-@@ -460,6 +461,12 @@ regardless of timestamp. This is useful
+@@ -461,6 +462,12 @@ regardless of timestamp. This is useful
after using another mirroring system which may not preserve timestamps
exactly.
{"fuzzy", 'y', POPT_ARG_NONE, &fuzzy_basis, 0, 0, 0 },
{"compress", 'z', POPT_ARG_NONE, 0, 'z', 0, 0 },
{"compress-level", 0, POPT_ARG_INT, &def_compress_level, 'z', 0, 0 },
-@@ -1335,7 +1338,7 @@ int parse_arguments(int *argc, const cha
+@@ -1334,7 +1337,7 @@ int parse_arguments(int *argc, const cha
inplace = 1;
}
partial_dir = tmp_partialdir;
if (inplace) {
-@@ -1344,6 +1347,7 @@ int parse_arguments(int *argc, const cha
+@@ -1343,6 +1346,7 @@ int parse_arguments(int *argc, const cha
snprintf(err_buf, sizeof err_buf,
"--%s cannot be used with --%s\n",
append_mode ? "append" : "inplace",
int preserve_links = 0;
int preserve_hard_links = 0;
int preserve_perms = 0;
-@@ -327,6 +328,7 @@ void usage(enum logcode F)
+@@ -328,6 +329,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");
-@@ -501,6 +503,7 @@ static struct poptOption long_options[]
+@@ -503,6 +505,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 },
-@@ -1694,6 +1697,9 @@ void server_options(char **args,int *arg
+@@ -1696,6 +1699,9 @@ void server_options(char **args,int *arg
args[ac++] = tmpdir;
}
extern int basis_dir_cnt;
extern int make_backups;
extern int cleanup_got_literal;
-@@ -318,6 +319,12 @@ static int receive_data(int f_in, char *
+@@ -257,6 +258,12 @@ static int receive_data(int f_in, char *
exit_cleanup(RERR_FILEIO);
}
extern int modify_window;
extern int relative_paths;
extern int human_readable;
-@@ -312,6 +313,12 @@ int copy_file(const char *source, const
+@@ -303,6 +304,12 @@ int copy_file(const char *source, const
return -1;
}
iflags |= ITEM_IS_NEW;
--- old/rsync.c
+++ new/rsync.c
-@@ -49,6 +49,7 @@ extern int inplace;
+@@ -50,6 +50,7 @@ extern int inplace;
extern int keep_dirlinks;
extern int make_backups;
extern struct stats stats;
#if defined HAVE_ICONV_OPEN && defined HAVE_ICONV_H
iconv_t ic_chck = (iconv_t)-1;
-@@ -116,6 +117,8 @@ int set_file_attrs(char *fname, struct f
+@@ -125,6 +126,8 @@ int set_file_attrs(char *fname, struct f
int updated = 0;
STRUCT_STAT st2;
int change_uid, change_gid;
if (!st) {
if (dry_run)
-@@ -148,9 +151,11 @@ int set_file_attrs(char *fname, struct f
+@@ -157,9 +160,11 @@ int set_file_attrs(char *fname, struct f
updated = 1;
}
#if !defined HAVE_LCHOWN && !defined CHOWN_MODIFIES_SYMLINK
if (S_ISLNK(st->st_mode))
;
-@@ -162,18 +167,18 @@ int set_file_attrs(char *fname, struct f
+@@ -171,18 +176,18 @@ int set_file_attrs(char *fname, struct f
rprintf(FINFO,
"set uid of %s from %ld to %ld\n",
fname,
/* Match the "pattern" against the forced-to-lower-case "text" string. */
--- old/options.c
+++ new/options.c
-@@ -110,6 +110,7 @@ OFF_T max_size = 0;
+@@ -111,6 +111,7 @@ OFF_T max_size = 0;
OFF_T min_size = 0;
int ignore_errors = 0;
int modify_window = 0;
int blocking_io = -1;
int checksum_seed = 0;
int inplace = 0;
-@@ -349,6 +350,7 @@ void usage(enum logcode F)
+@@ -350,6 +351,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");
-@@ -501,6 +503,7 @@ static struct poptOption long_options[]
+@@ -503,6 +505,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 },
-@@ -1655,6 +1658,9 @@ void server_options(char **args,int *arg
+@@ -1657,6 +1660,9 @@ void server_options(char **args,int *arg
args[ac++] = arg;
}
+#endif
--- old/options.c
+++ new/options.c
-@@ -144,6 +144,7 @@ char *backup_suffix = NULL;
+@@ -145,6 +145,7 @@ char *backup_suffix = NULL;
char *tmpdir = NULL;
char *partial_dir = NULL;
char *basis_dir[MAX_BASIS_DIRS+1];
char *config_file = NULL;
char *shell_cmd = NULL;
char *log_format = NULL;
-@@ -337,6 +338,7 @@ void usage(enum logcode F)
+@@ -338,6 +339,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," -C, --cvs-exclude auto-ignore files the same way CVS does\n");
-@@ -383,7 +385,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OP
+@@ -385,7 +387,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OP
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_SERVER, OPT_REFUSED_BASE = 9000};
static struct poptOption long_options[] = {
-@@ -478,6 +480,7 @@ static struct poptOption long_options[]
+@@ -480,6 +482,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, &fuzzy_basis, 0, 0, 0 },
{"compress", 'z', POPT_ARG_NONE, 0, 'z', 0, 0 },
{"compress-level", 0, POPT_ARG_INT, &def_compress_level, 'z', 0, 0 },
-@@ -1057,6 +1060,21 @@ int parse_arguments(int *argc, const cha
+@@ -1060,6 +1063,21 @@ 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. */
-@@ -1706,6 +1724,11 @@ void server_options(char **args,int *arg
+@@ -1708,6 +1726,11 @@ void server_options(char **args,int *arg
}
}
extern char *partial_dir;
extern char *basis_dir[];
extern struct file_list *the_file_list;
-@@ -186,12 +187,13 @@ static int get_tmpname(char *fnametmp, c
+@@ -125,12 +126,13 @@ static int get_tmpname(char *fnametmp, c
static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
int32 len;
OFF_T offset = 0;
OFF_T offset2;
-@@ -211,6 +213,9 @@ static int receive_data(int f_in, char *
+@@ -150,6 +152,9 @@ static int receive_data(int f_in, char *
} else
mapbuf = NULL;
sum_init(checksum_seed);
if (append_mode) {
-@@ -253,6 +258,8 @@ static int receive_data(int f_in, char *
+@@ -192,6 +197,8 @@ static int receive_data(int f_in, char *
cleanup_got_literal = 1;
sum_update(data, i);
if (fd != -1 && write_file(fd,data,i) != i)
goto report_write_error;
-@@ -279,6 +286,8 @@ static int receive_data(int f_in, char *
+@@ -218,6 +225,8 @@ static int receive_data(int f_in, char *
see_token(map, len);
sum_update(map, len);
}
if (inplace) {
-@@ -319,6 +328,8 @@ static int receive_data(int f_in, char *
+@@ -258,6 +267,8 @@ static int receive_data(int f_in, char *
}
sum_end(file_sum1);
if (mapbuf)
unmap_file(mapbuf);
-@@ -334,7 +345,7 @@ static int receive_data(int f_in, char *
+@@ -273,7 +284,7 @@ static int receive_data(int f_in, char *
static void discard_receive_data(int f_in, OFF_T length)
{
}
static void handle_delayed_updates(struct file_list *flist, char *local_name)
-@@ -666,8 +677,12 @@ int recv_files(int f_in, struct file_lis
+@@ -605,8 +616,12 @@ int recv_files(int f_in, struct file_lis
rprintf(FINFO, "%s\n", fname);
/* recv file data */
log_item(file, &initial_stats, iflags, NULL);
--- old/rsync.c
+++ new/rsync.c
-@@ -49,6 +49,7 @@ extern int inplace;
+@@ -50,6 +50,7 @@ extern int inplace;
extern int keep_dirlinks;
extern int make_backups;
extern struct stats stats;
#if defined HAVE_ICONV_OPEN && defined HAVE_ICONV_H
iconv_t ic_chck = (iconv_t)-1;
-@@ -257,8 +258,15 @@ void finish_transfer(char *fname, char *
+@@ -266,8 +267,15 @@ void finish_transfer(char *fname, char *
/* move tmp file over real file */
if (verbose > 2)
rprintf(FINFO, "renaming %s to %s\n", fnametmp, fname);
int preserve_hard_links = 0;
int preserve_perms = 0;
int preserve_executability = 0;
-@@ -286,6 +287,7 @@ void usage(enum logcode F)
+@@ -287,6 +288,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");
-@@ -431,6 +433,7 @@ static struct poptOption long_options[]
+@@ -433,6 +435,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 },
+#endif /* md5.h */
--- old/options.c
+++ new/options.c
-@@ -116,6 +116,7 @@ int inplace = 0;
+@@ -117,6 +117,7 @@ int inplace = 0;
int delay_updates = 0;
long block_size = 0; /* "long" because popt can't set an int32. */
/** Network address family. **/
#ifdef INET6
-@@ -367,6 +368,7 @@ void usage(enum logcode F)
+@@ -369,6 +370,7 @@ void usage(enum logcode F)
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 INET6
rprintf(F," -4, --ipv4 prefer IPv4\n");
rprintf(F," -6, --ipv6 prefer IPv6\n");
-@@ -473,6 +475,7 @@ static struct poptOption long_options[]
+@@ -475,6 +477,7 @@ static struct poptOption long_options[]
{"whole-file", 'W', POPT_ARG_VAL, &whole_file, 1, 0, 0 },
{"no-whole-file", 0, POPT_ARG_VAL, &whole_file, 0, 0, 0 },
{"no-W", 0, POPT_ARG_VAL, &whole_file, 0, 0, 0 },
{"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 },
-@@ -1608,6 +1611,9 @@ void server_options(char **args,int *arg
+@@ -1610,6 +1613,9 @@ void server_options(char **args,int *arg
args[ac++] = arg;
}
*cygwin* ) AC_MSG_RESULT(yes)
--- old/options.c
+++ new/options.c
-@@ -167,6 +167,14 @@ int log_format_has_o_or_i = 0;
+@@ -168,6 +168,14 @@ int log_format_has_o_or_i = 0;
int always_checksum = 0;
int list_only = 0;
#define MAX_BATCH_NAME_LEN 256 /* Must be less than MAXPATHLEN-13 */
char *batch_name = NULL;
-@@ -195,6 +203,7 @@ static void print_rsync_version(enum log
+@@ -196,6 +204,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
-@@ -217,6 +226,10 @@ static void print_rsync_version(enum log
+@@ -218,6 +227,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");
-@@ -229,9 +242,9 @@ static void print_rsync_version(enum log
+@@ -230,9 +243,9 @@ static void print_rsync_version(enum log
/* Note that this field may not have type ino_t. It depends
* on the complicated interaction between largefile feature
* macros. */
(int) (sizeof dumstat->st_ino * 8),
(int) (sizeof (int64) * 8));
#ifdef MAINTAINER_MODE
-@@ -371,6 +384,13 @@ void usage(enum logcode F)
+@@ -373,6 +386,13 @@ void usage(enum logcode F)
rprintf(F," -4, --ipv4 prefer IPv4\n");
rprintf(F," -6, --ipv6 prefer IPv6\n");
#endif
rprintf(F," --version print version number\n");
rprintf(F," --help show this help screen\n");
-@@ -383,7 +403,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OP
+@@ -385,7 +405,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OP
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_SERVER, OPT_REFUSED_BASE = 9000};
static struct poptOption long_options[] = {
-@@ -520,6 +540,13 @@ static struct poptOption long_options[]
+@@ -523,6 +543,13 @@ static struct poptOption long_options[]
{"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 },
/* All the following options switch us into daemon-mode option-parsing. */
{"config", 0, POPT_ARG_STRING, 0, OPT_DAEMON, 0, 0 },
{"daemon", 0, POPT_ARG_NONE, 0, OPT_DAEMON, 0, 0 },
-@@ -1057,6 +1084,12 @@ int parse_arguments(int *argc, const cha
+@@ -1060,6 +1087,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. */
-@@ -1335,6 +1368,17 @@ int parse_arguments(int *argc, const cha
+@@ -1337,6 +1370,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) {
-@@ -1746,11 +1790,28 @@ char *check_for_hostspec(char *s, char *
+@@ -1748,11 +1792,28 @@ char *check_for_hostspec(char *s, char *
{
char *p;
int not_host;
int fd;
--- old/configure.in
+++ new/configure.in
-@@ -518,6 +518,29 @@ if test $rsync_cv_chown_follows_symlink
+@@ -522,6 +522,29 @@ if test $rsync_cv_chown_follows_symlink
AC_DEFINE(CHOWN_MODIFIES_SYMLINK, 1, [Define to 1 if chown modifies symlinks.])
fi
int dummy2;
--- old/options.c
+++ new/options.c
-@@ -195,6 +195,7 @@ static void print_rsync_version(enum log
+@@ -196,6 +196,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
-@@ -217,6 +218,10 @@ static void print_rsync_version(enum log
+@@ -218,6 +219,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");
-@@ -229,9 +234,9 @@ static void print_rsync_version(enum log
+@@ -230,9 +235,9 @@ static void print_rsync_version(enum log
/* Note that this field may not have type ino_t. It depends
* on the complicated interaction between largefile feature
* macros. */
enddit()
-@@ -541,6 +550,7 @@ use chroot = no
+@@ -544,6 +553,7 @@ use chroot = no
max connections = 4
syslog facility = local5
pid file = /var/run/rsyncd.pid
/* if always checksum is set then we use the checksum instead
--- old/options.c
+++ new/options.c
-@@ -98,6 +98,7 @@ int keep_partial = 0;
+@@ -99,6 +99,7 @@ int keep_partial = 0;
int safe_symlinks = 0;
int copy_unsafe_links = 0;
int size_only = 0;
int daemon_bwlimit = 0;
int bwlimit = 0;
int fuzzy_basis = 0;
-@@ -147,6 +148,8 @@ char *basis_dir[MAX_BASIS_DIRS+1];
+@@ -148,6 +149,8 @@ char *basis_dir[MAX_BASIS_DIRS+1];
char *config_file = NULL;
char *shell_cmd = NULL;
char *log_format = NULL;
char *password_file = NULL;
char *rsync_path = RSYNC_PATH;
char *backup_dir = NULL;
-@@ -331,6 +334,7 @@ void usage(enum logcode F)
+@@ -332,6 +335,7 @@ void usage(enum logcode F)
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");
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");
-@@ -366,6 +370,8 @@ void usage(enum logcode F)
+@@ -368,6 +372,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 INET6
rprintf(F," -4, --ipv4 prefer IPv4\n");
-@@ -443,6 +449,7 @@ static struct poptOption long_options[]
+@@ -445,6 +451,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 },
{"update", 'u', POPT_ARG_NONE, &update_only, 0, 0, 0 },
{"existing", 0, POPT_ARG_NONE, &ignore_non_existing, 0, 0, 0 },
-@@ -516,6 +523,8 @@ static struct poptOption long_options[]
+@@ -519,6 +526,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 },
{"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 },
-@@ -1380,6 +1389,16 @@ int parse_arguments(int *argc, const cha
+@@ -1382,6 +1391,16 @@ int parse_arguments(int *argc, const cha
}
}
if (files_from) {
char *h, *p;
int q;
-@@ -1640,6 +1659,25 @@ void server_options(char **args,int *arg
+@@ -1642,6 +1661,25 @@ void server_options(char **args,int *arg
args[ac++] = "--super";
}
extern char *tmpdir;
extern char *partial_dir;
extern char *basis_dir[];
-@@ -411,6 +412,8 @@ int recv_files(int f_in, struct file_lis
+@@ -350,6 +351,8 @@ int recv_files(int f_in, struct file_lis
: !am_server && log_format_has_i;
int max_phase = protocol_version >= 29 ? 2 : 1;
int i, recv_ok;
if (verbose > 2)
rprintf(FINFO,"recv_files(%d) starting\n",flist->count);
-@@ -423,6 +426,23 @@ int recv_files(int f_in, struct file_lis
+@@ -362,6 +365,23 @@ int recv_files(int f_in, struct file_lis
if (delay_updates)
- init_delayed_bits(flist->count);
+ delayed_bits = bitbag_create(flist->count);
+ if (dest_filter) {
+ char *p;
while (1) {
cleanup_disable();
-@@ -665,6 +685,9 @@ int recv_files(int f_in, struct file_lis
+@@ -604,6 +624,9 @@ int recv_files(int f_in, struct file_lis
else if (!am_server && verbose && do_progress)
rprintf(FINFO, "%s\n", fname);
/* recv file data */
recv_ok = receive_data(f_in, fnamecmp, fd1, st.st_size,
fname, fd2, file->length);
-@@ -680,6 +703,16 @@ int recv_files(int f_in, struct file_lis
+@@ -619,6 +642,16 @@ int recv_files(int f_in, struct file_lis
exit_cleanup(RERR_FILEIO);
}
--modify-window=NUM compare mod-times with reduced accuracy
-T, --temp-dir=DIR create temporary files in directory DIR
-y, --fuzzy find similar file for basis if no dest file
-@@ -390,6 +391,8 @@ to the detailed description below for a
+@@ -391,6 +392,8 @@ to the detailed description below for a
--write-batch=FILE write a batched update to FILE
--only-write-batch=FILE like --write-batch but w/o updating dest
--read-batch=FILE read a batched update from FILE
--protocol=NUM force an older protocol version to be used
--checksum-seed=NUM set block/file checksum seed (advanced)
-4, --ipv4 prefer IPv4
-@@ -1598,6 +1601,33 @@ file previously generated by bf(--write-
+@@ -1610,6 +1613,33 @@ file previously generated by bf(--write-
If em(FILE) is bf(-), the batch data will be read from standard input.
See the "BATCH MODE" section for details.
int keep_partial = 0;
int safe_symlinks = 0;
int copy_unsafe_links = 0;
-@@ -1293,6 +1293,7 @@ int parse_arguments(int *argc, const cha
- if ((do_progress || dry_run) && !verbose && !log_before_transfer
- && !am_server)
+@@ -1292,6 +1292,7 @@ int parse_arguments(int *argc, const cha
+
+ if (do_progress && !verbose && !log_before_transfer && !am_server)
verbose = 1;
+ recv_progress = do_progress;
rprintf(FERROR, "io timeout after %d seconds -- exiting\n",
--- old/options.c
+++ new/options.c
-@@ -115,6 +115,7 @@ int checksum_seed = 0;
+@@ -116,6 +116,7 @@ int checksum_seed = 0;
int inplace = 0;
int delay_updates = 0;
long block_size = 0; /* "long" because popt can't set an int32. */
/** Network address family. **/
-@@ -363,6 +364,8 @@ void usage(enum logcode F)
+@@ -365,6 +366,8 @@ void usage(enum logcode F)
rprintf(F," --password-file=FILE read password from FILE\n");
rprintf(F," --list-only list the files instead of copying them\n");
rprintf(F," --bwlimit=KBPS limit I/O bandwidth; KBytes per second\n");
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");
-@@ -383,7 +386,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OP
+@@ -385,7 +388,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OP
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_SERVER, OPT_REFUSED_BASE = 9000};
static struct poptOption long_options[] = {
-@@ -492,6 +495,8 @@ static struct poptOption long_options[]
+@@ -494,6 +497,8 @@ static struct poptOption long_options[]
{"log-format", 0, POPT_ARG_STRING, &log_format, 0, 0, 0 },
{"itemize-changes", 'i', POPT_ARG_NONE, 0, 'i', 0, 0 },
{"bwlimit", 0, POPT_ARG_INT, &bwlimit, 0, 0, 0 },
{"backup", 'b', POPT_ARG_NONE, &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 },
-@@ -1057,6 +1062,36 @@ int parse_arguments(int *argc, const cha
+@@ -1060,6 +1065,36 @@ 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. */
-@@ -1608,6 +1643,15 @@ void server_options(char **args,int *arg
+@@ -1610,6 +1645,15 @@ void server_options(char **args,int *arg
args[ac++] = arg;
}
args[ac++] = backup_dir;
--- old/rsync.yo
+++ new/rsync.yo
-@@ -387,6 +387,8 @@ to the detailed description below for a
+@@ -388,6 +388,8 @@ to the detailed description below for a
--password-file=FILE read password from FILE
--list-only list the files instead of copying them
--bwlimit=KBPS limit I/O bandwidth; KBytes per second
--write-batch=FILE write a batched update to FILE
--only-write-batch=FILE like --write-batch but w/o updating dest
--read-batch=FILE read a batched update from FILE
-@@ -1572,6 +1574,19 @@ transfer was too fast, it will wait befo
+@@ -1584,6 +1586,19 @@ transfer was too fast, it will wait befo
result is an average transfer rate equaling the specified limit. A value
of zero specifies no limit.
section for details, and also the bf(--only-write-batch) option.
--- old/util.c
+++ new/util.c
-@@ -128,6 +128,132 @@ void overflow_exit(char *str)
+@@ -125,6 +125,133 @@ void overflow_exit(char *str)
exit_cleanup(RERR_MALLOC);
}
+ }
+ return val;
+}
-
-
++
int set_modtime(char *fname, time_t modtime, mode_t mode)
+ {
+ #if !defined HAVE_LUTIMES || !defined HAVE_UTIMES
if (verbose > 1) {
--- old/configure.in
+++ new/configure.in
-@@ -810,6 +810,30 @@ samba_cv_HAVE_ACL_GET_PERM_NP=yes,samba_
+@@ -814,6 +814,30 @@ samba_cv_HAVE_ACL_GET_PERM_NP=yes,samba_
AC_MSG_RESULT(no)
)
int preserve_perms = 0;
int preserve_executability = 0;
int preserve_devices = 0;
-@@ -195,6 +196,7 @@ static void print_rsync_version(enum log
+@@ -196,6 +197,7 @@ static void print_rsync_version(enum log
char const *have_inplace = "no ";
char const *hardlinks = "no ";
char const *acls = "no ";
char const *links = "no ";
char const *ipv6 = "no ";
STRUCT_STAT *dumstat;
-@@ -214,7 +216,9 @@ static void print_rsync_version(enum log
+@@ -215,7 +217,9 @@ static void print_rsync_version(enum log
#ifdef SUPPORT_ACLS
acls = "";
#endif
#ifdef SUPPORT_LINKS
links = "";
#endif
-@@ -228,9 +232,9 @@ static void print_rsync_version(enum log
+@@ -229,9 +233,9 @@ static void print_rsync_version(enum log
rprintf(f, "Copyright (C) 1996-2006 by Andrew Tridgell, Wayne Davison, and others.\n");
rprintf(f, "<http://rsync.samba.org/>\n");
rprintf(f, "Capabilities: %d-bit files, %ssocketpairs, "
/* Note that this field may not have type ino_t. It depends
* on the complicated interaction between largefile feature
-@@ -302,6 +306,9 @@ void usage(enum logcode F)
+@@ -303,6 +307,9 @@ void usage(enum logcode F)
#ifdef SUPPORT_ACLS
rprintf(F," -A, --acls preserve ACLs (implies --perms)\n");
#endif
rprintf(F," --chmod=CHMOD change destination permissions\n");
rprintf(F," -o, --owner preserve owner (super-user only)\n");
rprintf(F," -g, --group preserve group\n");
-@@ -421,6 +428,9 @@ static struct poptOption long_options[]
+@@ -423,6 +430,9 @@ static struct poptOption long_options[]
{"acls", 'A', POPT_ARG_NONE, 0, 'A', 0, 0 },
{"no-acls", 0, POPT_ARG_VAL, &preserve_acls, 0, 0, 0 },
{"no-A", 0, POPT_ARG_VAL, &preserve_acls, 0, 0, 0 },
{"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 },
-@@ -1085,6 +1095,17 @@ int parse_arguments(int *argc, const cha
+@@ -1088,6 +1098,17 @@ int parse_arguments(int *argc, const cha
return 0;
#endif
default:
/* A large opt value means that set_refuse_options()
-@@ -1530,6 +1551,10 @@ void server_options(char **args,int *arg
+@@ -1532,6 +1553,10 @@ void server_options(char **args,int *arg
if (preserve_acls)
argstr[x++] = 'A';
#endif
if (preserve_gid)
--- old/rsync.c
+++ new/rsync.c
-@@ -206,12 +206,15 @@ int set_file_attrs(char *fname, struct f
+@@ -215,12 +215,15 @@ int set_file_attrs(char *fname, struct f
}
#endif
--chmod=CHMOD change destination permissions
-o, --owner preserve owner (super-user only)
-g, --group preserve group
-@@ -751,6 +752,11 @@ dit(bf(-A, --acls)) This option causes r
+@@ -752,6 +753,11 @@ dit(bf(-A, --acls)) This option causes r
ACLs to be the same as the source ACLs. This nonstandard option only
works if the remote rsync also supports it. bf(--acls) implies bf(--perms).