summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2008-01-23 15:43:14 +1100
committerAndrew Bartlett <abartlet@samba.org>2008-01-23 15:43:14 +1100
commit4172e09c5395b7004ada0d4a9e786bba6c159bc9 (patch)
tree974af47b37e97e54b7ff46bbcd6ef0c24aa694f8 /source4/torture
parent8bceed449d7332a5f860000b8c1b53ed8ccf72fa (diff)
downloadsamba-4172e09c5395b7004ada0d4a9e786bba6c159bc9.tar.gz
samba-4172e09c5395b7004ada0d4a9e786bba6c159bc9.tar.bz2
samba-4172e09c5395b7004ada0d4a9e786bba6c159bc9.zip
Fix DRSUAPI replication test - NET-API-BECOME-DC.
The main change here is to work with the current module stack, replacing only the objectGUID module, rather than a number of modules. However, two changes were key: - Fixing a typo search_req->handle -> change_req->handle - Allowing an error of NO_SUCH_OBJECT - it is quite valid for the object not to exist when being replicated in. Other small changes were required to the ejs provision to match changes in that code. Andrew Bartlett (This used to be commit 7b87a58502a052de391f4e1c56ac78a8d35b4e34)
Diffstat (limited to 'source4/torture')
-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,