From 9269e9c232f0ef9e402f70875381e47ca3a1c9c9 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 29 Sep 2020 13:24:29 -0700 Subject: [PATCH] s3: smbd: SMB1 reply_copy() - set the xxx_has_wild flags from the processed names. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- source3/smbd/reply.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 66552164533..e8a1717360a 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -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 -- 2.47.3