summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/samdb.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-12-22 17:39:01 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:29:40 -0500
commit37ad9ee7cc0af916cfd8cd901fb8fd4019170067 (patch)
tree248605f2deeede3bbc8f9d214c1384d77d6ccd2c /source4/dsdb/samdb/samdb.c
parent6f68945f7dc88814a5ed587512c7d29d18de5f34 (diff)
downloadsamba-37ad9ee7cc0af916cfd8cd901fb8fd4019170067.tar.gz
samba-37ad9ee7cc0af916cfd8cd901fb8fd4019170067.tar.bz2
samba-37ad9ee7cc0af916cfd8cd901fb8fd4019170067.zip
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)
Diffstat (limited to 'source4/dsdb/samdb/samdb.c')
-rw-r--r--source4/dsdb/samdb/samdb.c22
1 files changed, 18 insertions, 4 deletions
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;
}