this fixes a bug where Samba would under some circumstances return
authorAndrew Tridgell <tridge@samba.org>
Fri, 18 Jul 2003 06:48:28 +0000 (06:48 +0000)
committerAndrew Tridgell <tridge@samba.org>
Fri, 18 Jul 2003 06:48:28 +0000 (06:48 +0000)
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

index bdcd04443e972c70f29de7e11badff2fe54652c0..398646a6cd8154a1a4caed1336a70bfe98028007 100644 (file)
@@ -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;
 }
 
 /****************************************************************************