diff options
author | Stefan Metzmacher <metze@samba.org> | 2007-02-22 15:53:06 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:48:46 -0500 |
commit | 6cb8ac851ca07317c6c2159481d313c60759a057 (patch) | |
tree | c5a12929d21c2ae0f33e4bf9df153ec24d63cbb1 /source4/dsdb | |
parent | 6c32f44f24b8617990712e325a81342b5e2788a2 (diff) | |
download | samba-6cb8ac851ca07317c6c2159481d313c60759a057.tar.gz samba-6cb8ac851ca07317c6c2159481d313c60759a057.tar.xz samba-6cb8ac851ca07317c6c2159481d313c60759a057.zip |
r21503: add usefull function to get the site dn for the local server
metze
(This used to be commit 08b8e9acff6779ecc2e568ae0a875013d93838b7)
Diffstat (limited to 'source4/dsdb')
-rw-r--r-- | source4/dsdb/samdb/samdb.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/source4/dsdb/samdb/samdb.c b/source4/dsdb/samdb/samdb.c index a3ac2c9544c..dab2a232262 100644 --- a/source4/dsdb/samdb/samdb.c +++ b/source4/dsdb/samdb/samdb.c @@ -1384,6 +1384,23 @@ struct ldb_dn *samdb_server_dn(struct ldb_context *ldb, TALLOC_CTX *mem_ctx) } /* + work out the server dn for the current open ldb +*/ +struct ldb_dn *samdb_server_site_dn(struct ldb_context *ldb, TALLOC_CTX *mem_ctx) +{ + struct ldb_dn *server_dn; + struct ldb_dn *server_site_dn; + + server_dn = samdb_server_dn(ldb, mem_ctx); + if (!server_dn) return NULL; + + server_site_dn = ldb_dn_get_parent(mem_ctx, server_dn); + + talloc_free(server_dn); + return server_site_dn; +} + +/* work out if we are the PDC for the domain of the current open ldb */ BOOL samdb_is_pdc(struct ldb_context *ldb) |