]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbd: Change SMB_VFS_REMOVEXATTR -> SMB_VFS_FREMOVEXATTR.
authorJeremy Allison <jra@samba.org>
Thu, 11 Mar 2021 21:42:31 +0000 (13:42 -0800)
committerRalph Boehme <slow@samba.org>
Wed, 7 Apr 2021 16:26:28 +0000 (16:26 +0000)
We no longer need pathname based xattr remove.

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

index 3adb59e3b46057243f80b60e0aefa3591a0771cb..8449f745ff52d43bda97237b7db25dda3b598533 100644 (file)
@@ -792,20 +792,10 @@ NTSTATUS set_ea(connection_struct *conn, files_struct *fsp,
 
                if (ea_list->ea.value.length == 0) {
                        /* Remove the attribute. */
-                       if (!fsp->fsp_flags.is_pathref &&
-                           fsp_get_io_fd(fsp) != -1)
-                       {
-                               DEBUG(10,("set_ea: deleting ea name %s on "
-                                         "file %s by file descriptor.\n",
-                                         unix_ea_name, fsp_str_dbg(fsp)));
-                               ret = SMB_VFS_FREMOVEXATTR(fsp, unix_ea_name);
-                       } else {
-                               DEBUG(10,("set_ea: deleting ea name %s on file %s.\n",
-                                       unix_ea_name, fsp->fsp_name->base_name));
-                               ret = SMB_VFS_REMOVEXATTR(conn,
-                                               fsp->fsp_name,
-                                               unix_ea_name);
-                       }
+                       DBG_DEBUG("deleting ea name %s on "
+                                 "file %s by file descriptor.\n",
+                                 unix_ea_name, fsp_str_dbg(fsp));
+                       ret = SMB_VFS_FREMOVEXATTR(fsp, unix_ea_name);
 #ifdef ENOATTR
                        /* Removing a non existent attribute always succeeds. */
                        if (ret == -1 && errno == ENOATTR) {