A minor tweak to the compatibility code.
[rsync/rsync-patches.git] / acls.diff
index 1c10a72..1cbe85e 100644 (file)
--- a/acls.diff
+++ b/acls.diff
@@ -11,7 +11,7 @@ To use this patch, run these commands for a successful build:
 
 --- old/acls.c
 +++ new/acls.c
-@@ -90,6 +90,18 @@ static const char *str_acl_type(SMB_ACL_
+@@ -89,6 +89,18 @@ static const char *str_acl_type(SMB_ACL_
             : "unknown SMB_ACL_TYPE_T";
  }
  
@@ -30,7 +30,7 @@ To use this patch, run these commands for a successful build:
  static int calc_sacl_entries(const rsync_acl *racl)
  {
        /* A System ACL always gets user/group/other permission entries. */
-@@ -545,6 +557,91 @@ int get_acl(const char *fname, statx *sx
+@@ -544,6 +556,91 @@ int get_acl(const char *fname, statx *sx
        return 0;
  }
  
@@ -122,7 +122,7 @@ To use this patch, run these commands for a successful build:
  /* === Send functions === */
  
  /* The general strategy with the tag_type <-> character mapping is that
-@@ -631,6 +728,11 @@ static void send_rsync_acl(rsync_acl *ra
+@@ -630,6 +727,11 @@ static void send_rsync_acl(rsync_acl *ra
   * This also frees the ACL data. */
  void send_acl(statx *sxp, int f)
  {
@@ -134,7 +134,7 @@ To use this patch, run these commands for a successful build:
        if (!sxp->acc_acl) {
                sxp->acc_acl = create_racl();
                rsync_acl_fake_perms(sxp->acc_acl, sxp->st.st_mode);
-@@ -648,6 +750,146 @@ void send_acl(statx *sxp, int f)
+@@ -647,6 +749,146 @@ void send_acl(statx *sxp, int f)
        }
  }
  
@@ -281,7 +281,7 @@ To use this patch, run these commands for a successful build:
  /* === Receive functions === */
  
  static uchar recv_acl_access(uchar *name_follows_val, int f)
-@@ -767,6 +1009,11 @@ static int recv_rsync_acl(item_list *rac
+@@ -766,6 +1008,11 @@ static int recv_rsync_acl(item_list *rac
  /* Receive the ACL info the sender has included for this file-list entry. */
  void receive_acl(struct file_struct *file, int f)
  {
@@ -295,7 +295,7 @@ To use this patch, run these commands for a successful build:
        if (S_ISDIR(file->mode))
 --- old/compat.c
 +++ new/compat.c
-@@ -111,13 +111,6 @@ void setup_protocol(int f_out,int f_in)
+@@ -115,13 +115,6 @@ void setup_protocol(int f_out,int f_in)
                            protocol_version);
                        exit_cleanup(RERR_PROTOCOL);
                }
@@ -306,9 +306,9 @@ To use this patch, run these commands for a successful build:
 -                          protocol_version);
 -                      exit_cleanup(RERR_PROTOCOL);
 -              }
-       }
-       if (delete_mode && !(delete_before+delete_during+delete_after)) {
+               if (preserve_xattrs) {
+                       rprintf(FERROR,
+                           "--xattrs requires protocol 30 or higher"
 --- old/testsuite/acls.test
 +++ new/testsuite/acls.test
 @@ -9,10 +9,6 @@
@@ -316,7 +316,7 @@ To use this patch, run these commands for a successful build:
  $RSYNC --version | grep ", ACLs" >/dev/null || test_skipped "Rsync is configured without ACL support"
  
 -case "$RSYNC" in
--*protocol=29*) test_skipped "ACLs require protocol 30" ;;
+-*protocol=29*) test_skipped "ACL support requires protocol 30" ;;
 -esac
 -
  case "$setfacl_nodef" in