diff options
author | Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de> | 2009-10-18 11:59:11 +0200 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de> | 2009-10-18 14:33:43 +0200 |
commit | 85e49953641fc9ddece3f4a08df8c96cf41e06dc (patch) | |
tree | 228dfdf726bd82ebbe88f3ae200deb6be06ed1fc /source4/dsdb/common | |
parent | 5d4093a937a39243c0c8ca1215297d26a67ba64b (diff) | |
download | samba-85e49953641fc9ddece3f4a08df8c96cf41e06dc.tar.gz samba-85e49953641fc9ddece3f4a08df8c96cf41e06dc.tar.bz2 samba-85e49953641fc9ddece3f4a08df8c96cf41e06dc.zip |
s4:sites - get the server site (name) from DSDB
Diffstat (limited to 'source4/dsdb/common')
-rw-r--r-- | source4/dsdb/common/util.c | 10 |
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 */ |