summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/cliconnect.c10
-rw-r--r--source3/libsmb/clidfs.c5
2 files changed, 15 insertions, 0 deletions
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c
index 14cdf968b8..f963edf678 100644
--- a/source3/libsmb/cliconnect.c
+++ b/source3/libsmb/cliconnect.c
@@ -3130,6 +3130,8 @@ static void cli_start_connection_done(struct tevent_req *subreq)
{
struct tevent_req *req = tevent_req_callback_data(
subreq, struct tevent_req);
+ struct cli_start_connection_state *state = tevent_req_data(
+ req, struct cli_start_connection_state);
NTSTATUS status;
status = smbXcli_negprot_recv(subreq);
@@ -3137,6 +3139,13 @@ static void cli_start_connection_done(struct tevent_req *subreq)
if (tevent_req_nterror(req, status)) {
return;
}
+
+ if (smbXcli_conn_protocol(state->cli->conn) >= PROTOCOL_SMB2_02) {
+ /* Ensure we ask for some initial credits. */
+ smb2cli_conn_set_max_credits(state->cli->conn,
+ DEFAULT_SMB2_MAX_CREDITS);
+ }
+
tevent_req_done(req);
}
@@ -3151,6 +3160,7 @@ static NTSTATUS cli_start_connection_recv(struct tevent_req *req,
return status;
}
*output_cli = state->cli;
+
return NT_STATUS_OK;
}
diff --git a/source3/libsmb/clidfs.c b/source3/libsmb/clidfs.c
index 95f8817a94..1ed6ac5fc1 100644
--- a/source3/libsmb/clidfs.c
+++ b/source3/libsmb/clidfs.c
@@ -160,6 +160,11 @@ static NTSTATUS do_connect(TALLOC_CTX *ctx,
return status;
}
+ if (smbXcli_conn_protocol(c->conn) >= PROTOCOL_SMB2_02) {
+ /* Ensure we ask for some initial credits. */
+ smb2cli_conn_set_max_credits(c->conn, DEFAULT_SMB2_MAX_CREDITS);
+ }
+
username = get_cmdline_auth_info_username(auth_info);
password = get_cmdline_auth_info_password(auth_info);