]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Use dirfsp and atname passed to open_file()
authorVolker Lendecke <vl@samba.org>
Thu, 7 Apr 2022 09:31:33 +0000 (11:31 +0200)
committerJeremy Allison <jra@samba.org>
Thu, 7 Apr 2022 17:30:29 +0000 (17:30 +0000)
Give non_widelink_open() to use the cheaper path without the full
chdir() logic when called via open_file_ntcreate()/open_file().

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Apr  7 17:30:29 UTC 2022 on sn-devel-184

source3/smbd/open.c

index e05e7556cd590acb233d72329c86ceb97eb9e3ea..c534ccd183ad6a73b83b1772eb58b0cce51f32c6 100644 (file)
@@ -1479,8 +1479,8 @@ static NTSTATUS open_file(struct smb_request *req,
                 * Actually do the open - if O_TRUNC is needed handle it
                 * below under the share mode lock.
                 */
-               status = reopen_from_fsp(fsp->conn->cwd_fsp,
-                                        fsp->fsp_name,
+               status = reopen_from_fsp(dirfsp,
+                                        smb_fname_atname,
                                         fsp,
                                         local_flags & ~O_TRUNC,
                                         unx_mode,