--- 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";
}
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;
}
/* === 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)
{
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)
}
}
/* === 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)
{
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);
}
-- if (preserve_acls) {
+- if (preserve_acls && !local_server) {
- rprintf(FERROR,
- "--acls requires protocol 30 or higher"
- " (negotiated %d).\n",
- protocol_version);
- exit_cleanup(RERR_PROTOCOL);
- }
- }
-
- if (delete_mode && !(delete_before+delete_during+delete_after)) {
---- old/testsuite/acls.test
-+++ new/testsuite/acls.test
-@@ -9,10 +9,6 @@
-
- $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" ;;
--esac
--
- case "$setfacl_nodef" in
- true) test_skipped "I don't know how to use your setfacl command" ;;
- esac
---- old/testsuite/default-acls.test
-+++ new/testsuite/default-acls.test
-@@ -9,10 +9,6 @@
-
- $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" ;;
--esac
--
- case "$setfacl_nodef" in
- true) test_skipped "I don't know how to use your setfacl command" ;;
- *-k*) opts='-dm u::7,g::5,o:5' ;;
+ if (preserve_xattrs && !local_server) {
+ rprintf(FERROR,
+ "--xattrs requires protocol 30 or higher"