]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3/smbd: SMB_VFS_CHMOD -> SMB_VFS_FCHMOD
authorNoel Power <noel.power@suse.com>
Tue, 6 Apr 2021 16:11:48 +0000 (17:11 +0100)
committerNoel Power <npower@samba.org>
Sun, 11 Apr 2021 22:27:34 +0000 (22:27 +0000)
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/trans2.c

index 8449f745ff52d43bda97237b7db25dda3b598533..2dadd08944b2a45b0b69b5b6d78a22073f8172be 100644 (file)
@@ -8328,14 +8328,7 @@ static NTSTATUS smb_set_file_unix_basic(connection_struct *conn,
                          "setting mode 0%o for file %s\n",
                          (unsigned int)unixmode,
                          smb_fname_str_dbg(smb_fname)));
-               if (fsp &&
-                   !fsp->fsp_flags.is_pathref &&
-                   fsp_get_io_fd(fsp) != -1)
-               {
-                       ret = SMB_VFS_FCHMOD(fsp, unixmode);
-               } else {
-                       ret = SMB_VFS_CHMOD(conn, smb_fname, unixmode);
-               }
+               ret = SMB_VFS_FCHMOD(fsp, unixmode);
                if (ret != 0) {
                        return map_nt_error_from_unix(errno);
                }