From: Volker Lendecke Date: Thu, 25 Sep 2025 06:55:34 +0000 (+0200) Subject: smbd: Remove "dst_original_lcomp" from smb2_parse_file_rename_information() X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e0610a0787ccd773a7e416500209ac033d5348d1;p=thirdparty%2Fsamba.git smbd: Remove "dst_original_lcomp" from smb2_parse_file_rename_information() Nobody uses it anymore Signed-off-by: Volker Lendecke Reviewed-by: Ralph Boehme --- diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h index ac7722350ca..41baa76c866 100644 --- a/source3/smbd/proto.h +++ b/source3/smbd/proto.h @@ -1148,8 +1148,7 @@ NTSTATUS smb2_parse_file_rename_information( char **_newname, bool *overwrite, struct files_struct **_dst_dirfsp, - struct smb_filename **_smb_fname_dst, - char **_dst_original_lcomp); + struct smb_filename **_smb_fname_dst); /* The following definitions come from smbd/uid.c */ diff --git a/source3/smbd/smb2_setinfo.c b/source3/smbd/smb2_setinfo.c index 522e10e92f6..ffa6b4a6a9e 100644 --- a/source3/smbd/smb2_setinfo.c +++ b/source3/smbd/smb2_setinfo.c @@ -582,7 +582,6 @@ static void smbd_smb2_setinfo_rename_dst_check(struct tevent_req *req) struct files_struct *fsp = state->fsp; struct files_struct *dst_dirfsp = NULL; struct smb_filename *smb_fname_dst = NULL; - char *dst_original_lcomp = NULL; bool has_other_open; NTSTATUS status; NTSTATUS close_status; @@ -605,12 +604,10 @@ static void smbd_smb2_setinfo_rename_dst_check(struct tevent_req *req) &newname, &overwrite, &dst_dirfsp, - &smb_fname_dst, - &dst_original_lcomp); + &smb_fname_dst); if (tevent_req_nterror(req, status)) { return; } - TALLOC_FREE(dst_original_lcomp); if (!VALID_STAT(smb_fname_dst->st)) { /* Doesn't exist, nothing to do here */ @@ -795,7 +792,6 @@ static void smbd_smb2_setinfo_rename_dst_parent_check(struct tevent_req *req) struct files_struct *fsp = state->fsp; struct files_struct *dst_parent_dirfsp = NULL; struct smb_filename *smb_fname_dst = NULL; - char *dst_original_lcomp = NULL; NTSTATUS status; if (state->rename_dst_parent_check_done) { @@ -819,8 +815,7 @@ static void smbd_smb2_setinfo_rename_dst_parent_check(struct tevent_req *req) &newname, &overwrite, &dst_parent_dirfsp, - &smb_fname_dst, - &dst_original_lcomp); + &smb_fname_dst); if (tevent_req_nterror(req, status)) { return; } diff --git a/source3/smbd/smb2_trans2.c b/source3/smbd/smb2_trans2.c index 983ae2e7606..c24ded34f28 100644 --- a/source3/smbd/smb2_trans2.c +++ b/source3/smbd/smb2_trans2.c @@ -4248,8 +4248,7 @@ NTSTATUS smb2_parse_file_rename_information( char **_newname, bool *_overwrite, struct files_struct **_dst_dirfsp, - struct smb_filename **_smb_fname_dst, - char **_dst_original_lcomp) + struct smb_filename **_smb_fname_dst) { char *newname = NULL; struct files_struct *dst_dirfsp = NULL; @@ -4345,7 +4344,6 @@ done: *_overwrite = overwrite; *_dst_dirfsp = dst_dirfsp; *_smb_fname_dst = smb_fname_dst; - *_dst_original_lcomp = dst_original_lcomp; return NT_STATUS_OK; } @@ -4363,7 +4361,6 @@ static NTSTATUS smb2_file_rename_information(connection_struct *conn, struct smb_filename *smb_fname_src_rel = NULL; struct files_struct *dst_dirfsp = NULL; struct smb_filename *smb_fname_dst = NULL; - char *dst_original_lcomp = NULL; NTSTATUS status = NT_STATUS_OK; TALLOC_CTX *ctx = talloc_tos(); @@ -4377,8 +4374,7 @@ static NTSTATUS smb2_file_rename_information(connection_struct *conn, &newname, &overwrite, &dst_dirfsp, - &smb_fname_dst, - &dst_original_lcomp); + &smb_fname_dst); if (!NT_STATUS_IS_OK(status)) { return status; }