From e61a956b9346833e863d35d29e36a702ca1e92f2 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 19 Sep 2023 09:49:25 -0700 Subject: [PATCH] s3: smbd: rename_internals_fsp() has to reopen the parent directory of the target as a pathref to check permissions. So it never looks at any passed in dst_dirfsp. Prove this by passing NULL. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- source3/smbd/smb2_reply.c | 2 +- source3/smbd/smb2_trans2.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source3/smbd/smb2_reply.c b/source3/smbd/smb2_reply.c index dfcd05d2cae..aea5d627add 100644 --- a/source3/smbd/smb2_reply.c +++ b/source3/smbd/smb2_reply.c @@ -1938,7 +1938,7 @@ NTSTATUS rename_internals(TALLOC_CTX *ctx, status = rename_internals_fsp(conn, fsp, - dst_dirfsp, + NULL, smb_fname_dst, dst_original_lcomp, attrs, diff --git a/source3/smbd/smb2_trans2.c b/source3/smbd/smb2_trans2.c index 23081a11e43..0f1ef2d4354 100644 --- a/source3/smbd/smb2_trans2.c +++ b/source3/smbd/smb2_trans2.c @@ -4751,7 +4751,7 @@ static NTSTATUS smb_file_rename_information(connection_struct *conn, smb_fname_str_dbg(smb_fname_dst))); status = rename_internals_fsp(conn, fsp, - dst_dirfsp, + NULL, smb_fname_dst, dst_original_lcomp, 0, -- 2.47.3