summaryrefslogtreecommitdiff
path: root/source4/torture/ldap/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/torture/ldap/common.c')
-rw-r--r--source4/torture/ldap/common.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source4/torture/ldap/common.c b/source4/torture/ldap/common.c
index a0fe31d0e9..eea3b12073 100644
--- a/source4/torture/ldap/common.c
+++ b/source4/torture/ldap/common.c
@@ -67,25 +67,25 @@ NTSTATUS torture_ldap_bind_sasl(struct ldap_connection *conn, const char *userna
}
/* open a ldap connection to a server */
-NTSTATUS torture_ldap_connection(struct ldap_connection **conn,
+NTSTATUS torture_ldap_connection(TALLOC_CTX *mem_ctx, struct ldap_connection **conn,
const char *url, const char *userdn, const char *password)
{
NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
- BOOL ret;
+ int ret;
if (!url) {
printf("You must specify a url string\n");
return NT_STATUS_INVALID_PARAMETER;
}
- *conn = new_ldap_connection();
+ *conn = ldap_connect(mem_ctx, url);
if (!*conn) {
printf("Failed to initialize ldap_connection structure\n");
return status;
}
- ret = ldap_setup_connection(*conn, url, userdn, password);
- if (!ret) {
+ ret = ldap_bind_simple(*conn, userdn, password);
+ if (ret != LDAP_SUCCESS) {
printf("Failed to connect with url [%s]\n", url);
/* FIXME: what abut actually implementing an ldap_connection_free() function ?
:-) sss */