summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2010-03-16 14:25:11 +0100
committerStefan Metzmacher <metze@samba.org>2010-03-16 15:09:41 +0100
commit7e859be26ac1ba1154eb5b39e0467ca48a66cbf4 (patch)
treea98d3b80f1aa65676fe71418e878f150aa89f246 /source4
parent287304e59eb4f83dd052642d35cf3a7d4e05067a (diff)
downloadsamba-7e859be26ac1ba1154eb5b39e0467ca48a66cbf4.tar.gz
samba-7e859be26ac1ba1154eb5b39e0467ca48a66cbf4.tar.bz2
samba-7e859be26ac1ba1154eb5b39e0467ca48a66cbf4.zip
s4:torture/rpc/dsgetinfo.c: fix name resolving for ldap_url
metze
Diffstat (limited to 'source4')
-rw-r--r--source4/torture/rpc/dsgetinfo.c7
1 files changed, 6 insertions, 1 deletions
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");