From: Jeremy Allison Date: Mon, 5 Oct 2020 19:07:18 +0000 (-0700) Subject: s3: smbd: Add a 'const char *src_orginal_lcomp' (last component) parameter to rename_... X-Git-Tag: talloc-2.3.2~291 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f75e633fde8dcc8662f1949b0f81d605d7d44ef6;p=thirdparty%2Fsamba.git s3: smbd: Add a 'const char *src_orginal_lcomp' (last component) parameter to rename_internals(). Not yet used. Passing as NULL means explicitly no wildcards in the source name. There's only one place where we have to handle wildcards here and that is from SMB1 reply_mv(). Could have used a bool here as in unlink_internals() but using a string here makes the parameters more symmetrical around src and destination values. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index 9f5737b83c0..57b7f2f807b 100644 --- a/source3/smbd/nttrans.c +++ b/source3/smbd/nttrans.c @@ -1831,6 +1831,7 @@ void reply_ntrename(struct smb_request *req) conn, req, smb_fname_old, + NULL, smb_fname_new, dst_original_lcomp, attrs, diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h index cd4b34c050b..40e7c3b04e7 100644 --- a/source3/smbd/proto.h +++ b/source3/smbd/proto.h @@ -1023,6 +1023,7 @@ NTSTATUS rename_internals(TALLOC_CTX *ctx, connection_struct *conn, struct smb_request *req, struct smb_filename *smb_fname_src, + const char *src_original_lcomp, struct smb_filename *smb_fname_dst, const char *dst_original_lcomp, uint32_t attrs, diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index c4380f070bd..43bf9bb7994 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -7861,6 +7861,7 @@ NTSTATUS rename_internals(TALLOC_CTX *ctx, connection_struct *conn, struct smb_request *req, struct smb_filename *smb_fname_src, + const char *src_original_lcomp, struct smb_filename *smb_fname_dst, const char *dst_original_lcomp, uint32_t attrs, @@ -8374,6 +8375,7 @@ void reply_mv(struct smb_request *req) conn, req, smb_fname_src, + NULL, smb_fname_dst, dst_original_lcomp, attrs, diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 792c70403f0..f9300efee9a 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -7480,6 +7480,7 @@ static NTSTATUS smb_file_rename_information(connection_struct *conn, conn, req, smb_fname_src, + NULL, smb_fname_dst, dst_original_lcomp, 0,