summaryrefslogtreecommitdiff
path: root/source3/torture
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2013-08-11 13:10:13 +0200
committerStefan Metzmacher <metze@samba.org>2013-08-15 09:07:05 +0200
commit2c3c8caa0cc7b085231b2edc100ce2332e1e0085 (patch)
treeb08d346da176cc5044fd69d82fba969ce0c33fb4 /source3/torture
parent861ee9319f3cce8f104fd30c7139323ac3d3319d (diff)
downloadsamba-2c3c8caa0cc7b085231b2edc100ce2332e1e0085.tar.gz
samba-2c3c8caa0cc7b085231b2edc100ce2332e1e0085.tar.bz2
samba-2c3c8caa0cc7b085231b2edc100ce2332e1e0085.zip
s3:torture: avoid interpret_protocol()
lp_set_cmdline("client max protocol",...) and lp_cli_maxprotocol() are the more generic solution. https://bugzilla.samba.org/show_bug.cgi?id=9514 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/torture')
-rw-r--r--source3/torture/masktest.c5
-rw-r--r--source3/torture/torture.c3
2 files changed, 4 insertions, 4 deletions
diff --git a/source3/torture/masktest.c b/source3/torture/masktest.c
index 8332e806db..bca35aa4bf 100644
--- a/source3/torture/masktest.c
+++ b/source3/torture/masktest.c
@@ -27,7 +27,7 @@
static fstring password;
static fstring username;
static int got_pass;
-static int max_protocol = PROTOCOL_NT1;
+static int max_protocol = -1;
static bool showall = False;
static bool old_list = False;
static const char *maskchars = "<>\"?*abc.";
@@ -510,7 +510,7 @@ static void usage(void)
verbose++;
break;
case 'M':
- max_protocol = interpret_protocol(optarg, max_protocol);
+ lp_set_cmdline("client max protocol", optarg);
break;
case 'U':
fstrcpy(username,optarg);
@@ -548,6 +548,7 @@ static void usage(void)
argc -= optind;
argv += optind;
+ max_protocol = lp_cli_maxprotocol();
cli = connect_one(share);
if (!cli) {
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index b0b498f1fe..4a8e3ed451 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -46,7 +46,6 @@ extern char *optarg;
extern int optind;
fstring host, workgroup, share, password, username, myname;
-static int max_protocol = PROTOCOL_NT1;
static const char *sockops="TCP_NODELAY";
int torture_nprocs=1;
static int port_to_use=0;
@@ -9759,7 +9758,7 @@ static void usage(void)
fstrcpy(workgroup,optarg);
break;
case 'm':
- max_protocol = interpret_protocol(optarg, max_protocol);
+ lp_set_cmdline("client max protocol", optarg);
break;
case 'N':
torture_nprocs = atoi(optarg);