DO NOT REPLY [Bug 7884] New: Workaround for ACL problem with ZFS under FreeBSD
samba-bugs at samba.org
samba-bugs at samba.org
Thu Dec 23 03:56:31 MST 2010
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.
More information about the rsync
mailing list