diff options
Diffstat (limited to 'source4')
-rw-r--r-- | source4/lib/ldb-samba/ldb_wrap.c | 5 | ||||
-rw-r--r-- | source4/param/util.c | 10 | ||||
-rw-r--r-- | source4/torture/drs/rpc/dssync.c | 5 | ||||
-rw-r--r-- | source4/torture/drs/rpc/msds_intid.c | 5 | ||||
-rw-r--r-- | source4/torture/rpc/dsgetinfo.c | 2 |
5 files changed, 5 insertions, 22 deletions
diff --git a/source4/lib/ldb-samba/ldb_wrap.c b/source4/lib/ldb-samba/ldb_wrap.c index f7d562377a..d713dfffbf 100644 --- a/source4/lib/ldb-samba/ldb_wrap.c +++ b/source4/lib/ldb-samba/ldb_wrap.c @@ -126,10 +126,7 @@ char *wrap_casefold(void *context, void *mem_ctx, const char *s, size_t n) return NULL; } - ldb_set_modules_dir(ldb, - talloc_asprintf(ldb, - "%s/ldb", - lpcfg_modulesdir(lp_ctx))); + ldb_set_modules_dir(ldb, modules_path(ldb, "ldb")); ldb_set_debug(ldb, ldb_wrap_debug, NULL); diff --git a/source4/param/util.c b/source4/param/util.c index f8fc15a152..bcb5be1974 100644 --- a/source4/param/util.c +++ b/source4/param/util.c @@ -266,14 +266,6 @@ bool run_init_functions(init_module_fn *fns) return ret; } -static char *modules_path(TALLOC_CTX* mem_ctx, struct loadparm_context *lp_ctx, - const char *name) -{ - return talloc_asprintf(mem_ctx, "%s/%s", - lpcfg_modulesdir(lp_ctx), - name); -} - /** * Load the initialization functions from DSO files for a specific subsystem. * @@ -282,7 +274,7 @@ static char *modules_path(TALLOC_CTX* mem_ctx, struct loadparm_context *lp_ctx, init_module_fn *load_samba_modules(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx, const char *subsystem) { - char *path = modules_path(mem_ctx, lp_ctx, subsystem); + char *path = modules_path(mem_ctx, subsystem); init_module_fn *ret; ret = load_modules(mem_ctx, path); diff --git a/source4/torture/drs/rpc/dssync.c b/source4/torture/drs/rpc/dssync.c index 733e55ded5..8279e736b1 100644 --- a/source4/torture/drs/rpc/dssync.c +++ b/source4/torture/drs/rpc/dssync.c @@ -271,10 +271,7 @@ static bool test_LDAPBind(struct torture_context *tctx, struct DsSyncTest *ctx, return NULL; } - ldb_set_modules_dir(ldb, - talloc_asprintf(ldb, - "%s/ldb", - lpcfg_modulesdir(tctx->lp_ctx))); + ldb_set_modules_dir(ldb, modules_path(ldb, "ldb")); if (ldb_set_opaque(ldb, "credentials", credentials)) { talloc_free(ldb); diff --git a/source4/torture/drs/rpc/msds_intid.c b/source4/torture/drs/rpc/msds_intid.c index 53f4992ba2..14c6454abe 100644 --- a/source4/torture/drs/rpc/msds_intid.c +++ b/source4/torture/drs/rpc/msds_intid.c @@ -283,10 +283,7 @@ static bool _test_LDAPBind(struct torture_context *tctx, return NULL; } - ldb_set_modules_dir(ldb, - talloc_asprintf(ldb, - "%s/ldb", - lpcfg_modulesdir(tctx->lp_ctx))); + ldb_set_modules_dir(ldb, modules_path(ldb, "ldb")); if (ldb_set_opaque(ldb, "credentials", credentials) != LDB_SUCCESS) { talloc_free(ldb); diff --git a/source4/torture/rpc/dsgetinfo.c b/source4/torture/rpc/dsgetinfo.c index 6122ff0603..a0360e8404 100644 --- a/source4/torture/rpc/dsgetinfo.c +++ b/source4/torture/rpc/dsgetinfo.c @@ -88,7 +88,7 @@ static const char *torture_get_ldap_base_dn(struct torture_context *tctx, struct } ldb_set_modules_dir(ldb, - talloc_asprintf(ldb, "%s/ldb", lpcfg_modulesdir(tctx->lp_ctx))); + modules_path(ldb, "ldb")); ret = ldb_connect(ldb, ldap_url, 0, NULL); if (ret != LDB_SUCCESS) { |