"--write-batch and --read-batch can not be used together\n");
--- old/rsync.c
+++ new/rsync.c
-@@ -49,7 +49,6 @@ extern int preserve_gid;
- extern int inplace;
- extern int keep_dirlinks;
- extern int make_backups;
--extern mode_t orig_umask;
- extern struct stats stats;
- extern struct chmod_mode_struct *daemon_chmod_modes;
-
-@@ -197,7 +196,9 @@ int set_file_attrs(char *fname, struct f
+@@ -196,7 +196,9 @@ int set_file_attrs(char *fname, struct f
(long)sxp->st.st_gid, (long)file->gid);
}
}
change_uid ? file->uid : sxp->st.st_uid,
change_gid ? file->gid : sxp->st.st_gid) != 0) {
/* shouldn't have attempted to change uid or gid
-@@ -206,7 +207,7 @@ int set_file_attrs(char *fname, struct f
+@@ -205,7 +207,7 @@ int set_file_attrs(char *fname, struct f
change_uid ? "chown" : "chgrp",
full_fname(fname));
goto cleanup;
/* a lchown had been done - we have to re-stat if the
* destination had the setuid or setgid bits set due
* to the side effect of the chown call */
-@@ -223,6 +224,8 @@ int set_file_attrs(char *fname, struct f
+@@ -222,6 +224,8 @@ int set_file_attrs(char *fname, struct f
#ifdef SUPPORT_XATTRS
if (preserve_xattrs && set_xattr(fname, file, sxp) == 0)
updated = 1;
#endif
#ifdef SUPPORT_ACLS
/* It's OK to call set_acl() now, even for a dir, as the generator
-@@ -237,7 +240,7 @@ int set_file_attrs(char *fname, struct f
+@@ -236,7 +240,7 @@ int set_file_attrs(char *fname, struct f
#ifdef HAVE_CHMOD
if ((sxp->st.st_mode & CHMOD_BITS) != (new_mode & CHMOD_BITS)) {
int preserve_perms = 0;
--- old/xattr.c
+++ new/xattr.c
-@@ -28,11 +28,15 @@
+@@ -28,11 +28,14 @@
extern int dry_run;
extern int read_only;
extern int list_only;
+extern int am_root;
-+extern mode_t orig_umask;
extern unsigned int file_struct_len;
#define RSYNC_XAL_INITIAL 5
typedef struct {
char *name;
char *datum;
-@@ -132,9 +136,15 @@ static int rsync_xal_get(const char *fna
+@@ -132,9 +135,15 @@ static int rsync_xal_get(const char *fna
if (name_size == 0)
return 0;
for (left = name_size, name = namebuf; left > 0 ; left -= len, name += len) {
datum_size = sys_lgetxattr(fname, name, NULL, 0);
if (datum_size < 0) {
if (errno == ENOTSUP)
-@@ -287,10 +297,19 @@ void receive_xattr(struct file_struct *f
+@@ -287,10 +296,19 @@ void receive_xattr(struct file_struct *f
out_of_memory("receive_xattr");
read_buf(f, ptr, name_len);
read_buf(f, ptr + name_len, datum_len);
#ifdef HAVE_OSX_XATTRS
if (strncmp(rxa->name, UNIQUE_PREFIX, UPRE_LEN) == 0) {
rxa->name_len -= UPRE_LEN;
-@@ -372,4 +391,146 @@ int set_xattr(const char *fname, const s
+@@ -372,4 +390,146 @@ int set_xattr(const char *fname, const s
return rsync_xal_set(fname, lst + ndx); /* TODO: This needs to return 1 if no xattrs changed! */
}