OBJS1=flist.o rsync.o generator.o receiver.o cleanup.o sender.o exclude.o \
- util.o main.o checksum.o match.o syscall.o log.o backup.o
+ util.o main.o checksum.o match.o syscall.o log.o backup.o @EXTRA_OBJECT@
- OBJS2=options.o io.o compat.o hlink.o token.o uidlist.o socket.o \
+ OBJS2=options.o io.o compat.o hlink.o token.o uidlist.o socket.o hashtable.o \
fileio.o batch.o clientname.o chmod.o acls.o xattrs.o
OBJS3=progress.o pipe.o
--- old/cleanup.c
fnametmp[0] = '\0';
return 0;
}
-@@ -174,6 +178,10 @@ static int receive_data(int f_in, char *
+@@ -176,6 +180,10 @@ static int receive_data(int f_in, char *
if (fd != -1 && (j = do_lseek(fd, offset, SEEK_SET)) != offset) {
rsyserr(FERROR, errno, "lseek of %s returned %.0f, not %.0f",
full_fname(fname), (double)j, (double)offset);
exit_cleanup(RERR_FILEIO);
}
}
-@@ -231,6 +239,11 @@ static int receive_data(int f_in, char *
+@@ -233,6 +241,11 @@ static int receive_data(int f_in, char *
"lseek of %s returned %.0f, not %.0f",
full_fname(fname),
(double)pos, (double)offset);
exit_cleanup(RERR_FILEIO);
}
continue;
-@@ -256,6 +269,9 @@ static int receive_data(int f_in, char *
+@@ -258,6 +271,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);
}
-@@ -299,6 +315,12 @@ static void handle_delayed_updates(char
+@@ -301,6 +317,12 @@ static void handle_delayed_updates(char
rsyserr(FERROR, errno,
"rename failed for %s (from %s)",
full_fname(fname), partialptr);
} else {
if (remove_source_files
|| (preserve_hard_links && F_IS_HLINKED(file)))
-@@ -450,6 +472,9 @@ int recv_files(int f_in, char *local_nam
+@@ -454,6 +476,9 @@ int recv_files(int f_in, char *local_nam
if (server_filter_list.head
&& check_filter(&server_filter_list, fname, 0) < 0) {
rprintf(FERROR, "attempt to hack rsync failed.\n");
exit_cleanup(RERR_PROTOCOL);
}
-@@ -508,6 +533,11 @@ int recv_files(int f_in, char *local_nam
+@@ -512,6 +537,11 @@ int recv_files(int f_in, char *local_nam
rprintf(FERROR,
"invalid basis_dir index: %d.\n",
fnamecmp_type);
exit_cleanup(RERR_PROTOCOL);
}
pathjoin(fnamecmpbuf, sizeof fnamecmpbuf,
-@@ -556,6 +586,9 @@ int recv_files(int f_in, char *local_nam
+@@ -560,6 +590,9 @@ int recv_files(int f_in, char *local_nam
} else if (do_fstat(fd1,&st) != 0) {
rsyserr(FERROR, errno, "fstat %s failed",
full_fname(fnamecmp));
discard_receive_data(f_in, F_LENGTH(file));
close(fd1);
if (inc_recurse)
-@@ -571,6 +604,9 @@ int recv_files(int f_in, char *local_nam
+@@ -575,6 +608,9 @@ int recv_files(int f_in, char *local_nam
*/
rprintf(FERROR,"recv_files: %s is a directory\n",
full_fname(fnamecmp));
discard_receive_data(f_in, F_LENGTH(file));
close(fd1);
if (inc_recurse)
-@@ -605,6 +641,9 @@ int recv_files(int f_in, char *local_nam
+@@ -609,6 +645,9 @@ int recv_files(int f_in, char *local_nam
if (fd2 == -1) {
rsyserr(FERROR, errno, "open %s failed",
full_fname(fname));
discard_receive_data(f_in, F_LENGTH(file));
if (fd1 != -1)
close(fd1);
-@@ -642,6 +681,10 @@ int recv_files(int f_in, char *local_nam
+@@ -646,6 +685,10 @@ int recv_files(int f_in, char *local_nam
if (fd2 == -1) {
rsyserr(FERROR, errno, "mkstemp %s failed",
full_fname(fnametmp));
discard_receive_data(f_in, F_LENGTH(file));
if (fd1 != -1)
close(fd1);
-@@ -664,12 +707,19 @@ int recv_files(int f_in, char *local_nam
+@@ -668,12 +711,19 @@ int recv_files(int f_in, char *local_nam
fname, fd2, F_LENGTH(file));
log_item(log_code, file, &initial_stats, iflags, NULL);
exit_cleanup(RERR_FILEIO);
}
-@@ -726,6 +776,12 @@ int recv_files(int f_in, char *local_nam
+@@ -730,6 +780,12 @@ int recv_files(int f_in, char *local_nam
rprintf(msgtype,
"%s: %s failed verification -- update %s%s.\n",
errstr, fname, keptstr, redostr);
+extern int preserve_atimes;
extern int preserve_acls;
extern int preserve_xattrs;
- extern int preserve_hard_links;
-@@ -59,7 +60,7 @@ extern char *dest_option;
+ extern int need_messages_from_generator;
+@@ -58,7 +59,7 @@ extern char *dest_option;
extern struct filter_list_struct filter_list;
/* These index values are for the file-list's extra-attribute array. */
/* The server makes sure that if either side only supports a pre-release
* version of a protocol, that both sides must speak a compatible version
-@@ -100,6 +101,8 @@ void setup_protocol(int f_out,int f_in)
+@@ -99,6 +100,8 @@ void setup_protocol(int f_out,int f_in)
uid_ndx = ++file_extra_cnt;
if (preserve_gid)
gid_ndx = ++file_extra_cnt;
extern int relative_paths;
extern int implied_dirs;
extern int file_extra_cnt;
-@@ -158,6 +159,7 @@ void show_flist_stats(void)
+@@ -170,6 +171,7 @@ void show_flist_stats(void)
static void list_file_entry(struct file_struct *f)
{
char permbuf[PERMSTRING_SIZE];
double len;
if (!F_IS_ACTIVE(f)) {
-@@ -172,14 +174,16 @@ static void list_file_entry(struct file_
+@@ -184,14 +186,16 @@ static void list_file_entry(struct file_
#ifdef SUPPORT_LINKS
if (preserve_links && S_ISLNK(f->mode)) {
f_name(f, NULL));
}
}
-@@ -347,6 +351,7 @@ int push_pathname(const char *dir, int l
- static void send_file_entry(int f, struct file_struct *file, int ndx)
+@@ -359,6 +363,7 @@ int push_pathname(const char *dir, int l
+ static void send_file_entry(int f, struct file_struct *file, int ndx, int first_ndx)
{
static time_t modtime;
+ static time_t atime;
static mode_t mode;
static int64 dev;
static dev_t rdev;
-@@ -446,6 +451,13 @@ static void send_file_entry(int f, struc
+@@ -458,6 +463,13 @@ static void send_file_entry(int f, struc
xflags |= XMIT_SAME_TIME;
else
modtime = file->modtime;
#ifdef SUPPORT_HARD_LINKS
if (tmp_dev != 0) {
-@@ -517,6 +529,8 @@ static void send_file_entry(int f, struc
+@@ -530,6 +542,8 @@ static void send_file_entry(int f, struc
}
if (!(xflags & XMIT_SAME_MODE))
write_int(f, to_wire_mode(mode));
if (uid_ndx && !(xflags & XMIT_SAME_UID)) {
if (protocol_version < 30)
write_int(f, uid);
-@@ -603,7 +617,7 @@ static void send_file_entry(int f, struc
+@@ -616,7 +630,7 @@ static void send_file_entry(int f, struc
static struct file_struct *recv_file_entry(struct file_list *flist,
int xflags, int f)
{
static mode_t mode;
static int64 dev;
static dev_t rdev;
-@@ -739,6 +753,16 @@ static struct file_struct *recv_file_ent
+@@ -753,6 +767,16 @@ static struct file_struct *recv_file_ent
}
if (!(xflags & XMIT_SAME_MODE))
mode = from_wire_mode(read_int(f));
if (chmod_modes && !S_ISLNK(mode))
mode = tweak_mode(mode, chmod_modes);
-@@ -867,6 +891,8 @@ static struct file_struct *recv_file_ent
+@@ -881,6 +905,8 @@ static struct file_struct *recv_file_ent
F_GROUP(file) = gid;
file->flags |= gid_flags;
}
#ifdef ICONV_OPTION
if (ic_ndx)
F_NDX(file) = flist->used + flist->ndx_start;
-@@ -1181,6 +1207,8 @@ struct file_struct *make_file(const char
+@@ -1196,6 +1222,8 @@ struct file_struct *make_file(const char
F_OWNER(file) = st.st_uid;
if (gid_ndx)
F_GROUP(file) = st.st_gid;
if (preserve_hard_links && F_IS_HLINKED(file))
finish_hard_link(file, fname, &sxp->st, itemizing, code, j);
if (itemizing && (verbose > 1 || stdout_format_has_i > 1)) {
-@@ -1774,7 +1780,7 @@ static void touch_up_dirs(struct file_li
+@@ -1782,7 +1788,7 @@ static void touch_up_dirs(struct file_li
if (!(file->mode & S_IWUSR))
do_chmod(fname, file->mode);
if (need_retouch_dir_times)
+++ new/rsync.h
@@ -57,6 +57,7 @@
#define XMIT_RDEV_MINOR_8_pre30 (1<<11) /* protocols 28 - 29 */
- #define XMIT_GROUP_NAME_FOLLOWS (1<<11) /* protocols 30 - NOW */
- #define XMIT_HLINK_FIRST (1<<12) /* protocols 30 - NOW (HLINKED files only) */
-+#define XMIT_SAME_ATIME (1<<13) /* protocols ?? - NOW */
+ #define XMIT_GROUP_NAME_FOLLOWS (1<<11) /* protocols 30 - now */
+ #define XMIT_HLINK_FIRST (1<<12) /* protocols 30 - now (HLINKED files only) */
++#define XMIT_SAME_ATIME (1<<13) /* protocols ?? - now */
/* These flags are used in the live flist data. */
#define FULL_FLUSH 1
#define NORMAL_FLUSH 0
-@@ -583,6 +585,7 @@ struct file_struct {
- extern int file_extra_cnt;
+@@ -573,6 +575,7 @@ extern int file_extra_cnt;
+ extern int inc_recurse;
extern int uid_ndx;
extern int gid_ndx;
+extern int atimes_ndx;
extern int acls_ndx;
extern int xattrs_ndx;
-@@ -620,6 +623,7 @@ extern int xattrs_ndx;
+@@ -610,6 +613,7 @@ extern int xattrs_ndx;
/* When the associated option is on, all entries will have these present: */
#define F_OWNER(f) REQ_EXTRA(f, uid_ndx)->unum
#define F_GROUP(f) REQ_EXTRA(f, gid_ndx)->unum
--super receiver attempts super-user activities
--fake-super store/recover privileged attrs using xattrs
-S, --sparse handle sparse files efficiently
-@@ -940,6 +941,12 @@ it is preserving modification times (see
+@@ -947,6 +948,12 @@ it is preserving modification times (see
the directories on the receiving side, it is a good idea to use bf(-O).
This option is inferred if you use bf(--backup) without bf(--backup-dir).
dit(bf(--super)) This tells the receiving side to attempt super-user
activities even if the receiving rsync wasn't run by the super-user. These
activities include: preserving users via the bf(--owner) option, preserving
-@@ -1602,8 +1609,10 @@ quote(itemization(
+@@ -1609,8 +1616,10 @@ quote(itemization(
sender's value (requires bf(--owner) and super-user privileges).
it() A bf(g) means the group is different and is being updated to the
sender's value (requires bf(--group) and the authority to set the group).
+exit 0
--- old/testsuite/rsync.fns
+++ new/testsuite/rsync.fns
-@@ -186,6 +186,10 @@ checkit() {
+@@ -187,6 +187,10 @@ checkit() {
# We can just write everything to stdout/stderr, because the
# wrapper hides it unless there is a problem.
echo "Running: \"$1\""
eval "$1"
status=$?
-@@ -193,10 +197,13 @@ checkit() {
+@@ -194,10 +198,13 @@ checkit() {
failed="YES";
fi
--- old/compat.c
+++ new/compat.c
-@@ -44,6 +44,7 @@ extern int prune_empty_dirs;
+@@ -45,6 +45,7 @@ extern int prune_empty_dirs;
extern int protocol_version;
extern int preserve_uid;
extern int preserve_gid;
+extern int preserve_fileflags;
extern int preserve_acls;
extern int preserve_xattrs;
- extern int preserve_hard_links;
+ extern int need_messages_from_generator;
@@ -58,7 +59,7 @@ extern char *dest_option;
extern struct filter_list_struct filter_list;
extern int relative_paths;
extern int implied_dirs;
extern int file_extra_cnt;
-@@ -348,6 +349,9 @@ static void send_file_entry(int f, struc
+@@ -360,6 +361,9 @@ static void send_file_entry(int f, struc
{
static time_t modtime;
static mode_t mode;
static int64 dev;
static dev_t rdev;
static uint32 rdev_major;
-@@ -396,6 +400,12 @@ static void send_file_entry(int f, struc
+@@ -408,6 +412,12 @@ static void send_file_entry(int f, struc
xflags |= XMIT_SAME_MODE;
else
mode = file->mode;
if (protocol_version >= 30 && S_ISDIR(mode) && !(file->flags & FLAG_XFER_DIR))
xflags |= XMIT_NON_XFER_DIR;
-@@ -517,6 +527,10 @@ static void send_file_entry(int f, struc
+@@ -530,6 +540,10 @@ static void send_file_entry(int f, struc
}
if (!(xflags & XMIT_SAME_MODE))
write_int(f, to_wire_mode(mode));
if (uid_ndx && !(xflags & XMIT_SAME_UID)) {
if (protocol_version < 30)
write_int(f, uid);
-@@ -605,6 +619,9 @@ static struct file_struct *recv_file_ent
+@@ -618,6 +632,9 @@ static struct file_struct *recv_file_ent
{
static int64 modtime;
static mode_t mode;
static int64 dev;
static dev_t rdev;
static uint32 rdev_major;
-@@ -739,9 +756,12 @@ static struct file_struct *recv_file_ent
+@@ -753,9 +770,12 @@ static struct file_struct *recv_file_ent
}
if (!(xflags & XMIT_SAME_MODE))
mode = from_wire_mode(read_int(f));
if (uid_ndx && !(xflags & XMIT_SAME_UID)) {
if (protocol_version < 30)
-@@ -861,6 +881,10 @@ static struct file_struct *recv_file_ent
+@@ -875,6 +895,10 @@ static struct file_struct *recv_file_ent
OPT_EXTRA(file, 0)->unum = (uint32)(file_length >> 32);
}
file->mode = mode;
if (uid_ndx)
F_OWNER(file) = uid;
if (gid_ndx) {
-@@ -1187,6 +1211,10 @@ struct file_struct *make_file(const char
+@@ -1192,6 +1216,10 @@ struct file_struct *make_file(const char
OPT_EXTRA(file, 0)->unum = (uint32)(st.st_size >> 32);
}
file->mode = st.st_mode;
if (gid_ndx)
--- old/generator.c
+++ new/generator.c
-@@ -116,6 +116,14 @@ static int need_retouch_dir_times;
+@@ -115,6 +115,14 @@ static int need_retouch_dir_times;
static int need_retouch_dir_perms;
static const char *solo_file = NULL;
/* For calling delete_item() and delete_dir_contents(). */
#define DEL_RECURSE (1<<1) /* recurse */
#define DEL_DIR_IS_EMPTY (1<<2) /* internal delete_FUNCTIONS use only */
-@@ -131,7 +139,6 @@ enum delret {
+@@ -130,7 +138,6 @@ enum delret {
/* Forward declaration for delete_item(). */
static enum delret delete_dir_contents(char *fname, int flags);
static int is_backup_file(char *fn)
{
int k = strlen(fn) - backup_suffix_len;
-@@ -144,17 +151,20 @@ static int is_backup_file(char *fn)
+@@ -143,17 +150,20 @@ static int is_backup_file(char *fn)
* Note that fbuf must point to a MAXPATHLEN buffer if the mode indicates it's
* a directory! (The buffer is used for recursion, but returned unchanged.)
*/
if (S_ISDIR(mode) && !(flags & DEL_DIR_IS_EMPTY)) {
ignore_perishable = 1;
/* If DEL_RECURSE is not set, this just reports emptiness. */
-@@ -266,7 +276,7 @@ static enum delret delete_dir_contents(c
+@@ -265,7 +275,7 @@ static enum delret delete_dir_contents(c
if (S_ISDIR(fp->mode)
&& delete_dir_contents(fname, flags | DEL_RECURSE) != DR_SUCCESS)
ret = DR_NOT_EMPTY;
ret = DR_NOT_EMPTY;
}
-@@ -322,8 +332,9 @@ static int remember_delete(struct file_s
+@@ -321,8 +331,9 @@ static int remember_delete(struct file_s
while (1) {
len = snprintf(deldelay_buf + deldelay_cnt,
if ((deldelay_cnt += len) <= deldelay_size)
break;
if (deldelay_fd < 0 && !start_delete_delay_temp())
-@@ -336,7 +347,7 @@ static int remember_delete(struct file_s
+@@ -335,7 +346,7 @@ static int remember_delete(struct file_s
return 1;
}
{
static int read_pos = 0;
int j, len, mode;
-@@ -378,7 +389,7 @@ static int read_delay_line(char *buf)
+@@ -377,7 +388,7 @@ static int read_delay_line(char *buf)
bp = deldelay_buf + read_pos;
invalid_data:
rprintf(FERROR, "ERROR: invalid data in delete-delay file.\n");
return -1;
-@@ -401,15 +412,15 @@ static int read_delay_line(char *buf)
+@@ -400,15 +411,15 @@ static int read_delay_line(char *buf)
static void do_delayed_deletions(char *delbuf)
{
if (deldelay_fd >= 0)
close(deldelay_fd);
}
-@@ -476,7 +487,7 @@ static void delete_in_dir(char *fbuf, st
+@@ -475,7 +486,7 @@ static void delete_in_dir(char *fbuf, st
if (!remember_delete(fp, delbuf))
break;
} else
}
}
-@@ -1220,7 +1231,7 @@ static void recv_generator(char *fname,
+@@ -1219,7 +1230,7 @@ static void recv_generator(char *fname,
* we need to delete it. If it doesn't exist, then
* (perhaps recursively) create it. */
if (statret == 0 && !S_ISDIR(sx.st.st_mode)) {
goto skipping_dir_contents;
statret = -1;
}
-@@ -1352,7 +1363,7 @@ static void recv_generator(char *fname,
+@@ -1351,7 +1362,7 @@ static void recv_generator(char *fname,
}
/* Not the right symlink (or not a symlink), so
* delete it. */
goto cleanup;
} else if (basis_dir[0] != NULL) {
int j = try_dests_non(file, fname, ndx, fnamecmpbuf, &sx,
-@@ -1429,7 +1440,7 @@ static void recv_generator(char *fname,
+@@ -1430,7 +1441,7 @@ static void recv_generator(char *fname,
goto return_with_success;
goto cleanup;
}
goto cleanup;
} else if (basis_dir[0] != NULL) {
int j = try_dests_non(file, fname, ndx, fnamecmpbuf, &sx,
-@@ -1518,7 +1529,7 @@ static void recv_generator(char *fname,
+@@ -1521,7 +1532,7 @@ static void recv_generator(char *fname,
fnamecmp_type = FNAMECMP_FNAME;
if (statret == 0 && !S_ISREG(sx.st.st_mode)) {
int preserve_executability = 0;
int preserve_devices = 0;
int preserve_specials = 0;
-@@ -214,6 +215,7 @@ static void print_rsync_version(enum log
+@@ -219,6 +220,7 @@ static void print_rsync_version(enum log
char const *links = "no ";
char const *iconv = "no ";
char const *ipv6 = "no ";
STRUCT_STAT *dumstat;
#if SUBPROTOCOL_VERSION != 0
-@@ -243,6 +245,9 @@ static void print_rsync_version(enum log
+@@ -248,6 +250,9 @@ static void print_rsync_version(enum log
#ifdef ICONV_OPTION
iconv = "";
#endif
rprintf(f, "%s version %s protocol version %d%s\n",
RSYNC_NAME, RSYNC_VERSION, PROTOCOL_VERSION, subprotocol);
-@@ -256,8 +261,8 @@ static void print_rsync_version(enum log
+@@ -261,8 +266,8 @@ static void print_rsync_version(enum log
(int)(sizeof (int64) * 8));
rprintf(f, " %ssocketpairs, %shardlinks, %ssymlinks, %sIPv6, batchfiles, %sinplace,\n",
got_socketpair, hardlinks, links, ipv6, have_inplace);
#ifdef MAINTAINER_MODE
rprintf(f, "Panic Action: \"%s\"\n", get_panic_action());
-@@ -323,6 +328,7 @@ void usage(enum logcode F)
+@@ -329,6 +334,7 @@ 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
-@@ -463,6 +469,8 @@ static struct poptOption long_options[]
+@@ -467,6 +473,8 @@ 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 },
-@@ -1254,6 +1262,15 @@ int parse_arguments(int *argc, const cha
+@@ -1263,6 +1271,15 @@ int parse_arguments(int *argc, const cha
}
#endif
if (write_batch && read_batch) {
snprintf(err_buf, sizeof err_buf,
"--write-batch and --read-batch can not be used together\n");
-@@ -1738,6 +1755,9 @@ void server_options(char **args,int *arg
+@@ -1754,6 +1771,9 @@ void server_options(char **args,int *arg
if (xfer_dirs && !recurse && delete_mode && am_sender)
args[ac++] = "--no-r";
+extern int preserve_fileflags;
extern int preserve_executability;
extern int preserve_times;
- extern int omit_dir_times;
-@@ -61,6 +62,16 @@ iconv_t ic_send = (iconv_t)-1, ic_recv =
+ extern int am_root;
+@@ -60,6 +61,16 @@ iconv_t ic_send = (iconv_t)-1, ic_recv =
int ic_ndx;
#endif
static const char *default_charset(void)
{
#if defined HAVE_LIBCHARSET_H && defined HAVE_LOCALE_CHARSET
-@@ -268,6 +279,41 @@ mode_t dest_mode(mode_t flist_mode, mode
+@@ -267,6 +278,41 @@ mode_t dest_mode(mode_t flist_mode, mode
return new_mode;
}
int set_file_attrs(const char *fname, struct file_struct *file, statx *sxp,
const char *fnamecmp, int flags)
{
-@@ -396,6 +442,15 @@ int set_file_attrs(const char *fname, st
+@@ -395,6 +441,15 @@ int set_file_attrs(const char *fname, st
}
#endif
if (verbose > 1 && flags & ATTRS_REPORT) {
if (updated)
rprintf(FCLIENT, "%s\n", fname);
-@@ -455,6 +510,9 @@ void finish_transfer(const char *fname,
+@@ -454,6 +509,9 @@ void finish_transfer(const char *fname,
set_file_attrs(fnametmp, file, NULL, fnamecmp,
ok_to_set_time ? 0 : ATTRS_SKIP_MTIME);
/* move tmp file over real file */
if (verbose > 2)
rprintf(FINFO, "renaming %s to %s\n", fnametmp, fname);
-@@ -469,6 +527,9 @@ void finish_transfer(const char *fname,
+@@ -468,6 +526,9 @@ void finish_transfer(const char *fname,
}
if (ret == 0) {
/* The file was moved into place (not copied), so it's done. */
+++ new/rsync.h
@@ -57,6 +57,7 @@
#define XMIT_RDEV_MINOR_8_pre30 (1<<11) /* protocols 28 - 29 */
- #define XMIT_GROUP_NAME_FOLLOWS (1<<11) /* protocols 30 - NOW */
- #define XMIT_HLINK_FIRST (1<<12) /* protocols 30 - NOW (HLINKED files only) */
-+#define XMIT_SAME_FLAGS (1<<14) /* protocols ?? - NOW */
+ #define XMIT_GROUP_NAME_FOLLOWS (1<<11) /* protocols 30 - now */
+ #define XMIT_HLINK_FIRST (1<<12) /* protocols 30 - now (HLINKED files only) */
++#define XMIT_SAME_FLAGS (1<<14) /* protocols ?? - now */
/* These flags are used in the live flist data. */
/* Find a variable that is either exactly 32-bits or longer.
* If some code depends on 32-bit truncation, it will need to
* take special action in a "#if SIZEOF_INT32 > 4" section. */
-@@ -583,6 +588,7 @@ struct file_struct {
- extern int file_extra_cnt;
+@@ -573,6 +578,7 @@ extern int file_extra_cnt;
+ extern int inc_recurse;
extern int uid_ndx;
extern int gid_ndx;
+extern int fileflags_ndx;
extern int acls_ndx;
extern int xattrs_ndx;
-@@ -620,6 +626,7 @@ extern int xattrs_ndx;
+@@ -610,6 +616,7 @@ extern int xattrs_ndx;
/* When the associated option is on, all entries will have these present: */
#define F_OWNER(f) REQ_EXTRA(f, uid_ndx)->unum
#define F_GROUP(f) REQ_EXTRA(f, gid_ndx)->unum
#define F_NDX(f) REQ_EXTRA(f, ic_ndx)->num
--- old/rsync.yo
+++ new/rsync.yo
-@@ -342,6 +342,7 @@ to the detailed description below for a
+@@ -343,6 +343,7 @@ to the detailed description below for a
-K, --keep-dirlinks treat symlinked dir on receiver as dir
-H, --hard-links preserve hard links
-p, --perms preserve permissions
-E, --executability preserve executability
--chmod=CHMOD affect file and/or directory permissions
-A, --acls preserve ACLs (implies -p)
-@@ -542,7 +543,9 @@ specified, in which case bf(-r) is not i
+@@ -543,7 +544,9 @@ specified, in which case bf(-r) is not i
Note that bf(-a) bf(does not preserve hardlinks), because
finding multiply-linked files is expensive. You must separately
dit(--no-OPTION) You may turn off one or more implied options by prefixing
the option name with "no-". Not all options may be prefixed with a "no-":
-@@ -865,6 +868,13 @@ dit(bf(-X, --xattrs)) This option causes
+@@ -882,6 +885,13 @@ dit(bf(-X, --xattrs)) This option causes
extended attributes to be the same as the local ones. This will work
only if the remote machine's rsync also supports this option.
*cygwin* ) AC_MSG_RESULT(yes)
--- old/options.c
+++ new/options.c
-@@ -181,6 +181,14 @@ int logfile_format_has_o_or_i = 0;
+@@ -180,6 +180,14 @@ int logfile_format_has_o_or_i = 0;
int always_checksum = 0;
int list_only = 0;
OPT_SERVER, OPT_REFUSED_BASE = 9000};
static struct poptOption long_options[] = {
-@@ -613,6 +632,13 @@ static struct poptOption long_options[]
+@@ -615,6 +634,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 },
-@@ -638,6 +664,13 @@ static void daemon_usage(enum logcode F)
+@@ -640,6 +666,13 @@ static void daemon_usage(enum logcode F)
rprintf(F," -v, --verbose increase verbosity\n");
rprintf(F," -4, --ipv4 prefer IPv4\n");
rprintf(F," -6, --ipv6 prefer IPv6\n");
rprintf(F," --help show this help screen\n");
rprintf(F,"\n");
-@@ -662,6 +695,13 @@ static struct poptOption long_daemon_opt
+@@ -664,6 +697,13 @@ static struct poptOption long_daemon_opt
{"protocol", 0, POPT_ARG_INT, &protocol_version, 0, 0, 0 },
{"server", 0, POPT_ARG_NONE, &am_server, 0, 0, 0 },
{"temp-dir", 'T', POPT_ARG_STRING, &tmpdir, 0, 0, 0 },
{"verbose", 'v', POPT_ARG_NONE, 0, 'v', 0, 0 },
{"no-verbose", 0, POPT_ARG_VAL, &verbose, 0, 0, 0 },
{"no-v", 0, POPT_ARG_VAL, &verbose, 0, 0, 0 },
-@@ -932,6 +972,12 @@ int parse_arguments(int *argc, const cha
+@@ -934,6 +974,12 @@ int parse_arguments(int *argc, const cha
verbose++;
break;
default:
rprintf(FERROR,
"rsync: %s: %s (in daemon mode)\n",
-@@ -955,6 +1001,17 @@ int parse_arguments(int *argc, const cha
+@@ -957,6 +1003,17 @@ int parse_arguments(int *argc, const cha
exit_cleanup(RERR_SYNTAX);
}
*argv = poptGetArgs(pc);
*argc = count_args(*argv);
am_starting_up = 0;
-@@ -1205,6 +1262,12 @@ int parse_arguments(int *argc, const cha
+@@ -1207,6 +1264,12 @@ int parse_arguments(int *argc, const cha
return 0;
#endif
default:
/* A large opt value means that set_refuse_options()
* turned this option off. */
-@@ -1505,6 +1568,17 @@ int parse_arguments(int *argc, const cha
+@@ -1514,6 +1577,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) {
-@@ -1972,10 +2046,27 @@ char *check_for_hostspec(char *s, char *
+@@ -1981,10 +2055,27 @@ char *check_for_hostspec(char *s, char *
char *p;
int not_host;
int hostlen;
+#include <openssl/err.h>
+#endif
+
- /* Starting from protocol version 26, we always use 64-bit
- * ino_t and dev_t internally, even if this platform does not
- * allow files to have 64-bit inums. That's because the
+ struct hashtable {
+ void *nodes;
+ int32 size, entries;
--- old/ssl.c
+++ new/ssl.c
@@ -0,0 +1,370 @@