samba-bugs at samba.org
2010-Dec-23 10:56 UTC
DO NOT REPLY [Bug 7884] New: Workaround for ACL problem with ZFS under FreeBSD
https://bugzilla.samba.org/show_bug.cgi?id=7884
Summary: Workaround for ACL problem with ZFS under FreeBSD
Product: rsync
Version: 3.0.7
Platform: x64
OS/Version: FreeBSD
Status: NEW
Severity: normal
Priority: P3
Component: core
AssignedTo: wayned at samba.org
ReportedBy: trasz at FreeBSD.org
QAContact: rsync-qa at samba.org
When running on ZFS or UFS with NFSv4 ACL support enabled, "rsync -A"
fails due
to acl_get_file(3)
returning EINVAL. EINVAL is caused by improper use of this routine - rsync
doesn't bother to check
if POSIX.1e ACLs are supported, and blindly requests ACL_TYPE_ACCESS, which is
invalid for files
with NFSv4 ACLs.
Patch below makes rsync properly recognize EINVAL as lack of support for the
requested ACL type.
--- acls.c.orig 2010-12-23 10:45:21.344757361 +0100
+++ acls.c 2010-12-23 10:44:33.000000000 +0100
@@ -1082,6 +1082,10 @@ int default_perms_for_dir(const char *di
case ENOTSUP:
#endif
case ENOSYS:
+#ifdef __FreeBSD__
+ /* Workaround for improper NFSv4 ACL handling in rsync. */
+ case EINVAL:
+#endif
/* No ACLs are available. */
break;
case ENOENT:
--- lib/sysacls.c.orig 2010-12-23 10:47:02.945461082 +0100
+++ lib/sysacls.c 2010-12-23 10:44:52.000000000 +0100
@@ -2771,6 +2771,13 @@ int no_acl_syscall_error(int err)
if (err == ENOENT)
return 1; /* Weird problem with directory ACLs. */
#endif
+#ifdef __FreeBSD__
+ if (err == EINVAL)
+ /*
+ * Workaround for improper NFSv4 ACL handling in rsync.
+ */
+ return 1;
+#endif
#if defined(ENOSYS)
if (err == ENOSYS) {
return 1;
--
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.
samba-bugs at samba.org
2011-Feb-22 16:53 UTC
DO NOT REPLY [Bug 7884] Workaround for ACL problem with ZFS under FreeBSD
https://bugzilla.samba.org/show_bug.cgi?id=7884
wayned at samba.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Comment #1 from wayned at samba.org 2011-02-22 10:53 CST -------
Interesting. So, non-posix ACLs are supported (thus, no ENOTSUP), but the arg
is invalid because ACL_TYPE_ACCESS isn't allowed.
I've checked in a fix for this.
--
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.
Possibly Parallel Threads
- DO NOT REPLY [Bug 7865] New: files or dirs with more than 16 ACLs are not rsynced correctly
- rsync: [generator] set_acl: sys_acl_set_file(dev/kvm, ACL_TYPE_ACCESS): Operation not supported (95)
- sysvol replcation rsync error
- Strange GPO rights samba 4.2.1
- DO NOT REPLY [Bug 3543] New: [ACL] rsync calls default_perms_for_dir on omitted implied dirs before ensuring they exist