summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-11-02 17:04:22 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-11-02 17:04:22 +0100
commita1cc27814240bf50bd546dcfc8b80d3838a6a38d (patch)
tree04d7c24dcbbeb344fa36b5a0937015b44008da30 /source4
parentcb77fca1cd4cb340ca619410195aa6895f848b92 (diff)
downloadsamba-a1cc27814240bf50bd546dcfc8b80d3838a6a38d.tar.gz
samba-a1cc27814240bf50bd546dcfc8b80d3838a6a38d.tar.bz2
samba-a1cc27814240bf50bd546dcfc8b80d3838a6a38d.zip
Remove use of global_loadparm during initialization of gensec.
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/registry/rpc.c2
-rw-r--r--source4/lib/wmi/wmicore.c5
-rw-r--r--source4/libcli/util/errormap.c4
-rw-r--r--source4/librpc/rpc/dcerpc.c4
-rw-r--r--source4/librpc/rpc/dcerpc.h2
-rw-r--r--source4/torture/rpc/rpc.c4
-rw-r--r--source4/utils/net/net.c2
7 files changed, 12 insertions, 11 deletions
diff --git a/source4/lib/registry/rpc.c b/source4/lib/registry/rpc.c
index 3a16ae1db5..117951ed03 100644
--- a/source4/lib/registry/rpc.c
+++ b/source4/lib/registry/rpc.c
@@ -486,7 +486,7 @@ _PUBLIC_ WERROR reg_open_remote(struct registry_context **ctx,
struct dcerpc_pipe *p;
struct rpc_registry_context *rctx;
- dcerpc_init();
+ dcerpc_init(lp_ctx);
rctx = talloc(NULL, struct rpc_registry_context);
diff --git a/source4/lib/wmi/wmicore.c b/source4/lib/wmi/wmicore.c
index a853f26035..7624946536 100644
--- a/source4/lib/wmi/wmicore.c
+++ b/source4/lib/wmi/wmicore.c
@@ -37,9 +37,10 @@ struct IWbemContext;
DEBUG(1, ("OK : %s\n", msg)); \
}
-void wmi_init(struct com_context **ctx, struct cli_credentials *credentials)
+void wmi_init(struct com_context **ctx, struct cli_credentials *credentials,
+ struct loadparm_context *lp_ctx)
{
- dcerpc_init();
+ dcerpc_init(lp_ctx);
ndr_table_init();
/* FIXME: Register DCOM proxies? */
diff --git a/source4/libcli/util/errormap.c b/source4/libcli/util/errormap.c
index 2257955c76..4260c0dd7d 100644
--- a/source4/libcli/util/errormap.c
+++ b/source4/libcli/util/errormap.c
@@ -1157,8 +1157,8 @@ static const struct {
{NT_STATUS(0x80000025), W_ERROR(0x962)},
{NT_STATUS(0x80000288), W_ERROR(0x48d)},
{NT_STATUS(0x80000289), W_ERROR(0x48e)},
- {NT_STATUS_OK, WERR_OK}};
-
+ {NT_STATUS_OK, WERR_OK}
+};
/*
check if a DOS encoded NTSTATUS code maps to the given NTSTATUS code
diff --git a/source4/librpc/rpc/dcerpc.c b/source4/librpc/rpc/dcerpc.c
index 042745d74d..16ea51e6ff 100644
--- a/source4/librpc/rpc/dcerpc.c
+++ b/source4/librpc/rpc/dcerpc.c
@@ -31,9 +31,9 @@
#include "auth/gensec/gensec.h"
#include "param/param.h"
-_PUBLIC_ NTSTATUS dcerpc_init(void)
+_PUBLIC_ NTSTATUS dcerpc_init(struct loadparm_context *lp_ctx)
{
- return gensec_init(global_loadparm);
+ return gensec_init(lp_ctx);
}
static void dcerpc_connection_dead(struct dcerpc_connection *conn, NTSTATUS status);
diff --git a/source4/librpc/rpc/dcerpc.h b/source4/librpc/rpc/dcerpc.h
index dfbe6ee7a6..6b9d61dd0f 100644
--- a/source4/librpc/rpc/dcerpc.h
+++ b/source4/librpc/rpc/dcerpc.h
@@ -309,7 +309,7 @@ NTSTATUS dcerpc_bind_auth_schannel(TALLOC_CTX *tmp_ctx,
struct loadparm_context *lp_ctx,
uint8_t auth_level);
struct event_context *dcerpc_event_context(struct dcerpc_pipe *p);
-NTSTATUS dcerpc_init(void);
+NTSTATUS dcerpc_init(struct loadparm_context *lp_ctx);
struct smbcli_tree *dcerpc_smb_tree(struct dcerpc_connection *c);
uint16_t dcerpc_smb_fnum(struct dcerpc_connection *c);
NTSTATUS dcerpc_secondary_context(struct dcerpc_pipe *p,
diff --git a/source4/torture/rpc/rpc.c b/source4/torture/rpc/rpc.c
index 3e5d2d4323..2fcf700c36 100644
--- a/source4/torture/rpc/rpc.c
+++ b/source4/torture/rpc/rpc.c
@@ -77,6 +77,8 @@ _PUBLIC_ NTSTATUS torture_rpc_connection(struct torture_context *tctx,
NTSTATUS status;
struct dcerpc_binding *binding;
+ dcerpc_init(tctx->lp_ctx);
+
status = torture_rpc_binding(tctx, &binding);
if (NT_STATUS_IS_ERR(status))
return status;
@@ -371,8 +373,6 @@ NTSTATUS torture_rpc_init(void)
{
struct torture_suite *suite = torture_suite_create(talloc_autofree_context(), "RPC");
- dcerpc_init();
-
ndr_table_init();
torture_suite_add_simple_test(suite, "LSA", torture_rpc_lsa);
diff --git a/source4/utils/net/net.c b/source4/utils/net/net.c
index 1c834fe4f0..81584e4398 100644
--- a/source4/utils/net/net.c
+++ b/source4/utils/net/net.c
@@ -183,7 +183,7 @@ static int binary_net(int argc, const char **argv)
return net_usage(ctx, argc, argv);
}
- dcerpc_init();
+ dcerpc_init(cmdline_lp_ctx);
ev = s4_event_context_init(NULL);
if (!ev) {