summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/auth/auth_server.c2
-rw-r--r--source4/client/smbmount.c2
-rw-r--r--source4/libcli/cliconnect.c5
3 files changed, 4 insertions, 5 deletions
diff --git a/source4/auth/auth_server.c b/source4/auth/auth_server.c
index b4fbeea2f5..36637edd57 100644
--- a/source4/auth/auth_server.c
+++ b/source4/auth/auth_server.c
@@ -92,7 +92,7 @@ static struct smbcli_state *server_cryptkey(TALLOC_CTX *mem_ctx)
DEBUG(3,("got session\n"));
- if (!smbcli_negprot(cli)) {
+ if (!smbcli_negprot(cli, lp_cli_maxprotocol(global_loadparm))) {
DEBUG(1,("%s rejected the negprot\n",desthost));
release_server_mutex();
talloc_free(cli);
diff --git a/source4/client/smbmount.c b/source4/client/smbmount.c
index 8a106974c2..1a1371edae 100644
--- a/source4/client/smbmount.c
+++ b/source4/client/smbmount.c
@@ -181,7 +181,7 @@ static struct smbcli_state *do_connection(char *the_service)
DEBUG(4,("%d: session request ok\n", sys_getpid()));
- if (!smbcli_negprot(c)) {
+ if (!smbcli_negprot(c, lp_cli_maxprotocol(global_loadparm))) {
DEBUG(0,("%d: protocol negotiation failed\n", sys_getpid()));
talloc_free(c);
return NULL;
diff --git a/source4/libcli/cliconnect.c b/source4/libcli/cliconnect.c
index a56100fc80..d806653758 100644
--- a/source4/libcli/cliconnect.c
+++ b/source4/libcli/cliconnect.c
@@ -55,10 +55,9 @@ bool smbcli_transport_establish(struct smbcli_state *cli,
}
/* wrapper around smb_raw_negotiate() */
-NTSTATUS smbcli_negprot(struct smbcli_state *cli)
+NTSTATUS smbcli_negprot(struct smbcli_state *cli, int maxprotocol)
{
- return smb_raw_negotiate(cli->transport,
- lp_cli_maxprotocol(global_loadparm));
+ return smb_raw_negotiate(cli->transport, maxprotocol);
}
/* wrapper around smb_raw_sesssetup() */