Commit daebd525 authored by Tom Lane's avatar Tom Lane

Ooops, ldap fix for win32 broke the non-win32 case.

parent 04b84f5a
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * 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 ...@@ -68,8 +68,7 @@ static Port *pam_port_cludge; /* Workaround for passing "Port *port" into
#ifdef USE_LDAP #ifdef USE_LDAP
#ifndef WIN32 #ifndef WIN32
/* We use a deprecated function to keep the codepaths the same as the /* We use a deprecated function to keep the codepath the same as win32. */
* win32 one. */
#define LDAP_DEPRECATED 1 #define LDAP_DEPRECATED 1
#include <ldap.h> #include <ldap.h>
#else #else
...@@ -710,8 +709,6 @@ CheckPAMAuth(Port *port, char *user, char *password) ...@@ -710,8 +709,6 @@ CheckPAMAuth(Port *port, char *user, char *password)
static int static int
CheckLDAPAuth(Port *port) CheckLDAPAuth(Port *port)
{ {
static __ldap_start_tls_sA _ldap_start_tls_sA = NULL;
char *passwd; char *passwd;
char server[128]; char server[128];
char basedn[128]; char basedn[128];
...@@ -807,8 +804,10 @@ CheckLDAPAuth(Port *port) ...@@ -807,8 +804,10 @@ CheckLDAPAuth(Port *port)
if (ssl) if (ssl)
{ {
#ifndef WIN32 #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 #else
static __ldap_start_tls_sA _ldap_start_tls_sA = NULL;
if (_ldap_start_tls_sA == NULL) if (_ldap_start_tls_sA == NULL)
{ {
/* /*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment