vfs_posixacl: catch ACL_EVERYONE on FreeBSD
authorRalph Boehme <slow@samba.org>
Fri, 10 Oct 2014 11:53:56 +0000 (13:53 +0200)
committerJeremy Allison <jra@samba.org>
Sat, 11 Oct 2014 22:22:19 +0000 (00:22 +0200)
Using POSIX ACL API on FreeBSD may return NFSv4 style tag type
ACL_EVERYONE. Catch the error and issue a helpful log message telling
users to enable zfsacl VFS module.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sun Oct 12 00:22:19 CEST 2014 on sn-devel-104

source3/modules/vfs_posixacl.c
source3/wscript

index 6963aae8fd8fe6ff8896ba06d864ab090c1e3a34..f009fcc846a15920b294cc51089a512bf8396583 100644 (file)
@@ -167,6 +167,11 @@ static bool smb_ace_to_internal(acl_entry_t posix_ace,
        case ACL_MASK:
                ace->a_type = SMB_ACL_MASK;
                break;
+#ifdef HAVE_ACL_EVERYONE
+       case ACL_EVERYONE:
+               DEBUG(1, ("ACL tag type ACL_EVERYONE. FreeBSD with ZFS? Use 'vfs objects = zfsacl'\n"));
+               return false;
+#endif
        default:
                DEBUG(0, ("unknown tag type %d\n", (unsigned int)tag));
                return False;
index b285c5f38c45e56b7376832cc9d42deeb4acf8f3..4f182bf748124a459669da6d4b0103d2a24cff12 100644 (file)
@@ -476,6 +476,7 @@ return acl_get_perm_np(permset_d, perm);
                         headers='sys/types.h sys/acl.h', link=True,
                         msg="Checking whether acl_get_perm_np() is available")
                 default_static_modules.extend(TO_LIST('vfs_posixacl'))
+                conf.CHECK_VARIABLE('ACL_EVERYONE', headers='sys/acl.h')
             elif conf.CHECK_FUNCS_IN(['facl'], 'sec'):
                 Logs.info('Using solaris or UnixWare ACLs')
                 conf.DEFINE('HAVE_SOLARIS_UNIXWARE_ACLS',1)