Adding group-auth patch; updating patches.
[rsync/rsync-patches.git] / xattrs.diff
index 4ece1ba..80c283a 100644 (file)
@@ -14,7 +14,7 @@ based-on: patch/acls
 diff --git a/compat.c b/compat.c
 --- a/compat.c
 +++ b/compat.c
-@@ -189,13 +189,6 @@ void setup_protocol(int f_out,int f_in)
+@@ -192,13 +192,6 @@ void setup_protocol(int f_out,int f_in)
        if (protocol_version < 30) {
                if (append_mode == 1)
                        append_mode = 2;
@@ -56,7 +56,7 @@ diff --git a/xattrs.c b/xattrs.c
                        /* For large datums, we store a flag and a checksum. */
                        name_offset = 1 + MAX_DIGEST_LEN;
                        sum_init(checksum_seed);
-@@ -351,7 +353,7 @@ static int find_matching_xattr(item_list *xalp)
+@@ -365,7 +367,7 @@ static int find_matching_xattr(item_list *xalp)
                         || rxas1[j].datum_len != rxas2[j].datum_len
                         || strcmp(rxas1[j].name, rxas2[j].name))
                                break;
@@ -65,7 +65,7 @@ diff --git a/xattrs.c b/xattrs.c
                                if (memcmp(rxas1[j].datum + 1,
                                           rxas2[j].datum + 1,
                                           MAX_DIGEST_LEN) != 0)
-@@ -388,13 +390,22 @@ int send_xattr(stat_x *sxp, int f)
+@@ -402,13 +404,22 @@ int send_xattr(int f, stat_x *sxp)
  {
        int ndx = find_matching_xattr(sxp->xattr);
  
@@ -91,7 +91,7 @@ diff --git a/xattrs.c b/xattrs.c
                for (rxa = sxp->xattr->items; count--; rxa++) {
                        size_t name_len = rxa->name_len;
                        const char *name = rxa->name;
-@@ -413,8 +424,8 @@ int send_xattr(stat_x *sxp, int f)
+@@ -427,8 +438,8 @@ int send_xattr(int f, stat_x *sxp)
                                name_len += UPRE_LEN;
                        }
  #endif
@@ -102,7 +102,7 @@ diff --git a/xattrs.c b/xattrs.c
  #ifndef HAVE_LINUX_XATTRS
                        if (name_len > rxa->name_len) {
                                write_buf(f, USER_PREFIX, UPRE_LEN);
-@@ -422,7 +433,7 @@ int send_xattr(stat_x *sxp, int f)
+@@ -436,7 +447,7 @@ int send_xattr(int f, stat_x *sxp)
                        }
  #endif
                        write_buf(f, name, name_len);
@@ -111,7 +111,7 @@ diff --git a/xattrs.c b/xattrs.c
                                write_buf(f, rxa->datum + 1, MAX_DIGEST_LEN);
                        else
                                write_buf(f, rxa->datum, rxa->datum_len);
-@@ -472,7 +483,7 @@ int xattr_diff(struct file_struct *file, stat_x *sxp, int find_all)
+@@ -486,7 +497,7 @@ int xattr_diff(struct file_struct *file, stat_x *sxp, int find_all)
                cmp = rec_cnt ? strcmp(snd_rxa->name, rec_rxa->name) : -1;
                if (cmp > 0)
                        same = 0;
@@ -120,7 +120,7 @@ diff --git a/xattrs.c b/xattrs.c
                        same = cmp == 0 && snd_rxa->datum_len == rec_rxa->datum_len
                            && memcmp(snd_rxa->datum + 1, rec_rxa->datum + 1,
                                      MAX_DIGEST_LEN) == 0;
-@@ -517,6 +528,9 @@ void send_xattr_request(const char *fname, struct file_struct *file, int f_out)
+@@ -531,6 +542,9 @@ void send_xattr_request(const char *fname, struct file_struct *file, int f_out)
        int cnt, prior_req = 0;
        rsync_xa *rxa;
  
@@ -130,7 +130,7 @@ diff --git a/xattrs.c b/xattrs.c
        lst += F_XATTR(file);
        for (rxa = lst->items, cnt = lst->count; cnt--; rxa++) {
                if (rxa->datum_len <= MAX_FULL_DATUM)
-@@ -573,6 +587,9 @@ int recv_xattr_request(struct file_struct *file, int f_in)
+@@ -587,6 +601,9 @@ int recv_xattr_request(struct file_struct *file, int f_in)
        rsync_xa *rxa;
        int rel_pos, cnt, num, got_xattr_data = 0;
  
@@ -140,7 +140,7 @@ diff --git a/xattrs.c b/xattrs.c
        if (F_XATTR(file) < 0) {
                rprintf(FERROR, "recv_xattr_request: internal data error!\n");
                exit_cleanup(RERR_STREAMIO);
-@@ -635,7 +652,22 @@ void receive_xattr(struct file_struct *file, int f)
+@@ -649,7 +666,22 @@ void receive_xattr(int f, struct file_struct *file)
  #else
        int need_sort = 1;
  #endif
@@ -164,7 +164,7 @@ diff --git a/xattrs.c b/xattrs.c
  
        if (ndx < 0 || (size_t)ndx > rsync_xal_l.count) {
                rprintf(FERROR, "receive_xattr: xa index %d out of"
-@@ -648,7 +680,7 @@ void receive_xattr(struct file_struct *file, int f)
+@@ -662,7 +694,7 @@ void receive_xattr(int f, struct file_struct *file)
                return;
        }
        
@@ -173,7 +173,7 @@ diff --git a/xattrs.c b/xattrs.c
                (void)EXPAND_ITEM_LIST(&temp_xattr, rsync_xa, count);
                temp_xattr.count = 0;
        }
-@@ -656,9 +688,10 @@ void receive_xattr(struct file_struct *file, int f)
+@@ -670,9 +702,10 @@ void receive_xattr(int f, struct file_struct *file)
        for (num = 1; num <= count; num++) {
                char *ptr, *name;
                rsync_xa *rxa;