apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r265755 - in /apr/apr-util/trunk/ldap: apr_ldap_init.c apr_ldap_option.c
Date Thu, 01 Sep 2005 17:01:53 GMT
Author: wrowe
Date: Thu Sep  1 10:01:49 2005
New Revision: 265755

URL: http://svn.apache.org/viewcvs?rev=265755&view=rev
Log:

  Correct the use-case checking to determine our ldap[ssl]_[ssl]init()
  choice.  This isn't platform specific, it must be based on our
  apu_ldap.h configuration choices, APR_HAS_LDAP_SSLINIT and 
  APR_HAS_LDAPSSL_INIT are already flagged correctly on Netware, Win32.

  And follow the APR_HAS_LDAP_START_TLS_S election on Win32, because
  the platform SDK exports a binding to ordinals 330/331 for start/stop
  TLS, but these entry points are missing on Windows 2000 Pro SP4, and
  likely many other flavors of WLDAP32.DLL.  

  Note that the WLDAP32.DLL is bound by ordinals, not by fn names, so
  VC98 for example provides an invalid wldap32.lib with the wrong
  ordinal numbers.  Only use the platform SDK, and use depends.exe to
  ensure that the elected functions are correct.  One good thing; the
  VC98 flavor is an LDAPv2 toolkit, while the PSDK is an LDAPv3 which
  passes the #ifndef/#error backstop.  So it's unlikely a user will
  bind to the wrong wldap32.lib if the LIB and INCLUDES paths on their
  configuration keeps the VC and PSDK paths in the same order relative
  to the other envvar.

Modified:
    apr/apr-util/trunk/ldap/apr_ldap_init.c
    apr/apr-util/trunk/ldap/apr_ldap_option.c

Modified: apr/apr-util/trunk/ldap/apr_ldap_init.c
URL: http://svn.apache.org/viewcvs/apr/apr-util/trunk/ldap/apr_ldap_init.c?rev=265755&r1=265754&r2=265755&view=diff
==============================================================================
--- apr/apr-util/trunk/ldap/apr_ldap_init.c (original)
+++ apr/apr-util/trunk/ldap/apr_ldap_init.c Thu Sep  1 10:01:49 2005
@@ -145,8 +145,10 @@
     apr_ldap_err_t *result = (apr_ldap_err_t *)apr_pcalloc(pool, sizeof(apr_ldap_err_t));
     *result_err = result;
 
-#if APR_HAS_NOVELL_LDAPSDK
+#if APR_HAS_LDAPSSL_INIT
     *ldap = ldapssl_init(hostname, portno, 0);
+#elif APR_HAS_LDAP_SSLINIT
+    *ldap = ldap_sslinit((char *)hostname, portno, 0);
 #else
     *ldap = ldap_init((char *)hostname, portno);
 #endif

Modified: apr/apr-util/trunk/ldap/apr_ldap_option.c
URL: http://svn.apache.org/viewcvs/apr/apr-util/trunk/ldap/apr_ldap_option.c?rev=265755&r1=265754&r2=265755&view=diff
==============================================================================
--- apr/apr-util/trunk/ldap/apr_ldap_option.c (original)
+++ apr/apr-util/trunk/ldap/apr_ldap_option.c Thu Sep  1 10:01:49 2005
@@ -304,6 +304,7 @@
             result->msg = ldap_err2string(result->rc);
         }
     }
+#if APR_HAS_LDAP_START_TLS_S
     else if (tls == APR_LDAP_STARTTLS) {
         result->rc = ldap_start_tls_s(ldap, NULL, NULL, NULL, NULL);
         if (result->rc != LDAP_SUCCESS) {
@@ -318,6 +319,7 @@
             result->msg = ldap_err2string(result->rc);
         }
     }
+#endif
 #endif
 
 #if APR_HAS_OTHER_LDAPSDK



Mime
View raw message