]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
VFS: Remove SMB_VFS_LISTXATTR, no longer used
authorNoel Power <noel.power@suse.com>
Wed, 10 Feb 2021 16:21:36 +0000 (16:21 +0000)
committerJeremy Allison <jra@samba.org>
Fri, 26 Feb 2021 21:28:33 +0000 (21:28 +0000)
                               ---------------
                              /               \
                             /      REST       \
                            /        IN         \
                           /        PEACE        \
                          /                       \
                          |                       |
                          |   SMB_VFS_LISTXATTR   |
                          |                       |
                          |                       |
                          |       10 February     |
                          |          2021         |
                          |                       |
                          |                       |
                         *|     *  *  *           | *
                _________)/\\_//(\/(/\)/\//\/\////|_)_______

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
21 files changed:
examples/VFS/skel_opaque.c
examples/VFS/skel_transparent.c
source3/include/vfs.h
source3/include/vfs_macros.h
source3/modules/vfs_cap.c
source3/modules/vfs_catia.c
source3/modules/vfs_ceph.c
source3/modules/vfs_ceph_snapshots.c
source3/modules/vfs_default.c
source3/modules/vfs_full_audit.c
source3/modules/vfs_glusterfs.c
source3/modules/vfs_media_harmony.c
source3/modules/vfs_not_implemented.c
source3/modules/vfs_posix_eadb.c
source3/modules/vfs_shadow_copy2.c
source3/modules/vfs_snapper.c
source3/modules/vfs_time_audit.c
source3/modules/vfs_unityed_media.c
source3/modules/vfs_vxfs.c
source3/modules/vfs_xattr_tdb.c
source3/smbd/vfs.c

index 1f20753fc76e461a6e4d4d90402e6f464d59b51c..3fcbd321564efd35ffaf74ee076a46e2715e32c4 100644 (file)
@@ -925,15 +925,6 @@ static ssize_t skel_fgetxattr(vfs_handle_struct *handle,
        return -1;
 }
 
-static ssize_t skel_listxattr(vfs_handle_struct *handle,
-                               const struct smb_filename *smb_fname,
-                               char *list,
-                               size_t size)
-{
-       errno = ENOSYS;
-       return -1;
-}
-
 static ssize_t skel_flistxattr(vfs_handle_struct *handle,
                               struct files_struct *fsp, char *list,
                               size_t size)
@@ -1139,7 +1130,6 @@ static struct vfs_fn_pointers skel_opaque_fns = {
        .getxattrat_send_fn = skel_getxattrat_send,
        .getxattrat_recv_fn = skel_getxattrat_recv,
        .fgetxattr_fn = skel_fgetxattr,
-       .listxattr_fn = skel_listxattr,
        .flistxattr_fn = skel_flistxattr,
        .removexattr_fn = skel_removexattr,
        .fremovexattr_fn = skel_fremovexattr,
index f7d99e6101b4c2143c5e64cf75c08ccff4242034..87eec7544d14e249c3080f2c4d3456a9ef3b070e 100644 (file)
@@ -1219,14 +1219,6 @@ static ssize_t skel_fgetxattr(vfs_handle_struct *handle,
        return SMB_VFS_NEXT_FGETXATTR(handle, fsp, name, value, size);
 }
 
-static ssize_t skel_listxattr(vfs_handle_struct *handle,
-                               const struct smb_filename *smb_fname,
-                               char *list,
-                               size_t size)
-{
-       return SMB_VFS_NEXT_LISTXATTR(handle, smb_fname, list, size);
-}
-
 static ssize_t skel_flistxattr(vfs_handle_struct *handle,
                               struct files_struct *fsp, char *list,
                               size_t size)
@@ -1444,7 +1436,6 @@ static struct vfs_fn_pointers skel_transparent_fns = {
        .getxattrat_send_fn = skel_getxattrat_send,
        .getxattrat_recv_fn = skel_getxattrat_recv,
        .fgetxattr_fn = skel_fgetxattr,
-       .listxattr_fn = skel_listxattr,
        .flistxattr_fn = skel_flistxattr,
        .removexattr_fn = skel_removexattr,
        .fremovexattr_fn = skel_fremovexattr,
index eb005bdc86ac8d1f42cc45a6a2dd08647278ad6e..db2283b7cd03a7883120f67122b93239fb601a78 100644 (file)
  * Version 44 - Replace SMB_VFS_GET_COMPRESSION() with SMB_VFS_FGET_COMPRESSION()
  * Version 44 - Add type argument to SMB_VFS_SYS_ACL_SET_FD()
  * Version 44 - Remove SMB_VFS_SYS_ACL_SET_FILE()
+ * Change to Version 45 - will ship with 4.15
+ * Version 45 - Remove SMB_VFS_LISTXATTR
  */
 
-#define SMB_VFS_INTERFACE_VERSION 44
+#define SMB_VFS_INTERFACE_VERSION 45
 
 /*
     All intercepted VFS operations must be declared as static functions inside module source
@@ -1244,10 +1246,6 @@ struct vfs_fn_pointers {
                                      TALLOC_CTX *mem_ctx,
                                      uint8_t **xattr_value);
        ssize_t (*fgetxattr_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, const char *name, void *value, size_t size);
-       ssize_t (*listxattr_fn)(struct vfs_handle_struct *handle,
-                                       const struct smb_filename *smb_fname,
-                                       char *list,
-                                       size_t size);
        ssize_t (*flistxattr_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, char *list, size_t size);
        int (*removexattr_fn)(struct vfs_handle_struct *handle,
                                        const struct smb_filename *smb_fname,
@@ -1769,10 +1767,6 @@ ssize_t smb_vfs_call_getxattrat_recv(struct tevent_req *req,
 ssize_t smb_vfs_call_fgetxattr(struct vfs_handle_struct *handle,
                               struct files_struct *fsp, const char *name,
                               void *value, size_t size);
-ssize_t smb_vfs_call_listxattr(struct vfs_handle_struct *handle,
-                               const struct smb_filename *smb_fname,
-                               char *list,
-                               size_t size);
 ssize_t smb_vfs_call_flistxattr(struct vfs_handle_struct *handle,
                                struct files_struct *fsp, char *list,
                                size_t size);
index 9a6dd67288cc911f52492b78db993edfaaec9389..d006aaf60bdc9e1d13cd1134ca2cac77c05cc514 100644 (file)
 #define SMB_VFS_NEXT_FGETXATTR(handle,fsp,name,value,size) \
        smb_vfs_call_fgetxattr((handle)->next,(fsp),(name),(value),(size))
 
-#define SMB_VFS_LISTXATTR(conn,smb_fname,list,size) \
-       smb_vfs_call_listxattr((conn)->vfs_handles,(smb_fname),(list),(size))
-#define SMB_VFS_NEXT_LISTXATTR(handle,smb_fname,list,size) \
-       smb_vfs_call_listxattr((handle)->next,(smb_fname),(list),(size))
-
 #define SMB_VFS_FLISTXATTR(fsp,list,size) \
        smb_vfs_call_flistxattr((fsp)->conn->vfs_handles, (fsp), (list),(size))
 #define SMB_VFS_NEXT_FLISTXATTR(handle,fsp,list,size) \
index 95b6087d41c5aad838b99d033b6d6b667527232d..5c2474e66e79b1757010da4d125f27c398668115 100644 (file)
@@ -910,43 +910,6 @@ static ssize_t cap_fgetxattr(vfs_handle_struct *handle, struct files_struct *fsp
         return SMB_VFS_NEXT_FGETXATTR(handle, fsp, cappath, value, size);
 }
 
-static ssize_t cap_listxattr(vfs_handle_struct *handle,
-                               const struct smb_filename *smb_fname,
-                               char *list,
-                               size_t size)
-{
-       struct smb_filename *cap_smb_fname = NULL;
-       char *cappath = capencode(talloc_tos(), smb_fname->base_name);
-       ssize_t ret;
-       int saved_errno = 0;
-
-       if (!cappath) {
-               errno = ENOMEM;
-               return -1;
-       }
-       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 -1;
-       }
-       ret = SMB_VFS_NEXT_LISTXATTR(handle, cap_smb_fname, list, size);
-       if (ret == -1) {
-               saved_errno = errno;
-       }
-       TALLOC_FREE(cappath);
-       TALLOC_FREE(cap_smb_fname);
-       if (saved_errno) {
-               errno = saved_errno;
-       }
-       return ret;
-}
-
 static int cap_removexattr(vfs_handle_struct *handle,
                                const struct smb_filename *smb_fname,
                                const char *name)
@@ -1151,7 +1114,6 @@ static struct vfs_fn_pointers vfs_cap_fns = {
        .getxattrat_send_fn = vfs_not_implemented_getxattrat_send,
        .getxattrat_recv_fn = vfs_not_implemented_getxattrat_recv,
        .fgetxattr_fn = cap_fgetxattr,
-       .listxattr_fn = cap_listxattr,
        .removexattr_fn = cap_removexattr,
        .fremovexattr_fn = cap_fremovexattr,
        .setxattr_fn = cap_setxattr,
index 81c24a8cfd141608a34af4f7999e7397d9d386c5..0a3fa5ca7917d14a2b020848dab429851ea6e38f 100644 (file)
@@ -1241,51 +1241,6 @@ catia_getxattr(vfs_handle_struct *handle,
        return ret;
 }
 
-static ssize_t
-catia_listxattr(vfs_handle_struct *handle,
-               const struct smb_filename *smb_fname,
-               char *list, size_t size)
-{
-       struct smb_filename *mapped_smb_fname = NULL;
-       char *mapped_name = NULL;
-       NTSTATUS status;
-       ssize_t ret;
-       int saved_errno = 0;
-
-       status = catia_string_replace_allocate(handle->conn,
-                               smb_fname->base_name,
-                               &mapped_name,
-                               vfs_translate_to_unix);
-       if (!NT_STATUS_IS_OK(status)) {
-               errno = map_errno_from_nt_status(status);
-               return -1;
-       }
-
-       mapped_smb_fname = synthetic_smb_fname(talloc_tos(),
-                                       mapped_name,
-                                       NULL,
-                                       &smb_fname->st,
-                                       smb_fname->twrp,
-                                       smb_fname->flags);
-       if (mapped_smb_fname == NULL) {
-               TALLOC_FREE(mapped_name);
-               errno = ENOMEM;
-               return -1;
-       }
-
-       ret = SMB_VFS_NEXT_LISTXATTR(handle, mapped_smb_fname, list, size);
-       if (ret == -1) {
-               saved_errno = errno;
-       }
-       TALLOC_FREE(mapped_name);
-       TALLOC_FREE(mapped_smb_fname);
-       if (saved_errno != 0) {
-               errno = saved_errno;
-       }
-
-       return ret;
-}
-
 static int
 catia_removexattr(vfs_handle_struct *handle,
                        const struct smb_filename *smb_fname,
@@ -2426,7 +2381,6 @@ static struct vfs_fn_pointers vfs_catia_fns = {
        .getxattr_fn = catia_getxattr,
        .getxattrat_send_fn = vfs_not_implemented_getxattrat_send,
        .getxattrat_recv_fn = vfs_not_implemented_getxattrat_recv,
-       .listxattr_fn = catia_listxattr,
        .removexattr_fn = catia_removexattr,
        .setxattr_fn = catia_setxattr,
        .fgetxattr_fn = catia_fgetxattr,
index 47b5046cfcbf641b14ef7d1081958ccb3ec1b402..d37e749455a3650cb6ce76c42aba428acbf18388 100644 (file)
@@ -1278,22 +1278,6 @@ static ssize_t cephwrap_fgetxattr(struct vfs_handle_struct *handle, struct files
        return (ssize_t)ret;
 }
 
-static ssize_t cephwrap_listxattr(struct vfs_handle_struct *handle,
-                       const struct smb_filename *smb_fname,
-                       char *list,
-                       size_t size)
-{
-       int ret;
-       DBG_DEBUG("[CEPH] listxattr(%p, %s, %p, %llu)\n", handle,
-                       smb_fname->base_name, list, llu(size));
-       ret = ceph_listxattr(handle->data, smb_fname->base_name, list, size);
-       DBG_DEBUG("[CEPH] listxattr(...) = %d\n", ret);
-       if (ret < 0) {
-               WRAP_RETURN(ret);
-       }
-       return (ssize_t)ret;
-}
-
 static ssize_t cephwrap_flistxattr(struct vfs_handle_struct *handle, struct files_struct *fsp, char *list, size_t size)
 {
        int ret;
@@ -1595,7 +1579,6 @@ static struct vfs_fn_pointers ceph_fns = {
        .getxattrat_send_fn = vfs_not_implemented_getxattrat_send,
        .getxattrat_recv_fn = vfs_not_implemented_getxattrat_recv,
        .fgetxattr_fn = cephwrap_fgetxattr,
-       .listxattr_fn = cephwrap_listxattr,
        .flistxattr_fn = cephwrap_flistxattr,
        .removexattr_fn = cephwrap_removexattr,
        .fremovexattr_fn = cephwrap_fremovexattr,
index 1c395e2a0201416689f3f9318213bc73dfd87215..9d93b8ba9da9662f95084bffea20700ef2dea052 100644 (file)
@@ -1298,47 +1298,6 @@ static ssize_t ceph_snap_gmt_getxattr(vfs_handle_struct *handle,
        return ret;
 }
 
-static ssize_t ceph_snap_gmt_listxattr(struct vfs_handle_struct *handle,
-                                    const struct smb_filename *csmb_fname,
-                                    char *list, size_t size)
-{
-       time_t timestamp = 0;
-       char stripped[PATH_MAX + 1];
-       char conv[PATH_MAX + 1];
-       int ret;
-       struct smb_filename *new_fname;
-       int saved_errno;
-
-       ret = ceph_snap_gmt_strip_snapshot(handle,
-                                       csmb_fname,
-                                       &timestamp, stripped, sizeof(stripped));
-       if (ret < 0) {
-               errno = -ret;
-               return -1;
-       }
-       if (timestamp == 0) {
-               return SMB_VFS_NEXT_LISTXATTR(handle, csmb_fname, list, size);
-       }
-       ret = ceph_snap_gmt_convert(handle, stripped,
-                                       timestamp, conv, sizeof(conv));
-       if (ret < 0) {
-               errno = -ret;
-               return -1;
-       }
-       new_fname = cp_smb_filename(talloc_tos(), csmb_fname);
-       if (new_fname == NULL) {
-               errno = ENOMEM;
-               return -1;
-       }
-       new_fname->base_name = conv;
-
-       ret = SMB_VFS_NEXT_LISTXATTR(handle, new_fname, list, size);
-       saved_errno = errno;
-       TALLOC_FREE(new_fname);
-       errno = saved_errno;
-       return ret;
-}
-
 static int ceph_snap_gmt_removexattr(vfs_handle_struct *handle,
                                const struct smb_filename *csmb_fname,
                                const char *aname)
@@ -1531,7 +1490,6 @@ static struct vfs_fn_pointers ceph_snap_fns = {
        .getxattr_fn = ceph_snap_gmt_getxattr,
        .getxattrat_send_fn = vfs_not_implemented_getxattrat_send,
        .getxattrat_recv_fn = vfs_not_implemented_getxattrat_recv,
-       .listxattr_fn = ceph_snap_gmt_listxattr,
        .removexattr_fn = ceph_snap_gmt_removexattr,
        .setxattr_fn = ceph_snap_gmt_setxattr,
        .chflags_fn = ceph_snap_gmt_chflags,
index 84464bc3b04001dd0d918249aca872f644700f0e..7291813f60931b5c49304f41f37ddc5909576351 100644 (file)
@@ -3612,14 +3612,6 @@ static ssize_t vfswrap_fgetxattr(struct vfs_handle_struct *handle,
        return getxattr(fsp->fsp_name->base_name, name, value, size);
 }
 
-static ssize_t vfswrap_listxattr(struct vfs_handle_struct *handle,
-                       const struct smb_filename *smb_fname,
-                       char *list,
-                       size_t size)
-{
-       return listxattr(smb_fname->base_name, list, size);
-}
-
 static ssize_t vfswrap_flistxattr(struct vfs_handle_struct *handle, struct files_struct *fsp, char *list, size_t size)
 {
        int fd = fsp_get_pathref_fd(fsp);
@@ -3896,7 +3888,6 @@ static struct vfs_fn_pointers vfs_default_fns = {
        .getxattrat_send_fn = vfswrap_getxattrat_send,
        .getxattrat_recv_fn = vfswrap_getxattrat_recv,
        .fgetxattr_fn = vfswrap_fgetxattr,
-       .listxattr_fn = vfswrap_listxattr,
        .flistxattr_fn = vfswrap_flistxattr,
        .removexattr_fn = vfswrap_removexattr,
        .fremovexattr_fn = vfswrap_fremovexattr,
index cfb9ba4fcefbbdbbb147835cfd2e9fea162159db..eb7f836a84edd2fcf1a809f52e0601716910a759 100644 (file)
@@ -209,7 +209,6 @@ typedef enum _vfs_op_type {
        SMB_VFS_OP_GETXATTRAT_SEND,
        SMB_VFS_OP_GETXATTRAT_RECV,
        SMB_VFS_OP_FGETXATTR,
-       SMB_VFS_OP_LISTXATTR,
        SMB_VFS_OP_FLISTXATTR,
        SMB_VFS_OP_REMOVEXATTR,
        SMB_VFS_OP_FREMOVEXATTR,
@@ -341,7 +340,6 @@ static struct {
        { SMB_VFS_OP_GETXATTRAT_SEND, "getxattrat_send" },
        { SMB_VFS_OP_GETXATTRAT_RECV, "getxattrat_recv" },
        { SMB_VFS_OP_FGETXATTR, "fgetxattr" },
-       { SMB_VFS_OP_LISTXATTR, "listxattr" },
        { SMB_VFS_OP_FLISTXATTR,        "flistxattr" },
        { SMB_VFS_OP_REMOVEXATTR,       "removexattr" },
        { SMB_VFS_OP_FREMOVEXATTR,      "fremovexattr" },
@@ -2819,24 +2817,6 @@ static ssize_t smb_full_audit_fgetxattr(struct vfs_handle_struct *handle,
        return result;
 }
 
-static ssize_t smb_full_audit_listxattr(struct vfs_handle_struct *handle,
-                               const struct smb_filename *smb_fname,
-                               char *list,
-                               size_t size)
-{
-       ssize_t result;
-
-       result = SMB_VFS_NEXT_LISTXATTR(handle, smb_fname, list, size);
-
-       do_log(SMB_VFS_OP_LISTXATTR,
-              (result >= 0),
-              handle,
-              "%s",
-              smb_fname_str_do_log(handle->conn, smb_fname));
-
-       return result;
-}
-
 static ssize_t smb_full_audit_flistxattr(struct vfs_handle_struct *handle,
                                struct files_struct *fsp, char *list,
                                size_t size)
@@ -3095,7 +3075,6 @@ static struct vfs_fn_pointers vfs_full_audit_fns = {
        .getxattrat_send_fn = smb_full_audit_getxattrat_send,
        .getxattrat_recv_fn = smb_full_audit_getxattrat_recv,
        .fgetxattr_fn = smb_full_audit_fgetxattr,
-       .listxattr_fn = smb_full_audit_listxattr,
        .flistxattr_fn = smb_full_audit_flistxattr,
        .removexattr_fn = smb_full_audit_removexattr,
        .fremovexattr_fn = smb_full_audit_fremovexattr,
index af0ce70e1e80b5286bc3c444b44d797a93b8d061..8cfc8f80fa9a4686dd94a7b6b6fe4ee460924821 100644 (file)
@@ -2040,14 +2040,6 @@ static ssize_t vfs_gluster_fgetxattr(struct vfs_handle_struct *handle,
        return glfs_fgetxattr(glfd, name, value, size);
 }
 
-static ssize_t vfs_gluster_listxattr(struct vfs_handle_struct *handle,
-                               const struct smb_filename *smb_fname,
-                               char *list,
-                               size_t size)
-{
-       return glfs_listxattr(handle->data, smb_fname->base_name, list, size);
-}
-
 static ssize_t vfs_gluster_flistxattr(struct vfs_handle_struct *handle,
                                      files_struct *fsp, char *list,
                                      size_t size)
@@ -2357,7 +2349,6 @@ static struct vfs_fn_pointers glusterfs_fns = {
        .getxattrat_send_fn = vfs_not_implemented_getxattrat_send,
        .getxattrat_recv_fn = vfs_not_implemented_getxattrat_recv,
        .fgetxattr_fn = vfs_gluster_fgetxattr,
-       .listxattr_fn = vfs_gluster_listxattr,
        .flistxattr_fn = vfs_gluster_flistxattr,
        .removexattr_fn = vfs_gluster_removexattr,
        .fremovexattr_fn = vfs_gluster_fremovexattr,
index 1df2316947283698b408a67b1a297b95f6b01016..4c1e9aa657639387a6e2a5c2389be1cbd708aeae 100644 (file)
@@ -2129,41 +2129,6 @@ out:
        return ret;
 }
 
-/*
- * Success: return positive number
- * Failure: set errno, return -1
- */
-static ssize_t mh_listxattr(struct vfs_handle_struct *handle,
-               const struct smb_filename *smb_fname,
-               char *list,
-               size_t size)
-{
-       ssize_t ret;
-       struct smb_filename *clientFname = NULL;
-       int status;
-
-       DEBUG(MH_INFO_DEBUG, ("Entering mh_listxattr\n"));
-       if (!is_in_media_files(smb_fname->base_name)) {
-               ret = SMB_VFS_NEXT_LISTXATTR(handle, smb_fname, list, size);
-               goto out;
-       }
-
-       status = alloc_get_client_smb_fname(handle,
-                               talloc_tos(),
-                               smb_fname,
-                               &clientFname);
-       if (status != 0) {
-               ret = -1;
-               goto err;
-       }
-
-       ret = SMB_VFS_NEXT_LISTXATTR(handle, clientFname, list, size);
-err:
-       TALLOC_FREE(clientFname);
-out:
-       return ret;
-}
-
 /*
  * Success: return 0
  * Failure: set errno, return -1
@@ -2284,7 +2249,6 @@ static struct vfs_fn_pointers vfs_mh_fns = {
        .getxattr_fn = mh_getxattr,
        .getxattrat_send_fn = vfs_not_implemented_getxattrat_send,
        .getxattrat_recv_fn = vfs_not_implemented_getxattrat_recv,
-       .listxattr_fn = mh_listxattr,
        .removexattr_fn = mh_removexattr,
        .setxattr_fn = mh_setxattr,
 
index 9ab56b786096eb6f73ca09710f135f414b974346..316f92d654542fa1f11d20c94e99be698febff84 100644 (file)
@@ -929,15 +929,6 @@ ssize_t vfs_not_implemented_fgetxattr(vfs_handle_struct *handle,
        return -1;
 }
 
-ssize_t vfs_not_implemented_listxattr(vfs_handle_struct *handle,
-                                     const struct smb_filename *smb_fname,
-                                     char *list,
-                                     size_t size)
-{
-       errno = ENOSYS;
-       return -1;
-}
-
 ssize_t vfs_not_implemented_flistxattr(vfs_handle_struct *handle,
                                       struct files_struct *fsp, char *list,
                                       size_t size)
@@ -1143,7 +1134,6 @@ static struct vfs_fn_pointers vfs_not_implemented_fns = {
        .getxattrat_send_fn = vfs_not_implemented_getxattrat_send,
        .getxattrat_recv_fn = vfs_not_implemented_getxattrat_recv,
        .fgetxattr_fn = vfs_not_implemented_fgetxattr,
-       .listxattr_fn = vfs_not_implemented_listxattr,
        .flistxattr_fn = vfs_not_implemented_flistxattr,
        .removexattr_fn = vfs_not_implemented_removexattr,
        .fremovexattr_fn = vfs_not_implemented_fremovexattr,
index 57d0920f8c85d078451cf36ac7f8fa0eb066bcc3..8779e274886e3cc9cc7a727119fe6f6a227badaa 100644 (file)
@@ -185,18 +185,6 @@ static ssize_t posix_eadb_listattr(struct tdb_wrap *db_ctx,
        return blob.length;
 }
 
-static ssize_t posix_eadb_listxattr(struct vfs_handle_struct *handle,
-                               const struct smb_filename *smb_fname,
-                               char *list,
-                               size_t size)
-{
-       struct tdb_wrap *db;
-
-       SMB_VFS_HANDLE_GET_DATA(handle, db, struct tdb_wrap, return -1);
-
-       return posix_eadb_listattr(db, smb_fname->base_name, -1, list, size);
-}
-
 static ssize_t posix_eadb_flistxattr(struct vfs_handle_struct *handle,
                                    struct files_struct *fsp, char *list,
                                    size_t size)
@@ -490,7 +478,6 @@ static struct vfs_fn_pointers vfs_posix_eadb_fns = {
        .fgetxattr_fn = posix_eadb_fgetxattr,
        .setxattr_fn = posix_eadb_setxattr,
        .fsetxattr_fn = posix_eadb_fsetxattr,
-       .listxattr_fn = posix_eadb_listxattr,
        .flistxattr_fn = posix_eadb_flistxattr,
        .removexattr_fn = posix_eadb_removexattr,
        .fremovexattr_fn = posix_eadb_fremovexattr,
index 76d09587007230325a4ab080bfb5a2479f1c4920..f3d16b10e19b231e2e0e0cedee80e084de342006 100644 (file)
@@ -2313,54 +2313,6 @@ static ssize_t shadow_copy2_getxattr(vfs_handle_struct *handle,
        return ret;
 }
 
-static ssize_t shadow_copy2_listxattr(struct vfs_handle_struct *handle,
-                                     const struct smb_filename *smb_fname,
-                                     char *list, size_t size)
-{
-       time_t timestamp = 0;
-       char *stripped = NULL;
-       ssize_t ret;
-       int saved_errno = 0;
-       char *conv;
-       struct smb_filename *conv_smb_fname = NULL;
-
-       if (!shadow_copy2_strip_snapshot(talloc_tos(),
-                               handle,
-                               smb_fname,
-                               &timestamp,
-                               &stripped)) {
-               return -1;
-       }
-       if (timestamp == 0) {
-               return SMB_VFS_NEXT_LISTXATTR(handle, smb_fname, list, size);
-       }
-       conv = shadow_copy2_convert(talloc_tos(), handle, stripped, timestamp);
-       TALLOC_FREE(stripped);
-       if (conv == NULL) {
-               return -1;
-       }
-       conv_smb_fname = synthetic_smb_fname(talloc_tos(),
-                                       conv,
-                                       NULL,
-                                       NULL,
-                                       0,
-                                       smb_fname->flags);
-       if (conv_smb_fname == NULL) {
-               TALLOC_FREE(conv);
-               return -1;
-       }
-       ret = SMB_VFS_NEXT_LISTXATTR(handle, conv_smb_fname, list, size);
-       if (ret == -1) {
-               saved_errno = errno;
-       }
-       TALLOC_FREE(conv_smb_fname);
-       TALLOC_FREE(conv);
-       if (saved_errno != 0) {
-               errno = saved_errno;
-       }
-       return ret;
-}
-
 static int shadow_copy2_removexattr(vfs_handle_struct *handle,
                                const struct smb_filename *smb_fname,
                                const char *aname)
@@ -3248,7 +3200,6 @@ static struct vfs_fn_pointers vfs_shadow_copy2_fns = {
        .getxattr_fn = shadow_copy2_getxattr,
        .getxattrat_send_fn = vfs_not_implemented_getxattrat_send,
        .getxattrat_recv_fn = vfs_not_implemented_getxattrat_recv,
-       .listxattr_fn = shadow_copy2_listxattr,
        .removexattr_fn = shadow_copy2_removexattr,
        .setxattr_fn = shadow_copy2_setxattr,
        .chflags_fn = shadow_copy2_chflags,
index d97e38f621616e763e54e9943fa849e36543eb9d..20de30249cf2053e13f461f5d4c933c3a7d80903 100644 (file)
@@ -2511,55 +2511,6 @@ static ssize_t snapper_gmt_getxattr(vfs_handle_struct *handle,
        return ret;
 }
 
-static ssize_t snapper_gmt_listxattr(struct vfs_handle_struct *handle,
-                                    const struct smb_filename *smb_fname,
-                                    char *list, size_t size)
-{
-       time_t timestamp = 0;
-       char *stripped = NULL;
-       ssize_t ret;
-       int saved_errno = 0;
-       char *conv = NULL;
-       struct smb_filename *conv_smb_fname = NULL;
-
-       if (!snapper_gmt_strip_snapshot(talloc_tos(),
-                                       handle,
-                                       smb_fname,
-                                       &timestamp,
-                                       &stripped)) {
-               return -1;
-       }
-       if (timestamp == 0) {
-               return SMB_VFS_NEXT_LISTXATTR(handle, smb_fname, list, size);
-       }
-       conv = snapper_gmt_convert(talloc_tos(), handle, stripped, timestamp);
-       TALLOC_FREE(stripped);
-       if (conv == NULL) {
-               return -1;
-       }
-       conv_smb_fname = synthetic_smb_fname(talloc_tos(),
-                                       conv,
-                                       NULL,
-                                       NULL,
-                                       0,
-                                       smb_fname->flags);
-       TALLOC_FREE(conv);
-       if (conv_smb_fname == NULL) {
-               errno = ENOMEM;
-               return -1;
-       }
-       ret = SMB_VFS_NEXT_LISTXATTR(handle, conv_smb_fname, list, size);
-       if (ret == -1) {
-               saved_errno = errno;
-       }
-       TALLOC_FREE(conv_smb_fname);
-       TALLOC_FREE(conv);
-       if (saved_errno != 0) {
-               errno = saved_errno;
-       }
-       return ret;
-}
-
 static int snapper_gmt_removexattr(vfs_handle_struct *handle,
                                const struct smb_filename *smb_fname,
                                const char *aname)
@@ -2802,7 +2753,6 @@ static struct vfs_fn_pointers snapper_fns = {
        .getxattr_fn = snapper_gmt_getxattr,
        .getxattrat_send_fn = vfs_not_implemented_getxattrat_send,
        .getxattrat_recv_fn = vfs_not_implemented_getxattrat_recv,
-       .listxattr_fn = snapper_gmt_listxattr,
        .removexattr_fn = snapper_gmt_removexattr,
        .setxattr_fn = snapper_gmt_setxattr,
        .chflags_fn = snapper_gmt_chflags,
index 4e2aa404fa9d0df3f862f7f9ac1caf4a45ffed7a..4de617c262bd4afbc3df182d3bd9eb36c714bce1 100644 (file)
@@ -2633,28 +2633,6 @@ static ssize_t smb_time_audit_fgetxattr(struct vfs_handle_struct *handle,
        return result;
 }
 
-static ssize_t smb_time_audit_listxattr(struct vfs_handle_struct *handle,
-                                       const struct smb_filename *smb_fname,
-                                       char *list,
-                                       size_t size)
-{
-       ssize_t result;
-       struct timespec ts1,ts2;
-       double timediff;
-
-       clock_gettime_mono(&ts1);
-       result = SMB_VFS_NEXT_LISTXATTR(handle, smb_fname, list, size);
-       clock_gettime_mono(&ts2);
-       timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
-
-       if (timediff > audit_timeout) {
-               smb_time_audit_log_fname("listxattr", timediff,
-                               smb_fname->base_name);
-       }
-
-       return result;
-}
-
 static ssize_t smb_time_audit_flistxattr(struct vfs_handle_struct *handle,
                                         struct files_struct *fsp, char *list,
                                         size_t size)
@@ -2948,7 +2926,6 @@ static struct vfs_fn_pointers vfs_time_audit_fns = {
        .getxattrat_send_fn = smb_time_audit_getxattrat_send,
        .getxattrat_recv_fn = smb_time_audit_getxattrat_recv,
        .fgetxattr_fn = smb_time_audit_fgetxattr,
-       .listxattr_fn = smb_time_audit_listxattr,
        .flistxattr_fn = smb_time_audit_flistxattr,
        .removexattr_fn = smb_time_audit_removexattr,
        .fremovexattr_fn = smb_time_audit_fremovexattr,
index 2acd80d7ddac791d36147206f89a7d13e459e91e..ca0d84d8aebe98cdeb38ef62c1db25ef1106664a 100644 (file)
@@ -1731,37 +1731,6 @@ err:
        return ret;
 }
 
-static ssize_t um_listxattr(struct vfs_handle_struct *handle,
-                           const struct smb_filename *smb_fname,
-                           char *list,
-                           size_t size)
-{
-       ssize_t ret;
-       struct smb_filename *client_fname = NULL;
-       int status;
-
-       DEBUG(10, ("Entering um_listxattr\n"));
-
-       if (!is_in_media_files(smb_fname->base_name)) {
-               return SMB_VFS_NEXT_LISTXATTR(handle, smb_fname, list, size);
-       }
-
-       status = alloc_get_client_smb_fname(handle,
-                               talloc_tos(),
-                               smb_fname,
-                               &client_fname);
-       if (status != 0) {
-               ret = -1;
-               goto err;
-       }
-
-       ret = SMB_VFS_NEXT_LISTXATTR(handle, client_fname, list, size);
-
-err:
-       TALLOC_FREE(client_fname);
-       return ret;
-}
-
 static int um_removexattr(struct vfs_handle_struct *handle,
                          const struct smb_filename *smb_fname,
                          const char *name)
@@ -1912,7 +1881,6 @@ static struct vfs_fn_pointers vfs_um_fns = {
        .getxattr_fn = um_getxattr,
        .getxattrat_send_fn = vfs_not_implemented_getxattrat_send,
        .getxattrat_recv_fn = vfs_not_implemented_getxattrat_recv,
-       .listxattr_fn = um_listxattr,
        .removexattr_fn = um_removexattr,
        .setxattr_fn = um_setxattr,
 };
index 06efe9f8f4c1f3af16311a24065564811e1c971c..00877c5f7ea39d939630719525acc96f2c381fd1 100644 (file)
@@ -767,30 +767,6 @@ static size_t vxfs_filter_list(char *list, size_t size)
        return size;
 }
 
-static ssize_t vxfs_listxattr(vfs_handle_struct *handle,
-                               const struct smb_filename *smb_fname,
-                               char *list,
-                               size_t size)
-{
-       ssize_t result;
-
-       result = vxfs_listxattr_path(smb_fname->base_name, list, size);
-       if (result >= 0 || ((errno != ENOTSUP) && (errno != ENOSYS))) {
-               return result;
-       }
-
-       result = SMB_VFS_NEXT_LISTXATTR(handle, smb_fname, list, size);
-
-       if (result <= 0) {
-               return result;
-       }
-
-       /* Remove any XATTR_USER_NTACL elements from the returned list. */
-       result = vxfs_filter_list(list, result);
-
-        return result;
-}
-
 static ssize_t vxfs_flistxattr(struct vfs_handle_struct *handle,
                                 struct files_struct *fsp, char *list,
                                 size_t size)
@@ -932,7 +908,6 @@ static struct vfs_fn_pointers vfs_vxfs_fns = {
        .getxattrat_send_fn = vfs_not_implemented_getxattrat_send,
        .getxattrat_recv_fn = vfs_not_implemented_getxattrat_recv,
        .fgetxattr_fn = vxfs_fget_xattr,
-       .listxattr_fn = vxfs_listxattr,
        .flistxattr_fn = vxfs_flistxattr,
        .removexattr_fn = vxfs_remove_xattr,
        .fremovexattr_fn = vxfs_fremove_xattr,
index 26e8a37bc712ba9195def608aefdc5cb34d6eb33..81ee8be493a34ae899f90a485143a5ebf55e1cab 100644 (file)
@@ -342,34 +342,6 @@ static int xattr_tdb_fsetxattr(struct vfs_handle_struct *handle,
 
 }
 
-static ssize_t xattr_tdb_listxattr(struct vfs_handle_struct *handle,
-                               const struct smb_filename *smb_fname,
-                               char *list,
-                               size_t size)
-{
-       struct file_id id;
-       struct db_context *db;
-       int ret;
-       TALLOC_CTX *frame = talloc_stackframe();
-
-       SMB_VFS_HANDLE_GET_DATA(handle, db, struct db_context,
-                               if (!xattr_tdb_init(-1, frame, &db))
-                               {
-                                       TALLOC_FREE(frame); return -1;
-                               });
-
-       ret = xattr_tdb_get_file_id(handle, smb_fname->base_name, &id);
-       if (ret == -1) {
-               TALLOC_FREE(frame);
-               return -1;
-       }
-
-       ret = xattr_tdb_listattr(db, &id, list, size);
-       TALLOC_FREE(frame);
-       return ret;
-
-}
-
 static ssize_t xattr_tdb_flistxattr(struct vfs_handle_struct *handle,
                                    struct files_struct *fsp, char *list,
                                    size_t size)
@@ -740,7 +712,6 @@ static struct vfs_fn_pointers vfs_xattr_tdb_fns = {
        .fgetxattr_fn = xattr_tdb_fgetxattr,
        .setxattr_fn = xattr_tdb_setxattr,
        .fsetxattr_fn = xattr_tdb_fsetxattr,
-       .listxattr_fn = xattr_tdb_listxattr,
        .flistxattr_fn = xattr_tdb_flistxattr,
        .removexattr_fn = xattr_tdb_removexattr,
        .fremovexattr_fn = xattr_tdb_fremovexattr,
index 1f52a7213a132cb8f4dd75d0f4c4089c19b816ac..d15e6b3ec29547d60544270cf313e3815c5c052c 100644 (file)
@@ -2917,15 +2917,6 @@ ssize_t smb_vfs_call_fgetxattr(struct vfs_handle_struct *handle,
        return handle->fns->fgetxattr_fn(handle, fsp, name, value, size);
 }
 
-ssize_t smb_vfs_call_listxattr(struct vfs_handle_struct *handle,
-                               const struct smb_filename *smb_fname,
-                               char *list,
-                               size_t size)
-{
-       VFS_FIND(listxattr);
-       return handle->fns->listxattr_fn(handle, smb_fname, list, size);
-}
-
 ssize_t smb_vfs_call_flistxattr(struct vfs_handle_struct *handle,
                                struct files_struct *fsp, char *list,
                                size_t size)