From: Jeremy Allison Date: Mon, 27 Mar 2023 17:43:55 +0000 (-0700) Subject: s3: smbd: Cleanup. smb2_file_rename_information() can never have a @GMT path in the... X-Git-Tag: talloc-2.4.1~1229 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4c5a07ed4e04b2c52de84dee1083705714fa45a5;p=thirdparty%2Fsamba.git s3: smbd: Cleanup. smb2_file_rename_information() can never have a @GMT path in the destination. That's an SMB1 thing. It will always be (and always was) zero. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- diff --git a/source3/smbd/smb2_trans2.c b/source3/smbd/smb2_trans2.c index 2ed3745347f..089a8f08853 100644 --- a/source3/smbd/smb2_trans2.c +++ b/source3/smbd/smb2_trans2.c @@ -4411,7 +4411,6 @@ static NTSTATUS smb2_file_rename_information(connection_struct *conn, struct smb_filename *smb_fname_dst = NULL; const char *dst_original_lcomp = NULL; uint32_t ucf_flags = ucf_flags_from_smb_request(req); - NTTIME dst_twrp = 0; NTSTATUS status = NT_STATUS_OK; bool is_dfs = (req->flags2 & FLAGS2_DFS_PATHNAMES); TALLOC_CTX *ctx = talloc_tos(); @@ -4463,14 +4462,11 @@ static NTSTATUS smb2_file_rename_information(connection_struct *conn, goto out; } } else { - if (ucf_flags & UCF_GMT_PATHNAME) { - extract_snapshot_token(newname, &dst_twrp); - } status = filename_convert_dirfsp(ctx, conn, newname, ucf_flags, - dst_twrp, + 0, /* Never a TWRP. */ &dst_dirfsp, &smb_fname_dst); if (!NT_STATUS_IS_OK(status)) {