diff options
Diffstat (limited to 'source4/dsdb/samdb')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/partition_init.c | 3 | ||||
-rw-r--r-- | source4/dsdb/samdb/samdb.c | 27 |
2 files changed, 2 insertions, 28 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/partition_init.c b/source4/dsdb/samdb/ldb_modules/partition_init.c index 0ab8bada13..775e566d51 100644 --- a/source4/dsdb/samdb/ldb_modules/partition_init.c +++ b/source4/dsdb/samdb/ldb_modules/partition_init.c @@ -31,6 +31,7 @@ #include "dsdb/samdb/ldb_modules/partition.h" #include "lib/util/tsort.h" +#include "lib/ldb-samba/ldb_wrap.h" static int partition_sort_compare(const void *v1, const void *v2) { @@ -218,7 +219,7 @@ static int new_partition_from_dn(struct ldb_context *ldb, struct partition_priva (*partition)->backend_url = data->ldapBackend; } else { /* the backend LDB is the DN (base64 encoded if not 'plain') followed by .ldb */ - backend_url = samdb_relative_path(ldb, + backend_url = ldb_relative_path(ldb, *partition, filename); if (!backend_url) { diff --git a/source4/dsdb/samdb/samdb.c b/source4/dsdb/samdb/samdb.c index c2a1e9ec80..57de27a22e 100644 --- a/source4/dsdb/samdb/samdb.c +++ b/source4/dsdb/samdb/samdb.c @@ -43,33 +43,6 @@ #include "param/secrets.h" #include "auth/auth.h" -char *samdb_relative_path(struct ldb_context *ldb, - TALLOC_CTX *mem_ctx, - const char *name) -{ - const char *base_url = - (const char *)ldb_get_opaque(ldb, "ldb_url"); - char *path, *p, *full_name; - if (name == NULL) { - return NULL; - } - if (strncmp("tdb://", base_url, 6) == 0) { - base_url = base_url+6; - } - path = talloc_strdup(mem_ctx, base_url); - if (path == NULL) { - return NULL; - } - if ( (p = strrchr(path, '/')) != NULL) { - p[0] = '\0'; - full_name = talloc_asprintf(mem_ctx, "%s/%s", path, name); - } else { - full_name = talloc_asprintf(mem_ctx, "./%s", name); - } - talloc_free(path); - return full_name; -} - /* make sure the static credentials are not freed */ |