From 14f3c7507020d77bc92ae00614b6af8f24784925 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 18 Jul 2003 06:48:28 +0000 Subject: 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) --- source3/smbd/trans2.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'source3/smbd/trans2.c') diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index bdcd04443e..398646a6cd 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; } /**************************************************************************** -- cgit