#ifdef SUPPORT_LINKS
if (preserve_links && S_ISLNK(f->mode)) {
rprintf(FINFO, "%s %11.0f %s %s -> %s\n",
-@@ -712,6 +715,12 @@ static struct file_struct *recv_file_ent
+@@ -715,6 +718,12 @@ static struct file_struct *recv_file_ent
}
#endif
if (always_checksum && S_ISREG(mode))
extra_len += SUM_EXTRA_CNT * EXTRA_LEN;
-@@ -849,6 +858,11 @@ static struct file_struct *recv_file_ent
+@@ -852,6 +861,11 @@ static struct file_struct *recv_file_ent
read_buf(f, bp, checksum_len);
}
+ receive_acl(file, f);
+#endif
+
- return file;
- }
+ if (S_ISREG(mode) || S_ISLNK(mode))
+ stats.total_size += file_length;
-@@ -1120,6 +1134,9 @@ static struct file_struct *send_file_nam
+@@ -1123,6 +1137,9 @@ static struct file_struct *send_file_nam
int flags, int filter_flags)
{
struct file_struct *file;
file = make_file(fname, flist, stp, flags, filter_flags);
if (!file)
-@@ -1128,12 +1145,26 @@ static struct file_struct *send_file_nam
+@@ -1131,12 +1148,26 @@ static struct file_struct *send_file_nam
if (chmod_modes && !S_ISLNK(file->mode))
file->mode = tweak_mode(file->mode, chmod_modes);
if (real_ret != 0 && one_file_system)
- real_st.st_dev = filesystem_dev;
+ real_sx.st.st_dev = filesystem_dev;
- if (incremental) {
+ if (inc_recurse) {
if (one_file_system) {
uint32 *devp = F_DIRDEV_P(file);
- DEV_MAJOR(devp) = major(real_st.st_dev);
+ return;
}
- void generate_files(int f_out, char *local_name)
-@@ -1708,6 +1796,8 @@ void generate_files(int f_out, char *loc
+ static void touch_up_dirs(struct file_list *flist, int ndx,
+@@ -1742,6 +1830,8 @@ void generate_files(int f_out, char *loc
* notice that and let us know via the redo pipe (or its closing). */
ignore_timeout = 1;
+ dflt_perms = (ACCESSPERMS & ~orig_umask);
+
do {
- if (incremental && delete_during && cur_flist->ndx_start) {
+ if (inc_recurse && delete_during && cur_flist->ndx_start) {
struct file_struct *fp = dir_flist->files[cur_flist->parent_ndx];
--- old/hlink.c
+++ new/hlink.c
extern int delay_updates;
+extern mode_t orig_umask;
extern struct stats stats;
- extern char *stdout_format;
extern char *tmpdir;
-@@ -349,6 +350,10 @@ int recv_files(int f_in, char *local_nam
+ extern char *partial_dir;
+@@ -348,6 +349,10 @@ int recv_files(int f_in, char *local_nam
int itemizing = am_server ? logfile_format_has_i : stdout_format_has_i;
enum logcode log_code = log_before_transfer ? FLOG : FINFO;
int max_phase = protocol_version >= 29 ? 2 : 1;
int ndx, recv_ok;
if (verbose > 2)
-@@ -562,7 +567,16 @@ int recv_files(int f_in, char *local_nam
+@@ -563,7 +568,16 @@ int recv_files(int f_in, char *local_nam
* mode based on the local permissions and some heuristics. */
if (!preserve_perms) {
int exists = fd1 != -1;
extern int keep_dirlinks;
extern int make_backups;
-extern mode_t orig_umask;
- extern struct stats stats;
extern struct file_list *cur_flist, *first_flist, *dir_flist;
extern struct chmod_mode_struct *daemon_chmod_modes;
-@@ -203,7 +203,8 @@ void free_sums(struct sum_struct *s)
+
+@@ -202,7 +202,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. */
{
int new_mode;
/* If the file already exists, we'll return the local permissions,
-@@ -220,56 +221,65 @@ mode_t dest_mode(mode_t flist_mode, mode
+@@ -219,56 +220,65 @@ mode_t dest_mode(mode_t flist_mode, mode
new_mode |= (new_mode & 0444) >> 2;
}
} else {
;
else
#endif
-@@ -279,45 +289,57 @@ int set_file_attrs(char *fname, struct f
+@@ -278,45 +288,57 @@ int set_file_attrs(char *fname, struct f
rprintf(FINFO,
"set uid of %s from %ld to %ld\n",
fname,
}
if (ret == 0) /* ret == 1 if symlink could not be set */
updated = 1;
-@@ -330,6 +352,11 @@ int set_file_attrs(char *fname, struct f
+@@ -329,6 +351,11 @@ int set_file_attrs(char *fname, struct f
else
rprintf(FCLIENT, "%s is uptodate\n", fname);
}
-o, --owner preserve owner (super-user only)
-g, --group preserve group
--devices preserve device files (super-user only)
-@@ -754,7 +755,9 @@ quote(itemization(
+@@ -771,7 +772,9 @@ quote(itemization(
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.
))
-@@ -785,9 +788,11 @@ The preservation of the destination's se
+@@ -802,9 +805,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
-@@ -805,6 +810,14 @@ quote(itemization(
+@@ -822,6 +827,14 @@ quote(itemization(
If bf(--perms) is enabled, this option is ignored.
dit(bf(--chmod)) This option tells rsync to apply one or more
comma-separated "chmod" strings to the permission of the files in the
transfer. The resulting value is treated as though it was the permissions
-@@ -1402,8 +1415,8 @@ if the receiving rsync is at least versi
+@@ -1432,8 +1445,8 @@ if the receiving rsync is at least versi
with older versions of rsync, but that also turns on the output of other
verbose messages).
type of update being done, bf(X) is replaced by the file-type, and the
other letters represent attributes that may be output if they are being
modified.
-@@ -1452,7 +1465,11 @@ quote(itemization(
+@@ -1482,7 +1495,11 @@ 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).