From: Jeremy Allison Date: Thu, 28 Jul 2022 18:43:21 +0000 (-0700) Subject: s3: smbd: Add old_dirfsp and new_dirfsp parameters to hardlink_internals(). X-Git-Tag: samba-4.17.0rc1~143 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b80e51137c3b39b36d124eb6a1e028b692d0a863;p=thirdparty%2Fsamba.git s3: smbd: Add old_dirfsp and new_dirfsp parameters to hardlink_internals(). Not yet used. Signed-off-by: Jeremy Allison Reviewed-by: Volker Lendecke --- diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h index 64dd0b7647b..9bb31b1ed28 100644 --- a/source3/smbd/proto.h +++ b/source3/smbd/proto.h @@ -1143,7 +1143,9 @@ NTSTATUS hardlink_internals(TALLOC_CTX *ctx, connection_struct *conn, struct smb_request *req, bool overwrite_if_exists, + struct files_struct *old_dirfsp, const struct smb_filename *smb_fname_old, + struct files_struct *new_dirfsp, struct smb_filename *smb_fname_new); NTSTATUS smb_set_file_time(connection_struct *conn, files_struct *fsp, diff --git a/source3/smbd/smb1_nttrans.c b/source3/smbd/smb1_nttrans.c index f07f2b64e41..ea56f56cea3 100644 --- a/source3/smbd/smb1_nttrans.c +++ b/source3/smbd/smb1_nttrans.c @@ -1551,7 +1551,9 @@ void reply_ntrename(struct smb_request *req) conn, req, false, + NULL, /* old_dirfsp */ smb_fname_old, + NULL, /* new_dirfsp */ smb_fname_new); break; case RENAME_FLAG_COPY: diff --git a/source3/smbd/smb2_trans2.c b/source3/smbd/smb2_trans2.c index ee5704aeec6..e35dd29543c 100644 --- a/source3/smbd/smb2_trans2.c +++ b/source3/smbd/smb2_trans2.c @@ -4241,7 +4241,9 @@ NTSTATUS hardlink_internals(TALLOC_CTX *ctx, connection_struct *conn, struct smb_request *req, bool overwrite_if_exists, + struct files_struct *old_dirfsp, const struct smb_filename *smb_fname_old, + struct files_struct *new_dirfsp, struct smb_filename *smb_fname_new) { NTSTATUS status = NT_STATUS_OK; @@ -4919,8 +4921,14 @@ static NTSTATUS smb_set_file_unix_hlink(connection_struct *conn, return status; } - return hardlink_internals(ctx, conn, req, false, - smb_fname_old, smb_fname_new); + return hardlink_internals(ctx, + conn, + req, + false, + NULL, /* old_dirfsp */ + smb_fname_old, + NULL, /* new_dirfsp */ + smb_fname_new); } /**************************************************************************** @@ -5118,7 +5126,9 @@ static NTSTATUS smb_file_link_information(connection_struct *conn, conn, req, overwrite, + NULL, /* src_dirfsp */ fsp->fsp_name, + NULL, /* dst_dirfsp */ smb_fname_dst); TALLOC_FREE(smb_fname_dst);