aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/backend/libpq/auth.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/src/backend/libpq/auth.c b/src/backend/libpq/auth.c
index a98b934a8e2..2b119e9ca45 100644
--- a/src/backend/libpq/auth.c
+++ b/src/backend/libpq/auth.c
@@ -2611,31 +2611,6 @@ CheckLDAPAuth(Port *port)
pfree(filter);
ldap_memfree(dn);
ldap_msgfree(search_message);
-
- /* Unbind and disconnect from the LDAP server */
- r = ldap_unbind_s(ldap);
- if (r != LDAP_SUCCESS)
- {
- ereport(LOG,
- (errmsg("could not unbind after searching for user \"%s\" on server \"%s\"",
- fulluser, server_name)));
- pfree(passwd);
- pfree(fulluser);
- return STATUS_ERROR;
- }
-
- /*
- * Need to re-initialize the LDAP connection, so that we can bind to
- * it with a different username.
- */
- if (InitializeLDAPConnection(port, &ldap) == STATUS_ERROR)
- {
- pfree(passwd);
- pfree(fulluser);
-
- /* Error message already sent */
- return STATUS_ERROR;
- }
}
else
fulluser = psprintf("%s%s%s",