s3: smbd: SMB1 reply_copy() - set the xxx_has_wild flags from the processed names.
authorJeremy Allison <jra@samba.org>
Tue, 29 Sep 2020 20:24:29 +0000 (13:24 -0700)
committerRalph Boehme <slow@samba.org>
Wed, 30 Sep 2020 20:46:41 +0000 (20:46 +0000)
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/reply.c

index 66552164533fc4a6880400de26f99caecacc5281..e8a1717360aac5d9eb94a426060b521cd5a4ad23 100644 (file)
@@ -8806,6 +8806,18 @@ void reply_copy(struct smb_request *req)
                goto out;
        }
 
+       if (!req->posix_pathnames) {
+               /*
+                * Check the wildcard mask *before*
+                * unmangling. As mangling is done
+                * for names that can't be returned
+                * to Windows the unmangled name may
+                * contain Windows wildcard characters.
+                */
+               source_has_wild = ms_has_wild(fname_src_mask);
+               dest_has_wild = ms_has_wild(smb_fname_dst->base_name);
+       }
+
        /*
         * We should only check the mangled cache
         * here if unix_convert failed. This means