From: Jeremy Allison Date: Tue, 29 Sep 2020 19:05:53 +0000 (-0700) Subject: s3: smbd: SMB1 reply_search(). The dptr already knows if the mask has a wildcard. X-Git-Tag: talloc-2.3.2~406 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e3611cc05f8ffcaa2a955aa2c2754d2ae6bff8d9;p=thirdparty%2Fsamba.git s3: smbd: SMB1 reply_search(). The dptr already knows if the mask has a wildcard. Get the value from the dptr instead. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 25154f4efde..e848d6c553c 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -2014,16 +2014,11 @@ void reply_search(struct smb_request *req) if (!mask) { goto SearchEmpty; } - /* - * For a 'continue' search we have no string. So - * check from the initial saved string. - */ - if (!req->posix_pathnames) { - mask_contains_wcard = ms_has_wild(mask); - } dirtype = dptr_attr(sconn, dptr_num); } + mask_contains_wcard = dptr_has_wild(fsp->dptr); + DEBUG(4,("dptr_num is %d\n",dptr_num)); if ((dirtype&0x1F) == FILE_ATTRIBUTE_VOLUME) {