summaryrefslogtreecommitdiff
path: root/source4/dsdb
diff options
context:
space:
mode:
authorNadezhda Ivanova <nadezhda.ivanova@postpath.com>2010-03-09 14:56:46 +0200
committerNadezhda Ivanova <nadezhda.ivanova@postpath.com>2010-03-09 14:56:46 +0200
commitdeebbe7cfae309baed9654e6e8354886eb3c568f (patch)
treea53e64dd1d7e32deb0d7380523a1c49a088282b0 /source4/dsdb
parent4b8961bc6f7aaf2c420d7b2bc2ef6eb07ab42429 (diff)
downloadsamba-deebbe7cfae309baed9654e6e8354886eb3c568f.tar.gz
samba-deebbe7cfae309baed9654e6e8354886eb3c568f.tar.bz2
samba-deebbe7cfae309baed9654e6e8354886eb3c568f.zip
A helper function to get the Infrastructure DN.
Diffstat (limited to 'source4/dsdb')
-rw-r--r--source4/dsdb/common/util.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c
index f597c419cc..9c2950994c 100644
--- a/source4/dsdb/common/util.c
+++ b/source4/dsdb/common/util.c
@@ -1069,6 +1069,18 @@ struct ldb_dn *samdb_partitions_dn(struct ldb_context *sam_ctx, TALLOC_CTX *mem_
return new_dn;
}
+struct ldb_dn *samdb_infrastructure_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=Infrastructure")) {
+ talloc_free(new_dn);
+ return NULL;
+ }
+ return new_dn;
+}
+
struct ldb_dn *samdb_sites_dn(struct ldb_context *sam_ctx, TALLOC_CTX *mem_ctx)
{
struct ldb_dn *new_dn;