s4:kdc: Implement KDC plugin hardware authentication policy
[samba.git] / source3 / modules / vfs_aixacl2.c
index 1affe1523f79655d7898078b49566fb9aa24725f..923b54fc9c20f2d859afaa009d3b37ca77490b0c 100644 (file)
@@ -185,28 +185,6 @@ static NTSTATUS aixjfs2_fget_nt_acl(vfs_handle_struct *handle,
        return status;
 }
 
-static int aixjfs2_sys_acl_blob_get_file(vfs_handle_struct *handle,
-                       const struct smb_filename *smb_fname,
-                       TALLOC_CTX *mem_ctx,
-                       char **blob_description,
-                       DATA_BLOB *blob)
-{
-       struct SMB4ACL_T *pacl = NULL;
-       const char *path_p = smb_fname->base_name;
-       bool    result;
-       bool    retryPosix = False;
-
-       result = aixjfs2_get_nfs4_acl(mem_ctx, path_p, &pacl, &retryPosix);
-       if (retryPosix)
-       {
-               return posix_sys_acl_blob_get_file(handle, smb_fname, mem_ctx,
-                                                  blob_description, blob);
-       }
-       /* Now way to linarlise NFS4 ACLs at the moment, but the NT ACL is pretty close in this case */
-       errno = ENOSYS;
-       return -1;
-}
-
 static int aixjfs2_sys_acl_blob_get_fd(vfs_handle_struct *handle, files_struct *fsp, TALLOC_CTX *mem_ctx, char **blob_description, DATA_BLOB *blob)
 {
        struct SMB4ACL_T *pacl = NULL;
@@ -259,29 +237,6 @@ static SMB_ACL_T aixjfs2_get_posix_acl(const char *path, acl_type_t type, TALLOC
         return result;
 }
 
-SMB_ACL_T aixjfs2_sys_acl_get_file(vfs_handle_struct *handle,
-                               const struct smb_filename *smb_fname,
-                               SMB_ACL_TYPE_T type,
-                               TALLOC_CTX *mem_ctx)
-{
-        acl_type_t aixjfs2_type;
-
-        switch(type) {
-        case SMB_ACL_TYPE_ACCESS:
-                aixjfs2_type.u64 = ACL_AIXC;
-                break;
-        case SMB_ACL_TYPE_DEFAULT:
-                DEBUG(0, ("Got AIX JFS2 unsupported type: %d\n", type));
-                return NULL;
-        default:
-                DEBUG(0, ("Got invalid type: %d\n", type));
-                smb_panic("exiting");
-        }
-
-        return aixjfs2_get_posix_acl(smb_fname->base_name,
-                       aixjfs2_type, mem_ctx);
-}
-
 SMB_ACL_T aixjfs2_sys_acl_get_fd(vfs_handle_struct *handle,
                                 files_struct *fsp,
                                 SMB_ACL_TYPE_T type,
@@ -379,7 +334,7 @@ static bool aixjfs2_process_smbacl(vfs_handle_struct *handle,
 
                memset(jfs2_ace, 0, entryLen);
                jfs2_ace->entryLen = entryLen; /* won't store textual "who" */
-               jfs2_ace->aceType = aceprop->aceType; /* only ACCES|DENY supported by jfs2 */
+               jfs2_ace->aceType = aceprop->aceType; /* only ACCESS|DENY supported by jfs2 */
                jfs2_ace->aceFlags = aceprop->aceFlags;
                jfs2_ace->aceMask = aceprop->aceMask;
                jfs2_ace->flags = (aceprop->flags&SMB_ACE4_ID_SPECIAL) ? ACE4_ID_SPECIAL : 0;
@@ -453,7 +408,7 @@ int aixjfs2_sys_acl_set_fd(vfs_handle_struct *handle,
        acl_type_t      acl_type_info;
        int     rc;
 
-       DEBUG(10, ("aixjfs2_sys_acl_set_fd invoked for %s", fsp_str_dbg(fsp)));
+       DEBUG(10, ("aixjfs2_sys_acl_set_fd invoked for %s\n", fsp_str_dbg(fsp)));
 
        rc = aixjfs2_query_acl_support(fsp->fsp_name->base_name, ACL_AIXC,
                                       &acl_type_info);
@@ -505,11 +460,13 @@ int aixjfs2_sys_acl_delete_def_fd(vfs_handle_struct *handle,
 }
 
 static struct vfs_fn_pointers vfs_aixacl2_fns = {
+       .stat_fn = nfs4_acl_stat,
+       .fstat_fn = nfs4_acl_fstat,
+       .lstat_fn = nfs4_acl_lstat,
+       .fstatat_fn = nfs4_acl_fstatat,
        .fget_nt_acl_fn = aixjfs2_fget_nt_acl,
        .fset_nt_acl_fn = aixjfs2_fset_nt_acl,
-       .sys_acl_get_file_fn = aixjfs2_sys_acl_get_file,
        .sys_acl_get_fd_fn = aixjfs2_sys_acl_get_fd,
-       .sys_acl_blob_get_file_fn = aixjfs2_sys_acl_blob_get_file,
        .sys_acl_blob_get_fd_fn = aixjfs2_sys_acl_blob_get_fd,
        .sys_acl_set_fd_fn = aixjfs2_sys_acl_set_fd,
        .sys_acl_delete_def_fd_fn = aixjfs2_sys_acl_delete_def_fd