mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
s3: smbd: Convert smb2_file_rename_information() to use filename_convert_dirfsp().
One less use of filename_convert(). Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
This commit is contained in:
parent
3b3cab8188
commit
e960f4b30b
@ -4951,9 +4951,11 @@ static NTSTATUS smb2_file_rename_information(connection_struct *conn,
|
||||
bool overwrite;
|
||||
uint32_t len;
|
||||
char *newname = NULL;
|
||||
struct files_struct *dst_dirfsp = NULL;
|
||||
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;
|
||||
TALLOC_CTX *ctx = talloc_tos();
|
||||
|
||||
@ -5011,12 +5013,16 @@ static NTSTATUS smb2_file_rename_information(connection_struct *conn,
|
||||
goto out;
|
||||
}
|
||||
} else {
|
||||
status = filename_convert(ctx,
|
||||
conn,
|
||||
newname,
|
||||
ucf_flags,
|
||||
0,
|
||||
&smb_fname_dst);
|
||||
if (ucf_flags & UCF_GMT_PATHNAME) {
|
||||
extract_snapshot_token(newname, &dst_twrp);
|
||||
}
|
||||
status = filename_convert_dirfsp(ctx,
|
||||
conn,
|
||||
newname,
|
||||
ucf_flags,
|
||||
dst_twrp,
|
||||
&dst_dirfsp,
|
||||
&smb_fname_dst);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
goto out;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user