diff options
author | Andrew Tridgell <tridge@samba.org> | 2001-08-20 05:15:26 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2001-08-20 05:15:26 +0000 |
commit | 3eba9606f71f90bfd9820af26f8676277ed22390 (patch) | |
tree | f42e9ed0d6f0d1d52db3553e6e8f6afee12dce2c /source/torture/masktest.c | |
parent | 82153dde951ff7af3655f466cb2ea42c3195bdff (diff) | |
download | samba-3eba9606f71f90bfd9820af26f8676277ed22390.tar.gz |
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
Diffstat (limited to 'source/torture/masktest.c')
-rw-r--r-- | source/torture/masktest.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/torture/masktest.c b/source/torture/masktest.c index 88b518b43ed..097d8c1c43e 100644 --- a/source/torture/masktest.c +++ b/source/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", |