summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-07-18 06:48:28 +0000
committerAndrew Tridgell <tridge@samba.org>2003-07-18 06:48:28 +0000
commit14f3c7507020d77bc92ae00614b6af8f24784925 (patch)
tree6faee5a2a3b52acaccb837530d5a47c04b13819f /source3
parentfc7c1101fb2a568f6489d3e4b58c050cd2f12cb9 (diff)
downloadsamba-14f3c7507020d77bc92ae00614b6af8f24784925.tar.gz
samba-14f3c7507020d77bc92ae00614b6af8f24784925.tar.bz2
samba-14f3c7507020d77bc92ae00614b6af8f24784925.zip
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)
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/trans2.c8
1 files changed, 7 insertions, 1 deletions
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;
}
/****************************************************************************