summaryrefslogtreecommitdiff
path: root/source4/libnet
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libnet')
-rw-r--r--source4/libnet/libnet.c4
-rw-r--r--source4/libnet/libnet.h2
-rw-r--r--source4/libnet/libnet_become_dc.c3
-rw-r--r--source4/libnet/libnet_join.c5
-rw-r--r--source4/libnet/libnet_rpc.c5
-rw-r--r--source4/libnet/libnet_unbecome_dc.c3
-rw-r--r--source4/libnet/libnet_vampire.c2
7 files changed, 16 insertions, 8 deletions
diff --git a/source4/libnet/libnet.c b/source4/libnet/libnet.c
index 86804df1ea..4502599217 100644
--- a/source4/libnet/libnet.c
+++ b/source4/libnet/libnet.c
@@ -22,7 +22,8 @@
#include "lib/events/events.h"
#include "param/param.h"
-struct libnet_context *libnet_context_init(struct event_context *ev)
+struct libnet_context *libnet_context_init(struct event_context *ev,
+ struct loadparm_context *lp_ctx)
{
struct libnet_context *ctx;
@@ -41,6 +42,7 @@ struct libnet_context *libnet_context_init(struct event_context *ev)
}
}
ctx->event_ctx = ev;
+ ctx->lp_ctx = lp_ctx;
/* name resolution methods */
ctx->name_res_methods = str_list_copy(ctx, lp_name_resolve_order(global_loadparm));
diff --git a/source4/libnet/libnet.h b/source4/libnet/libnet.h
index 56a7d0ba20..4f3acc6010 100644
--- a/source4/libnet/libnet.h
+++ b/source4/libnet/libnet.h
@@ -50,6 +50,8 @@ struct libnet_context {
const char **name_res_methods;
struct event_context *event_ctx;
+
+ struct loadparm_context *lp_ctx;
};
diff --git a/source4/libnet/libnet_become_dc.c b/source4/libnet/libnet_become_dc.c
index 0f8b86fddf..a691fca420 100644
--- a/source4/libnet/libnet_become_dc.c
+++ b/source4/libnet/libnet_become_dc.c
@@ -1526,7 +1526,8 @@ static void becomeDC_drsuapi_connect_send(struct libnet_BecomeDC_state *s,
}
creq = dcerpc_pipe_connect_b_send(s, drsuapi->binding, &ndr_table_drsuapi,
- s->libnet->cred, s->libnet->event_ctx);
+ s->libnet->cred, s->libnet->event_ctx,
+ s->libnet->lp_ctx);
composite_continue(c, creq, recv_fn, s);
}
diff --git a/source4/libnet/libnet_join.c b/source4/libnet/libnet_join.c
index 25ad0ca440..2f14799ced 100644
--- a/source4/libnet/libnet_join.c
+++ b/source4/libnet/libnet_join.c
@@ -114,7 +114,8 @@ static NTSTATUS libnet_JoinADSDomain(struct libnet_context *ctx, struct libnet_J
drsuapi_binding,
&ndr_table_drsuapi,
ctx->cred,
- ctx->event_ctx);
+ ctx->event_ctx,
+ ctx->lp_ctx);
if (!NT_STATUS_IS_OK(status)) {
r->out.error_string = talloc_asprintf(r,
"Connection to DRSUAPI pipe of PDC of domain '%s' failed: %s",
@@ -506,7 +507,7 @@ NTSTATUS libnet_JoinDomain(struct libnet_context *ctx, TALLOC_CTX *mem_ctx, stru
status = dcerpc_pipe_auth(tmp_ctx, &samr_pipe,
connect_with_info->out.dcerpc_pipe->binding,
- &ndr_table_samr, ctx->cred);
+ &ndr_table_samr, ctx->cred, ctx->lp_ctx);
if (!NT_STATUS_IS_OK(status)) {
r->out.error_string = talloc_asprintf(mem_ctx,
"SAMR bind failed: %s",
diff --git a/source4/libnet/libnet_rpc.c b/source4/libnet/libnet_rpc.c
index 85dd6c43e7..667f54c447 100644
--- a/source4/libnet/libnet_rpc.c
+++ b/source4/libnet/libnet_rpc.c
@@ -114,7 +114,8 @@ static struct composite_context* libnet_RpcConnectSrv_send(struct libnet_context
/* connect to remote dcerpc pipe */
pipe_connect_req = dcerpc_pipe_connect_b_send(c, b, r->in.dcerpc_iface,
- ctx->cred, c->event_ctx);
+ ctx->cred, c->event_ctx,
+ ctx->lp_ctx);
if (composite_nomem(pipe_connect_req, c)) return c;
composite_continue(c, pipe_connect_req, continue_pipe_connect, c);
@@ -744,7 +745,7 @@ static void continue_epm_map_binding_send(struct composite_context *c)
if (composite_nomem(talloc_reference(s->final_binding, s->lsa_pipe->binding), c)) return;
epm_map_req = dcerpc_epm_map_binding_send(c, s->final_binding, s->r.in.dcerpc_iface,
- s->lsa_pipe->conn->event_ctx);
+ s->lsa_pipe->conn->event_ctx, s->ctx->lp_ctx);
if (composite_nomem(epm_map_req, c)) return;
composite_continue(c, epm_map_req, continue_epm_map_binding, c);
diff --git a/source4/libnet/libnet_unbecome_dc.c b/source4/libnet/libnet_unbecome_dc.c
index a7b962f2a8..a39df4f254 100644
--- a/source4/libnet/libnet_unbecome_dc.c
+++ b/source4/libnet/libnet_unbecome_dc.c
@@ -540,7 +540,8 @@ static void unbecomeDC_drsuapi_connect_send(struct libnet_UnbecomeDC_state *s)
if (!composite_is_ok(c)) return;
creq = dcerpc_pipe_connect_b_send(s, s->drsuapi.binding, &ndr_table_drsuapi,
- s->libnet->cred, s->libnet->event_ctx);
+ s->libnet->cred, s->libnet->event_ctx,
+ s->libnet->lp_ctx);
composite_continue(c, creq, unbecomeDC_drsuapi_connect_recv, s);
}
diff --git a/source4/libnet/libnet_vampire.c b/source4/libnet/libnet_vampire.c
index fbb7c8b6e5..e4c8833156 100644
--- a/source4/libnet/libnet_vampire.c
+++ b/source4/libnet/libnet_vampire.c
@@ -270,7 +270,7 @@ NTSTATUS libnet_SamSync_netlogon(struct libnet_context *ctx, TALLOC_CTX *mem_ctx
}
nt_status = dcerpc_bind_auth_schannel(samsync_ctx, p, &ndr_table_netlogon,
- machine_account, DCERPC_AUTH_LEVEL_PRIVACY);
+ machine_account, ctx->lp_ctx, DCERPC_AUTH_LEVEL_PRIVACY);
if (!NT_STATUS_IS_OK(nt_status)) {
r->out.error_string = talloc_asprintf(mem_ctx,