From 974a890822384314178281875c8afbd9959e2db1 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Mon, 18 Dec 2023 12:35:58 +0100 Subject: [PATCH] smbd: use dirfsp and atname in open_directory() On systems without /proc/fd support this avoid the expensive chdir() logic in non_widelink_open(). open_file_ntcreate() already passes dirfsp and atname to reopen_from_fsp(), it was just missed in the conversion. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15549 Reviewed-by: Volker Lendecke Signed-off-by: Ralph Boehme Autobuild-User(master): Volker Lendecke Autobuild-Date(master): Mon Jan 22 12:00:56 UTC 2024 on atb-devel-224 (cherry picked from commit 2713023250f15cf9971d88620cab9dd4afd0dc73) Autobuild-User(v4-18-test): Jule Anger Autobuild-Date(v4-18-test): Mon Jan 29 11:53:56 UTC 2024 on atb-devel-224 --- source3/smbd/open.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 4d7a103cbc0..3e7a8f45ebd 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -4915,8 +4915,8 @@ static NTSTATUS open_directory(connection_struct *conn, if (access_mask & need_fd_access) { status = reopen_from_fsp( - fsp->conn->cwd_fsp, - fsp->fsp_name, + parent_dir_fname->fsp, + smb_fname_atname, fsp, O_RDONLY | O_DIRECTORY, 0, -- 2.34.1