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>
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.";
verbose++;
break;
case 'M':
- max_protocol = interpret_protocol(optarg, max_protocol);
+ lp_set_cmdline("client max protocol", optarg);
break;
case 'U':
fstrcpy(username,optarg);
argc -= optind;
argv += optind;
+ max_protocol = lp_cli_maxprotocol();
cli = connect_one(share);
if (!cli) {
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;
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);