From 85e49953641fc9ddece3f4a08df8c96cf41e06dc Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Sun, 18 Oct 2009 11:59:11 +0200 Subject: s4:sites - get the server site (name) from DSDB --- source4/dsdb/common/util.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'source4/dsdb/common') diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c index c9562b0de7..ace8e185ab 100644 --- a/source4/dsdb/common/util.c +++ b/source4/dsdb/common/util.c @@ -1432,6 +1432,16 @@ struct ldb_dn *samdb_server_site_dn(struct ldb_context *ldb, TALLOC_CTX *mem_ctx return server_site_dn; } +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)); + + if (val != NULL) + return (const char *) val->data; + else + return NULL; +} + /* work out if we are the PDC for the domain of the current open ldb */ -- cgit