svn commit: samba r2776 - in branches/SAMBA_4_0/source/lib: .

tridge at samba.org tridge at samba.org
Sat Oct 2 05:09:16 GMT 2004


Author: tridge
Date: 2004-10-02 05:09:16 +0000 (Sat, 02 Oct 2004)
New Revision: 2776

WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_4_0/source/lib&rev=2776&nolog=1

Log:
if there are no wildcard characters then use StrCaseCmp()

note that this is not just an optimisation, it fixes a rare edge case
when LANMAN1 is negotiated





Modified:
   branches/SAMBA_4_0/source/lib/ms_fnmatch.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ms_fnmatch.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ms_fnmatch.c	2004-10-02 01:43:43 UTC (rev 2775)
+++ branches/SAMBA_4_0/source/lib/ms_fnmatch.c	2004-10-02 05:09:16 UTC (rev 2776)
@@ -150,6 +150,12 @@
 		string = ".";
 	}
 
+	if (strpbrk(pattern, "<>*?\"") == NULL) {
+		/* this is not just an optmisation - it is essential
+		   for LANMAN1 correctness */
+		return StrCaseCmp(pattern, string);
+	}
+
 	pstrcpy_wa(p, pattern);
 	pstrcpy_wa(s, string);
 



More information about the samba-cvs mailing list