From: Jeremy Allison Date: Tue, 19 Sep 2023 17:30:01 +0000 (-0700) Subject: s3: smbd: hardlink_internals() never looks at src_dirfsp or dst_dirfsp. X-Git-Tag: tevent-0.16.0~540 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3fba7872b2bc04b9c5b284bef0f44ec286925730;p=thirdparty%2Fsamba.git s3: smbd: hardlink_internals() never looks at src_dirfsp or dst_dirfsp. Show this by sending NULL in all cases. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- diff --git a/source3/smbd/smb1_nttrans.c b/source3/smbd/smb1_nttrans.c index 82578ae6596..c75a30ebbf4 100644 --- a/source3/smbd/smb1_nttrans.c +++ b/source3/smbd/smb1_nttrans.c @@ -1588,9 +1588,9 @@ void reply_ntrename(struct smb_request *req) conn, req, false, - src_dirfsp, + NULL, smb_fname_old, - dst_dirfsp, + NULL, smb_fname_new); break; case RENAME_FLAG_COPY: diff --git a/source3/smbd/smb1_trans2.c b/source3/smbd/smb1_trans2.c index fca781d2cd4..47493d57904 100644 --- a/source3/smbd/smb1_trans2.c +++ b/source3/smbd/smb1_trans2.c @@ -3861,7 +3861,7 @@ static NTSTATUS smb_set_file_unix_hlink(connection_struct *conn, conn, req, false, - src_dirfsp, + NULL, smb_fname_old, NULL, /* new_dirfsp */ smb_fname_new); diff --git a/source3/smbd/smb2_trans2.c b/source3/smbd/smb2_trans2.c index 377a484eaff..7baf420bdd0 100644 --- a/source3/smbd/smb2_trans2.c +++ b/source3/smbd/smb2_trans2.c @@ -4473,7 +4473,7 @@ static NTSTATUS smb2_file_link_information(connection_struct *conn, overwrite, NULL, /* src_dirfsp */ fsp->fsp_name, - dst_dirfsp, /* dst_dirfsp */ + NULL, /* dst_dirfsp */ smb_fname_dst); TALLOC_FREE(smb_fname_dst); @@ -4571,7 +4571,7 @@ static NTSTATUS smb_file_link_information(connection_struct *conn, overwrite, NULL, /* src_dirfsp */ fsp->fsp_name, - dst_dirfsp, /* dst_dirfsp */ + NULL, /* dst_dirfsp */ smb_fname_dst); TALLOC_FREE(smb_fname_dst);