]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: VFS: vxfs: Remove vxfs_remove_xattr() - no longer called.
authorJeremy Allison <jra@samba.org>
Fri, 19 Mar 2021 21:02:17 +0000 (14:02 -0700)
committerRalph Boehme <slow@samba.org>
Wed, 7 Apr 2021 16:26:28 +0000 (16:26 +0000)
Also remove supporting function from lib_vxfs.c.

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

index 13b2e612a27a53524a211510131309ab7a69afb3..432eadd1865007b3c155963c692877adb0d631f4 100644 (file)
@@ -121,27 +121,6 @@ int vxfs_removexattr_fd(int fd, const char *name)
        return ret;
 }
 
-int vxfs_removexattr_path(const char *path, const char *name, bool is_dir)
-{
-       int ret, fd = -1;
-
-       if (is_dir) {
-               fd = open(path, O_RDONLY|O_DIRECTORY);
-       } else {
-               fd = open(path, O_WRONLY);
-       }
-       if (fd == -1) {
-               DEBUG(10, ("file not opened: vxfs_removexattr_path for %s\n",
-                          path));
-               return -1;
-       }
-
-       ret = vxfs_removexattr_fd(fd, name);
-       close(fd);
-
-       return ret;
-}
-
 int vxfs_listxattr_fd(int fd, char *list, size_t size)
 {
        int ret;
index 3dedf8d489d2fc30bcce26bcc6c5c6bc62545e10..6c6f92e1f524fed03aaa954b230d921966cd1e64 100644 (file)
@@ -585,57 +585,6 @@ static ssize_t vxfs_fget_xattr(struct vfs_handle_struct *handle,
        return SMB_VFS_NEXT_FGETXATTR(handle, fsp, name, value, size);
 }
 
-static int vxfs_remove_xattr(struct vfs_handle_struct *handle,
-                               const struct smb_filename *smb_fname_in,
-                               const char *name)
-{
-       bool is_dir = false;
-       int ret = 0, ret_new = 0, old_errno;
-       struct smb_filename *smb_fname = NULL;
-
-       DEBUG(10, ("In vxfs_remove_xattr\n"));
-
-       smb_fname = cp_smb_filename_nostream(talloc_tos(), smb_fname_in);
-       if (smb_fname == NULL) {
-               errno = ENOMEM;
-               return -1;
-       }
-
-       /* Remove with old way */
-       if (strcmp(name, XATTR_NTACL_NAME) == 0) {
-               ret = SMB_VFS_NEXT_REMOVEXATTR(handle, smb_fname,
-                                              XATTR_USER_NTACL);
-       } else {
-               if (strcasecmp(name, XATTR_USER_NTACL) != 0) {
-                       ret = SMB_VFS_NEXT_REMOVEXATTR(handle, smb_fname,
-                                                      name);
-               }
-       }
-       /* Remove with new way */
-       old_errno = errno;
-
-       if (SMB_VFS_NEXT_STAT(handle, smb_fname) != 0) {
-               TALLOC_FREE(smb_fname);
-               return -1;
-       }
-
-       is_dir = S_ISDIR(smb_fname->st.st_ex_mode);
-       TALLOC_FREE(smb_fname);
-       /*
-        * If both fail, return failuer else return whichever succeeded
-        */
-       ret_new = vxfs_removexattr_path(smb_fname_in->base_name, name, is_dir);
-       if (errno == ENOTSUP || errno == ENOSYS) {
-               errno = old_errno;
-       }
-       if ((ret_new != -1) && (ret == -1)) {
-               ret = ret_new;
-       }
-
-       return ret;
-
-}
-
 static int vxfs_fremove_xattr(struct vfs_handle_struct *handle,
                              struct files_struct *fsp, const char *name){
        int ret = 0, ret_new = 0, old_errno;
@@ -831,7 +780,6 @@ static struct vfs_fn_pointers vfs_vxfs_fns = {
        .getxattrat_recv_fn = vfs_not_implemented_getxattrat_recv,
        .fgetxattr_fn = vxfs_fget_xattr,
        .flistxattr_fn = vxfs_flistxattr,
-       .removexattr_fn = vxfs_remove_xattr,
        .fremovexattr_fn = vxfs_fremove_xattr,
        .fsetxattr_fn = vxfs_fset_xattr,
 };
index e081baa0fc74c964c4ff4e7a3191f002d247e4f9..afeccd85502f7686315e327238604cd207819023 100644 (file)
@@ -23,7 +23,6 @@ int vxfs_setxattr_fd(int, const char *, const void *, size_t, int);
 int vxfs_getxattr_path(const char *, const char *, void *, size_t);
 int vxfs_getxattr_fd(int, const char *, void *, size_t);
 
-int vxfs_removexattr_path(const char *, const char *, bool);
 int vxfs_removexattr_fd(int, const char *);
 
 int vxfs_listxattr_fd(int, char *, size_t);