summaryrefslogtreecommitdiff
path: root/source4/torture/masktest.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-08-09 20:51:16 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:57:48 -0500
commit9c41274ace0a1dd88b113ce2bf84b33b0c528efa (patch)
tree3029ae61eacacbd79fb3bb53226d820542f7258f /source4/torture/masktest.c
parent0f32036afef72cbf0050ddd057ed986f9ef35976 (diff)
downloadsamba-9c41274ace0a1dd88b113ce2bf84b33b0c528efa.tar.gz
samba-9c41274ace0a1dd88b113ce2bf84b33b0c528efa.tar.bz2
samba-9c41274ace0a1dd88b113ce2bf84b33b0c528efa.zip
r1676: - improved the handling of username/password in locktest and gentest
- use lp_maxprotocol() in the libcli/raw/ negotiate code, so we obey the smb.conf "max protocol" option - better handling of -M option in masktest (This used to be commit 8685a584c92ab73a35b29a8c719f1ec207562837)
Diffstat (limited to 'source4/torture/masktest.c')
-rw-r--r--source4/torture/masktest.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/source4/torture/masktest.c b/source4/torture/masktest.c
index 4c219c630e..ee7e25ebbd 100644
--- a/source4/torture/masktest.c
+++ b/source4/torture/masktest.c
@@ -22,7 +22,6 @@
static fstring password;
static fstring username;
-static int max_protocol = PROTOCOL_NT1;
static BOOL showall = False;
static BOOL old_list = False;
static const char *maskchars = "<>\"?*abc.";
@@ -130,7 +129,7 @@ static BOOL reg_match_one(struct smbcli_state *cli, const char *pattern, const c
if (strcmp(pattern,".") == 0) return False;
- if (max_protocol <= PROTOCOL_LANMAN2) {
+ if (cli->transport->negotiate.protocol <= PROTOCOL_LANMAN1) {
return ms_fnmatch_lanman(pattern, file)==0;
}
@@ -208,7 +207,7 @@ static void get_real_name(struct smbcli_state *cli,
pstring long_name, fstring short_name)
{
const char *mask;
- if (max_protocol <= PROTOCOL_LANMAN1) {
+ if (cli->transport->negotiate.protocol <= PROTOCOL_LANMAN1) {
mask = "\\masktest\\*.*";
} else {
mask = "\\masktest\\*";
@@ -410,7 +409,7 @@ static void usage(void)
verbose++;
break;
case 'M':
- max_protocol = interpret_protocol(optarg, max_protocol);
+ lp_set_cmdline("max protocol", optarg);
break;
case 'U':
fstrcpy(username,optarg);
@@ -455,7 +454,7 @@ static void usage(void)
}
/* need to init seed after connect as clientgen uses random numbers */
- DEBUG(0,("seed=%d\n", seed));
+ DEBUG(0,("seed=%d format --- --- (server, correct)\n", seed));
srandom(seed);
test_mask(argc, argv, cli);