s3: smbd: Add a 'const char *src_orginal_lcomp' (last component) parameter to rename_...
authorJeremy Allison <jra@samba.org>
Mon, 5 Oct 2020 19:07:18 +0000 (12:07 -0700)
committerRalph Boehme <slow@samba.org>
Thu, 8 Oct 2020 15:07:30 +0000 (15:07 +0000)
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 <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/nttrans.c
source3/smbd/proto.h
source3/smbd/reply.c
source3/smbd/trans2.c

index 9f5737b83c0f65e1785dae3b1d41d0c061cc2fbe..57b7f2f807ba931d89d16aebc42fbee801a38a85 100644 (file)
@@ -1831,6 +1831,7 @@ void reply_ntrename(struct smb_request *req)
                                                conn,
                                                req,
                                                smb_fname_old,
+                                               NULL,
                                                smb_fname_new,
                                                dst_original_lcomp,
                                                attrs,
index cd4b34c050bb7fa9f2342227d3a91fbaffd39a20..40e7c3b04e7edbc9b7060c884025ff6627b8c8fd 100644 (file)
@@ -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,
index c4380f070bd3f51054a0e4ef9f6ebff23185a61f..43bf9bb79945299b9ebe1c124adf12ad733164bb 100644 (file)
@@ -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,
index 792c70403f0ce2597e167592976b0cf08c77697b..f9300efee9a333ad2ba0ae0f65cf3395b9054b5b 100644 (file)
@@ -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,