From 7e859be26ac1ba1154eb5b39e0467ca48a66cbf4 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 16 Mar 2010 14:25:11 +0100 Subject: s4:torture/rpc/dsgetinfo.c: fix name resolving for ldap_url metze --- source4/torture/rpc/dsgetinfo.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source4/torture/rpc/dsgetinfo.c b/source4/torture/rpc/dsgetinfo.c index 2745804790..3c3e293d0d 100644 --- a/source4/torture/rpc/dsgetinfo.c +++ b/source4/torture/rpc/dsgetinfo.c @@ -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->target_hostname; + const char *hostname = p->binding->host; struct ldb_context *ldb; const char *ldap_url = talloc_asprintf(p, "ldap://%s", hostname); const char *attrs[] = { "defaultNamingContext", NULL }; @@ -82,6 +82,11 @@ static const char *torture_get_ldap_base_dn(struct torture_context *tctx, struct return NULL; } + if (ldb_set_opaque(ldb, "loadparm", tctx->lp_ctx)) { + talloc_free(ldb); + return NULL; + } + ret = ldb_connect(ldb, ldap_url, 0, NULL); if (ret != LDB_SUCCESS) { torture_comment(tctx, "Failed to make LDB connection to target"); -- cgit