summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2013-08-11 13:08:49 +0200
committerStefan Metzmacher <metze@samba.org>2013-08-15 09:07:05 +0200
commit861ee9319f3cce8f104fd30c7139323ac3d3319d (patch)
treef50a3463dcfe3465ee987b7122c93d3be0642154
parentf2fb829cee81996c62ff91cb8d1e9997008ffb42 (diff)
downloadsamba-861ee9319f3cce8f104fd30c7139323ac3d3319d.tar.gz
samba-861ee9319f3cce8f104fd30c7139323ac3d3319d.tar.bz2
samba-861ee9319f3cce8f104fd30c7139323ac3d3319d.zip
s3:client: avoid interpret_protocol()
lp_set_cmdline("client max protocol",...) and lp_cli_maxprotocol() are the more generic solution. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
-rw-r--r--source3/client/client.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/client/client.c b/source3/client/client.c
index 1f63052651..44e1efd6db 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -58,7 +58,7 @@ const char *cmd_ptr = NULL;
static int io_bufsize = 524288;
static int name_type = 0x20;
-static int max_protocol = PROTOCOL_NT1;
+static int max_protocol = -1;
static int process_tok(char *tok);
static int cmd_help(void);
@@ -5456,7 +5456,7 @@ static int do_message_op(struct user_auth_info *a_info)
}
break;
case 'm':
- max_protocol = interpret_protocol(poptGetOptArg(pc), max_protocol);
+ lp_set_cmdline("client max protocol", poptGetOptArg(pc));
break;
case 'T':
/* We must use old option processing for this. Find the
@@ -5574,6 +5574,8 @@ static int do_message_op(struct user_auth_info *a_info)
/* Ensure we have a password (or equivalent). */
set_cmdline_auth_info_getpass(auth_info);
+ max_protocol = lp_cli_maxprotocol();
+
if (tar_type) {
if (cmdstr)
process_command_string(cmdstr);