diff options
author | Andrew Bartlett <abartlet@samba.org> | 2009-11-24 10:16:56 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2009-11-24 10:39:09 +1100 |
commit | 7b2bd93635637015eb0bd853c767ac0785e02854 (patch) | |
tree | f1b6e6e8083b4cf8ca302ce9f100d794ab0f9ce5 /source4/dsdb | |
parent | 90d739990a5e17d1f2a7246287b6220534d9aae0 (diff) | |
download | samba-7b2bd93635637015eb0bd853c767ac0785e02854.tar.gz samba-7b2bd93635637015eb0bd853c767ac0785e02854.tar.bz2 samba-7b2bd93635637015eb0bd853c767ac0785e02854.zip |
s4:dsdb Add function to return the CN=Aggregate schema DN
Diffstat (limited to 'source4/dsdb')
-rw-r--r-- | source4/dsdb/common/util.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c index e58754553d..feebab8d45 100644 --- a/source4/dsdb/common/util.c +++ b/source4/dsdb/common/util.c @@ -1027,6 +1027,24 @@ struct ldb_dn *samdb_schema_dn(struct ldb_context *sam_ctx) return ldb_get_schema_basedn(sam_ctx); } +struct ldb_dn *samdb_aggregate_schema_dn(struct ldb_context *sam_ctx, TALLOC_CTX *mem_ctx) +{ + struct ldb_dn *schema_dn = ldb_get_schema_basedn(sam_ctx); + struct ldb_dn *aggregate_dn; + if (!schema_dn) { + return NULL; + } + + aggregate_dn = ldb_dn_copy(mem_ctx, schema_dn); + if (!aggregate_dn) { + return NULL; + } + if (!ldb_dn_add_child_fmt(aggregate_dn, "CN=Aggregate")) { + return NULL; + } + return aggregate_dn; +} + struct ldb_dn *samdb_root_dn(struct ldb_context *sam_ctx) { return ldb_get_root_basedn(sam_ctx); |