}
if (*client_get_fileselection() &&
- !mask_match(finfo->name,client_get_fileselection(),false)) {
+ !mask_match(finfo->name, client_get_fileselection(),
+ get_Protocol(), false)) {
DEBUG(3,("mask_match %s failed\n", finfo->name));
return false;
}
const char **name);
bool ms_has_wild(const char *s);
bool ms_has_wild_w(const smb_ucs2_t *s);
-bool mask_match(const char *string, const char *pattern, bool is_case_sensitive);
+bool mask_match(const char *string, const char *pattern,
+ enum protocol_types proto, bool is_case_sensitive);
bool mask_match_search(const char *string, const char *pattern, bool is_case_sensitive);
bool mask_match_list(const char *string, char **list, int listLen, bool is_case_sensitive);
bool unix_wild_match(const char *pattern, const char *string);
for(; namelist->name != NULL; namelist++) {
if(namelist->is_wild) {
- if (mask_match(last_component, namelist->name, case_sensitive)) {
+ if (mask_match(last_component, namelist->name,
+ get_Protocol(), case_sensitive)) {
DEBUG(8,("is_in_path: mask match succeeded\n"));
return True;
}
of the ".." name.
*******************************************************************/
-bool mask_match(const char *string, const char *pattern, bool is_case_sensitive)
+bool mask_match(const char *string, const char *pattern,
+ enum protocol_types proto, bool is_case_sensitive)
{
if (ISDOTDOT(string))
string = ".";
if (ISDOT(pattern))
return False;
- return ms_fnmatch(pattern, string, Protocol <= PROTOCOL_LANMAN2, is_case_sensitive) == 0;
+ return ms_fnmatch(pattern, string, proto <= PROTOCOL_LANMAN2,
+ is_case_sensitive) == 0;
}
/*******************************************************************
bool mask_match_list(const char *string, char **list, int listLen, bool is_case_sensitive)
{
while (listLen-- > 0) {
- if (mask_match(string, *list++, is_case_sensitive))
+ if (mask_match(string, *list++, get_Protocol(),
+ is_case_sensitive))
return True;
}
return False;
continue;
}
- if(!mask_match(dname, fname_mask,
+ if(!mask_match(dname, fname_mask, get_Protocol(),
conn->case_sensitive)) {
TALLOC_FREE(frame);
TALLOC_FREE(talloced);
continue;
}
- if(!mask_match(dname, fname_src_mask, conn->case_sensitive)) {
+ if(!mask_match(dname, fname_src_mask, get_Protocol(),
+ conn->case_sensitive)) {
TALLOC_FREE(talloced);
continue;
}
continue;
}
- if(!mask_match(dname, fname_src_mask,
+ if(!mask_match(dname, fname_src_mask, get_Protocol(),
conn->case_sensitive)) {
TALLOC_FREE(talloced);
continue;
fname, mask);
state->got_exact_match = got_match;
if (!got_match) {
- got_match = mask_match(fname, mask,
+ got_match = mask_match(fname, mask, get_Protocol(),
state->conn->case_sensitive);
}
state->got_exact_match = got_match;
if (!got_match) {
got_match = mask_match(mangled_name, mask,
+ get_Protocol(),
state->conn->case_sensitive);
}
}