apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s.@apache.org
Subject svn commit: r1209597 - in /apr/apr-util/branches/1.4.x: ./ CHANGES ldap/apr_ldap_init.c
Date Fri, 02 Dec 2011 17:34:02 GMT
Author: sf
Date: Fri Dec  2 17:34:02 2011
New Revision: 1209597

URL: http://svn.apache.org/viewvc?rev=1209597&view=rev
Log:
Merge r1209594:

Pass secure=1 to ldapssl_init with SolarisLDAP, if appropriate. This commit
carefully avoids changing anything for non-Solaris LDAP SDKs.

PR: 42682

Modified:
    apr/apr-util/branches/1.4.x/   (props changed)
    apr/apr-util/branches/1.4.x/CHANGES
    apr/apr-util/branches/1.4.x/ldap/apr_ldap_init.c

Propchange: apr/apr-util/branches/1.4.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Dec  2 17:34:02 2011
@@ -1,4 +1,4 @@
 /apr/apr/trunk:781403,781409,784519,784592,789965,794508,917837-917838,1207704
 /apr/apr-util/branches/1.3.x:896410,979221-979222,979232,1001059,1002632,1002648,1002733,1003214,1003255,1003358,1003370,1003376,1003602,1005956,1005962,1006017,1006137,1154885
-/apr/apr-util/branches/1.5.x:1002504,1002584-1002585,1002620,1002622-1002623,1002628,1207683,1207690,1207707
+/apr/apr-util/branches/1.5.x:1002504,1002584-1002585,1002620,1002622-1002623,1002628,1207683,1207690,1207707,1209594
 /apr/apr-util/trunk:731033-731034,731225,731236,731291,731293,731379,743986,744009,745771,747612,747623,747630

Modified: apr/apr-util/branches/1.4.x/CHANGES
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.4.x/CHANGES?rev=1209597&r1=1209596&r2=1209597&view=diff
==============================================================================
--- apr/apr-util/branches/1.4.x/CHANGES [utf-8] (original)
+++ apr/apr-util/branches/1.4.x/CHANGES [utf-8] Fri Dec  2 17:34:02 2011
@@ -1,6 +1,9 @@
                                                      -*- coding: utf-8 -*-
 Changes with APR-util 1.4.0
 
+  *) apr_ldap_init: Pass secure=1 to ldapssl_init() with Solaris LDAP SDK.
+     PR: 42682 [Stefan Fritsch]
+
   *) apr_memcache_server_create: Fix possible segfault. PR 51064.
      [Michajlo Matijkiw <michajlo_matijkiw comcast com>]
 

Modified: apr/apr-util/branches/1.4.x/ldap/apr_ldap_init.c
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.4.x/ldap/apr_ldap_init.c?rev=1209597&r1=1209596&r2=1209597&view=diff
==============================================================================
--- apr/apr-util/branches/1.4.x/ldap/apr_ldap_init.c (original)
+++ apr/apr-util/branches/1.4.x/ldap/apr_ldap_init.c Fri Dec  2 17:34:02 2011
@@ -156,13 +156,29 @@ APU_DECLARE_LDAP(int) apr_ldap_init(apr_
     *result_err = result;
 
 #if APR_HAS_LDAPSSL_INIT
+#if APR_HAS_SOLARIS_LDAPSDK
+    /*
+     * Using the secure argument should aways be possible.  But as LDAP SDKs
+     * tend to have different quirks and bugs, this needs to be tested for
+     * for each of them, first. For Solaris LDAP it works, and the method
+     * with ldap_set_option doesn't.
+     */
+    *ldap = ldapssl_init(hostname, portno, secure == APR_LDAP_SSL);
+#else
     *ldap = ldapssl_init(hostname, portno, 0);
+#endif
 #elif APR_HAS_LDAP_SSLINIT
     *ldap = ldap_sslinit((char *)hostname, portno, 0);
 #else
     *ldap = ldap_init((char *)hostname, portno);
 #endif
+
     if (*ldap != NULL) {
+#if APR_HAS_SOLARIS_LDAPSDK
+        if (secure == APR_LDAP_SSL)
+            return APR_SUCCESS;
+        else
+#endif
         return apr_ldap_set_option(pool, *ldap, APR_LDAP_OPT_TLS, &secure, result_err);
     }
     else {



Mime
View raw message