summaryrefslogtreecommitdiff
path: root/source3/lib/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/util.c')
-rw-r--r--source3/lib/util.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c
index cd30ef9814..265302d2d4 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -2475,7 +2475,23 @@ BOOL mask_match(const char *string, char *pattern, BOOL is_case_sensitive)
if (strcmp(pattern,".") == 0)
return False;
- return ms_fnmatch(pattern, string, Protocol, is_case_sensitive) == 0;
+ return ms_fnmatch(pattern, string, Protocol <= PROTOCOL_LANMAN2, is_case_sensitive) == 0;
+}
+
+/*******************************************************************
+ A wrapper that handles case sensitivity and the special handling
+ of the ".." name. Varient that is only called by old search code which requires
+ pattern translation.
+*******************************************************************/
+
+BOOL mask_match_search(const char *string, char *pattern, BOOL is_case_sensitive)
+{
+ if (strcmp(string,"..") == 0)
+ string = ".";
+ if (strcmp(pattern,".") == 0)
+ return False;
+
+ return ms_fnmatch(pattern, string, True, is_case_sensitive) == 0;
}
/*******************************************************************