From 37ad9ee7cc0af916cfd8cd901fb8fd4019170067 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 22 Dec 2006 17:39:01 +0000 Subject: r20321: fix the samdb_partitions_dn() and samdb_sites_dn() calls, to use the new samdb_config_dn() call. also add samdb_ wrappers for samdb_schema_dn() and samdb_config_dn() metze (This used to be commit 80b8a968243aadeef7512c03278dbb0d4e88a9f2) --- source4/dsdb/samdb/samdb.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'source4') diff --git a/source4/dsdb/samdb/samdb.c b/source4/dsdb/samdb/samdb.c index 2d811094ff..124797d517 100644 --- a/source4/dsdb/samdb/samdb.c +++ b/source4/dsdb/samdb/samdb.c @@ -1030,13 +1030,27 @@ struct ldb_dn *samdb_base_dn(struct ldb_context *sam_ctx) return ldb_get_default_basedn(sam_ctx); } +struct ldb_dn *samdb_config_dn(struct ldb_context *sam_ctx) +{ + return ldb_get_config_basedn(sam_ctx); +} + +struct ldb_dn *samdb_schema_dn(struct ldb_context *sam_ctx) +{ + return ldb_get_schema_basedn(sam_ctx); +} + +struct ldb_dn *samdb_root_dn(struct ldb_context *sam_ctx) +{ + return ldb_get_root_basedn(sam_ctx); +} struct ldb_dn *samdb_partitions_dn(struct ldb_context *sam_ctx, TALLOC_CTX *mem_ctx) { struct ldb_dn *new_dn; - new_dn = ldb_dn_copy(mem_ctx, samdb_base_dn(sam_ctx)); - if ( ! ldb_dn_add_child_fmt(new_dn, "CN=Partitions,CN=Configuration")) { + new_dn = ldb_dn_copy(mem_ctx, samdb_config_dn(sam_ctx)); + if ( ! ldb_dn_add_child_fmt(new_dn, "CN=Partitions")) { talloc_free(new_dn); return NULL; } @@ -1047,8 +1061,8 @@ struct ldb_dn *samdb_sites_dn(struct ldb_context *sam_ctx, TALLOC_CTX *mem_ctx) { struct ldb_dn *new_dn; - new_dn = ldb_dn_copy(mem_ctx, samdb_base_dn(sam_ctx)); - if ( ! ldb_dn_add_child_fmt(new_dn, "CN=Sites,CN=Configuration")) { + new_dn = ldb_dn_copy(mem_ctx, samdb_config_dn(sam_ctx)); + if ( ! ldb_dn_add_child_fmt(new_dn, "CN=Sites")) { talloc_free(new_dn); return NULL; } -- cgit