s4:torture/rpc: make use of dcerpc_binding_get_string_option("host")
authorStefan Metzmacher <metze@samba.org>
Tue, 4 Feb 2014 11:14:37 +0000 (12:14 +0100)
committerGünther Deschner <gd@samba.org>
Thu, 13 Feb 2014 10:54:18 +0000 (11:54 +0100)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
source4/torture/rpc/dsgetinfo.c
source4/torture/rpc/testjoin.c

index b622f60f92b8f260b0faa79590f0bf11334a3d1d..7d6b01f0008d74a1e6aab5b8ed80c77344718dbb 100644 (file)
@@ -67,7 +67,7 @@ struct DsGetinfoTest {
  */
 static const char *torture_get_ldap_base_dn(struct torture_context *tctx, struct dcerpc_pipe *p)
 {
-       const char *hostname = p->binding->host;
+       const char *hostname = dcerpc_binding_get_string_option(p->binding, "host");
        struct ldb_context *ldb;
        const char *ldap_url = talloc_asprintf(p, "ldap://%s", hostname);
        const char *attrs[] = { "defaultNamingContext", NULL };
index e54650885b829a9f5859ebba9237b141d4a84adf..d2b25ed1198e2f7c9cb10a9755cea95ad610ed4a 100644 (file)
@@ -660,7 +660,8 @@ static NTSTATUS torture_leave_ads_domain(struct torture_context *torture,
                return NT_STATUS_NO_MEMORY;
        }
 
-       remote_ldb_url = talloc_asprintf(tmp_ctx, "ldap://%s", libnet_r->out.samr_binding->host);
+       remote_ldb_url = talloc_asprintf(tmp_ctx, "ldap://%s",
+               dcerpc_binding_get_string_option(libnet_r->out.samr_binding, "host"));
        if (!remote_ldb_url) {
                libnet_r->out.error_string = NULL;
                talloc_free(tmp_ctx);