aboutsummaryrefslogtreecommitdiff
path: root/src/backend/libpq/auth.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2006-08-22 02:23:45 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2006-08-22 02:23:45 +0000
commitdaebd5257c76f00beff4325e19056923139deafd (patch)
tree3a61b3c7a1bd828ee1d2852038ff48a797b6a063 /src/backend/libpq/auth.c
parent04b84f5a93671d9289381261d802a8eb8eabbec5 (diff)
downloadpostgresql-daebd5257c76f00beff4325e19056923139deafd.tar.gz
postgresql-daebd5257c76f00beff4325e19056923139deafd.zip
Ooops, ldap fix for win32 broke the non-win32 case.
Diffstat (limited to 'src/backend/libpq/auth.c')
-rw-r--r--src/backend/libpq/auth.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/backend/libpq/auth.c b/src/backend/libpq/auth.c
index 4551b289e9b..0c3238d737b 100644
--- a/src/backend/libpq/auth.c
+++ b/src/backend/libpq/auth.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/libpq/auth.c,v 1.140 2006/08/21 19:21:38 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/libpq/auth.c,v 1.141 2006/08/22 02:23:45 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -68,8 +68,7 @@ static Port *pam_port_cludge; /* Workaround for passing "Port *port" into
#ifdef USE_LDAP
#ifndef WIN32
-/* We use a deprecated function to keep the codepaths the same as the
- * win32 one. */
+/* We use a deprecated function to keep the codepath the same as win32. */
#define LDAP_DEPRECATED 1
#include <ldap.h>
#else
@@ -710,8 +709,6 @@ CheckPAMAuth(Port *port, char *user, char *password)
static int
CheckLDAPAuth(Port *port)
{
- static __ldap_start_tls_sA _ldap_start_tls_sA = NULL;
-
char *passwd;
char server[128];
char basedn[128];
@@ -807,8 +804,10 @@ CheckLDAPAuth(Port *port)
if (ssl)
{
#ifndef WIN32
- if ((r = ldap_start_tls_s(ldap, NULL, NULL)) != LDAP_SUCCESS)
+ if ((r = ldap_start_tls_s(ldap, NULL, NULL)) != LDAP_SUCCESS)
#else
+ static __ldap_start_tls_sA _ldap_start_tls_sA = NULL;
+
if (_ldap_start_tls_sA == NULL)
{
/*