summaryrefslogtreecommitdiff
path: root/source4/torture/libnet
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-02-15 15:14:55 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-02-15 15:14:55 +0100
commit85fe22a85fe7e8db7d2f6e2fdd6f02836f116b8e (patch)
treef492776d3da8fef9c9a383192e71577bad5c287f /source4/torture/libnet
parentb5f329602b3cd044cabb9ea0945724a307139eb9 (diff)
downloadsamba-85fe22a85fe7e8db7d2f6e2fdd6f02836f116b8e.tar.gz
samba-85fe22a85fe7e8db7d2f6e2fdd6f02836f116b8e.tar.bz2
samba-85fe22a85fe7e8db7d2f6e2fdd6f02836f116b8e.zip
Use struct for provision parameters since there are so many of them.
(This used to be commit 4b9d5bc57ca4ee14c142ea720dce5e4ee97f8c16)
Diffstat (limited to 'source4/torture/libnet')
-rw-r--r--source4/torture/libnet/libnet_BecomeDC.c39
1 files changed, 24 insertions, 15 deletions
diff --git a/source4/torture/libnet/libnet_BecomeDC.c b/source4/torture/libnet/libnet_BecomeDC.c
index 83d7426dfb..13e1aec6d0 100644
--- a/source4/torture/libnet/libnet_BecomeDC.c
+++ b/source4/torture/libnet/libnet_BecomeDC.c
@@ -37,7 +37,7 @@
#include "lib/ldb_wrap.h"
#include "auth/auth.h"
#include "param/param.h"
-#include "torture/util.h"
+#include "torture/util_provision.h"
struct test_become_dc_state {
struct libnet_context *ctx;
@@ -72,20 +72,29 @@ static NTSTATUS test_become_dc_prepare_db(void *private_data,
const struct libnet_BecomeDC_PrepareDB *p)
{
struct test_become_dc_state *s = talloc_get_type(private_data, struct test_become_dc_state);
- return provision_bare(s, s->tctx->lp_ctx, p->dest_dsa->dns_name,
- p->dest_dsa->site_name, p->forest->root_dn_str,
- p->domain->dn_str, p->forest->config_dn_str,
- p->forest->schema_dn_str,
- &p->dest_dsa->invocation_id,
- p->dest_dsa->netbios_name,
- torture_join_dom_dns_name(s->tj),
- torture_join_dom_netbios_name(s->tj),
- &p->dest_dsa->ntds_guid,
- p->dest_dsa->ntds_dn_str,
- cli_credentials_get_password(s->machine_account),
- s->path.samdb_ldb, s->path.secrets_ldb,
- s->path.secrets_keytab, s->path.schemadn_ldb,
- s->path.configdn_ldb, s->path.domaindn_ldb);
+ struct provision_settings settings;
+
+ settings.dns_name = p->dest_dsa->dns_name;
+ settings.site_name = p->dest_dsa->site_name;
+ settings.root_dn_str = p->forest->root_dn_str;
+ settings.domain_dn_str = p->domain->dn_str;
+ settings.config_dn_str = p->forest->config_dn_str;
+ settings.schema_dn_str = p->forest->schema_dn_str;
+ settings.invocation_id = &p->dest_dsa->invocation_id;
+ settings.netbios_name = p->dest_dsa->netbios_name;
+ settings.realm = torture_join_dom_dns_name(s->tj);
+ settings.domain = torture_join_dom_netbios_name(s->tj);
+ settings.ntds_guid = &p->dest_dsa->ntds_guid;
+ settings.ntds_dn_str = p->dest_dsa->ntds_dn_str;
+ settings.machine_password = cli_credentials_get_password(s->machine_account);
+ settings.samdb_ldb = s->path.samdb_ldb;
+ settings.secrets_ldb = s->path.secrets_ldb;
+ settings.secrets_keytab = s->path.secrets_keytab;
+ settings.schemadn_ldb = s->path.schemadn_ldb;
+ settings.configdn_ldb = s->path.configdn_ldb;
+ settings.domaindn_ldb = s->path.domaindn_ldb;
+
+ return provision_bare(s, s->tctx->lp_ctx, &settings);
}
static NTSTATUS test_become_dc_check_options(void *private_data,