vfs: Use posix_sys_acl_blob_get_file in vfs_aixacl
[kai/samba.git] / source3 / modules / vfs_aixacl.c
index 726a7f485e84e7218d93f153d431c182b68f2fb8..25d9089ba5cf7b83bd064430cd98f90e95fa9042 100644 (file)
@@ -18,9 +18,9 @@
 */
 
 #include "includes.h"
-
-extern SMB_ACL_T aixacl_to_smbacl( struct acl *file_acl);
-extern struct acl *aixacl_smb_to_aixacl(SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl);
+#include "system/filesys.h"
+#include "smbd/smbd.h"
+#include "vfs_aixacl_util.h"
 
 SMB_ACL_T aixacl_sys_acl_get_file(vfs_handle_struct *handle,
                                    const char *path_p,
@@ -177,38 +177,19 @@ int aixacl_sys_acl_delete_def_file(vfs_handle_struct *handle,
        return 0; /* otherwise you can't set acl at upper level */
 }
 
-/* VFS operations structure */
-
-static vfs_op_tuple aixacl_op_tuples[] = {
-       /* Disk operations */
-  {SMB_VFS_OP(aixacl_sys_acl_get_file),
-   SMB_VFS_OP_SYS_ACL_GET_FILE,
-   SMB_VFS_LAYER_TRANSPARENT},
-
-  {SMB_VFS_OP(aixacl_sys_acl_get_fd),
-   SMB_VFS_OP_SYS_ACL_GET_FD,
-   SMB_VFS_LAYER_TRANSPARENT},
-
-  {SMB_VFS_OP(aixacl_sys_acl_set_file),
-   SMB_VFS_OP_SYS_ACL_SET_FILE,
-   SMB_VFS_LAYER_TRANSPARENT},
-
-  {SMB_VFS_OP(aixacl_sys_acl_set_fd),
-   SMB_VFS_OP_SYS_ACL_SET_FD,
-   SMB_VFS_LAYER_TRANSPARENT},
-
-  {SMB_VFS_OP(aixacl_sys_acl_delete_def_file),
-   SMB_VFS_OP_SYS_ACL_DELETE_DEF_FILE,
-   SMB_VFS_LAYER_TRANSPARENT},
-
-  {SMB_VFS_OP(NULL),
-   SMB_VFS_OP_NOOP,
-   SMB_VFS_LAYER_NOOP}
+static struct vfs_fn_pointers vfs_aixacl_fns = {
+       .sys_acl_get_file_fn = aixacl_sys_acl_get_file,
+       .sys_acl_get_fd_fn = aixacl_sys_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 = aixacl_sys_acl_set_file,
+       .sys_acl_set_fd_fn = aixacl_sys_acl_set_fd,
+       .sys_acl_delete_def_file_fn = aixacl_sys_acl_delete_def_file,
 };
 
 NTSTATUS vfs_aixacl_init(void);
 NTSTATUS vfs_aixacl_init(void)
 {
        return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "aixacl",
-                               aixacl_op_tuples);
+                               &vfs_aixacl_fns);
 }