static int io_bufsize = 524288;
static int name_type = 0x20;
-extern int max_protocol;
+static int max_protocol = PROTOCOL_NT1;
static int process_tok(char *tok);
static int cmd_help(void);
if (!cli) {
cli = cli_cm_open(talloc_tos(), NULL,
have_ip ? dest_ss_str : desthost,
- service, true, smb_encrypt);
+ service, true, smb_encrypt,
+ max_protocol);
if (!cli) {
return 1;
}
cli = cli_cm_open(talloc_tos(), NULL,
have_ip ? dest_ss_str : desthost,
- service, true, smb_encrypt);
+ service, true, smb_encrypt,
+ max_protocol);
if (!cli) {
return 1;
}
struct sockaddr_storage ss;
cli = cli_cm_open(talloc_tos(), NULL,
- query_host, "IPC$", true, smb_encrypt);
+ query_host, "IPC$", true, smb_encrypt,
+ max_protocol);
if (!cli)
return 1;
cli_cm_shutdown();
cli_cm_set_port( 139 );
cli = cli_cm_open(talloc_tos(), NULL,
- query_host, "IPC$", true, smb_encrypt);
+ query_host, "IPC$", true, smb_encrypt,
+ max_protocol);
}
if (cli == NULL) {
if (!cli) {
cli = cli_cm_open(talloc_tos(), NULL,
have_ip ? dest_ss_str : desthost,
- service, true, smb_encrypt);
+ service, true, smb_encrypt,
+ max_protocol);
if (!cli)
return 1;
}
char *mount;
};
-/* global state....globals reek! */
-int max_protocol = PROTOCOL_NT1;
-
static struct cm_cred_struct {
char *username;
char *password;
const char *server,
const char *share,
bool show_sessetup,
- bool force_encrypt)
+ bool force_encrypt,
+ int max_protocol)
{
struct cli_state *c = NULL;
struct nmb_name called, calling;
lp_workgroup())) {
cli_shutdown(c);
return do_connect(ctx, newserver,
- newshare, false, force_encrypt);
+ newshare, false,
+ force_encrypt, max_protocol);
}
/* must be a normal share */
const char *server,
const char *share,
bool show_hdr,
- bool force_encrypt)
+ bool force_encrypt,
+ int max_protocol)
{
struct client_connection *node;
return NULL;
}
- node->cli = do_connect(ctx, server, share, show_hdr, force_encrypt);
+ node->cli = do_connect(ctx, server, share,
+ show_hdr, force_encrypt, max_protocol);
if ( !node->cli ) {
TALLOC_FREE( node );
const char *server,
const char *share,
bool show_hdr,
- bool force_encrypt)
+ bool force_encrypt,
+ int max_protocol)
{
struct cli_state *c;
c = cli_cm_find(server, share);
if (!c) {
c = cli_cm_connect(ctx, referring_cli,
- server, share, show_hdr, force_encrypt);
+ server, share, show_hdr, force_encrypt,
+ max_protocol);
}
return c;
if (!(cli_ipc = cli_cm_open(ctx, rootcli,
rootcli->desthost,
"IPC$", false,
- (rootcli->trans_enc_state != NULL)))) {
+ (rootcli->trans_enc_state != NULL),
+ rootcli->protocol))) {
return false;
}
server,
share,
false,
- (rootcli->trans_enc_state != NULL))) == NULL) {
+ (rootcli->trans_enc_state != NULL),
+ rootcli->protocol)) == NULL) {
d_printf("Unable to follow dfs referral [\\%s\\%s]\n",
server, share );
return false;