summaryrefslogtreecommitdiff
path: root/source4/torture/libnet/libnet_BecomeDC.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/torture/libnet/libnet_BecomeDC.c')
-rw-r--r--source4/torture/libnet/libnet_BecomeDC.c37
1 files changed, 18 insertions, 19 deletions
diff --git a/source4/torture/libnet/libnet_BecomeDC.c b/source4/torture/libnet/libnet_BecomeDC.c
index 10625b25de..932498a517 100644
--- a/source4/torture/libnet/libnet_BecomeDC.c
+++ b/source4/torture/libnet/libnet_BecomeDC.c
@@ -60,7 +60,9 @@ struct test_become_dc_state {
const char *configdn_ldb;
const char *schemadn_ldb;
const char *secrets_ldb;
+ const char *templates_ldb;
const char *secrets_keytab;
+ const char *dns_keytab;
} path;
};
@@ -195,25 +197,13 @@ static NTSTATUS test_become_dc_prepare_db(void *private_data,
"subobj.SCHEMADN = \"%s\";\n"
"subobj.SCHEMADN_LDB = \"%s\";\n"
"subobj.HOSTNAME = \"%s\";\n"
- "subobj.DNSNAME = \"%s\";\n"
+ "subobj.REALM = \"%s\";\n"
+ "subobj.DOMAIN = \"%s\";\n"
"subobj.DEFAULTSITE = \"%s\";\n"
"\n"
- "modules_list = new Array(\"rootdse\",\n"
- " \"kludge_acl\",\n"
- " \"paged_results\",\n"
- " \"server_sort\",\n"
- " \"extended_dn\",\n"
- " \"asq\",\n"
- " \"samldb\",\n"
- " \"operational\",\n"
- " \"objectclass\",\n"
- " \"rdn_name\",\n"
- " \"show_deleted\",\n"
- " \"partition\");\n"
- "subobj.MODULES_LIST = join(\",\", modules_list);\n"
- "subobj.DOMAINDN_MOD = \"pdc_fsmo,password_hash,repl_meta_data\";\n"
- "subobj.CONFIGDN_MOD = \"naming_fsmo,repl_meta_data\";\n"
- "subobj.SCHEMADN_MOD = \"schema_fsmo,repl_meta_data\";\n"
+ "subobj.DOMAINDN_MOD2 = \",repl_meta_data\";\n"
+ "subobj.CONFIGDN_MOD2 = \",repl_meta_data\";\n"
+ "subobj.SCHEMADN_MOD2 = \",repl_meta_data\";\n"
"\n"
"subobj.KRBTGTPASS = \"_NOT_USED_\";\n"
"subobj.MACHINEPASS = \"%s\";\n"
@@ -222,7 +212,9 @@ static NTSTATUS test_become_dc_prepare_db(void *private_data,
"var paths = provision_default_paths(subobj);\n"
"paths.samdb = \"%s\";\n"
"paths.secrets = \"%s\";\n"
+ "paths.templates = \"%s\";\n"
"paths.keytab = \"%s\";\n"
+ "paths.dns_keytab = \"%s\";\n"
"\n"
"var system_session = system_session();\n"
"\n"
@@ -238,12 +230,15 @@ static NTSTATUS test_become_dc_prepare_db(void *private_data,
p->forest->schema_dn_str, /* subobj.SCHEMADN */
s->path.schemadn_ldb, /* subobj.SCHEMADN_LDB */
p->dest_dsa->netbios_name, /* subobj.HOSTNAME */
- p->dest_dsa->dns_name, /* subobj.DNSNAME */
+ torture_join_dom_dns_name(s->tj),/* subobj.REALM */
+ torture_join_dom_netbios_name(s->tj),/* subobj.DOMAIN */
p->dest_dsa->site_name, /* subobj.DEFAULTSITE */
cli_credentials_get_password(s->machine_account),/* subobj.MACHINEPASS */
s->path.samdb_ldb, /* paths.samdb */
+ s->path.templates_ldb, /* paths.templates */
s->path.secrets_ldb, /* paths.secrets */
- s->path.secrets_keytab); /* paths.keytab */
+ s->path.secrets_keytab, /* paths.keytab */
+ s->path.dns_keytab); /* paths.dns_keytab */
NT_STATUS_HAVE_NO_MEMORY(ejs);
ret = test_run_ejs(ejs);
@@ -854,8 +849,12 @@ bool torture_net_become_dc(struct torture_context *torture)
if (!s->path.schemadn_ldb) return false;
s->path.secrets_ldb = talloc_asprintf(s, "%s_secrets.ldb", s->netbios_name);
if (!s->path.secrets_ldb) return false;
+ s->path.templates_ldb = talloc_asprintf(s, "%s_templates.ldb", s->netbios_name);
+ if (!s->path.templates_ldb) return false;
s->path.secrets_keytab = talloc_asprintf(s, "%s_secrets.keytab", s->netbios_name);
if (!s->path.secrets_keytab) return false;
+ s->path.dns_keytab = talloc_asprintf(s, "%s_dns.keytab", s->netbios_name);
+ if (!s->path.dns_keytab) return false;
/* Join domain as a member server. */
s->tj = torture_join_domain(torture, s->netbios_name,