diff options
author | Andrew Bartlett <abartlet@samba.org> | 2008-04-04 12:55:45 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2008-04-04 12:55:45 +1100 |
commit | 9f96f39ca095a5f450f673e607a72efed504fdad (patch) | |
tree | 9a0639c12354caa2b0787c7284ebd9d9d27d5d2b /source4/torture | |
parent | c764791100079ed447c07ca6b99d33f9695255c3 (diff) | |
download | samba-9f96f39ca095a5f450f673e607a72efed504fdad.tar.gz samba-9f96f39ca095a5f450f673e607a72efed504fdad.tar.xz samba-9f96f39ca095a5f450f673e607a72efed504fdad.zip |
Pass discovered server DN down to provision.
This uses the new 'serverdn' argument added to provision in the
previous commit.
Andrew Bartlett
(This used to be commit 74480c7de76069701246eb5b7acc5858b84d106c)
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/libnet/libnet_BecomeDC.c | 1 | ||||
-rw-r--r-- | source4/torture/rpc/testjoin.c | 8 | ||||
-rw-r--r-- | source4/torture/util.h | 1 | ||||
-rw-r--r-- | source4/torture/util_provision.c | 4 |
4 files changed, 14 insertions, 0 deletions
diff --git a/source4/torture/libnet/libnet_BecomeDC.c b/source4/torture/libnet/libnet_BecomeDC.c index 3f8edd40e84..f8699fe06ab 100644 --- a/source4/torture/libnet/libnet_BecomeDC.c +++ b/source4/torture/libnet/libnet_BecomeDC.c @@ -84,6 +84,7 @@ static NTSTATUS test_become_dc_prepare_db(void *private_data, 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.server_dn_str = torture_join_server_dn_str(s->tj); settings.machine_password = cli_credentials_get_password(s->machine_account); settings.targetdir = s->targetdir; diff --git a/source4/torture/rpc/testjoin.c b/source4/torture/rpc/testjoin.c index 02f04946d6e..892886c08c5 100644 --- a/source4/torture/rpc/testjoin.c +++ b/source4/torture/rpc/testjoin.c @@ -553,6 +553,14 @@ const char *torture_join_dom_dns_name(struct test_join *join) return join->dom_dns_name; } +const char *torture_join_server_dn_str(struct test_join *join) +{ + if (join->libnet_r) { + return join->libnet_r->out.server_dn_str; + } + return NULL; +} + #if 0 /* Left as the documentation of the join process, but see new implementation in libnet_become_dc.c */ struct test_join_ads_dc { diff --git a/source4/torture/util.h b/source4/torture/util.h index 477a8281201..72f97e4766a 100644 --- a/source4/torture/util.h +++ b/source4/torture/util.h @@ -27,6 +27,7 @@ struct provision_settings { const char *domain_dn_str; const char *config_dn_str; const char *schema_dn_str; + const char *server_dn_str; const struct GUID *invocation_id; const char *netbios_name; const char *host_ip; diff --git a/source4/torture/util_provision.c b/source4/torture/util_provision.c index cce8e18fdcc..3167a37cdf7 100644 --- a/source4/torture/util_provision.c +++ b/source4/torture/util_provision.c @@ -105,6 +105,10 @@ NTSTATUS provision_bare(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx, PyDict_SetItemString(parameters, "configdn", PyString_FromString(settings->config_dn_str)); + if (settings->server_dn_str) + PyDict_SetItemString(parameters, "serverdn", + PyString_FromString(settings->server_dn_str)); + if (settings->site_name) PyDict_SetItemString(parameters, "sitename", PyString_FromString(settings->site_name)); |