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:
parent
bae2baeb02
commit
8d879cf54c
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user