diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-01-05 17:07:51 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-01-08 13:02:58 +1100 |
commit | 2bad107aa1110bd003aaca91c3214fe2c6b07197 (patch) | |
tree | 85336005c38cc8d872d2dbb6d6fb43565bb5ea45 | |
parent | a1362492ab71a8853d2292d55b35e5c90de9448e (diff) | |
download | samba-2bad107aa1110bd003aaca91c3214fe2c6b07197.tar.gz samba-2bad107aa1110bd003aaca91c3214fe2c6b07197.tar.bz2 samba-2bad107aa1110bd003aaca91c3214fe2c6b07197.zip |
s4-dsdb: added samdb_rid_set_dn()
This returns the DN of our RID Set object
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
-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 2548b0b155..2b8a68e58f 100644 --- a/source4/dsdb/common/util.c +++ b/source4/dsdb/common/util.c @@ -1583,6 +1583,24 @@ int samdb_rid_manager_dn(struct ldb_context *ldb, TALLOC_CTX *mem_ctx, struct ld return samdb_reference_dn(ldb, mem_ctx, samdb_base_dn(ldb), "rIDManagerReference", dn); } +/* + find the RID Set DN via the rIDSetReferences attribute in our + machine account DN + */ +int samdb_rid_set_dn(struct ldb_context *ldb, TALLOC_CTX *mem_ctx, struct ldb_dn **dn) +{ + struct ldb_dn *server_ref_dn; + int ret; + + ret = samdb_server_reference_dn(ldb, mem_ctx, &server_ref_dn); + if (ret != LDB_SUCCESS) { + return ret; + } + ret = samdb_reference_dn(ldb, mem_ctx, server_ref_dn, "rIDSetReferences", dn); + talloc_free(server_ref_dn); + return ret; +} + const char *samdb_server_site_name(struct ldb_context *ldb, TALLOC_CTX *mem_ctx) { const struct ldb_val *val = ldb_dn_get_rdn_val(samdb_server_site_dn(ldb, mem_ctx)); |