From: Jeremy Allison Date: Tue, 29 Sep 2020 20:24:29 +0000 (-0700) Subject: s3: smbd: SMB1 reply_copy() - set the xxx_has_wild flags from the processed names. X-Git-Tag: talloc-2.3.2~397 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9269e9c232f0ef9e402f70875381e47ca3a1c9c9;p=thirdparty%2Fsamba.git s3: smbd: SMB1 reply_copy() - set the xxx_has_wild flags from the processed names. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- 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