diff options
author | Jeremy Allison <jra@samba.org> | 2009-01-14 14:26:56 -0800 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2009-01-14 14:26:56 -0800 |
commit | 2c0a802cf823df9bac879b1e7d591f50ee7d51fa (patch) | |
tree | 31053e01524cee0de393ea451f89b327fbc992a2 /source3/libsmb | |
parent | b3e6247a9eb27835a71d6b42b33b51a48f35b862 (diff) | |
download | samba-2c0a802cf823df9bac879b1e7d591f50ee7d51fa.tar.gz samba-2c0a802cf823df9bac879b1e7d591f50ee7d51fa.tar.bz2 samba-2c0a802cf823df9bac879b1e7d591f50ee7d51fa.zip |
Remove another global from clidfs that is only used in client.c.
Jeremy.
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/clidfs.c | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/source3/libsmb/clidfs.c b/source3/libsmb/clidfs.c index 211aca2bd8..7ed66611bd 100644 --- a/source3/libsmb/clidfs.c +++ b/source3/libsmb/clidfs.c @@ -38,9 +38,6 @@ struct client_connection { char *mount; }; -/* global state....globals reek! */ -int max_protocol = PROTOCOL_NT1; - static struct cm_cred_struct { char *username; char *password; @@ -111,7 +108,8 @@ static struct cli_state *do_connect(TALLOC_CTX *ctx, 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; @@ -264,7 +262,8 @@ static struct cli_state *do_connect(TALLOC_CTX *ctx, 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 */ @@ -348,7 +347,8 @@ static struct cli_state *cli_cm_connect(TALLOC_CTX *ctx, const char *server, const char *share, bool show_hdr, - bool force_encrypt) + bool force_encrypt, + int max_protocol) { struct client_connection *node; @@ -358,7 +358,8 @@ static struct cli_state *cli_cm_connect(TALLOC_CTX *ctx, 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 ); @@ -411,7 +412,8 @@ struct cli_state *cli_cm_open(TALLOC_CTX *ctx, const char *server, const char *share, bool show_hdr, - bool force_encrypt) + bool force_encrypt, + int max_protocol) { struct cli_state *c; @@ -420,7 +422,8 @@ struct cli_state *cli_cm_open(TALLOC_CTX *ctx, 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; @@ -900,7 +903,8 @@ bool cli_resolve_path(TALLOC_CTX *ctx, 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; } @@ -945,7 +949,8 @@ bool cli_resolve_path(TALLOC_CTX *ctx, 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; |