X-Git-Url: https://mattmccutchen.net/rsync/rsync-patches.git/blobdiff_plain/fdf967c7385fcb3ca1141d12fa2c8ea1f7953132..a302c04819c87d365481d9a8b516d3c20df8bf46:/xattrs.diff diff --git a/xattrs.diff b/xattrs.diff index 39239b0..4af1c38 100644 --- a/xattrs.diff +++ b/xattrs.diff @@ -102,18 +102,18 @@ TODO: if ((am_root && preserve_devices && IS_DEVICE(file->mode)) --- old/compat.c +++ new/compat.c -@@ -50,6 +50,8 @@ void setup_protocol(int f_out,int f_in) - preserve_gid = ++flist_extra_cnt; +@@ -52,6 +52,8 @@ void setup_protocol(int f_out,int f_in) + preserve_gid = ++file_extra_cnt; if (preserve_acls && !am_sender) - preserve_acls = ++flist_extra_cnt; + preserve_acls = ++file_extra_cnt; + if (preserve_xattrs && !am_sender) -+ preserve_xattrs = ++flist_extra_cnt; ++ preserve_xattrs = ++file_extra_cnt; if (remote_protocol == 0) { if (!read_batch) --- old/configure.in +++ new/configure.in -@@ -878,6 +878,40 @@ samba_cv_HAVE_ACL_GET_PERM_NP=yes,samba_ +@@ -883,6 +883,40 @@ samba_cv_HAVE_ACL_GET_PERM_NP=yes,samba_ AC_MSG_RESULT(no) ) @@ -176,7 +176,7 @@ TODO: return file; } @@ -1082,7 +1087,7 @@ static struct file_struct *send_file_nam - unsigned short flags) + int flags) { struct file_struct *file; -#ifdef SUPPORT_ACLS @@ -497,7 +497,7 @@ TODO: * will enable owner-writability using chmod, if necessary. --- old/rsync.h +++ new/rsync.h -@@ -511,6 +511,10 @@ struct idev_node { +@@ -540,6 +540,10 @@ struct idev_node { #define ACLS_NEED_MASK 1 #endif @@ -508,7 +508,15 @@ TODO: #define GID_NONE ((gid_t)-1) union file_extras { -@@ -563,6 +567,7 @@ extern int preserve_gid; +@@ -560,6 +564,7 @@ extern int file_extra_cnt; + extern int preserve_uid; + extern int preserve_gid; + extern int preserve_acls; ++extern int preserve_xattrs; + + #define FILE_STRUCT_LEN (offsetof(struct file_struct, basename)) + #define EXTRA_LEN (sizeof (union file_extras)) +@@ -593,6 +598,7 @@ extern int preserve_acls; #define F_UID(f) REQ_EXTRA(f, preserve_uid)->unum #define F_GID(f) REQ_EXTRA(f, preserve_gid)->unum #define F_ACL(f) REQ_EXTRA(f, preserve_acls)->unum @@ -516,7 +524,7 @@ TODO: /* These items are per-entry optional and mutally exclusive: */ #define F_HL_GNUM(f) OPT_EXTRA(f, LEN64_BUMP(f))->num -@@ -738,6 +743,9 @@ typedef struct { +@@ -768,6 +774,9 @@ typedef struct { struct rsync_acl *acc_acl; /* access ACL */ struct rsync_acl *def_acl; /* default ACL */ #endif @@ -559,7 +567,7 @@ TODO: transfer. The resulting value is treated as though it was the permissions --- old/xattr.c +++ new/xattr.c -@@ -0,0 +1,415 @@ +@@ -0,0 +1,413 @@ +/* + * Extended Attribute support for rsync. + * Written by Jay Fenlason, vaguely based on the ACLs patch. @@ -591,8 +599,6 @@ TODO: +extern int am_root; +extern int read_only; +extern int list_only; -+extern int preserve_xattrs; -+extern unsigned int file_struct_len; + +#define RSYNC_XAL_INITIAL 5 +#define RSYNC_XAL_LIST_INITIAL 100