X-Git-Url: https://mattmccutchen.net/rsync/rsync-patches.git/blobdiff_plain/ffc188460d94afdf8da233d822e7312e676b146a..73adde61db8f09341ee81e703c1747990983757a:/acls.diff diff --git a/acls.diff b/acls.diff index 1c10a72..21aa7fa 100644 --- 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,43 +295,17 @@ 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); } -- 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"