return NT_STATUS_NO_MEMORY;
}
- return smb_raw_negotiate(cli->transport, unicode, maxprotocol);
+ return smb_raw_negotiate(cli->transport, unicode, PROTOCOL_CORE, maxprotocol);
}
/* wrapper around smb_raw_sesssetup() */
struct tevent_req *smb_raw_negotiate_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
struct smbcli_transport *transport,
+ int minprotocol,
int maxprotocol)
{
struct tevent_req *req;
subreq = smbXcli_negprot_send(state, ev,
transport->conn,
timeout_msec,
- PROTOCOL_CORE,
+ minprotocol,
maxprotocol);
if (tevent_req_nomem(subreq, req)) {
return tevent_req_post(req, ev);
/*
Send a negprot command (sync interface)
*/
-NTSTATUS smb_raw_negotiate(struct smbcli_transport *transport, bool unicode, int maxprotocol)
+NTSTATUS smb_raw_negotiate(struct smbcli_transport *transport, bool unicode,
+ int minprotocol, int maxprotocol)
{
NTSTATUS status = NT_STATUS_INTERNAL_ERROR;
struct tevent_req *subreq = NULL;
subreq = smb_raw_negotiate_send(transport,
transport->ev,
transport,
+ minprotocol,
maxprotocol);
if (subreq == NULL) {
return NT_STATUS_NO_MEMORY;
state->subreq = smb_raw_negotiate_send(state,
state->transport->ev,
state->transport,
+ state->transport->options.min_protocol,
state->transport->options.max_protocol);
NT_STATUS_HAVE_NO_MEMORY(state->subreq);
tevent_req_set_callback(state->subreq, subreq_handler, c);
struct tevent_req *req;
req = smb_raw_negotiate_send(cli, tctx->ev,
cli->transport,
+ PROTOCOL_CORE,
PROTOCOL_NT1);
tevent_loop_once(tctx->ev);
if (!tevent_req_is_in_progress(req)) {