1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-12 21:58:10 +03:00

r2776: 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
This commit is contained in:
Andrew Tridgell 2004-10-02 05:09:16 +00:00 committed by Gerald (Jerry) Carter
parent bae2baeb02
commit 8d879cf54c

View File

@ -150,6 +150,12 @@ int ms_fnmatch(const char *pattern, const char *string, enum protocol_types prot
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);