diff options
author | Daniel Stenberg <daniel@haxx.se> | 2001-11-05 14:04:57 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2001-11-05 14:04:57 +0000 |
commit | 08ad385e0eaae73cce890b09d957fd6ff053ce5f (patch) | |
tree | 0a234005d60ec5bb9601b4b298dd91971e1decc6 | |
parent | 5623e0bb0ef5a0c55aa2ef81ece4b50a6bd77c86 (diff) |
Ramana Mokkapati did some good bug hunting, and we these fixes ldap transfers
should work a lot better!
-rw-r--r-- | lib/ldap.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/ldap.c b/lib/ldap.c index b89fc857d..37dd8a582 100644 --- a/lib/ldap.c +++ b/lib/ldap.c @@ -95,9 +95,11 @@ static void DynaClose(void) #if defined(HAVE_DLOPEN) || defined(HAVE_LIBDL) if (libldap) { dlclose(libldap); + libldap=NULL; } if (liblber) { dlclose(liblber); + liblber=NULL; } #endif } @@ -174,7 +176,9 @@ CURLcode Curl_ldap(struct connectdata *conn) conn->hostname, conn->port); status = CURLE_COULDNT_CONNECT; } else { - rc = ldap_simple_bind_s(server, data->state.user, data->state.passwd); + rc = ldap_simple_bind_s(server, + data->state.user[0]?data->state.user:NULL, + data->state.passwd[0]?data->state.passwd:NULL); if (rc != 0) { failf(data, "LDAP: %s", ldap_err2string(rc)); status = CURLE_LDAP_CANNOT_BIND; |