]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: VFS: ceph_snapshots. Remove ceph_snap_gmt_fget_nt_acl().
authorJeremy Allison <jra@samba.org>
Tue, 14 Apr 2020 21:37:17 +0000 (14:37 -0700)
committerRalph Boehme <slow@samba.org>
Thu, 30 Apr 2020 07:33:40 +0000 (07:33 +0000)
This fallback was only used for directories. Now we always
have a valid fd for directories it is no longer needed.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/modules/vfs_ceph_snapshots.c

index 2b625843187d78365e17221155332ca173af8f81..c6916930d699ddb607ecd2edd26337bdd7de5ee2 100644 (file)
@@ -1164,56 +1164,6 @@ static struct smb_filename *ceph_snap_gmt_realpath(vfs_handle_struct *handle,
        return result_fname;
 }
 
-/*
- * XXX this should have gone through open() conversion, so why do we need
- * a handler here? posix_fget_nt_acl() falls back to posix_get_nt_acl() for
- * dirs (or fd == -1).
- */
-static NTSTATUS ceph_snap_gmt_fget_nt_acl(vfs_handle_struct *handle,
-                                       struct files_struct *fsp,
-                                       uint32_t security_info,
-                                       TALLOC_CTX *mem_ctx,
-                                       struct security_descriptor **ppdesc)
-{
-       time_t timestamp = 0;
-       char stripped[PATH_MAX + 1];
-       char conv[PATH_MAX + 1];
-       struct smb_filename *smb_fname;
-       int ret;
-       NTSTATUS status;
-
-       ret = ceph_snap_gmt_strip_snapshot(handle,
-                                       fsp->fsp_name->base_name,
-                                       &timestamp, stripped, sizeof(stripped));
-       if (ret < 0) {
-               return map_nt_error_from_unix(-ret);
-       }
-       if (timestamp == 0) {
-               return SMB_VFS_NEXT_FGET_NT_ACL(handle, fsp, security_info,
-                                               mem_ctx,
-                                               ppdesc);
-       }
-       ret = ceph_snap_gmt_convert(handle, stripped,
-                                       timestamp, conv, sizeof(conv));
-       if (ret < 0) {
-               return map_nt_error_from_unix(-ret);
-       }
-
-       smb_fname = synthetic_smb_fname(mem_ctx,
-                                       conv,
-                                       NULL,
-                                       NULL,
-                                       fsp->fsp_name->flags);
-       if (smb_fname == NULL) {
-               return NT_STATUS_NO_MEMORY;
-       }
-
-       status = SMB_VFS_NEXT_GET_NT_ACL(handle, smb_fname, security_info,
-                                        mem_ctx, ppdesc);
-       TALLOC_FREE(smb_fname);
-       return status;
-}
-
 static NTSTATUS ceph_snap_gmt_get_nt_acl(vfs_handle_struct *handle,
                                       const struct smb_filename *csmb_fname,
                                       uint32_t security_info,
@@ -1570,7 +1520,6 @@ static struct vfs_fn_pointers ceph_snap_fns = {
        .mknodat_fn = ceph_snap_gmt_mknodat,
        .realpath_fn = ceph_snap_gmt_realpath,
        .get_nt_acl_fn = ceph_snap_gmt_get_nt_acl,
-       .fget_nt_acl_fn = ceph_snap_gmt_fget_nt_acl,
        .get_nt_acl_fn = ceph_snap_gmt_get_nt_acl,
        .mkdirat_fn = ceph_snap_gmt_mkdirat,
        .getxattr_fn = ceph_snap_gmt_getxattr,