s4:torture/drs: 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/drs/rpc/dssync.c

index 3e17800c66693c2700a86820e05dd80f83f5edfe..813f136219d216393d8564650013f1db87ab5da0 100644 (file)
@@ -88,6 +88,7 @@ static struct DsSyncTest *test_create_context(struct torture_context *tctx)
        struct drsuapi_DsBindInfo28 *our_bind_info28;
        struct drsuapi_DsBindInfoCtr *our_bind_info_ctr;
        const char *binding = torture_setting_string(tctx, "binding", NULL);
+       const char *host;
        struct nbt_name name;
 
        ctx = talloc_zero(tctx, struct DsSyncTest);
@@ -105,9 +106,11 @@ static struct DsSyncTest *test_create_context(struct torture_context *tctx)
                return NULL;
        }
 
-       ctx->ldap_url = talloc_asprintf(ctx, "ldap://%s", ctx->drsuapi_binding->host);
+       host = dcerpc_binding_get_string_option(ctx->drsuapi_binding, "host");
 
-       make_nbt_name_server(&name, ctx->drsuapi_binding->host);
+       ctx->ldap_url = talloc_asprintf(ctx, "ldap://%s", host);
+
+       make_nbt_name_server(&name, host);
 
        /* do an initial name resolution to find its IP */
        status = resolve_name_ex(lpcfg_resolve_context(tctx->lp_ctx),