summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-12-20 21:14:44 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:29:32 -0500
commitfdf95ba0058e978f637c46f714677fc55240e51a (patch)
treeb0acc4f3acd77b519c5a9cf97d20ed84d869f926 /source4/torture
parent02b65d5453c1f6846387f7431d7dfc0a38bc5235 (diff)
downloadsamba-fdf95ba0058e978f637c46f714677fc55240e51a.tar.gz
samba-fdf95ba0058e978f637c46f714677fc55240e51a.tar.bz2
samba-fdf95ba0058e978f637c46f714677fc55240e51a.zip
r20291: implement prepare_db hook of libnet_BecomeDC()
metze (This used to be commit 07f1075d469833e10c2f0b0d4578221c6a189b04)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/libnet/libnet_BecomeDC.c31
1 files changed, 30 insertions, 1 deletions
diff --git a/source4/torture/libnet/libnet_BecomeDC.c b/source4/torture/libnet/libnet_BecomeDC.c
index 8db3b8d448..561ad622bb 100644
--- a/source4/torture/libnet/libnet_BecomeDC.c
+++ b/source4/torture/libnet/libnet_BecomeDC.c
@@ -30,7 +30,7 @@
#define TORTURE_NETBIOS_NAME "smbtorturedc"
static NTSTATUS test_become_dc_check_options(void *private_data,
- const struct libnet_BecomeDC_CheckOptions *o)
+ const struct libnet_BecomeDC_CheckOptions *o)
{
DEBUG(0,("Become DC of Domain[%s]/[%s]\n",
o->domain->netbios_name, o->domain->dns_name));
@@ -50,6 +50,33 @@ static NTSTATUS test_become_dc_check_options(void *private_data,
return NT_STATUS_OK;
}
+static NTSTATUS test_become_dc_prepare_db(void *private_data,
+ const struct libnet_BecomeDC_PrepareDB *p)
+{
+ struct test_join *tj = talloc_get_type(private_data, struct test_join);
+
+ DEBUG(0,("New Server[%s] in Site[%s]\n",
+ p->dest_dsa->dns_name, p->dest_dsa->site_name));
+
+ DEBUG(0,("DSA Instance [%s]\n"
+ "\tobjectGUID[%s]\n"
+ "\tinvocationId[%s]\n",
+ p->dest_dsa->ntds_dn_str,
+ GUID_string(tj, &p->dest_dsa->ntds_guid),
+ GUID_string(tj, &p->dest_dsa->invocation_id)));
+
+ DEBUG(0,("Schema Partition[%s]\n",
+ p->forest->schema_dn_str));
+
+ DEBUG(0,("Config Partition[%s]\n",
+ p->forest->config_dn_str));
+
+ DEBUG(0,("Domain Partition[%s]\n",
+ p->domain->dn_str));
+
+ return NT_STATUS_OK;
+}
+
BOOL torture_net_become_dc(struct torture_context *torture)
{
BOOL ret = True;
@@ -80,7 +107,9 @@ BOOL torture_net_become_dc(struct torture_context *torture)
b.in.source_dsa_address = lp_parm_string(-1, "torture", "host");
b.in.dest_dsa_netbios_name = TORTURE_NETBIOS_NAME;
+ b.in.callbacks.private_data = tj;
b.in.callbacks.check_options = test_become_dc_check_options;
+ b.in.callbacks.prepare_db = test_become_dc_prepare_db;
status = libnet_BecomeDC(ctx, ctx, &b);
if (!NT_STATUS_IS_OK(status)) {