s3: VFS: shadow_copy2: Remove shadow_copy2_getxattr.
authorJeremy Allison <jra@samba.org>
Wed, 23 Jun 2021 01:03:09 +0000 (18:03 -0700)
committerJeremy Allison <jra@samba.org>
Sun, 4 Jul 2021 17:15:35 +0000 (17:15 +0000)
No longer used.

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

index 680b8325428cd54f072bff088bf1c4a33e84e96a..31709a31a1a380f2a149664787142703f298e121 100644 (file)
@@ -2185,59 +2185,6 @@ static int shadow_copy2_fchflags(vfs_handle_struct *handle,
        return SMB_VFS_NEXT_FCHFLAGS(handle, fsp, flags);
 }
 
-static ssize_t shadow_copy2_getxattr(vfs_handle_struct *handle,
-                               const struct smb_filename *smb_fname,
-                               const char *aname,
-                               void *value,
-                               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_GETXATTR(handle, smb_fname, aname, value,
-                                            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_GETXATTR(handle, conv_smb_fname, aname, value, 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_fsetxattr(struct vfs_handle_struct *handle,
                                 struct files_struct *fsp,
                                 const char *aname, const void *value,
@@ -3200,7 +3147,6 @@ static struct vfs_fn_pointers vfs_shadow_copy2_fns = {
        .realpath_fn = shadow_copy2_realpath,
        .get_shadow_copy_data_fn = shadow_copy2_get_shadow_copy_data,
        .mkdirat_fn = shadow_copy2_mkdirat,
-       .getxattr_fn = shadow_copy2_getxattr,
        .getxattrat_send_fn = vfs_not_implemented_getxattrat_send,
        .getxattrat_recv_fn = vfs_not_implemented_getxattrat_recv,
        .fsetxattr_fn = shadow_copy2_fsetxattr,