*/
#include "includes.h"
+#include "system/filesys.h"
#include "smbd/smbd.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 "vfs_aixacl_util.h"
SMB_ACL_T aixacl_sys_acl_get_file(vfs_handle_struct *handle,
- const char *path_p,
- SMB_ACL_TYPE_T type)
+ const struct smb_filename *smb_fname,
+ SMB_ACL_TYPE_T type,
+ TALLOC_CTX *mem_ctx)
{
+ const char *path_p = smb_fname->base_name;
struct acl *file_acl = (struct acl *)NULL;
struct smb_acl_t *result = (struct smb_acl_t *)NULL;
DEBUG(10,("Got facl and returned it\n"));
- result = aixacl_to_smbacl(file_acl);
+ result = aixacl_to_smbacl(file_acl, mem_ctx);
SAFE_FREE(file_acl);
return result;
}
SMB_ACL_T aixacl_sys_acl_get_fd(vfs_handle_struct *handle,
- files_struct *fsp)
+ files_struct *fsp,
+ TALLOC_CTX *mem_ctx)
{
struct acl *file_acl = (struct acl *)NULL;
DEBUG(10,("Got facl and returned it\n"));
- result = aixacl_to_smbacl(file_acl);
+ result = aixacl_to_smbacl(file_acl, mem_ctx);
SAFE_FREE(file_acl);
return result;
}
int aixacl_sys_acl_delete_def_file(vfs_handle_struct *handle,
- const char *path)
+ const struct smb_filename *smb_fname)
{
return 0; /* otherwise you can't set acl at upper level */
}
static struct vfs_fn_pointers vfs_aixacl_fns = {
- .sys_acl_get_file = aixacl_sys_acl_get_file,
- .sys_acl_get_fd = aixacl_sys_acl_get_fd,
- .sys_acl_set_file = aixacl_sys_acl_set_file,
- .sys_acl_set_fd = aixacl_sys_acl_set_fd,
- .sys_acl_delete_def_file = aixacl_sys_acl_delete_def_file,
+ .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)
+NTSTATUS vfs_aixacl_init(TALLOC_CTX *);
+NTSTATUS vfs_aixacl_init(TALLOC_CTX *ctx)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "aixacl",
&vfs_aixacl_fns);