./configure (optional if already run)
make
-based-on: 24079e988fc31af4eba56cd2701fdc5a4154980d
+based-on: a01e3b490eb36ccf9e704840e1b6683dab867550
diff --git a/compat.c b/compat.c
--- a/compat.c
+++ b/compat.c
-@@ -43,6 +43,7 @@ extern int protocol_version;
+@@ -44,6 +44,7 @@ extern int protocol_version;
extern int protect_args;
extern int preserve_uid;
extern int preserve_gid;
extern int preserve_acls;
extern int preserve_xattrs;
extern int need_messages_from_generator;
-@@ -60,7 +61,7 @@ extern char *iconv_opt;
+@@ -61,7 +62,7 @@ extern char *iconv_opt;
#endif
/* These index values are for the file-list's extra-attribute array. */
int receiver_symlink_times = 0; /* receiver can set the time on a symlink */
int sender_symlink_iconv = 0; /* sender should convert symlink content */
-@@ -136,6 +137,8 @@ void setup_protocol(int f_out,int f_in)
+@@ -138,6 +139,8 @@ void setup_protocol(int f_out,int f_in)
uid_ndx = ++file_extra_cnt;
if (preserve_gid)
gid_ndx = ++file_extra_cnt;
diff --git a/flist.c b/flist.c
--- a/flist.c
+++ b/flist.c
-@@ -54,6 +54,7 @@ extern int missing_args;
+@@ -55,6 +55,7 @@ extern int missing_args;
extern int uid_ndx;
extern int gid_ndx;
extern int eol_nulls;
extern int relative_paths;
extern int implied_dirs;
extern int file_extra_cnt;
-@@ -404,7 +405,7 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
+@@ -406,7 +407,7 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
#endif
int ndx, int first_ndx)
{
static mode_t mode;
#ifdef SUPPORT_HARD_LINKS
static int64 dev;
-@@ -504,6 +505,13 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
+@@ -506,6 +507,13 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
modtime = file->modtime;
if (NSEC_BUMP(file) && protocol_version >= 31)
xflags |= XMIT_MOD_NSEC;
#ifdef SUPPORT_HARD_LINKS
if (tmp_dev != 0) {
-@@ -590,6 +598,8 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
+@@ -592,6 +600,8 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
write_varint(f, F_MOD_NSEC(file));
if (!(xflags & XMIT_SAME_MODE))
write_int(f, to_wire_mode(mode));
if (preserve_uid && !(xflags & XMIT_SAME_UID)) {
if (protocol_version < 30)
write_int(f, uid);
-@@ -675,7 +685,7 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
+@@ -677,7 +687,7 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
static struct file_struct *recv_file_entry(int f, struct file_list *flist, int xflags)
{
static mode_t mode;
#ifdef SUPPORT_HARD_LINKS
static int64 dev;
-@@ -819,6 +829,16 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
+@@ -821,6 +831,16 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
modtime_nsec = 0;
if (!(xflags & XMIT_SAME_MODE))
mode = from_wire_mode(read_int(f));
if (chmod_modes && !S_ISLNK(mode) && mode)
mode = tweak_mode(mode, chmod_modes);
-@@ -979,6 +999,8 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
+@@ -981,6 +1001,8 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
F_GROUP(file) = gid;
file->flags |= gid_flags;
}
if (unsort_ndx)
F_NDX(file) = flist->used + flist->ndx_start;
-@@ -1374,6 +1396,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1376,6 +1398,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
F_OWNER(file) = st.st_uid;
if (gid_ndx) /* Check gid_ndx instead of preserve_gid for del support */
F_GROUP(file) = st.st_gid;
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
-@@ -455,6 +455,9 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
+@@ -454,6 +454,9 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre
: iflags & (ITEM_TRANSFER|ITEM_LOCAL_CHANGE) && !(iflags & ITEM_MATCHED)
&& (!(iflags & ITEM_XNAME_FOLLOWS) || *xname))
iflags |= ITEM_REPORT_TIME;
#if !defined HAVE_LCHMOD && !defined HAVE_SETATTRLIST
if (S_ISLNK(file->mode)) {
;
-@@ -825,6 +828,8 @@ static int try_dests_reg(struct file_struct *file, char *fname, int ndx,
+@@ -824,6 +827,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;
if (preserve_hard_links && F_IS_HLINKED(file))
finish_hard_link(file, fname, ndx, &sxp->st, itemizing, code, j);
if (!maybe_ATTRS_REPORT && (INFO_GTE(NAME, 2) || stdout_format_has_i > 1)) {
-@@ -1017,6 +1022,7 @@ static int try_dests_non(struct file_struct *file, char *fname, int ndx,
+@@ -1016,6 +1021,7 @@ static int try_dests_non(struct file_struct *file, char *fname, int ndx,
static void list_file_entry(struct file_struct *f)
{
char permbuf[PERMSTRING_SIZE];
int64 len;
int colwidth = human_readable ? 14 : 11;
-@@ -1032,10 +1038,11 @@ static void list_file_entry(struct file_struct *f)
+@@ -1031,10 +1037,11 @@ static void list_file_entry(struct file_struct *f)
#ifdef SUPPORT_LINKS
if (preserve_links && S_ISLNK(f->mode)) {
} else
#endif
if (missing_args == 2 && f->mode == 0) {
-@@ -1043,9 +1050,11 @@ static void list_file_entry(struct file_struct *f)
+@@ -1042,9 +1049,11 @@ static void list_file_entry(struct file_struct *f)
colwidth + 31, "*missing",
f_name(f, NULL));
} else {
}
}
-@@ -1925,7 +1934,7 @@ static void touch_up_dirs(struct file_list *flist, int ndx)
+@@ -1924,7 +1933,7 @@ static void touch_up_dirs(struct file_list *flist, int ndx)
STRUCT_STAT st;
if (link_stat(fname, &st, 0) == 0
&& cmp_time(st.st_mtime, file->modtime) != 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 },
-@@ -2326,6 +2331,8 @@ void server_options(char **args, int *argc_p)
+@@ -2341,6 +2346,8 @@ void server_options(char **args, int *argc_p)
argstr[x++] = 'D';
if (preserve_times)
argstr[x++] = 't';
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
-@@ -1931,7 +1938,10 @@ quote(itemization(
+@@ -1945,7 +1952,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).
diff --git a/testsuite/rsync.fns b/testsuite/rsync.fns
--- a/testsuite/rsync.fns
+++ b/testsuite/rsync.fns
-@@ -214,6 +214,10 @@ checkit() {
+@@ -218,6 +218,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=$?
-@@ -221,10 +225,13 @@ checkit() {
+@@ -225,10 +229,13 @@ checkit() {
failed="YES";
fi