summaryrefslogtreecommitdiff
path: root/source3/lib/util.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-11-23 16:34:07 +0100
committerVolker Lendecke <vl@samba.org>2009-11-23 16:35:00 +0100
commita1a81ef785b2372bd4aab0304150b0f8b0fac247 (patch)
treef6e6b2d9c22ae6045e24aaaa8f0a6d7abdea5a97 /source3/lib/util.c
parentd6e55d8ec0335cd2494ca54f1471fad4e2b69795 (diff)
downloadsamba-a1a81ef785b2372bd4aab0304150b0f8b0fac247.tar.gz
samba-a1a81ef785b2372bd4aab0304150b0f8b0fac247.tar.bz2
samba-a1a81ef785b2372bd4aab0304150b0f8b0fac247.zip
Revert "s3: Make the implicit reference to Protocol in mask_match() explicit"
This reverts commit e23d8a3d1f558a7e98ef2afd71e1d15c5b3a71bc.
Diffstat (limited to 'source3/lib/util.c')
-rw-r--r--source3/lib/util.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c
index e3ceea4951..e0b09c4f1f 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -1687,8 +1687,7 @@ bool is_in_path(const char *name, name_compare_entry *namelist, bool case_sensit
for(; namelist->name != NULL; namelist++) {
if(namelist->is_wild) {
- if (mask_match(last_component, namelist->name,
- get_Protocol(), case_sensitive)) {
+ if (mask_match(last_component, namelist->name, case_sensitive)) {
DEBUG(8,("is_in_path: mask match succeeded\n"));
return True;
}
@@ -2385,16 +2384,14 @@ bool ms_has_wild_w(const smb_ucs2_t *s)
of the ".." name.
*******************************************************************/
-bool mask_match(const char *string, const char *pattern,
- enum protocol_types proto, bool is_case_sensitive)
+bool mask_match(const char *string, const char *pattern, bool is_case_sensitive)
{
if (ISDOTDOT(string))
string = ".";
if (ISDOT(pattern))
return False;
- return ms_fnmatch(pattern, string, proto <= PROTOCOL_LANMAN2,
- is_case_sensitive) == 0;
+ return ms_fnmatch(pattern, string, Protocol <= PROTOCOL_LANMAN2, is_case_sensitive) == 0;
}
/*******************************************************************
@@ -2421,8 +2418,7 @@ bool mask_match_search(const char *string, const char *pattern, bool is_case_sen
bool mask_match_list(const char *string, char **list, int listLen, bool is_case_sensitive)
{
while (listLen-- > 0) {
- if (mask_match(string, *list++, get_Protocol(),
- is_case_sensitive))
+ if (mask_match(string, *list++, is_case_sensitive))
return True;
}
return False;