summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-08 23:32:43 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:48:57 +0100
commita72c5053c587f0ed6113ef514fe3739cb81e7abf (patch)
tree6099f21bea03a584363c76c6b87a0f648f35d44e
parentdd7e5ed88c48f4ee39e53be07c8839791e914e45 (diff)
downloadsamba-a72c5053c587f0ed6113ef514fe3739cb81e7abf.tar.gz
samba-a72c5053c587f0ed6113ef514fe3739cb81e7abf.tar.bz2
samba-a72c5053c587f0ed6113ef514fe3739cb81e7abf.zip
r26353: Remove use of global_loadparm.
(This used to be commit 17637e4490e42db6cdef619286c4d5a0982e9d1a)
-rw-r--r--source4/lib/dbwrap/dbwrap.c2
-rw-r--r--source4/lib/dbwrap/dbwrap.h2
-rw-r--r--source4/lib/dbwrap/dbwrap_ctdb.c3
-rw-r--r--source4/lib/ldb/ldb_ildap/ldb_ildap.c3
-rw-r--r--source4/libcli/ldap/ldap_bind.c8
-rw-r--r--source4/ntptr/ntptr.h1
-rw-r--r--source4/ntptr/ntptr_base.c4
-rw-r--r--source4/ntptr/simple_ldb/ntptr_simple_ldb.c20
-rw-r--r--source4/ntvfs/cifs/vfs_cifs.c6
-rw-r--r--source4/ntvfs/common/opendb_tdb.c2
-rw-r--r--source4/ntvfs/ipc/vfs_ipc.c2
-rw-r--r--source4/ntvfs/ntvfs.h1
-rw-r--r--source4/ntvfs/ntvfs_base.c2
-rw-r--r--source4/ntvfs/posix/pvfs_shortname.c4
-rw-r--r--source4/ntvfs/posix/vfs_posix.c2
-rw-r--r--source4/ntvfs/print/vfs_print.c2
-rw-r--r--source4/ntvfs/unixuid/vfs_unixuid.c2
-rw-r--r--source4/rpc_server/spoolss/dcesrv_spoolss.c3
-rw-r--r--source4/rpc_server/srvsvc/srvsvc_ntvfs.c1
-rw-r--r--source4/smb_server/smb/service.c1
-rw-r--r--source4/smb_server/smb2/tcon.c2
-rw-r--r--source4/torture/ldap/basic.c4
-rw-r--r--source4/torture/ldap/common.c5
-rw-r--r--source4/torture/rpc/dssync.c2
-rw-r--r--source4/winbind/wb_init_domain.c3
25 files changed, 53 insertions, 34 deletions
diff --git a/source4/lib/dbwrap/dbwrap.c b/source4/lib/dbwrap/dbwrap.c
index 791d0adee6..be48e97b5a 100644
--- a/source4/lib/dbwrap/dbwrap.c
+++ b/source4/lib/dbwrap/dbwrap.c
@@ -32,7 +32,7 @@ struct db_context *db_tmp_open(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_
{
if (lp_parm_bool(lp_ctx, NULL, "ctdb", "enable", false) &&
lp_parm_bool(lp_ctx, NULL, "ctdb", name, true)) {
- return db_tmp_open_ctdb(mem_ctx, name, tdb_flags);
+ return db_tmp_open_ctdb(mem_ctx, lp_ctx, name, tdb_flags);
}
return db_tmp_open_tdb(mem_ctx, lp_ctx, name, tdb_flags);
diff --git a/source4/lib/dbwrap/dbwrap.h b/source4/lib/dbwrap/dbwrap.h
index fc1f123e23..1a3b3f5273 100644
--- a/source4/lib/dbwrap/dbwrap.h
+++ b/source4/lib/dbwrap/dbwrap.h
@@ -51,4 +51,4 @@ struct db_context *db_tmp_open(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_
/* backends */
struct db_context *db_tmp_open_tdb(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx, const char *name, int tdb_flags);
-struct db_context *db_tmp_open_ctdb(TALLOC_CTX *mem_ctx, const char *name, int tdb_flags);
+struct db_context *db_tmp_open_ctdb(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx, const char *name, int tdb_flags);
diff --git a/source4/lib/dbwrap/dbwrap_ctdb.c b/source4/lib/dbwrap/dbwrap_ctdb.c
index f635af04c8..f3daa7dfe5 100644
--- a/source4/lib/dbwrap/dbwrap_ctdb.c
+++ b/source4/lib/dbwrap/dbwrap_ctdb.c
@@ -159,7 +159,8 @@ static int db_ctdb_get_seqnum(struct db_context *db)
return -1;
}
-struct db_context *db_tmp_open_ctdb(TALLOC_CTX *mem_ctx, const char *name, int tdb_flags)
+struct db_context *db_tmp_open_ctdb(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx,
+ const char *name, int tdb_flags)
{
struct db_context *db;
struct ctdb_context *ctdb = talloc_get_type(cluster_backend_handle(),
diff --git a/source4/lib/ldb/ldb_ildap/ldb_ildap.c b/source4/lib/ldb/ldb_ildap/ldb_ildap.c
index 7b9023958c..0c0ee629bf 100644
--- a/source4/lib/ldb/ldb_ildap/ldb_ildap.c
+++ b/source4/lib/ldb/ldb_ildap/ldb_ildap.c
@@ -49,6 +49,7 @@
#include "libcli/ldap/ldap_client.h"
#include "auth/auth.h"
#include "auth/credentials/credentials.h"
+#include "param/param.h"
struct ildb_private {
struct ldap_connection *ldap;
@@ -792,7 +793,7 @@ static int ildb_connect(struct ldb_context *ldb, const char *url,
goto failed;
}
} else {
- status = ldap_bind_sasl(ildb->ldap, creds);
+ status = ldap_bind_sasl(ildb->ldap, creds, global_loadparm);
if (!NT_STATUS_IS_OK(status)) {
ldb_debug(ldb, LDB_DEBUG_ERROR, "Failed to bind - %s\n",
ldap_errstr(ildb->ldap, module, status));
diff --git a/source4/libcli/ldap/ldap_bind.c b/source4/libcli/ldap/ldap_bind.c
index 99b471e9a6..ba1ae90ebd 100644
--- a/source4/libcli/ldap/ldap_bind.c
+++ b/source4/libcli/ldap/ldap_bind.c
@@ -43,7 +43,8 @@ NTSTATUS ldap_rebind(struct ldap_connection *conn)
switch (conn->bind.type) {
case LDAP_BIND_SASL:
- status = ldap_bind_sasl(conn, (struct cli_credentials *)conn->bind.creds);
+ status = ldap_bind_sasl(conn, (struct cli_credentials *)conn->bind.creds,
+ global_loadparm);
break;
case LDAP_BIND_SIMPLE:
@@ -200,7 +201,8 @@ static struct ldap_message *new_ldap_sasl_bind_msg(struct ldap_connection *conn,
perform a sasl bind using the given credentials
*/
NTSTATUS ldap_bind_sasl(struct ldap_connection *conn,
- struct cli_credentials *creds)
+ struct cli_credentials *creds,
+ struct loadparm_context *lp_ctx)
{
NTSTATUS status;
TALLOC_CTX *tmp_ctx = NULL;
@@ -219,7 +221,7 @@ NTSTATUS ldap_bind_sasl(struct ldap_connection *conn,
NULL
};
- status = gensec_client_start(conn, &conn->gensec, NULL, global_loadparm);
+ status = gensec_client_start(conn, &conn->gensec, NULL, lp_ctx);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0, ("Failed to start GENSEC engine (%s)\n", nt_errstr(status)));
goto failed;
diff --git a/source4/ntptr/ntptr.h b/source4/ntptr/ntptr.h
index 56cb4176f4..3e95c3c5e1 100644
--- a/source4/ntptr/ntptr.h
+++ b/source4/ntptr/ntptr.h
@@ -220,6 +220,7 @@ struct ntptr_ops {
struct ntptr_context {
const struct ntptr_ops *ops;
void *private_data;
+ struct loadparm_context *lp_ctx;
};
/* this structure is used by backends to determine the size of some critical types */
diff --git a/source4/ntptr/ntptr_base.c b/source4/ntptr/ntptr_base.c
index 1a14c3b33e..e184afcfd5 100644
--- a/source4/ntptr/ntptr_base.c
+++ b/source4/ntptr/ntptr_base.c
@@ -119,7 +119,8 @@ const struct ntptr_critical_sizes *ntptr_interface_version(void)
/*
create a ntptr_context with a specified NTPTR backend
*/
-NTSTATUS ntptr_init_context(TALLOC_CTX *mem_ctx, const char *providor, struct ntptr_context **_ntptr)
+NTSTATUS ntptr_init_context(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx,
+ const char *providor, struct ntptr_context **_ntptr)
{
NTSTATUS status;
struct ntptr_context *ntptr;
@@ -132,6 +133,7 @@ NTSTATUS ntptr_init_context(TALLOC_CTX *mem_ctx, const char *providor, struct nt
NT_STATUS_HAVE_NO_MEMORY(ntptr);
ntptr->private_data = NULL;
ntptr->ops = ntptr_backend_byname(providor);
+ ntptr->lp_ctx = lp_ctx;
if (!ntptr->ops) {
DEBUG(1,("ntptr_init_context: failed to find NTPTR providor='%s'\n",
diff --git a/source4/ntptr/simple_ldb/ntptr_simple_ldb.c b/source4/ntptr/simple_ldb/ntptr_simple_ldb.c
index 9a9fa626ef..4e6586db65 100644
--- a/source4/ntptr/simple_ldb/ntptr_simple_ldb.c
+++ b/source4/ntptr/simple_ldb/ntptr_simple_ldb.c
@@ -87,7 +87,7 @@ static int sptr_db_search(struct ldb_context *ldb,
static NTSTATUS sptr_init_context(struct ntptr_context *ntptr)
{
- struct ldb_context *sptr_db = sptr_db_connect(ntptr, global_loadparm);
+ struct ldb_context *sptr_db = sptr_db_connect(ntptr, ntptr->lp_ctx);
NT_STATUS_HAVE_NO_MEMORY(sptr_db);
ntptr->private_data = sptr_db;
@@ -170,9 +170,9 @@ static WERROR sptr_GetPrintServerData(struct ntptr_GenericHandle *server, TALLOC
enum ndr_err_code ndr_err;
struct spoolss_OSVersion os;
- os.major = dcesrv_common_get_version_major(mem_ctx, global_loadparm);
- os.minor = dcesrv_common_get_version_minor(mem_ctx, global_loadparm);
- os.build = dcesrv_common_get_version_build(mem_ctx, global_loadparm);
+ os.major = dcesrv_common_get_version_major(mem_ctx, server->ntptr->lp_ctx);
+ os.minor = dcesrv_common_get_version_minor(mem_ctx, server->ntptr->lp_ctx);
+ os.build = dcesrv_common_get_version_build(mem_ctx, server->ntptr->lp_ctx);
os.extra_string = "";
ndr_err = ndr_push_struct_blob(&blob, mem_ctx, &os, (ndr_push_flags_fn_t)ndr_push_spoolss_OSVersion);
@@ -188,9 +188,9 @@ static WERROR sptr_GetPrintServerData(struct ntptr_GenericHandle *server, TALLOC
enum ndr_err_code ndr_err;
struct spoolss_OSVersionEx os_ex;
- os_ex.major = dcesrv_common_get_version_major(mem_ctx, global_loadparm);
- os_ex.minor = dcesrv_common_get_version_minor(mem_ctx, global_loadparm);
- os_ex.build = dcesrv_common_get_version_build(mem_ctx, global_loadparm);
+ os_ex.major = dcesrv_common_get_version_major(mem_ctx, server->ntptr->lp_ctx);
+ os_ex.minor = dcesrv_common_get_version_minor(mem_ctx, server->ntptr->lp_ctx);
+ os_ex.build = dcesrv_common_get_version_build(mem_ctx, server->ntptr->lp_ctx);
os_ex.extra_string = "";
os_ex.unknown2 = 0;
os_ex.unknown3 = 0;
@@ -204,12 +204,12 @@ static WERROR sptr_GetPrintServerData(struct ntptr_GenericHandle *server, TALLOC
r->out.data.binary = blob;
return WERR_OK;
} else if (strcmp("DNSMachineName", r->in.value_name) == 0) {
- if (!lp_realm(global_loadparm)) return WERR_INVALID_PARAM;
+ if (!lp_realm(server->ntptr->lp_ctx)) return WERR_INVALID_PARAM;
r->out.type = SPOOLSS_PRINTER_DATA_TYPE_STRING;
r->out.data.string = talloc_asprintf(mem_ctx, "%s.%s",
- lp_netbios_name(global_loadparm),
- lp_realm(global_loadparm));
+ lp_netbios_name(server->ntptr->lp_ctx),
+ lp_realm(server->ntptr->lp_ctx));
W_ERROR_HAVE_NO_MEMORY(r->out.data.string);
return WERR_OK;
}
diff --git a/source4/ntvfs/cifs/vfs_cifs.c b/source4/ntvfs/cifs/vfs_cifs.c
index cd4e363906..152a4056c5 100644
--- a/source4/ntvfs/cifs/vfs_cifs.c
+++ b/source4/ntvfs/cifs/vfs_cifs.c
@@ -166,7 +166,7 @@ static NTSTATUS cvfs_connect(struct ntvfs_module_context *ntvfs,
return NT_STATUS_NO_MEMORY;
}
cli_credentials_set_event_context(credentials, ntvfs->ctx->event_ctx);
- cli_credentials_set_conf(credentials, global_loadparm);
+ cli_credentials_set_conf(credentials, ntvfs->ctx->lp_ctx);
cli_credentials_set_username(credentials, user, CRED_SPECIFIED);
if (domain) {
cli_credentials_set_domain(credentials, domain, CRED_SPECIFIED);
@@ -176,7 +176,7 @@ static NTSTATUS cvfs_connect(struct ntvfs_module_context *ntvfs,
DEBUG(5, ("CIFS backend: Using machine account\n"));
credentials = cli_credentials_init(private);
cli_credentials_set_event_context(credentials, ntvfs->ctx->event_ctx);
- cli_credentials_set_conf(credentials, global_loadparm);
+ cli_credentials_set_conf(credentials, ntvfs->ctx->lp_ctx);
if (domain) {
cli_credentials_set_domain(credentials, domain, CRED_SPECIFIED);
}
@@ -198,7 +198,7 @@ static NTSTATUS cvfs_connect(struct ntvfs_module_context *ntvfs,
io.in.called_name = host;
io.in.credentials = credentials;
io.in.fallback_to_anonymous = false;
- io.in.workgroup = lp_workgroup(global_loadparm);
+ io.in.workgroup = lp_workgroup(ntvfs->ctx->lp_ctx);
io.in.service = remote_share;
io.in.service_type = "?????";
diff --git a/source4/ntvfs/common/opendb_tdb.c b/source4/ntvfs/common/opendb_tdb.c
index 9926bf8d3e..b8b8a5cb33 100644
--- a/source4/ntvfs/common/opendb_tdb.c
+++ b/source4/ntvfs/common/opendb_tdb.c
@@ -88,7 +88,7 @@ static struct odb_context *odb_tdb_init(TALLOC_CTX *mem_ctx,
odb->ntvfs_ctx = ntvfs_ctx;
/* leave oplocks disabled by default until the code is working */
- odb->oplocks = lp_parm_bool(global_loadparm, NULL, "opendb", "oplocks", false);
+ odb->oplocks = lp_parm_bool(ntvfs_ctx->lp_ctx, NULL, "opendb", "oplocks", false);
return odb;
}
diff --git a/source4/ntvfs/ipc/vfs_ipc.c b/source4/ntvfs/ipc/vfs_ipc.c
index 4a5ddd7a9c..b69fb98c5d 100644
--- a/source4/ntvfs/ipc/vfs_ipc.c
+++ b/source4/ntvfs/ipc/vfs_ipc.c
@@ -109,7 +109,7 @@ static NTSTATUS ipc_connect(struct ntvfs_module_context *ntvfs,
private->pipe_list = NULL;
/* setup the DCERPC server subsystem */
- status = dcesrv_init_ipc_context(private, global_loadparm, &private->dcesrv);
+ status = dcesrv_init_ipc_context(private, ntvfs->ctx->lp_ctx, &private->dcesrv);
NT_STATUS_NOT_OK_RETURN(status);
return NT_STATUS_OK;
diff --git a/source4/ntvfs/ntvfs.h b/source4/ntvfs/ntvfs.h
index 9ac6f85321..fe5f956426 100644
--- a/source4/ntvfs/ntvfs.h
+++ b/source4/ntvfs/ntvfs.h
@@ -187,6 +187,7 @@ struct ntvfs_context {
struct share_config *config;
struct server_id server_id;
+ struct loadparm_context *lp_ctx;
struct event_context *event_ctx;
struct messaging_context *msg_ctx;
diff --git a/source4/ntvfs/ntvfs_base.c b/source4/ntvfs/ntvfs_base.c
index 20197a4ba9..9172fe1580 100644
--- a/source4/ntvfs/ntvfs_base.c
+++ b/source4/ntvfs/ntvfs_base.c
@@ -154,6 +154,7 @@ _PUBLIC_ bool ntvfs_interface_differs(const struct ntvfs_critical_sizes *const i
NTSTATUS ntvfs_init_connection(TALLOC_CTX *mem_ctx, struct share_config *scfg, enum ntvfs_type type,
enum protocol_types protocol,
struct event_context *ev, struct messaging_context *msg,
+ struct loadparm_context *lp_ctx,
struct server_id server_id, struct ntvfs_context **_ctx)
{
const char **handlers = share_string_list_option(mem_ctx, scfg, SHARE_NTVFS_HANDLER);
@@ -172,6 +173,7 @@ NTSTATUS ntvfs_init_connection(TALLOC_CTX *mem_ctx, struct share_config *scfg, e
ctx->event_ctx = ev;
ctx->msg_ctx = msg;
ctx->server_id = server_id;
+ ctx->lp_ctx = lp_ctx;
for (i=0; handlers[i]; i++) {
struct ntvfs_module_context *ntvfs;
diff --git a/source4/ntvfs/posix/pvfs_shortname.c b/source4/ntvfs/posix/pvfs_shortname.c
index e671804ca6..68e415000e 100644
--- a/source4/ntvfs/posix/pvfs_shortname.c
+++ b/source4/ntvfs/posix/pvfs_shortname.c
@@ -614,7 +614,7 @@ NTSTATUS pvfs_mangle_init(struct pvfs_state *pvfs)
}
/* by default have a max of 512 entries in the cache. */
- ctx->cache_size = lp_parm_int(global_loadparm, NULL, "mangle", "cachesize", 512);
+ ctx->cache_size = lp_parm_int(pvfs->ntvfs->ctx->lp_ctx, NULL, "mangle", "cachesize", 512);
ctx->prefix_cache = talloc_array(ctx, char *, ctx->cache_size);
if (ctx->prefix_cache == NULL) {
@@ -628,7 +628,7 @@ NTSTATUS pvfs_mangle_init(struct pvfs_state *pvfs)
memset(ctx->prefix_cache, 0, sizeof(char *) * ctx->cache_size);
memset(ctx->prefix_cache_hashes, 0, sizeof(uint32_t) * ctx->cache_size);
- ctx->mangle_prefix = lp_parm_int(global_loadparm, NULL, "mangle", "prefix", -1);
+ ctx->mangle_prefix = lp_parm_int(pvfs->ntvfs->ctx->lp_ctx, NULL, "mangle", "prefix", -1);
if (ctx->mangle_prefix < 0 || ctx->mangle_prefix > 6) {
ctx->mangle_prefix = DEFAULT_MANGLE_PREFIX;
}
diff --git a/source4/ntvfs/posix/vfs_posix.c b/source4/ntvfs/posix/vfs_posix.c
index 07948a64e2..c1e15976d2 100644
--- a/source4/ntvfs/posix/vfs_posix.c
+++ b/source4/ntvfs/posix/vfs_posix.c
@@ -216,7 +216,7 @@ static NTSTATUS pvfs_connect(struct ntvfs_module_context *ntvfs,
event_context_find(pvfs),
pvfs->ntvfs->ctx->config);
- pvfs->sidmap = sidmap_open(pvfs, global_loadparm);
+ pvfs->sidmap = sidmap_open(pvfs, pvfs->ntvfs->ctx->lp_ctx);
if (pvfs->sidmap == NULL) {
return NT_STATUS_INTERNAL_DB_CORRUPTION;
}
diff --git a/source4/ntvfs/print/vfs_print.c b/source4/ntvfs/print/vfs_print.c
index baa1d876d6..5fdb7aada6 100644
--- a/source4/ntvfs/print/vfs_print.c
+++ b/source4/ntvfs/print/vfs_print.c
@@ -83,7 +83,7 @@ static NTSTATUS print_ioctl(struct ntvfs_module_context *ntvfs,
p = (char *)io->ioctl.out.blob.data;
SSVAL(p,0, 1 /* REWRITE: fsp->rap_print_jobid */);
- push_string(global_smb_iconv_convenience, p+2, lp_netbios_name(global_loadparm), 15, STR_TERMINATE|STR_ASCII);
+ push_string(global_smb_iconv_convenience, p+2, lp_netbios_name(ntvfs->ctx->lp_ctx), 15, STR_TERMINATE|STR_ASCII);
push_string(global_smb_iconv_convenience, p+18, ntvfs->ctx->config->name, 13, STR_TERMINATE|STR_ASCII);
return NT_STATUS_OK;
}
diff --git a/source4/ntvfs/unixuid/vfs_unixuid.c b/source4/ntvfs/unixuid/vfs_unixuid.c
index d7b64b01f2..63889c6677 100644
--- a/source4/ntvfs/unixuid/vfs_unixuid.c
+++ b/source4/ntvfs/unixuid/vfs_unixuid.c
@@ -216,7 +216,7 @@ static NTSTATUS unixuid_connect(struct ntvfs_module_context *ntvfs,
return NT_STATUS_NO_MEMORY;
}
- private->sidmap = sidmap_open(private, global_loadparm);
+ private->sidmap = sidmap_open(private, ntvfs->ctx->lp_ctx);
if (private->sidmap == NULL) {
return NT_STATUS_INTERNAL_DB_CORRUPTION;
}
diff --git a/source4/rpc_server/spoolss/dcesrv_spoolss.c b/source4/rpc_server/spoolss/dcesrv_spoolss.c
index 33a42dddab..7c701ec50a 100644
--- a/source4/rpc_server/spoolss/dcesrv_spoolss.c
+++ b/source4/rpc_server/spoolss/dcesrv_spoolss.c
@@ -216,7 +216,8 @@ static NTSTATUS dcerpc_spoolss_bind(struct dcesrv_call_state *dce_call, const st
NTSTATUS status;
struct ntptr_context *ntptr;
- status = ntptr_init_context(dce_call->context, lp_ntptr_providor(dce_call->conn->dce_ctx->lp_ctx), &ntptr);
+ status = ntptr_init_context(dce_call->context, dce_call->conn->dce_ctx->lp_ctx,
+ lp_ntptr_providor(dce_call->conn->dce_ctx->lp_ctx), &ntptr);
NT_STATUS_NOT_OK_RETURN(status);
dce_call->context->private = ntptr;
diff --git a/source4/rpc_server/srvsvc/srvsvc_ntvfs.c b/source4/rpc_server/srvsvc/srvsvc_ntvfs.c
index 63fd394317..21fbc53f2c 100644
--- a/source4/rpc_server/srvsvc/srvsvc_ntvfs.c
+++ b/source4/rpc_server/srvsvc/srvsvc_ntvfs.c
@@ -99,6 +99,7 @@ NTSTATUS srvsvc_create_ntvfs_context(struct dcesrv_call_state *dce_call,
PROTOCOL_NT1,
dce_call->event_ctx,
dce_call->conn->msg_ctx,
+ dce_call->conn->dce_ctx->lp_ctx,
dce_call->conn->server_id,
&c->ntvfs);
if (!NT_STATUS_IS_OK(status)) {
diff --git a/source4/smb_server/smb/service.c b/source4/smb_server/smb/service.c
index 0e602f6a8b..467cbca418 100644
--- a/source4/smb_server/smb/service.c
+++ b/source4/smb_server/smb/service.c
@@ -49,6 +49,7 @@ static NTSTATUS make_connection_scfg(struct smbsrv_request *req,
req->smb_conn->negotiate.protocol,
req->smb_conn->connection->event.ctx,
req->smb_conn->connection->msg_ctx,
+ global_loadparm,
req->smb_conn->connection->server_id,
&tcon->ntvfs);
if (!NT_STATUS_IS_OK(status)) {
diff --git a/source4/smb_server/smb2/tcon.c b/source4/smb_server/smb2/tcon.c
index 572d3b5bf5..4393d38c0d 100644
--- a/source4/smb_server/smb2/tcon.c
+++ b/source4/smb_server/smb2/tcon.c
@@ -26,6 +26,7 @@
#include "librpc/gen_ndr/security.h"
#include "smbd/service_stream.h"
#include "ntvfs/ntvfs.h"
+#include "param/param.h"
/*
send an oplock break request to a client
@@ -293,6 +294,7 @@ static NTSTATUS smb2srv_tcon_backend(struct smb2srv_request *req, union smb_tcon
req->smb_conn->negotiate.protocol,
req->smb_conn->connection->event.ctx,
req->smb_conn->connection->msg_ctx,
+ global_loadparm,
req->smb_conn->connection->server_id,
&tcon->ntvfs);
if (!NT_STATUS_IS_OK(status)) {
diff --git a/source4/torture/ldap/basic.c b/source4/torture/ldap/basic.c
index 3f030c97ba..76d412a7cd 100644
--- a/source4/torture/ldap/basic.c
+++ b/source4/torture/ldap/basic.c
@@ -27,6 +27,8 @@
#include "torture/torture.h"
#include "torture/ldap/proto.h"
+#include "param/param.h"
+
static bool test_bind_simple(struct ldap_connection *conn, const char *userdn, const char *password)
{
NTSTATUS status;
@@ -47,7 +49,7 @@ static bool test_bind_sasl(struct ldap_connection *conn, struct cli_credentials
printf("Testing sasl bind as user\n");
- status = torture_ldap_bind_sasl(conn, creds);
+ status = torture_ldap_bind_sasl(conn, creds, global_loadparm);
if (!NT_STATUS_IS_OK(status)) {
ret = false;
}
diff --git a/source4/torture/ldap/common.c b/source4/torture/ldap/common.c
index 66b2bb1e56..b03a6d8113 100644
--- a/source4/torture/ldap/common.c
+++ b/source4/torture/ldap/common.c
@@ -39,11 +39,12 @@ NTSTATUS torture_ldap_bind(struct ldap_connection *conn, const char *userdn, con
}
_PUBLIC_ NTSTATUS torture_ldap_bind_sasl(struct ldap_connection *conn,
- struct cli_credentials *creds)
+ struct cli_credentials *creds,
+ struct loadparm_context *lp_ctx)
{
NTSTATUS status;
- status = ldap_bind_sasl(conn, creds);
+ status = ldap_bind_sasl(conn, creds, lp_ctx);
if (!NT_STATUS_IS_OK(status)) {
printf("Failed sasl bind with provided credentials - %s\n",
nt_errstr(status));
diff --git a/source4/torture/rpc/dssync.c b/source4/torture/rpc/dssync.c
index c0deb13570..8f15f6f096 100644
--- a/source4/torture/rpc/dssync.c
+++ b/source4/torture/rpc/dssync.c
@@ -236,7 +236,7 @@ static bool test_LDAPBind(struct DsSyncTest *ctx, struct cli_credentials *creden
printf("connected to LDAP: %s\n", ctx->ldap_url);
- status = torture_ldap_bind_sasl(l->conn, credentials);
+ status = torture_ldap_bind_sasl(l->conn, credentials, global_loadparm);
if (!NT_STATUS_IS_OK(status)) {
printf("failed to bind to LDAP:\n");
return false;
diff --git a/source4/winbind/wb_init_domain.c b/source4/winbind/wb_init_domain.c
index c3a2ed6a69..6545805e8a 100644
--- a/source4/winbind/wb_init_domain.c
+++ b/source4/winbind/wb_init_domain.c
@@ -429,7 +429,8 @@ static void init_domain_recv_ldapconn(struct composite_context *ctx)
state->domain->dc_name);
state->ctx->status =
ldap_bind_sasl(state->domain->ldap_conn,
- state->domain->libnet_ctx->cred);
+ state->domain->libnet_ctx->cred,
+ state->domain->libnet_ctx->lp_ctx);
DEBUG(0, ("ldap_bind returned %s\n",
nt_errstr(state->ctx->status)));
}