summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/ms_fnmatch.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source4/lib/ms_fnmatch.c b/source4/lib/ms_fnmatch.c
index d072eb6a50..507d2aea4a 100644
--- a/source4/lib/ms_fnmatch.c
+++ b/source4/lib/ms_fnmatch.c
@@ -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);