X-Git-Url: https://mattmccutchen.net/rsync/rsync-patches.git/blobdiff_plain/cc3e685d09b2095099fc396157d19172ab3ef7c4..refs/heads/master:/adaptec_acl_mods.diff diff --git a/adaptec_acl_mods.diff b/adaptec_acl_mods.diff index c79da0a..eaa1ed2 100644 --- a/adaptec_acl_mods.diff +++ b/adaptec_acl_mods.diff @@ -10,7 +10,7 @@ Philip Lowman wrote: > chmod, and chown bits which Adaptec has added to XFS on their SnapOS NAS > units. This is nice for backing up files between different NAS units > and preserving all of the Samba ACLs. -> +> > I'm not sure how useful this patch will be because I'm not sure if any > other NAS vendors have standardized on their extensions to POSIX ACLs to > support Samba in the same manner that Adaptec has. FWIW, though, this @@ -24,10 +24,11 @@ Todo: Fix a bug that could lose some bits when stripping some (supposedly) superfluous ACL info. +based-on: a01e3b490eb36ccf9e704840e1b6683dab867550 diff --git a/lib/sysacls.c b/lib/sysacls.c --- a/lib/sysacls.c +++ b/lib/sysacls.c -@@ -30,6 +30,18 @@ +@@ -31,6 +31,18 @@ #endif #define DEBUG(x,y) @@ -46,7 +47,7 @@ diff --git a/lib/sysacls.c b/lib/sysacls.c void SAFE_FREE(void *mem) { if (mem) -@@ -99,6 +111,9 @@ int sys_acl_get_info(SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T *tag_type_p, uint32 *b +@@ -100,6 +112,9 @@ int sys_acl_get_info(SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T *tag_type_p, uint32 *b return -1; *bits_p = (acl_get_perm(permset, ACL_READ) ? 4 : 0) @@ -56,7 +57,7 @@ diff --git a/lib/sysacls.c b/lib/sysacls.c | (acl_get_perm(permset, ACL_WRITE) ? 2 : 0) | (acl_get_perm(permset, ACL_EXECUTE) ? 1 : 0); -@@ -143,6 +158,12 @@ int sys_acl_set_access_bits(SMB_ACL_ENTRY_T entry, uint32 bits) +@@ -144,6 +159,12 @@ int sys_acl_set_access_bits(SMB_ACL_ENTRY_T entry, uint32 bits) if ((rc = acl_get_permset(entry, &permset)) != 0) return rc; acl_clear_perms(permset); @@ -72,7 +73,7 @@ diff --git a/lib/sysacls.c b/lib/sysacls.c diff --git a/lib/sysacls.h b/lib/sysacls.h --- a/lib/sysacls.h +++ b/lib/sysacls.h -@@ -58,8 +58,8 @@ +@@ -59,8 +59,8 @@ #define SMB_ACL_TYPE_ACCESS ACL_TYPE_ACCESS #define SMB_ACL_TYPE_DEFAULT ACL_TYPE_DEFAULT