From: Volker Lendecke Date: Thu, 7 Apr 2022 09:31:33 +0000 (+0200) Subject: smbd: Use dirfsp and atname passed to open_file() X-Git-Tag: tevent-0.12.0~141 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6e6ced4b8cbddd9a04e69cb1865fa75ba7b4f8b7;p=thirdparty%2Fsamba.git smbd: Use dirfsp and atname passed to open_file() 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 Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Thu Apr 7 17:30:29 UTC 2022 on sn-devel-184 --- diff --git a/source3/smbd/open.c b/source3/smbd/open.c index e05e7556cd5..c534ccd183a 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -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,