From: Andrew Tridgell Date: Fri, 18 Jul 2003 06:48:28 +0000 (+0000) Subject: this fixes a bug where Samba would under some circumstances return X-Git-Url: http://git.samba.org/samba.git/?a=commitdiff_plain;h=14f3c7507020d77bc92ae00614b6af8f24784925;p=kai%2Fsamba.git 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. (This used to be commit 84cee2c3fcc34fe6356e842821a5f0a361477637) --- diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index bdcd04443e9..398646a6cd8 100644 --- a/source3/smbd/trans2.c +++ b/source3/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; } /****************************************************************************