]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: vfs: ceph: Add posix acl support
authorYan, Zheng <zyan@redhat.com>
Mon, 21 Mar 2016 02:42:21 +0000 (10:42 +0800)
committerIra Cooper <ira@samba.org>
Sun, 24 Jul 2016 02:08:23 +0000 (04:08 +0200)
Signed-off-by: Yan, Zheng <zyan@redhat.com>
Signed-off-by: Ira Cooper <ira@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Ira Cooper <ira@samba.org>
Autobuild-Date(master): Sun Jul 24 04:08:23 CEST 2016 on sn-devel-144

source3/modules/vfs_ceph.c
source3/modules/wscript_build

index b609d72bff9a359786c2e42a3f4bb9adfa7930ae..8e11dab852ecaf2e0185d670234563d30452725a 100644 (file)
@@ -36,6 +36,7 @@
 #include <sys/statvfs.h>
 #include "cephfs/libcephfs.h"
 #include "smbprofile.h"
+#include "modules/posixacl_xattr.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_VFS
@@ -1218,47 +1219,6 @@ static int cephwrap_set_offline(struct vfs_handle_struct *handle,
        return -1;
 }
 
-static SMB_ACL_T cephwrap_sys_acl_get_file(struct vfs_handle_struct *handle,
-                                          const char *path_p,
-                                          SMB_ACL_TYPE_T type,
-                                          TALLOC_CTX *mem_ctx)
-{
-       errno = ENOTSUP;
-       return NULL;
-}
-
-static SMB_ACL_T cephwrap_sys_acl_get_fd(struct vfs_handle_struct *handle,
-                                        struct files_struct *fsp,
-                                        TALLOC_CTX *mem_ctx)
-{
-       errno = ENOTSUP;
-       return NULL;
-}
-
-static int cephwrap_sys_acl_set_file(struct vfs_handle_struct *handle,
-                                    const char *name,
-                                    SMB_ACL_TYPE_T acltype,
-                                    SMB_ACL_T theacl)
-{
-       errno = ENOTSUP;
-       return -1;
-}
-
-static int cephwrap_sys_acl_set_fd(struct vfs_handle_struct *handle,
-                                  struct files_struct *fsp,
-                                  SMB_ACL_T theacl)
-{
-       errno = ENOTSUP;
-       return -1;
-}
-
-static int cephwrap_sys_acl_delete_def_file(struct vfs_handle_struct *handle,
-                                           const char *path)
-{
-       errno = ENOTSUP;
-       return -1;
-}
-
 static struct vfs_fn_pointers ceph_fns = {
        /* Disk operations */
 
@@ -1331,11 +1291,13 @@ static struct vfs_fn_pointers ceph_fns = {
        .fsetxattr_fn = cephwrap_fsetxattr,
 
        /* Posix ACL Operations */
-       .sys_acl_get_file_fn = cephwrap_sys_acl_get_file,
-       .sys_acl_get_fd_fn = cephwrap_sys_acl_get_fd,
-       .sys_acl_set_file_fn = cephwrap_sys_acl_set_file,
-       .sys_acl_set_fd_fn = cephwrap_sys_acl_set_fd,
-       .sys_acl_delete_def_file_fn = cephwrap_sys_acl_delete_def_file,
+       .sys_acl_get_file_fn = posixacl_xattr_acl_get_file,
+       .sys_acl_get_fd_fn = posixacl_xattr_acl_get_fd,
+       .sys_acl_blob_get_file_fn = posix_sys_acl_blob_get_file,
+       .sys_acl_blob_get_fd_fn = posix_sys_acl_blob_get_fd,
+       .sys_acl_set_file_fn = posixacl_xattr_acl_set_file,
+       .sys_acl_set_fd_fn = posixacl_xattr_acl_set_fd,
+       .sys_acl_delete_def_file_fn = posixacl_xattr_acl_delete_def_file,
 
        /* aio operations */
        .aio_force_fn = cephwrap_aio_force,
index 3bd1fd0e8019ce276c2ba4cbeae29d5ea103e838..2d42a82b9fab7952b83db77ed5e0503dec3e456a 100644 (file)
@@ -451,7 +451,7 @@ bld.SAMBA3_MODULE('perfcount_test',
 bld.SAMBA3_MODULE('vfs_ceph',
                  subsystem='vfs',
                  source='vfs_ceph.c',
-                 deps='samba-util cephfs',
+                 deps='POSIXACL_XATTR samba-util cephfs',
                  init_function='',
                  internal_module=bld.SAMBA3_IS_STATIC_MODULE('vfs_ceph'),
                  enabled=bld.SAMBA3_IS_ENABLED_MODULE('vfs_ceph'),