Updated the opening comments to mention how to apply the patch
[rsync/rsync-patches.git] / xattrs.diff
index 25edadf..37b9753 100644 (file)
@@ -1,13 +1,18 @@
-Depends-On-Patch: acls.diff
+This patch adds basic support for extended attributes.  It works, but there
+are some things that still needs to be improved (see TODO list below).
 
-This patch adds preliminary support for extended attributes.
-
-After applying this patch, run these commands for a successful build:
+To use this patch, run these commands for a successful build:
 
+    patch -p1 <patches/acls.diff
+    patch -p1 <patches/xattrs.diff
     ./prepare-source
     ./configure --enable-acl-support --enable-xattr-support
     make
 
+Alternately, if you don't want ACL support, configure it this way:
+
+    ./configure --enable-xattr-support
+
 TODO:
 
  - This patch needs to more efficiently handle large xattrs, especially when
@@ -41,7 +46,7 @@ TODO:
  popt_OBJS=popt/findme.o  popt/popt.o  popt/poptconfig.o \
 --- old/acls.c
 +++ new/acls.c
-@@ -31,6 +31,7 @@ extern int read_only;
+@@ -30,6 +30,7 @@ extern int read_only;
  extern int list_only;
  extern int orig_umask;
  extern int preserve_acls;
@@ -49,7 +54,7 @@ TODO:
  extern unsigned int file_struct_len;
  
  /* === ACL structures === */
-@@ -742,6 +743,10 @@ void receive_acl(struct file_struct *fil
+@@ -741,6 +742,10 @@ void receive_acl(struct file_struct *fil
        type = SMB_ACL_TYPE_ACCESS;
        racl_list = &access_acl_list;
        ndx_ptr = (char*)file + file_struct_len;
@@ -60,7 +65,7 @@ TODO:
        do {
                char tag = read_byte(f);
                int ndx;
-@@ -801,6 +806,10 @@ void cache_acl(struct file_struct *file,
+@@ -800,6 +805,10 @@ void cache_acl(struct file_struct *file,
        racl = sxp->acc_acl;
        racl_list = &access_acl_list;
        ndx_ptr = (char*)file + file_struct_len;
@@ -71,7 +76,7 @@ TODO:
        do {
                if (!racl)
                        ndx = -1;
-@@ -921,6 +930,10 @@ int set_acl(const char *fname, const str
+@@ -920,6 +929,10 @@ int set_acl(const char *fname, const str
  
        type = SMB_ACL_TYPE_ACCESS;
        ndx_ptr = (char*)file + file_struct_len;
@@ -501,7 +506,7 @@ TODO:
  extern int preserve_perms;
  extern int preserve_executability;
  extern int preserve_times;
-@@ -219,6 +220,10 @@ int set_file_attrs(char *fname, struct f
+@@ -218,6 +219,10 @@ int set_file_attrs(char *fname, struct f
        if (daemon_chmod_modes && !S_ISLNK(new_mode))
                new_mode = tweak_mode(new_mode, daemon_chmod_modes);