r26353: Remove use of global_loadparm.
authorJelmer Vernooij <jelmer@samba.org>
Sat, 8 Dec 2007 22:32:43 +0000 (23:32 +0100)
committerStefan Metzmacher <metze@samba.org>
Fri, 21 Dec 2007 04:48:57 +0000 (05:48 +0100)
25 files changed:
source/lib/dbwrap/dbwrap.c
source/lib/dbwrap/dbwrap.h
source/lib/dbwrap/dbwrap_ctdb.c
source/lib/ldb/ldb_ildap/ldb_ildap.c
source/libcli/ldap/ldap_bind.c
source/ntptr/ntptr.h
source/ntptr/ntptr_base.c
source/ntptr/simple_ldb/ntptr_simple_ldb.c
source/ntvfs/cifs/vfs_cifs.c
source/ntvfs/common/opendb_tdb.c
source/ntvfs/ipc/vfs_ipc.c
source/ntvfs/ntvfs.h
source/ntvfs/ntvfs_base.c
source/ntvfs/posix/pvfs_shortname.c
source/ntvfs/posix/vfs_posix.c
source/ntvfs/print/vfs_print.c
source/ntvfs/unixuid/vfs_unixuid.c
source/rpc_server/spoolss/dcesrv_spoolss.c
source/rpc_server/srvsvc/srvsvc_ntvfs.c
source/smb_server/smb/service.c
source/smb_server/smb2/tcon.c
source/torture/ldap/basic.c
source/torture/ldap/common.c
source/torture/rpc/dssync.c
source/winbind/wb_init_domain.c

index 791d0adee6bc5bd7207be574fdb51d64c0b7ba8c..be48e97b5ad92c11c8db7033db8d45cc78fa2ff0 100644 (file)
@@ -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);
index fc1f123e23270e94616a520e77e29bf541cb905a..1a3b3f527374ad493e3e897bedf270ae38e75588 100644 (file)
@@ -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);
index f635af04c85fb61a63e8d0c2da472c529373c10f..f3daa7dfe5a733d7921cf705777c2d1994d81403 100644 (file)
@@ -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(), 
index 7b9023958ce92c919af8e505e36d1c3601fbd962..0c0ee629bfc98e94f3f24a08703491a7e40b0155 100644 (file)
@@ -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));
index 99b471e9a60c03fa62749155ea03dca4cc763bd3..ba1ae90ebd07c05f7e9f80835bc40bc30edb7411 100644 (file)
@@ -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;
index 56cb4176f4dcc6b88f2ce8f9611edf191dc08430..3e95c3c5e1c0cca0e6a52eac8ea55d389e38303a 100644 (file)
@@ -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 */
index 1a14c3b33ec34a73715b300e71b1bacb424f613b..e184afcfd5f2e83181257e488aa9288cc2b4fba4 100644 (file)
@@ -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",
index 9a9fa626efdaa47ad3ca8719e0f889c9f1ef045b..4e6586db65d980a16289a6c631b173af56053d9c 100644 (file)
@@ -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;
        }
index cd4e36390663f605d663ea687ad7c5fb81267066..152a4056c5a56648a72b8d6d7feb21c8312cac14 100644 (file)
@@ -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 = "?????";
        
index 9926bf8d3ef908ba12aed40ef7a46f42e9e36384..b8b8a5cb3322d8e71f21be3fb7213d29eddc3a20 100644 (file)
@@ -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;
 }
index 4a5ddd7a9cd1a2de7665ea2e35a225fce0533937..b69fb98c5d60a3b5db6a721a602586ab29346edf 100644 (file)
@@ -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;
index 9ac6f85321515acc38f80e324eabc27000bd36dc..fe5f956426306245f3c9f986ffebd9638ac0fe7c 100644 (file)
@@ -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;
 
index 20197a4ba9f612f319ce7623d598cb6b0cf961c9..9172fe1580b9b90d35e2f4dd1abb3959768022b0 100644 (file)
@@ -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;
index e671804ca60d5be0b9b059769789941237a4b156..68e415000ef9d1f1a2ff64f5734fab3d4a11caf9 100644 (file)
@@ -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;
        }
index 07948a64e223bb83914ac687728eef13edac47b4..c1e15976d227940367b6c4c9df4cce7faea320a2 100644 (file)
@@ -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;
        }
index baa1d876d68e76c1dc94cfd77e2c4e370aa4165a..5fdb7aada615e07f6ef919317cf6aa1ce2d2f813 100644 (file)
@@ -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;
        }
index d7b64b01f23cd7c84def4b57a62ff85d7afb209e..63889c66772d6765c5d80e0e36f06556d8d67088 100644 (file)
@@ -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;
        }
index 33a42dddab6aa9a8cf4e6ee353ec1b0486462147..7c701ec50a0ec0109bd5ac525fc460fa5957accc 100644 (file)
@@ -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;
index 63fd394317a0551b480453d2a34f0082ef8cf59e..21fbc53f2c6df44f820ae2372159cca45e3c177c 100644 (file)
@@ -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)) {
index 0e602f6a8bc84a378fbf55e2544cf3daacd0f850..467cbca41826fbde36bc8cd31a039fdf08e9125d 100644 (file)
@@ -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)) {
index 572d3b5bf599147f198c9aa76d25a12083060eb5..4393d38c0db04d48c6cd3d7508e765e124fdfbb0 100644 (file)
@@ -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)) {
index 3f030c97bacbac52b4d5e620e0775fc38b4fdca3..76d412a7cd81d3b6d721243dcc902384acbda77f 100644 (file)
@@ -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;
        }
index 66b2bb1e562ce08616d36ac602a2ddf4f254c27d..b03a6d81131298fe56eecb8dc7bd4b35a640496c 100644 (file)
@@ -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));
index c0deb135703c7de9db0d407083d8fcfd27305f18..8f15f6f096cb0fc9353bc6ab867ced584cb8037f 100644 (file)
@@ -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;
index c3a2ed6a691d8bcc379f0f97f8283afb1f313bd4..6545805e8a04cd9d607fff47cebf6bf18cf4a21d 100644 (file)
@@ -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)));
        }