extern int relative_paths;
extern int implied_dirs;
extern int file_extra_cnt;
-@@ -344,6 +345,7 @@ int push_pathname(const char *dir, int len)
+@@ -343,6 +344,7 @@ int push_pathname(const char *dir, int len)
static void send_file_entry(int f, struct file_struct *file, int ndx, int first_ndx)
{
static time_t modtime;
#ifdef SUPPORT_HARD_LINKS
if (tmp_dev != 0) {
-@@ -523,6 +532,8 @@ static void send_file_entry(int f, struct file_struct *file, int ndx, int first_
+@@ -522,6 +531,8 @@ static void send_file_entry(int f, struct file_struct *file, int ndx, int first_
}
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);
-@@ -609,7 +620,7 @@ static void send_file_entry(int f, struct file_struct *file, int ndx, int first_
+@@ -608,7 +619,7 @@ static void send_file_entry(int f, struct file_struct *file, int ndx, int first_
static struct file_struct *recv_file_entry(struct file_list *flist,
int xflags, int f)
{
static mode_t mode;
#ifdef SUPPORT_HARD_LINKS
static int64 dev;
-@@ -742,6 +753,16 @@ static struct file_struct *recv_file_entry(struct file_list *flist,
+@@ -741,6 +752,16 @@ static struct file_struct *recv_file_entry(struct file_list *flist,
}
if (!(xflags & XMIT_SAME_MODE))
mode = from_wire_mode(read_int(f));
if (chmod_modes && !S_ISLNK(mode))
mode = tweak_mode(mode, chmod_modes);
-@@ -872,6 +893,8 @@ static struct file_struct *recv_file_entry(struct file_list *flist,
+@@ -871,6 +892,8 @@ static struct file_struct *recv_file_entry(struct file_list *flist,
F_GROUP(file) = gid;
file->flags |= gid_flags;
}
if (unsort_ndx)
F_NDX(file) = flist->used + flist->ndx_start;
-@@ -1200,6 +1223,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1197,6 +1220,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
F_OWNER(file) = st.st_uid;
if (gid_ndx)
F_GROUP(file) = st.st_gid;
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
-@@ -57,6 +57,7 @@ int preserve_specials = 0;
+@@ -58,6 +58,7 @@ int preserve_specials = 0;
int preserve_uid = 0;
int preserve_gid = 0;
int preserve_times = 0;
int update_only = 0;
int cvs_exclude = 0;
int dry_run = 0;
-@@ -347,6 +348,7 @@ void usage(enum logcode F)
+@@ -348,6 +349,7 @@ void usage(enum logcode F)
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," --super receiver attempts super-user activities\n");
#ifdef SUPPORT_XATTRS
rprintf(F," --fake-super store/recover privileged attrs using xattrs\n");
-@@ -482,6 +484,9 @@ static struct poptOption long_options[] = {
+@@ -483,6 +485,9 @@ static struct poptOption long_options[] = {
{"times", 't', POPT_ARG_VAL, &preserve_times, 2, 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 },
-@@ -1716,6 +1721,8 @@ void server_options(char **args, int *argc_p)
+@@ -1724,6 +1729,8 @@ void server_options(char **args, int *argc_p)
argstr[x++] = 'D';
if (preserve_times)
argstr[x++] = 't';
extern int preserve_times;
extern int am_root;
extern int am_server;
-@@ -343,6 +344,7 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
+@@ -344,6 +345,7 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
int updated = 0;
stat_x sx2;
int change_uid, change_gid;
mode_t new_mode = file->mode;
int inherit;
-@@ -386,18 +388,36 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
+@@ -387,18 +389,36 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
set_xattr(fname, file, fnamecmp, sxp);
#endif