summaryrefslogtreecommitdiff
path: root/source4/libcli/smb2/connect.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli/smb2/connect.c')
-rw-r--r--source4/libcli/smb2/connect.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/libcli/smb2/connect.c b/source4/libcli/smb2/connect.c
index 6f05d56cd4..7cfaf59a65 100644
--- a/source4/libcli/smb2/connect.c
+++ b/source4/libcli/smb2/connect.c
@@ -163,6 +163,7 @@ static void continue_resolve(struct composite_context *creq)
struct composite_context *smb2_connect_send(TALLOC_CTX *mem_ctx,
const char *host,
const char *share,
+ const char **name_resolve_order,
struct cli_credentials *credentials,
struct event_context *ev)
{
@@ -187,8 +188,7 @@ struct composite_context *smb2_connect_send(TALLOC_CTX *mem_ctx,
ZERO_STRUCT(name);
name.name = host;
- creq = resolve_name_send(&name, c->event_ctx,
- lp_name_resolve_order(global_loadparm));
+ creq = resolve_name_send(&name, c->event_ctx, name_resolve_order);
composite_continue(c, creq, continue_resolve, c);
return c;
}
@@ -215,11 +215,13 @@ NTSTATUS smb2_connect_recv(struct composite_context *c, TALLOC_CTX *mem_ctx,
*/
NTSTATUS smb2_connect(TALLOC_CTX *mem_ctx,
const char *host, const char *share,
+ const char **name_resolve_order,
struct cli_credentials *credentials,
struct smb2_tree **tree,
struct event_context *ev)
{
struct composite_context *c = smb2_connect_send(mem_ctx, host, share,
+ name_resolve_order,
credentials, ev);
return smb2_connect_recv(c, mem_ctx, tree);
}