summaryrefslogtreecommitdiff
path: root/source4/utils/net
diff options
context:
space:
mode:
Diffstat (limited to 'source4/utils/net')
-rw-r--r--source4/utils/net/net.c2
-rw-r--r--source4/utils/net/net.h1
-rw-r--r--source4/utils/net/net_join.c2
-rw-r--r--source4/utils/net/net_vampire.c2
4 files changed, 5 insertions, 2 deletions
diff --git a/source4/utils/net/net.c b/source4/utils/net/net.c
index 64e82e226a..2741f485cc 100644
--- a/source4/utils/net/net.c
+++ b/source4/utils/net/net.c
@@ -45,6 +45,7 @@
#include "lib/cmdline/popt_common.h"
#include "lib/ldb/include/ldb.h"
#include "librpc/rpc/dcerpc.h"
+#include "param/param.h"
/*
run a function from a function table. If not found then
@@ -192,6 +193,7 @@ static int binary_net(int argc, const char **argv)
ZERO_STRUCTP(ctx);
ctx->mem_ctx = mem_ctx;
+ ctx->lp_ctx = global_loadparm;
ctx->credentials = cmdline_credentials;
rc = net_run_function(ctx, argc_new-1, argv_new+1, net_functable, net_usage);
diff --git a/source4/utils/net/net.h b/source4/utils/net/net.h
index d9b5923dad..8c4fbd7fdd 100644
--- a/source4/utils/net/net.h
+++ b/source4/utils/net/net.h
@@ -24,6 +24,7 @@
struct net_context {
TALLOC_CTX *mem_ctx;
struct cli_credentials *credentials;
+ struct loadparm_context *lp_ctx;
};
struct net_functable {
diff --git a/source4/utils/net/net_join.c b/source4/utils/net/net_join.c
index 1352fb7d9b..6d833f8e93 100644
--- a/source4/utils/net/net_join.c
+++ b/source4/utils/net/net_join.c
@@ -67,7 +67,7 @@ int net_join(struct net_context *ctx, int argc, const char **argv)
return -1;
}
/* prepare parameters for the join */
- r->in.netbios_name = lp_netbios_name(global_loadparm);
+ r->in.netbios_name = lp_netbios_name(ctx->lp_ctx);
r->in.domain_name = domain_name;
r->in.join_type = secure_channel_type;
r->in.level = LIBNET_JOIN_AUTOMATIC;
diff --git a/source4/utils/net/net_vampire.c b/source4/utils/net/net_vampire.c
index dc11917fa4..4e0f1501d9 100644
--- a/source4/utils/net/net_vampire.c
+++ b/source4/utils/net/net_vampire.c
@@ -152,7 +152,7 @@ int net_samsync_ldb(struct net_context *ctx, int argc, const char **argv)
r.in.binding_string = NULL;
/* Needed to override the ACLs on ldb */
- r.in.session_info = system_session(libnetctx, global_loadparm);
+ r.in.session_info = system_session(libnetctx, ctx->lp_ctx);
status = libnet_samsync_ldb(libnetctx, libnetctx, &r);
if (!NT_STATUS_IS_OK(status)) {