s3: VFS: cap: Remove cap_sys_acl_get_file().
authorJeremy Allison <jra@samba.org>
Tue, 8 Jun 2021 22:16:23 +0000 (15:16 -0700)
committerRalph Boehme <slow@samba.org>
Wed, 9 Jun 2021 13:14:31 +0000 (13:14 +0000)
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/modules/vfs_cap.c

index 181d11c28ac34564678ee38ecd6862da54142dac..27805858530b2d1b39026e35ec81f51c7f69ba21 100644 (file)
@@ -720,44 +720,6 @@ static struct smb_filename *cap_realpath(vfs_handle_struct *handle,
        return return_fname;
 }
 
-static SMB_ACL_T cap_sys_acl_get_file(vfs_handle_struct *handle,
-                               const struct smb_filename *smb_fname,
-                               SMB_ACL_TYPE_T type,
-                               TALLOC_CTX *mem_ctx)
-{
-       struct smb_filename *cap_smb_fname = NULL;
-       char *cappath = capencode(talloc_tos(), smb_fname->base_name);
-       SMB_ACL_T ret;
-       int saved_errno = 0;
-
-       if (!cappath) {
-               errno = ENOMEM;
-               return (SMB_ACL_T)NULL;
-       }
-       cap_smb_fname = synthetic_smb_fname(talloc_tos(),
-                                       cappath,
-                                       NULL,
-                                       NULL,
-                                       smb_fname->twrp,
-                                       smb_fname->flags);
-       if (cap_smb_fname == NULL) {
-               TALLOC_FREE(cappath);
-               errno = ENOMEM;
-               return (SMB_ACL_T)NULL;
-       }
-       ret = SMB_VFS_NEXT_SYS_ACL_GET_FILE(handle, cap_smb_fname,
-                               type, mem_ctx);
-       if (ret == NULL) {
-               saved_errno = errno;
-       }
-       TALLOC_FREE(cappath);
-       TALLOC_FREE(cap_smb_fname);
-       if (saved_errno != 0) {
-               errno = saved_errno;
-       }
-       return ret;
-}
-
 static ssize_t cap_getxattr(vfs_handle_struct *handle,
                        const struct smb_filename *smb_fname,
                        const char *name,
@@ -925,7 +887,6 @@ static struct vfs_fn_pointers vfs_cap_fns = {
        .linkat_fn = cap_linkat,
        .mknodat_fn = cap_mknodat,
        .realpath_fn = cap_realpath,
-       .sys_acl_get_file_fn = cap_sys_acl_get_file,
        .getxattr_fn = cap_getxattr,
        .getxattrat_send_fn = vfs_not_implemented_getxattrat_send,
        .getxattrat_recv_fn = vfs_not_implemented_getxattrat_recv,