svn commit: samba r21503 - in branches/SAMBA_4_0/source/dsdb/samdb:
.
metze at samba.org
metze at samba.org
Thu Feb 22 15:53:07 GMT 2007
Author: metze
Date: 2007-02-22 15:53:06 +0000 (Thu, 22 Feb 2007)
New Revision: 21503
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21503
Log:
add usefull function to get the site dn for the local server
metze
Modified:
branches/SAMBA_4_0/source/dsdb/samdb/samdb.c
Changeset:
Modified: branches/SAMBA_4_0/source/dsdb/samdb/samdb.c
===================================================================
--- branches/SAMBA_4_0/source/dsdb/samdb/samdb.c 2007-02-22 15:25:55 UTC (rev 21502)
+++ branches/SAMBA_4_0/source/dsdb/samdb/samdb.c 2007-02-22 15:53:06 UTC (rev 21503)
@@ -1384,6 +1384,23 @@
}
/*
+ 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)
More information about the samba-cvs
mailing list