From 84cee2c3fcc34fe6356e842821a5f0a361477637 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 18 Jul 2003 06:48:28 +0000 Subject: [PATCH] this fixes a bug where Samba would under some circumstances return incomplete directory listings. The problem was the exact_match optimisation that short circuited directory listings on exact matches. This optimisation doesn't work when the unix filename contains Microsoft wildcard characters. --- source/smbd/trans2.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c index bdcd04443e9..398646a6cd8 100644 --- a/source/smbd/trans2.c +++ b/source/smbd/trans2.c @@ -326,7 +326,13 @@ static BOOL exact_match(char *str,char *mask, BOOL case_sig) return False; if (case_sig) return strcmp(str,mask)==0; - return StrCaseCmp(str,mask) == 0; + if (StrCaseCmp(str,mask) != 0) { + return False; + } + if (ms_has_wild(str)) { + return False; + } + return True; } /**************************************************************************** -- 2.11.4.GIT