It will just do the session setup and tree connect steps.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13308
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
(cherry picked from commit
f20e607c15b4c8ae56ade5d7e68d832542a2cd5e)
const char *share,
struct resolve_context *resolve_ctx,
struct cli_credentials *credentials,
const char *share,
struct resolve_context *resolve_ctx,
struct cli_credentials *credentials,
+ struct smbXcli_conn **existing_conn,
uint64_t previous_session_id,
const struct smbcli_options *options,
const char *socket_options,
uint64_t previous_session_id,
const struct smbcli_options *options,
const char *socket_options,
return tevent_req_post(req, ev);
}
return tevent_req_post(req, ev);
}
+ if (existing_conn != NULL) {
+ NTSTATUS status;
+
+ status = smb2_transport_raw_init(state, ev,
+ existing_conn,
+ options,
+ &state->transport);
+ if (tevent_req_nterror(req, status)) {
+ return tevent_req_post(req, ev);
+ }
+
+ smb2_connect_session_start(req);
+ if (!tevent_req_is_in_progress(req)) {
+ return tevent_req_post(req, ev);
+ }
+
+ return req;
+ }
+
creq = smbcli_sock_connect_send(state, NULL, state->ports,
state->host, state->resolve_ctx,
state->ev, state->socket_options,
creq = smbcli_sock_connect_send(state, NULL, state->ports,
state->host, state->resolve_ctx,
state->ev, state->socket_options,
share,
resolve_ctx,
credentials,
share,
resolve_ctx,
credentials,
+ NULL, /* existing_conn */
previous_session_id,
options,
socket_options,
previous_session_id,
options,
socket_options,
"IPC$",
s->io.resolve_ctx,
s->io.creds,
"IPC$",
s->io.resolve_ctx,
s->io.creds,
+ NULL, /* existing_conn */
0, /* previous_session_id */
&options,
lpcfg_socket_options(lp_ctx),
0, /* previous_session_id */
&options,
lpcfg_socket_options(lp_ctx),