summaryrefslogtreecommitdiff
path: root/source4/dsdb
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2009-10-18 11:59:11 +0200
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2009-10-18 14:33:43 +0200
commit85e49953641fc9ddece3f4a08df8c96cf41e06dc (patch)
tree228dfdf726bd82ebbe88f3ae200deb6be06ed1fc /source4/dsdb
parent5d4093a937a39243c0c8ca1215297d26a67ba64b (diff)
downloadsamba-85e49953641fc9ddece3f4a08df8c96cf41e06dc.tar.gz
samba-85e49953641fc9ddece3f4a08df8c96cf41e06dc.tar.bz2
samba-85e49953641fc9ddece3f4a08df8c96cf41e06dc.zip
s4:sites - get the server site (name) from DSDB
Diffstat (limited to 'source4/dsdb')
-rw-r--r--source4/dsdb/common/util.c10
1 files changed, 10 insertions, 0 deletions
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
*/