Skip to content

Commit daebd52

Browse files
committed
Ooops, ldap fix for win32 broke the non-win32 case.
1 parent 04b84f5 commit daebd52

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/backend/libpq/auth.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/libpq/auth.c,v 1.140 2006/08/21 19:21:38 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/libpq/auth.c,v 1.141 2006/08/22 02:23:45 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -68,8 +68,7 @@ static Port *pam_port_cludge; /* Workaround for passing "Port *port" into
6868

6969
#ifdef USE_LDAP
7070
#ifndef WIN32
71-
/* We use a deprecated function to keep the codepaths the same as the
72-
* win32 one. */
71+
/* We use a deprecated function to keep the codepath the same as win32. */
7372
#define LDAP_DEPRECATED 1
7473
#include <ldap.h>
7574
#else
@@ -710,8 +709,6 @@ CheckPAMAuth(Port *port, char *user, char *password)
710709
static int
711710
CheckLDAPAuth(Port *port)
712711
{
713-
static __ldap_start_tls_sA _ldap_start_tls_sA = NULL;
714-
715712
char *passwd;
716713
char server[128];
717714
char basedn[128];
@@ -807,8 +804,10 @@ CheckLDAPAuth(Port *port)
807804
if (ssl)
808805
{
809806
#ifndef WIN32
810-
if ((r = ldap_start_tls_s(ldap, NULL, NULL)) != LDAP_SUCCESS)
807+
if ((r = ldap_start_tls_s(ldap, NULL, NULL)) != LDAP_SUCCESS)
811808
#else
809+
static __ldap_start_tls_sA _ldap_start_tls_sA = NULL;
810+
812811
if (_ldap_start_tls_sA == NULL)
813812
{
814813
/*

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy