mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
s3: smbd: Use get_original_lcomp() inside reply_mv().
Pass to rename_internals(). Removes one more use of the struct member original_lcomp. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
parent
7d2cb52163
commit
aa80e9732f
@ -8290,6 +8290,7 @@ void reply_mv(struct smb_request *req)
|
||||
TALLOC_CTX *ctx = talloc_tos();
|
||||
struct smb_filename *smb_fname_src = NULL;
|
||||
struct smb_filename *smb_fname_dst = NULL;
|
||||
const char *dst_original_lcomp = NULL;
|
||||
uint32_t src_ucf_flags = ucf_flags_from_smb_request(req) |
|
||||
(req->posix_pathnames ?
|
||||
UCF_UNIX_NAME_LOOKUP :
|
||||
@ -8373,6 +8374,16 @@ void reply_mv(struct smb_request *req)
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* Get the last component of the destination for rename_internals(). */
|
||||
dst_original_lcomp = get_original_lcomp(ctx,
|
||||
conn,
|
||||
newname,
|
||||
dst_ucf_flags);
|
||||
if (dst_original_lcomp == NULL) {
|
||||
reply_nterror(req, NT_STATUS_NO_MEMORY);
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (stream_rename) {
|
||||
/* smb_fname_dst->base_name must be the same as
|
||||
smb_fname_src->base_name. */
|
||||
@ -8393,7 +8404,7 @@ void reply_mv(struct smb_request *req)
|
||||
req,
|
||||
smb_fname_src,
|
||||
smb_fname_dst,
|
||||
smb_fname_dst->original_lcomp,
|
||||
dst_original_lcomp,
|
||||
attrs,
|
||||
false,
|
||||
src_has_wcard,
|
||||
|
Loading…
Reference in New Issue
Block a user