summaryrefslogtreecommitdiff
path: root/source3/torture/masktest.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-08-20 05:15:26 +0000
committerAndrew Tridgell <tridge@samba.org>2001-08-20 05:15:26 +0000
commit11ce0f4d2d493702386c0bd49c8e2dd2aad84d56 (patch)
treef9d0e8cc2b71506b658e2a8519bf8bf4201f7618 /source3/torture/masktest.c
parent5f0b9d08303aeddb01019ff2a63001c9dfa3088b (diff)
downloadsamba-11ce0f4d2d493702386c0bd49c8e2dd2aad84d56.tar.gz
samba-11ce0f4d2d493702386c0bd49c8e2dd2aad84d56.tar.bz2
samba-11ce0f4d2d493702386c0bd49c8e2dd2aad84d56.zip
a bunch of fixes from the sflight to seattle
in particular: - fixed NT status code for a bunch of ops - fixed handling of protocol levels in ms_fnmatch (This used to be commit 3eba9606f71f90bfd9820af26f8676277ed22390)
Diffstat (limited to 'source3/torture/masktest.c')
-rw-r--r--source3/torture/masktest.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source3/torture/masktest.c b/source3/torture/masktest.c
index 88b518b43e..097d8c1c43 100644
--- a/source3/torture/masktest.c
+++ b/source3/torture/masktest.c
@@ -125,7 +125,7 @@ int ms_fnmatch_lanman(char *pattern, char *string)
return ms_fnmatch_lanman_core(pattern, string);
}
-static BOOL reg_match_one(char *pattern, char *file)
+static BOOL reg_match_one(struct cli_state *cli, char *pattern, char *file)
{
/* oh what a weird world this is */
if (old_list && strcmp(pattern, "*.*") == 0) return True;
@@ -138,20 +138,20 @@ static BOOL reg_match_one(char *pattern, char *file)
if (strcmp(file,"..") == 0) file = ".";
- return ms_fnmatch(pattern, file)==0;
+ return ms_fnmatch(pattern, file, cli->protocol)==0;
}
-static char *reg_test(char *pattern, char *long_name, char *short_name)
+static char *reg_test(struct cli_state *cli, char *pattern, char *long_name, char *short_name)
{
static fstring ret;
fstrcpy(ret, "---");
pattern = 1+strrchr_m(pattern,'\\');
- if (reg_match_one(pattern, ".")) ret[0] = '+';
- if (reg_match_one(pattern, "..")) ret[1] = '+';
- if (reg_match_one(pattern, long_name) ||
- (*short_name && reg_match_one(pattern, short_name))) ret[2] = '+';
+ if (reg_match_one(cli, pattern, ".")) ret[0] = '+';
+ if (reg_match_one(cli, pattern, "..")) ret[1] = '+';
+ if (reg_match_one(cli, pattern, long_name) ||
+ (*short_name && reg_match_one(cli, pattern, short_name))) ret[2] = '+';
return ret;
}
@@ -323,7 +323,7 @@ static void testpair(struct cli_state *cli, char *mask, char *file)
fstrcpy(res1, "---");
cli_list(cli, mask, aHIDDEN | aDIR, listfn, NULL);
- res2 = reg_test(mask, long_name, short_name);
+ res2 = reg_test(cli, mask, long_name, short_name);
if (showall || strcmp(res1, res2)) {
DEBUG(0,("%s %s %d mask=[%s] file=[%s] rfile=[%s/%s]\n",