httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r1129808 [1/2] - in /httpd/httpd/trunk: ./ build/ docs/ include/ modules/aaa/ modules/ldap/
Date Tue, 31 May 2011 17:10:12 GMT
Author: wrowe
Date: Tue May 31 17:10:11 2011
New Revision: 1129808

URL: http://svn.apache.org/viewvc?rev=1129808&view=rev
Log:
Incorporate the ap_ldap incomplete API, as there is no interest or effort
at APR to make this a complete abstraction, and it was voted 'off the island'
with APR 2.0.  This will allow httpd 2.3 to build against either apr-2.0
or apr+util 1.x.


Added:
    httpd/httpd/trunk/build/find_ldap.m4
      - copied, changed from r1128885, apr/apr/trunk/build/apu-ldap.m4
    httpd/httpd/trunk/include/ap_ldap.h.in
      - copied, changed from r1128716, apr/apr/trunk/include/apr_ldap.h.in
    httpd/httpd/trunk/include/ap_ldap.hnw
      - copied, changed from r1128716, apr/apr/trunk/include/apr_ldap.hnw
    httpd/httpd/trunk/include/ap_ldap.hw
      - copied, changed from r1128716, apr/apr/trunk/include/apr_ldap.hw
    httpd/httpd/trunk/include/ap_ldap_init.h
      - copied, changed from r1128716, apr/apr/trunk/include/apr_ldap_init.h
    httpd/httpd/trunk/include/ap_ldap_option.h
      - copied, changed from r1128716, apr/apr/trunk/include/apr_ldap_option.h
    httpd/httpd/trunk/include/ap_ldap_rebind.h
      - copied, changed from r1128716, apr/apr/trunk/include/apr_ldap_rebind.h
    httpd/httpd/trunk/include/ap_ldap_url.h
      - copied, changed from r1128716, apr/apr/trunk/include/apr_ldap_url.h
    httpd/httpd/trunk/modules/ldap/ap_ldap_init.c
      - copied, changed from r1128716, apr/apr/trunk/ldap/apr_ldap_init.c
    httpd/httpd/trunk/modules/ldap/ap_ldap_option.c
      - copied, changed from r1128716, apr/apr/trunk/ldap/apr_ldap_option.c
    httpd/httpd/trunk/modules/ldap/ap_ldap_rebind.c
      - copied, changed from r1128716, apr/apr/trunk/ldap/apr_ldap_rebind.c
    httpd/httpd/trunk/modules/ldap/ap_ldap_url.c
      - copied, changed from r1128716, apr/apr/trunk/ldap/apr_ldap_url.c
Modified:
    httpd/httpd/trunk/README
    httpd/httpd/trunk/configure.in
    httpd/httpd/trunk/docs/doxygen.conf
    httpd/httpd/trunk/include/util_ldap.h
    httpd/httpd/trunk/modules/aaa/config.m4
    httpd/httpd/trunk/modules/aaa/mod_authnz_ldap.c
    httpd/httpd/trunk/modules/ldap/config.m4
    httpd/httpd/trunk/modules/ldap/util_ldap.c
    httpd/httpd/trunk/modules/ldap/util_ldap_cache.c
    httpd/httpd/trunk/modules/ldap/util_ldap_cache.h
    httpd/httpd/trunk/modules/ldap/util_ldap_cache_mgr.c

Modified: httpd/httpd/trunk/README
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/README?rev=1129808&r1=1129807&r2=1129808&view=diff
==============================================================================
--- httpd/httpd/trunk/README (original)
+++ httpd/httpd/trunk/README Tue May 31 17:10:11 2011
@@ -76,6 +76,11 @@
     OpenSSL or the operating system's platform-specific SSL facilities.
     Apache httpd currently does not use that apr-util interface.
 
+    modules/ldap/ provides an abstract interface for SSL encrypted LDAP
+    (ldaps and STARTTLS style) connections, implemented with OpenLDAP, 
+    Netscape LDAP SDK, Mozilla LDAP SDK, or other platform specific ldap
+    interfaces.
+
     Some object code distributions of Apache httpd, indicated with the
     word "crypto" in the package name, may include object code for the
     OpenSSL encryption library as distributed in open source form from

Copied: httpd/httpd/trunk/build/find_ldap.m4 (from r1128885, apr/apr/trunk/build/apu-ldap.m4)
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/build/find_ldap.m4?p2=httpd/httpd/trunk/build/find_ldap.m4&p1=apr/apr/trunk/build/apu-ldap.m4&r1=1128885&r2=1129808&rev=1129808&view=diff
==============================================================================
--- apr/apr/trunk/build/apu-ldap.m4 (original)
+++ httpd/httpd/trunk/build/find_ldap.m4 Tue May 31 17:10:11 2011
@@ -18,11 +18,11 @@ dnl limitations under the License.
 dnl 
 dnl Find a particular LDAP library
 dnl
-AC_DEFUN([APU_FIND_LDAPLIB], [
-  if test ${apu_has_ldap} != "1"; then
+AC_DEFUN([AP_FIND_LDAPLIB], [
+  if test ${ap_has_ldap} != "1"; then
     ldaplib=$1
     extralib=$2
-    # Clear the cache entry for subsequent APU_FIND_LDAPLIB invocations.
+    # Clear the cache entry for subsequent AP_FIND_LDAPLIB invocations.
     changequote(,)
     ldaplib_cache_id="`echo $ldaplib | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
     changequote([,])
@@ -31,55 +31,55 @@ AC_DEFUN([APU_FIND_LDAPLIB], [
     AC_CHECK_LIB(${ldaplib}, ldap_init, 
       [
         LDADD_ldap="-l${ldaplib} ${extralib}"
-        AC_CHECK_LIB(${ldaplib}, ldapssl_client_init, apu_has_ldapssl_client_init="1", , ${extralib})
-        AC_CHECK_LIB(${ldaplib}, ldapssl_client_deinit, apu_has_ldapssl_client_deinit="1", , ${extralib})
-        AC_CHECK_LIB(${ldaplib}, ldapssl_add_trusted_cert, apu_has_ldapssl_add_trusted_cert="1", , ${extralib})
-        AC_CHECK_LIB(${ldaplib}, ldap_start_tls_s, apu_has_ldap_start_tls_s="1", , ${extralib})
-        AC_CHECK_LIB(${ldaplib}, ldap_sslinit, apu_has_ldap_sslinit="1", , ${extralib})
-        AC_CHECK_LIB(${ldaplib}, ldapssl_init, apu_has_ldapssl_init="1", , ${extralib})
-        AC_CHECK_LIB(${ldaplib}, ldapssl_install_routines, apu_has_ldapssl_install_routines="1", , ${extralib})
-        apu_has_ldap="1";
+        AC_CHECK_LIB(${ldaplib}, ldapssl_client_init, ap_has_ldapssl_client_init="1", , ${extralib})
+        AC_CHECK_LIB(${ldaplib}, ldapssl_client_deinit, ap_has_ldapssl_client_deinit="1", , ${extralib})
+        AC_CHECK_LIB(${ldaplib}, ldapssl_add_trusted_cert, ap_has_ldapssl_add_trusted_cert="1", , ${extralib})
+        AC_CHECK_LIB(${ldaplib}, ldap_start_tls_s, ap_has_ldap_start_tls_s="1", , ${extralib})
+        AC_CHECK_LIB(${ldaplib}, ldap_sslinit, ap_has_ldap_sslinit="1", , ${extralib})
+        AC_CHECK_LIB(${ldaplib}, ldapssl_init, ap_has_ldapssl_init="1", , ${extralib})
+        AC_CHECK_LIB(${ldaplib}, ldapssl_install_routines, ap_has_ldapssl_install_routines="1", , ${extralib})
+        ap_has_ldap="1";
       ], , ${extralib})
   fi
 ])
 
 
 dnl
-dnl APU_FIND_LDAP: figure out where LDAP is located
+dnl AP_FIND_LDAP: figure out where LDAP is located
 dnl
-AC_DEFUN([APU_FIND_LDAP],  [
+AC_DEFUN([AP_FIND_LDAP],  [
 
 echo $ac_n "${nl}checking for ldap support..."
 
-apu_has_ldap="0";
-apu_has_ldapssl_client_init="0"
-apu_has_ldapssl_client_deinit="0"
-apu_has_ldapssl_add_trusted_cert="0"
-apu_has_ldap_start_tls_s="0"
-apu_has_ldapssl_init="0"
-apu_has_ldap_sslinit="0"
-apu_has_ldapssl_install_routines="0"
-apu_has_ldap_openldap="0"
-apu_has_ldap_solaris="0"
-apu_has_ldap_novell="0"
-apu_has_ldap_microsoft="0"
-apu_has_ldap_netscape="0"
-apu_has_ldap_mozilla="0"
-apu_has_ldap_tivoli="0"
-apu_has_ldap_zos="0"
-apu_has_ldap_other="0"
+ap_has_ldap="0";
+ap_has_ldapssl_client_init="0"
+ap_has_ldapssl_client_deinit="0"
+ap_has_ldapssl_add_trusted_cert="0"
+ap_has_ldap_start_tls_s="0"
+ap_has_ldapssl_init="0"
+ap_has_ldap_sslinit="0"
+ap_has_ldapssl_install_routines="0"
+ap_has_ldap_openldap="0"
+ap_has_ldap_solaris="0"
+ap_has_ldap_novell="0"
+ap_has_ldap_microsoft="0"
+ap_has_ldap_netscape="0"
+ap_has_ldap_mozilla="0"
+ap_has_ldap_tivoli="0"
+ap_has_ldap_zos="0"
+ap_has_ldap_other="0"
 LDADD_ldap=""
 
 AC_ARG_WITH(lber,[  --with-lber=library     lber library to use],
   [
     if test "$withval" = "yes"; then
-      apu_liblber_name="lber"
+      ap_liblber_name="lber"
     else
-      apu_liblber_name="$withval"
+      ap_liblber_name="$withval"
     fi
   ],
   [
-    apu_liblber_name="lber"
+    ap_liblber_name="lber"
   ])
 
 AC_ARG_WITH(ldap-include,[  --with-ldap-include=path  path to ldap include files with trailing slash])
@@ -101,104 +101,104 @@ AC_ARG_WITH(ldap,[  --with-ldap=library 
       LIBLDAP="$withval"
       if test "$LIBLDAP" = "yes"; then
         dnl The iPlanet C SDK 5.0 is as yet untested... 
-        APU_FIND_LDAPLIB("ldap50", "-lnspr4 -lplc4 -lplds4 -liutil50 -llber50 -lldif50 -lnss3 -lprldap50 -lssl3 -lssldap50")
-        APU_FIND_LDAPLIB("ldapssl41", "-lnspr3 -lplc3 -lplds3")
-        APU_FIND_LDAPLIB("ldapssl40")
-        APU_FIND_LDAPLIB("ldapssl30")
-        APU_FIND_LDAPLIB("ldapssl20")
-        APU_FIND_LDAPLIB("ldapsdk", "-lldapx -lldapssl -lldapgss -lgssapi_krb5")
-        APU_FIND_LDAPLIB("ldapsdk", "-lldapx -lldapssl -lldapgss -lgss -lresolv -lsocket")
-        APU_FIND_LDAPLIB("ldap", "-llber")
-        APU_FIND_LDAPLIB("ldap", "-llber -lresolv")
-        APU_FIND_LDAPLIB("ldap", "-llber -lresolv -lsocket -lnsl")
-        APU_FIND_LDAPLIB("ldap", "-ldl -lpthread")
+        AP_FIND_LDAPLIB("ldap50", "-lnspr4 -lplc4 -lplds4 -liutil50 -llber50 -lldif50 -lnss3 -lprldap50 -lssl3 -lssldap50")
+        AP_FIND_LDAPLIB("ldapssl41", "-lnspr3 -lplc3 -lplds3")
+        AP_FIND_LDAPLIB("ldapssl40")
+        AP_FIND_LDAPLIB("ldapssl30")
+        AP_FIND_LDAPLIB("ldapssl20")
+        AP_FIND_LDAPLIB("ldapsdk", "-lldapx -lldapssl -lldapgss -lgssapi_krb5")
+        AP_FIND_LDAPLIB("ldapsdk", "-lldapx -lldapssl -lldapgss -lgss -lresolv -lsocket")
+        AP_FIND_LDAPLIB("ldap", "-llber")
+        AP_FIND_LDAPLIB("ldap", "-llber -lresolv")
+        AP_FIND_LDAPLIB("ldap", "-llber -lresolv -lsocket -lnsl")
+        AP_FIND_LDAPLIB("ldap", "-ldl -lpthread")
       else
-        APU_FIND_LDAPLIB($LIBLDAP)
-        APU_FIND_LDAPLIB($LIBLDAP, "-lresolv")
-        APU_FIND_LDAPLIB($LIBLDAP, "-lresolv -lsocket -lnsl")
-        APU_FIND_LDAPLIB($LIBLDAP, "-ldl -lpthread")
+        AP_FIND_LDAPLIB($LIBLDAP)
+        AP_FIND_LDAPLIB($LIBLDAP, "-lresolv")
+        AP_FIND_LDAPLIB($LIBLDAP, "-lresolv -lsocket -lnsl")
+        AP_FIND_LDAPLIB($LIBLDAP, "-ldl -lpthread")
       fi
 
-      test ${apu_has_ldap} != "1" && AC_MSG_ERROR(could not find an LDAP library)
-      AC_CHECK_LIB($apu_liblber_name, ber_init,
-        [LDADD_ldap="${LDADD_ldap} -l${apu_liblber_name}"])
+      test ${ap_has_ldap} != "1" && AC_MSG_ERROR(could not find an LDAP library)
+      AC_CHECK_LIB($ap_liblber_name, ber_init,
+        [LDADD_ldap="${LDADD_ldap} -l${ap_liblber_name}"])
 
       AC_CHECK_HEADERS(lber.h, lber_h=["#include <lber.h>"])
 
       # Solaris has a problem in <ldap.h> which prevents it from
       # being included by itself.  Check for <ldap.h> manually,
       # including lber.h first.
-      AC_CACHE_CHECK([for ldap.h], [apr_cv_hdr_ldap_h],
+      AC_CACHE_CHECK([for ldap.h], [ap_cv_hdr_ldap_h],
       [AC_TRY_CPP(
       [#ifdef HAVE_LBER_H
       #include <lber.h>
       #endif
       #include <ldap.h>
-      ], [apr_cv_hdr_ldap_h=yes], [apr_cv_hdr_ldap_h=no])])
-      if test "$apr_cv_hdr_ldap_h" = "yes"; then
+      ], [ap_cv_hdr_ldap_h=yes], [ap_cv_hdr_ldap_h=no])])
+      if test "$ap_cv_hdr_ldap_h" = "yes"; then
         ldap_h=["#include <ldap.h>"]
         AC_DEFINE([HAVE_LDAP_H], 1, [Defined if ldap.h is present])
       fi
 
       AC_CHECK_HEADERS(ldap_ssl.h, ldap_ssl_h=["#include <ldap_ssl.h>"])
 
-      if test "$apr_cv_hdr_ldap_h" = "yes"; then
+      if test "$ap_cv_hdr_ldap_h" = "yes"; then
         AC_CACHE_CHECK([for LDAP toolkit],
-                       [apr_cv_ldap_toolkit], [
-          if test "x$apr_cv_ldap_toolkit" = "x"; then
+                       [ap_cv_ldap_toolkit], [
+          if test "x$ap_cv_ldap_toolkit" = "x"; then
             AC_EGREP_CPP([OpenLDAP], [$lber_h
                          $ldap_h 
-                         LDAP_VENDOR_NAME], [apu_has_ldap_openldap="1"
-                                             apr_cv_ldap_toolkit="OpenLDAP"])
+                         LDAP_VENDOR_NAME], [ap_has_ldap_openldap="1"
+                                             ap_cv_ldap_toolkit="OpenLDAP"])
           fi
-          if test "x$apr_cv_ldap_toolkit" = "x"; then
+          if test "x$ap_cv_ldap_toolkit" = "x"; then
             AC_EGREP_CPP([Sun Microsystems Inc.], [$lber_h
                          $ldap_h
-                         LDAP_VENDOR_NAME], [apu_has_ldap_solaris="1"
-                                             apr_cv_ldap_toolkit="Solaris"])
+                         LDAP_VENDOR_NAME], [ap_has_ldap_solaris="1"
+                                             ap_cv_ldap_toolkit="Solaris"])
           fi
-          if test "x$apr_cv_ldap_toolkit" = "x"; then
+          if test "x$ap_cv_ldap_toolkit" = "x"; then
             AC_EGREP_CPP([Novell], [$lber_h
                          $ldap_h
-                         LDAP_VENDOR_NAME], [apu_has_ldap_novell="1"
-                                             apr_cv_ldap_toolkit="Novell"])
+                         LDAP_VENDOR_NAME], [ap_has_ldap_novell="1"
+                                             ap_cv_ldap_toolkit="Novell"])
           fi
-          if test "x$apr_cv_ldap_toolkit" = "x"; then
+          if test "x$ap_cv_ldap_toolkit" = "x"; then
             AC_EGREP_CPP([Microsoft Corporation.], [$lber_h
                          $ldap_h
-                         LDAP_VENDOR_NAME], [apu_has_ldap_microsoft="1"
-                                             apr_cv_ldap_toolkit="Microsoft"])
+                         LDAP_VENDOR_NAME], [ap_has_ldap_microsoft="1"
+                                             ap_cv_ldap_toolkit="Microsoft"])
           fi
-          if test "x$apr_cv_ldap_toolkit" = "x"; then
+          if test "x$ap_cv_ldap_toolkit" = "x"; then
             AC_EGREP_CPP([Netscape Communications Corp.], [$lber_h
                          $ldap_h
-                         LDAP_VENDOR_NAME], [apu_has_ldap_netscape="1"
-                                             apr_cv_ldap_toolkit="Netscape"])
+                         LDAP_VENDOR_NAME], [ap_has_ldap_netscape="1"
+                                             ap_cv_ldap_toolkit="Netscape"])
           fi
-          if test "x$apr_cv_ldap_toolkit" = "x"; then
+          if test "x$ap_cv_ldap_toolkit" = "x"; then
             AC_EGREP_CPP([mozilla.org], [$lber_h
                          $ldap_h
-                         LDAP_VENDOR_NAME], [apu_has_ldap_mozilla="1"
-                                             apr_cv_ldap_toolkit="Mozilla"])
+                         LDAP_VENDOR_NAME], [ap_has_ldap_mozilla="1"
+                                             ap_cv_ldap_toolkit="Mozilla"])
           fi
-          if test "x$apr_cv_ldap_toolkit" = "x"; then
+          if test "x$ap_cv_ldap_toolkit" = "x"; then
             AC_EGREP_CPP([International Business Machines], [$lber_h
                          $ldap_h
-                         LDAP_VENDOR_NAME], [apu_has_ldap_tivoli="1"
-                                             apr_cv_ldap_toolkit="Tivoli"])
+                         LDAP_VENDOR_NAME], [ap_has_ldap_tivoli="1"
+                                             ap_cv_ldap_toolkit="Tivoli"])
           fi
-          if test "x$apr_cv_ldap_toolkit" = "x"; then
+          if test "x$ap_cv_ldap_toolkit" = "x"; then
             case "$host" in
             *-ibm-os390)
               AC_EGREP_CPP([IBM], [$lber_h
-                                   $ldap_h], [apu_has_ldap_zos="1"
-                                              apr_cv_ldap_toolkit="z/OS"])
+                                   $ldap_h], [ap_has_ldap_zos="1"
+                                              ap_cv_ldap_toolkit="z/OS"])
               ;;
             esac
           fi
-          if test "x$apr_cv_ldap_toolkit" = "x"; then
-            apu_has_ldap_other="1"
-            apr_cv_ldap_toolkit="unknown"
+          if test "x$ap_cv_ldap_toolkit" = "x"; then
+            ap_has_ldap_other="1"
+            ap_cv_ldap_toolkit="unknown"
           fi
         ])
       fi
@@ -209,7 +209,7 @@ AC_ARG_WITH(ldap,[  --with-ldap=library 
     fi
   ])
 
-if test "$apu_has_ldap_openldap" = "1"; then
+if test "$ap_has_ldap_openldap" = "1"; then
     save_cppflags="$CPPFLAGS"
     save_ldflags="$LDFLAGS"
     save_libs="$LIBS"
@@ -241,26 +241,23 @@ fi
 AC_SUBST(ldap_h)
 AC_SUBST(lber_h)
 AC_SUBST(ldap_ssl_h)
-AC_SUBST(apu_has_ldapssl_client_init)
-AC_SUBST(apu_has_ldapssl_client_deinit)
-AC_SUBST(apu_has_ldapssl_add_trusted_cert)
-AC_SUBST(apu_has_ldap_start_tls_s)
-AC_SUBST(apu_has_ldapssl_init)
-AC_SUBST(apu_has_ldap_sslinit)
-AC_SUBST(apu_has_ldapssl_install_routines)
-AC_SUBST(apu_has_ldap)
-AC_SUBST(apu_has_ldap_openldap)
-AC_SUBST(apu_has_ldap_solaris)
-AC_SUBST(apu_has_ldap_novell)
-AC_SUBST(apu_has_ldap_microsoft)
-AC_SUBST(apu_has_ldap_netscape)
-AC_SUBST(apu_has_ldap_mozilla)
-AC_SUBST(apu_has_ldap_tivoli)
-AC_SUBST(apu_has_ldap_zos)
-AC_SUBST(apu_has_ldap_other)
+AC_SUBST(ap_has_ldapssl_client_init)
+AC_SUBST(ap_has_ldapssl_client_deinit)
+AC_SUBST(ap_has_ldapssl_add_trusted_cert)
+AC_SUBST(ap_has_ldap_start_tls_s)
+AC_SUBST(ap_has_ldapssl_init)
+AC_SUBST(ap_has_ldap_sslinit)
+AC_SUBST(ap_has_ldapssl_install_routines)
+AC_SUBST(ap_has_ldap)
+AC_SUBST(ap_has_ldap_openldap)
+AC_SUBST(ap_has_ldap_solaris)
+AC_SUBST(ap_has_ldap_novell)
+AC_SUBST(ap_has_ldap_microsoft)
+AC_SUBST(ap_has_ldap_netscape)
+AC_SUBST(ap_has_ldap_mozilla)
+AC_SUBST(ap_has_ldap_tivoli)
+AC_SUBST(ap_has_ldap_zos)
+AC_SUBST(ap_has_ldap_other)
 AC_SUBST(LDADD_ldap)
-AC_SUBST(APRUTIL_EXPORT_LIBS)
-
+AC_CONFIG_FILES(include/ap_ldap.h)
 ])
-
-

Modified: httpd/httpd/trunk/configure.in
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/configure.in?rev=1129808&r1=1129807&r2=1129808&view=diff
==============================================================================
--- httpd/httpd/trunk/configure.in (original)
+++ httpd/httpd/trunk/configure.in Tue May 31 17:10:11 2011
@@ -16,6 +16,7 @@ dnl #
 sinclude(build/apr_common.m4)
 sinclude(build/find_apr.m4)
 sinclude(build/find_apu.m4)
+sinclude(build/find_ldap.m4)
 sinclude(acinclude.m4)
 
 dnl Later versions of autoconf (>= 2.62) by default cause the produced

Modified: httpd/httpd/trunk/docs/doxygen.conf
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/doxygen.conf?rev=1129808&r1=1129807&r2=1129808&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/doxygen.conf (original)
+++ httpd/httpd/trunk/docs/doxygen.conf Tue May 31 17:10:11 2011
@@ -51,12 +51,13 @@ PREDEFINED="APR_DECLARE(x)=x" \
 	APR_HAS_USER \
 	APR_HAS_LARGE_FILES \
 	APR_HAS_XTHREAD_FILES \
-	DOXYGEN= \
-	APU_DECLARE_DATA= \
-	__pre_nw__= \
+	DOXYGEN \
+	APU_DECLARE_DATA \
+	__pre_nw__ \
 	"APU_DECLARE(x)=x" \
 	"CACHE_DECLARE(x)=x" \
-	"PROXY_DECLARE(x)=x"
+	"PROXY_DECLARE(x)=x" \
+	"MODLDAP_DECLARE(x)=x"
 	
 
 OPTIMIZE_OUTPUT_FOR_C=YES

Copied: httpd/httpd/trunk/include/ap_ldap.h.in (from r1128716, apr/apr/trunk/include/apr_ldap.h.in)
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/ap_ldap.h.in?p2=httpd/httpd/trunk/include/ap_ldap.h.in&p1=apr/apr/trunk/include/apr_ldap.h.in&r1=1128716&r2=1129808&rev=1129808&view=diff
==============================================================================
--- apr/apr/trunk/include/apr_ldap.h.in (original)
+++ httpd/httpd/trunk/include/ap_ldap.h.in Tue May 31 17:10:11 2011
@@ -15,57 +15,74 @@
  */
 
 /*
- * apr_ldap.h is generated from apr_ldap.h.in by configure -- do not edit apr_ldap.h
+ * ap_ldap.h is generated from ap_ldap.h.in by configure -- do not edit ap_ldap.h
  */
 /**
- * @file apr_ldap.h
- * @brief  APR-UTIL LDAP 
+ * @file ap_ldap.h
+ * @brief  MODLDAP 
  */
-#ifndef APU_LDAP_H
-#define APU_LDAP_H
+#ifndef AP_LDAP_H
+#define AP_LDAP_H
 
 /**
- * @defgroup APR_Util_LDAP LDAP
+ * @defgroup AP_Util_LDAP LDAP
  * @ingroup APR_Util
  * @{
  */
 
+#if !defined(WIN32)
+#define MODLDAP_DECLARE(type)            type
+#define MODLDAP_DECLARE_NONSTD(type)     type
+#define MODLDAP_DECLARE_DATA
+#elif defined(MODLDAP_DECLARE_STATIC)
+#define MODLDAP_DECLARE(type)            type __stdcall
+#define MODLDAP_DECLARE_NONSTD(type)     type
+#define MODLDAP_DECLARE_DATA
+#elif defined(MODLDAP_DECLARE_EXPORT)
+#define MODLDAP_DECLARE(type)            __declspec(dllexport) type __stdcall
+#define MODLDAP_DECLARE_NONSTD(type)     __declspec(dllexport) type
+#define MODLDAP_DECLARE_DATA             __declspec(dllexport)
+#else
+#define MODLDAP_DECLARE(type)            __declspec(dllimport) type __stdcall
+#define MODLDAP_DECLARE_NONSTD(type)     __declspec(dllimport) type
+#define MODLDAP_DECLARE_DATA             __declspec(dllimport)
+#endif
 /* this will be defined if LDAP support was compiled into apr-util */
-#define APR_HAS_LDAP		  @apu_has_ldap@
+#define AP_HAS_LDAP		  @ap_has_ldap@
 
 /* identify the LDAP toolkit used */
-#define APR_HAS_NETSCAPE_LDAPSDK  @apu_has_ldap_netscape@
-#define APR_HAS_SOLARIS_LDAPSDK   @apu_has_ldap_solaris@
-#define APR_HAS_NOVELL_LDAPSDK    @apu_has_ldap_novell@
-#define APR_HAS_MOZILLA_LDAPSDK   @apu_has_ldap_mozilla@
-#define APR_HAS_OPENLDAP_LDAPSDK  @apu_has_ldap_openldap@
-#define APR_HAS_MICROSOFT_LDAPSDK @apu_has_ldap_microsoft@
-#define APR_HAS_TIVOLI_LDAPSDK    @apu_has_ldap_tivoli@
-#define APR_HAS_ZOS_LDAPSDK       @apu_has_ldap_zos@
-#define APR_HAS_OTHER_LDAPSDK     @apu_has_ldap_other@
+#define AP_HAS_NETSCAPE_LDAPSDK  @ap_has_ldap_netscape@
+#define AP_HAS_SOLARIS_LDAPSDK   @ap_has_ldap_solaris@
+#define AP_HAS_NOVELL_LDAPSDK    @ap_has_ldap_novell@
+#define AP_HAS_MOZILLA_LDAPSDK   @ap_has_ldap_mozilla@
+#define AP_HAS_OPENLDAP_LDAPSDK  @ap_has_ldap_openldap@
+#define AP_HAS_MICROSOFT_LDAPSDK @ap_has_ldap_microsoft@
+#define AP_HAS_TIVOLI_LDAPSDK    @ap_has_ldap_tivoli@
+#define AP_HAS_ZOS_LDAPSDK       @ap_has_ldap_zos@
+#define AP_HAS_OTHER_LDAPSDK     @ap_has_ldap_other@
 
 
 /*
  * Handle the case when LDAP is enabled
  */
-#if APR_HAS_LDAP
+#if AP_HAS_LDAP
 
 /*
  * The following #defines are DEPRECATED and should not be used for
  * anything. They remain to maintain binary compatibility.
  * The original code defined the OPENLDAP SDK as present regardless
  * of what really was there, which was way bogus. In addition, the
- * apr_ldap_url_parse*() functions have been rewritten specifically for
- * APR, so the APR_HAS_LDAP_URL_PARSE macro is forced to zero.
+ * ap_ldap_url_parse*() functions have been rewritten specifically for
+ * APR, so the AP_HAS_LDAP_URL_PARSE macro is forced to zero.
  */
-#if APR_HAS_TIVOLI_LDAPSDK
-#define APR_HAS_LDAP_SSL 0
+#if AP_HAS_TIVOLI_LDAPSDK
+#define AP_HAS_LDAP_SSL 0
 #else
-#define APR_HAS_LDAP_SSL 1
+#define AP_HAS_LDAP_SSL 1
 #endif
-#define APR_HAS_LDAP_URL_PARSE      0
+#define AP_HAS_LDAP_URL_PARSE      0
 
-#if APR_HAS_OPENLDAP_LDAPSDK && !defined(LDAP_DEPRECATED) 
+#if AP_HAS_OPENLDAP_LDAPSDK && !defined(LDAP_DEPRECATED) 
 /* Ensure that the "deprecated" interfaces are still exposed
  * with OpenLDAP >= 2.3; these were exposed by default in earlier
  * releases. */
@@ -84,13 +101,13 @@
 /*
  * Detected standard functions
  */
-#define APR_HAS_LDAPSSL_CLIENT_INIT @apu_has_ldapssl_client_init@
-#define APR_HAS_LDAPSSL_CLIENT_DEINIT @apu_has_ldapssl_client_deinit@
-#define APR_HAS_LDAPSSL_ADD_TRUSTED_CERT @apu_has_ldapssl_add_trusted_cert@
-#define APR_HAS_LDAP_START_TLS_S @apu_has_ldap_start_tls_s@
-#define APR_HAS_LDAP_SSLINIT @apu_has_ldap_sslinit@
-#define APR_HAS_LDAPSSL_INIT @apu_has_ldapssl_init@
-#define APR_HAS_LDAPSSL_INSTALL_ROUTINES @apu_has_ldapssl_install_routines@
+#define AP_HAS_LDAPSSL_CLIENT_INIT @ap_has_ldapssl_client_init@
+#define AP_HAS_LDAPSSL_CLIENT_DEINIT @ap_has_ldapssl_client_deinit@
+#define AP_HAS_LDAPSSL_ADD_TRUSTED_CERT @ap_has_ldapssl_add_trusted_cert@
+#define AP_HAS_LDAP_START_TLS_S @ap_has_ldap_start_tls_s@
+#define AP_HAS_LDAP_SSLINIT @ap_has_ldap_sslinit@
+#define AP_HAS_LDAPSSL_INIT @ap_has_ldapssl_init@
+#define AP_HAS_LDAPSSL_INSTALL_ROUTINES @ap_has_ldapssl_install_routines@
 
 /*
  * Make sure the secure LDAP port is defined
@@ -106,15 +123,15 @@
  * or process is configured for.
  */
 #ifdef LDAP_DEFAULT_LIMIT
-#define APR_LDAP_SIZELIMIT LDAP_DEFAULT_LIMIT
+#define AP_LDAP_SIZELIMIT LDAP_DEFAULT_LIMIT
 #else
 #ifdef LDAP_NO_LIMIT
-#define APR_LDAP_SIZELIMIT LDAP_NO_LIMIT
+#define AP_LDAP_SIZELIMIT LDAP_NO_LIMIT
 #endif
 #endif
 
-#ifndef APR_LDAP_SIZELIMIT
-#define APR_LDAP_SIZELIMIT 0 /* equivalent to LDAP_NO_LIMIT, and what goes on the wire */
+#ifndef AP_LDAP_SIZELIMIT
+#define AP_LDAP_SIZELIMIT 0 /* equivalent to LDAP_NO_LIMIT, and what goes on the wire */
 #endif
 
 /*
@@ -123,7 +140,7 @@
 #ifndef LDAP_VERSION_MAX
 #define LDAP_VERSION_MAX  LDAP_VERSION
 #endif
-#if APR_HAS_ZOS_LDAPSDK
+#if AP_HAS_ZOS_LDAPSDK
 #define LDAP_VENDOR_NAME "IBM z/OS"
 #endif
 
@@ -145,53 +162,32 @@ extern "C" {
  * along with plain text error messages that explain to us mere mortals
  * what really happened.
  */
-typedef struct apr_ldap_err_t {
+typedef struct ap_ldap_err_t {
     const char *reason;
     const char *msg;
     int rc;
-} apr_ldap_err_t;
+} ap_ldap_err_t;
 
 #ifdef __cplusplus
 }
 #endif
 
 /* The MS SDK returns LDAP_UNAVAILABLE when the backend has closed the connection
- * between LDAP calls. Protect with APR_HAS_MICROSOFT_LDAPSDK in case someone 
+ * between LDAP calls. Protect with AP_HAS_MICROSOFT_LDAPSDK in case someone 
  * manually chooses another SDK on Windows 
  */
-#if APR_HAS_MICROSOFT_LDAPSDK
-#define APR_LDAP_IS_SERVER_DOWN(s)    ((s) == LDAP_SERVER_DOWN \
-                                    || (s) == LDAP_UNAVAILABLE)
-#else
-#define APR_LDAP_IS_SERVER_DOWN(s)    ((s) == LDAP_SERVER_DOWN)
-#endif
-
-/* These symbols are not actually exported in a DSO build, but mapped into
- * a private exported function array for apr_ldap_stub to bind dynamically.
- * Rename them appropriately to protect the global namespace.
- */
-#ifdef APU_DSO_LDAP_BUILD
-
-#define apr_ldap_info apr__ldap_info
-#define apr_ldap_init apr__ldap_init
-#define apr_ldap_ssl_init apr__ldap_ssl_init
-#define apr_ldap_ssl_deinit apr__ldap_ssl_deinit
-#define apr_ldap_get_option apr__ldap_get_option
-#define apr_ldap_set_option apr__ldap_set_option
-#define apr_ldap_rebind_init apr__ldap_rebind_init
-#define apr_ldap_rebind_add apr__ldap_rebind_add
-#define apr_ldap_rebind_remove apr__ldap_rebind_remove
-
-#define APR_DECLARE_LDAP(type) type
+#if AP_HAS_MICROSOFT_LDAPSDK
+#define AP_LDAP_IS_SERVER_DOWN(s)    ((s) == LDAP_SERVER_DOWN \
+                                   || (s) == LDAP_UNAVAILABLE)
 #else
-#define APR_DECLARE_LDAP(type) APR_DECLARE(type)
+#define AP_LDAP_IS_SERVER_DOWN(s)    ((s) == LDAP_SERVER_DOWN)
 #endif
 
-#include "apr_ldap_url.h"
-#include "apr_ldap_init.h"
-#include "apr_ldap_option.h"
-#include "apr_ldap_rebind.h"
+#include "ap_ldap_url.h"
+#include "ap_ldap_init.h"
+#include "ap_ldap_option.h"
+#include "ap_ldap_rebind.h"
 
-#endif /* APR_HAS_LDAP */
+#endif /* AP_HAS_LDAP */
 /** @} */
-#endif /* APU_LDAP_H */
+#endif /* AP_LDAP_H */

Copied: httpd/httpd/trunk/include/ap_ldap.hnw (from r1128716, apr/apr/trunk/include/apr_ldap.hnw)
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/ap_ldap.hnw?p2=httpd/httpd/trunk/include/ap_ldap.hnw&p1=apr/apr/trunk/include/apr_ldap.hnw&r1=1128716&r2=1129808&rev=1129808&view=diff
==============================================================================
--- apr/apr/trunk/include/apr_ldap.hnw (original)
+++ httpd/httpd/trunk/include/ap_ldap.hnw Tue May 31 17:10:11 2011
@@ -15,49 +15,49 @@
  */
 
 /*
- * apr_ldap.h is generated from apr_ldap.h.in by configure -- do not edit apr_ldap.h
+ * ap_ldap.h is generated from ap_ldap.h.in by configure -- do not edit ap_ldap.h
  */
 /**
- * @file apr_ldap.h
- * @brief  APR-UTIL LDAP 
+ * @file ap_ldap.h
+ * @brief  MODLDAP 
  */
-#ifndef APU_LDAP_H
-#define APU_LDAP_H
+#ifndef AP_LDAP_H
+#define AP_LDAP_H
 
 /**
- * @defgroup APR_Util_LDAP LDAP
- * @ingroup APR_Util
+ * @defgroup AP_Util_LDAP LDAP
+ * @ingroup AP_Util
  * @{
  */
 
 /* this will be defined if LDAP support was compiled into apr-util */
-#define APR_HAS_LDAP                1 
+#define AP_HAS_LDAP                1 
 
 /* identify the LDAP toolkit used */
-#define APR_HAS_NETSCAPE_LDAPSDK    0
-#define APR_HAS_SOLARIS_LDAPSDK     0
-#define APR_HAS_NOVELL_LDAPSDK      1
-#define APR_HAS_MOZILLA_LDAPSDK     0
-#define APR_HAS_OPENLDAP_LDAPSDK    0
-#define APR_HAS_MICROSOFT_LDAPSDK   0
-#define APR_HAS_OTHER_LDAPSDK       0
+#define AP_HAS_NETSCAPE_LDAPSDK    0
+#define AP_HAS_SOLARIS_LDAPSDK     0
+#define AP_HAS_NOVELL_LDAPSDK      1
+#define AP_HAS_MOZILLA_LDAPSDK     0
+#define AP_HAS_OPENLDAP_LDAPSDK    0
+#define AP_HAS_MICROSOFT_LDAPSDK   0
+#define AP_HAS_OTHER_LDAPSDK       0
 
 
 /*
  * Handle the case when LDAP is enabled
  */
-#if APR_HAS_LDAP
+#if AP_HAS_LDAP
 
 /*
  * The following #defines are DEPRECATED and should not be used for
  * anything. They remain to maintain binary compatibility.
  * The original code defined the OPENLDAP SDK as present regardless
  * of what really was there, which was way bogus. In addition, the
- * apr_ldap_url_parse*() functions have been rewritten specifically for
- * APR, so the APR_HAS_LDAP_URL_PARSE macro is forced to zero.
+ * ap_ldap_url_parse*() functions have been rewritten specifically for
+ * APR, so the AP_HAS_LDAP_URL_PARSE macro is forced to zero.
  */
-#define APR_HAS_LDAP_SSL            1
-#define APR_HAS_LDAP_URL_PARSE      0
+#define AP_HAS_LDAP_SSL            1
+#define AP_HAS_LDAP_URL_PARSE      0
 
 
 /*
@@ -70,7 +70,7 @@
 #else
 #include <lber.h>
 #include <ldap.h>
-#if APR_HAS_LDAP_SSL 
+#if AP_HAS_LDAP_SSL 
 #include <ldap_ssl.h>
 #endif
 #endif
@@ -79,13 +79,13 @@
 /*
  * Detected standard functions
  */
-#define APR_HAS_LDAPSSL_CLIENT_INIT 1
-#define APR_HAS_LDAPSSL_CLIENT_DEINIT 1
-#define APR_HAS_LDAPSSL_ADD_TRUSTED_CERT 1
-#define APR_HAS_LDAP_START_TLS_S 0
-#define APR_HAS_LDAP_SSLINIT 0
-#define APR_HAS_LDAPSSL_INIT 1
-#define APR_HAS_LDAPSSL_INSTALL_ROUTINES 0
+#define AP_HAS_LDAPSSL_CLIENT_INIT 1
+#define AP_HAS_LDAPSSL_CLIENT_DEINIT 1
+#define AP_HAS_LDAPSSL_ADD_TRUSTED_CERT 1
+#define AP_HAS_LDAP_START_TLS_S 0
+#define AP_HAS_LDAP_SSLINIT 0
+#define AP_HAS_LDAPSSL_INIT 1
+#define AP_HAS_LDAPSSL_INSTALL_ROUTINES 0
 
 
 /*
@@ -114,45 +114,24 @@ extern "C" {
  * along with plain text error messages that explain to us mere mortals
  * what really happened.
  */
-typedef struct apr_ldap_err_t {
+typedef struct ap_ldap_err_t {
     const char *reason;
     const char *msg;
     int rc;
-} apr_ldap_err_t;
+} ap_ldap_err_t;
 
 #ifdef __cplusplus
 }
 #endif
 
-#define APR_LDAP_IS_SERVER_DOWN(s)                ((s) == LDAP_SERVER_DOWN)
+#define AP_LDAP_IS_SERVER_DOWN(s)                ((s) == LDAP_SERVER_DOWN)
 
-/* These symbols are not actually exported in a DSO build, but mapped into
- * a private exported function array for apr_ldap_stub to bind dynamically.
- * Rename them appropriately to protect the global namespace.
- */
-#ifdef APU_DSO_LDAP_BUILD
-
-#define apr_ldap_info apr__ldap_info
-#define apr_ldap_init apr__ldap_init
-#define apr_ldap_ssl_init apr__ldap_ssl_init
-#define apr_ldap_ssl_deinit apr__ldap_ssl_deinit
-#define apr_ldap_get_option apr__ldap_get_option
-#define apr_ldap_set_option apr__ldap_set_option
-#define apr_ldap_rebind_init apr__ldap_rebind_init
-#define apr_ldap_rebind_add apr__ldap_rebind_add
-#define apr_ldap_rebind_remove apr__ldap_rebind_remove
-
-#define APR_DECLARE_LDAP(type) type
-#else
-#define APR_DECLARE_LDAP(type) APR_DECLARE(type)
-#endif
-
-#include "apr_ldap_url.h"
-#include "apr_ldap_init.h"
-#include "apr_ldap_option.h"
-#include "apr_ldap_rebind.h"
+#include "ap_ldap_url.h"
+#include "ap_ldap_init.h"
+#include "ap_ldap_option.h"
+#include "ap_ldap_rebind.h"
 
 /** @} */
-#endif /* APR_HAS_LDAP */
-#endif /* APU_LDAP_H */
+#endif /* AP_HAS_LDAP */
+#endif /* AP_LDAP_H */
 

Copied: httpd/httpd/trunk/include/ap_ldap.hw (from r1128716, apr/apr/trunk/include/apr_ldap.hw)
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/ap_ldap.hw?p2=httpd/httpd/trunk/include/ap_ldap.hw&p1=apr/apr/trunk/include/apr_ldap.hw&r1=1128716&r2=1129808&rev=1129808&view=diff
==============================================================================
--- apr/apr/trunk/include/apr_ldap.hw (original)
+++ httpd/httpd/trunk/include/ap_ldap.hw Tue May 31 17:10:11 2011
@@ -15,57 +15,57 @@
  */
 
 /*
- * apr_ldap.h is generated from apr_ldap.h.in by configure -- do not edit apr_ldap.h
+ * ap_ldap.h is generated from ap_ldap.h.in by configure -- do not edit ap_ldap.h
  */
 /**
- * @file apr_ldap.h
- * @brief  APR-UTIL LDAP 
+ * @file ap_ldap.h
+ * @brief  AP-UTIL LDAP 
  */
-#ifndef APU_LDAP_H
-#define APU_LDAP_H
+#ifndef AP_LDAP_H
+#define AP_LDAP_H
 
 /**
- * @defgroup APR_Util_LDAP LDAP
- * @ingroup APR_Util
+ * @defgroup AP_Util_LDAP LDAP
+ * @ingroup AP_Util
  * @{
  */
 
 /* this will be defined if LDAP support was compiled into apr-util */
-#define APR_HAS_LDAP		    0
+#define AP_HAS_LDAP		    0
 
 /* identify the LDAP toolkit used */
-#define APR_HAS_NETSCAPE_LDAPSDK    0
-#define APR_HAS_SOLARIS_LDAPSDK     0
-#define APR_HAS_NOVELL_LDAPSDK      0
-#define APR_HAS_MOZILLA_LDAPSDK     0
-#define APR_HAS_OPENLDAP_LDAPSDK    0
-#define APR_HAS_MICROSOFT_LDAPSDK   1
-#define APR_HAS_TIVOLI_LDAPSDK      0
-#define APR_HAS_ZOS_LDAPSDK         0
-#define APR_HAS_OTHER_LDAPSDK       0
+#define AP_HAS_NETSCAPE_LDAPSDK    0
+#define AP_HAS_SOLARIS_LDAPSDK     0
+#define AP_HAS_NOVELL_LDAPSDK      0
+#define AP_HAS_MOZILLA_LDAPSDK     0
+#define AP_HAS_OPENLDAP_LDAPSDK    0
+#define AP_HAS_MICROSOFT_LDAPSDK   1
+#define AP_HAS_TIVOLI_LDAPSDK      0
+#define AP_HAS_ZOS_LDAPSDK         0
+#define AP_HAS_OTHER_LDAPSDK       0
 
 
 /*
  * Handle the case when LDAP is enabled
  */
-#if APR_HAS_LDAP
+#if AP_HAS_LDAP
 
 /*
  * The following #defines are DEPRECATED and should not be used for
  * anything. They remain to maintain binary compatibility.
  * The original code defined the OPENLDAP SDK as present regardless
  * of what really was there, which was way bogus. In addition, the
- * apr_ldap_url_parse*() functions have been rewritten specifically for
- * APR, so the APR_HAS_LDAP_URL_PARSE macro is forced to zero.
+ * ap_ldap_url_parse*() functions have been rewritten specifically for
+ * APR, so the AP_HAS_LDAP_URL_PARSE macro is forced to zero.
  */
-#if APR_HAS_TIVOLI_LDAPSDK
-#define APR_HAS_LDAP_SSL 0
+#if AP_HAS_TIVOLI_LDAPSDK
+#define AP_HAS_LDAP_SSL 0
 #else
-#define APR_HAS_LDAP_SSL 1
+#define AP_HAS_LDAP_SSL 1
 #endif
-#define APR_HAS_LDAP_URL_PARSE 0
+#define AP_HAS_LDAP_URL_PARSE 0
 
-#if APR_HAS_OPENLDAP_LDAPSDK && !defined(LDAP_DEPRECATED) 
+#if AP_HAS_OPENLDAP_LDAPSDK && !defined(LDAP_DEPRECATED) 
 /* Ensure that the "deprecated" interfaces are still exposed
  * with OpenLDAP >= 2.3; these were exposed by default in earlier
  * releases. */
@@ -82,13 +82,13 @@
 /*
  * Detected standard functions
  */
-#define APR_HAS_LDAPSSL_CLIENT_INIT 0
-#define APR_HAS_LDAPSSL_CLIENT_DEINIT 0
-#define APR_HAS_LDAPSSL_ADD_TRUSTED_CERT 0
-#define APR_HAS_LDAP_START_TLS_S 0
-#define APR_HAS_LDAP_SSLINIT 1
-#define APR_HAS_LDAPSSL_INIT 0
-#define APR_HAS_LDAPSSL_INSTALL_ROUTINES 0
+#define AP_HAS_LDAPSSL_CLIENT_INIT 0
+#define AP_HAS_LDAPSSL_CLIENT_DEINIT 0
+#define AP_HAS_LDAPSSL_ADD_TRUSTED_CERT 0
+#define AP_HAS_LDAP_START_TLS_S 0
+#define AP_HAS_LDAP_SSLINIT 1
+#define AP_HAS_LDAPSSL_INIT 0
+#define AP_HAS_LDAPSSL_INSTALL_ROUTINES 0
 
 
 /*
@@ -106,15 +106,15 @@
  * or process is configured for.
  */
 #ifdef LDAP_DEFAULT_LIMIT
-#define APR_LDAP_SIZELIMIT LDAP_DEFAULT_LIMIT
+#define AP_LDAP_SIZELIMIT LDAP_DEFAULT_LIMIT
 #else
 #ifdef LDAP_NO_LIMIT
-#define APR_LDAP_SIZELIMIT LDAP_NO_LIMIT
+#define AP_LDAP_SIZELIMIT LDAP_NO_LIMIT
 #endif
 #endif
 
-#ifndef APR_LDAP_SIZELIMIT
-#define APR_LDAP_SIZELIMIT 0 /* equivalent to LDAP_NO_LIMIT, and what goes on the wire */
+#ifndef AP_LDAP_SIZELIMIT
+#define AP_LDAP_SIZELIMIT 0 /* equivalent to LDAP_NO_LIMIT, and what goes on the wire */
 #endif
 
 /*
@@ -123,7 +123,7 @@
 #ifndef LDAP_VERSION_MAX
 #define LDAP_VERSION_MAX  LDAP_VERSION
 #endif
-#if APR_HAS_ZOS_LDAPSDK
+#if AP_HAS_ZOS_LDAPSDK
 #define LDAP_VENDOR_NAME "IBM z/OS"
 #endif
 
@@ -145,53 +145,32 @@ extern "C" {
  * along with plain text error messages that explain to us mere mortals
  * what really happened.
  */
-typedef struct apr_ldap_err_t {
+typedef struct ap_ldap_err_t {
     const char *reason;
     const char *msg;
     int rc;
-} apr_ldap_err_t;
+} ap_ldap_err_t;
 
 #ifdef __cplusplus
 }
 #endif
 
 /* The MS SDK returns LDAP_UNAVAILABLE when the backend has closed the connection
- * between LDAP calls. Protect with APR_HAS_MICROSOFT_LDAPSDK in case someone 
+ * between LDAP calls. Protect with AP_HAS_MICROSOFT_LDAPSDK in case someone 
  * manually chooses another SDK on Windows 
  */
-#if APR_HAS_MICROSOFT_LDAPSDK
-#define APR_LDAP_IS_SERVER_DOWN(s)    ((s) == LDAP_SERVER_DOWN \
-                                    || (s) == LDAP_UNAVAILABLE)
+#if AP_HAS_MICROSOFT_LDAPSDK
+#define AP_LDAP_IS_SERVER_DOWN(s)    ((s) == LDAP_SERVER_DOWN \
+                                   || (s) == LDAP_UNAVAILABLE)
 #else
-#define APR_LDAP_IS_SERVER_DOWN(s)    ((s) == LDAP_SERVER_DOWN)
+#define AP_LDAP_IS_SERVER_DOWN(s)    ((s) == LDAP_SERVER_DOWN)
 #endif
 
-/* These symbols are not actually exported in a DSO build, but mapped into
- * a private exported function array for apr_ldap_stub to bind dynamically.
- * Rename them appropriately to protect the global namespace.
- */
-#ifdef APU_DSO_LDAP_BUILD
-
-#define apr_ldap_info apr__ldap_info
-#define apr_ldap_init apr__ldap_init
-#define apr_ldap_ssl_init apr__ldap_ssl_init
-#define apr_ldap_ssl_deinit apr__ldap_ssl_deinit
-#define apr_ldap_get_option apr__ldap_get_option
-#define apr_ldap_set_option apr__ldap_set_option
-#define apr_ldap_rebind_init apr__ldap_rebind_init
-#define apr_ldap_rebind_add apr__ldap_rebind_add
-#define apr_ldap_rebind_remove apr__ldap_rebind_remove
-
-#define APR_DECLARE_LDAP(type) type
-#else
-#define APR_DECLARE_LDAP(type) APR_DECLARE(type)
-#endif
-
-#include "apr_ldap_url.h"
-#include "apr_ldap_init.h"
-#include "apr_ldap_option.h"
-#include "apr_ldap_rebind.h"
+#include "ap_ldap_url.h"
+#include "ap_ldap_init.h"
+#include "ap_ldap_option.h"
+#include "ap_ldap_rebind.h"
 
 /** @} */
-#endif /* APR_HAS_LDAP */
-#endif /* APU_LDAP_H */
+#endif /* AP_HAS_LDAP */
+#endif /* AP_LDAP_H */

Copied: httpd/httpd/trunk/include/ap_ldap_init.h (from r1128716, apr/apr/trunk/include/apr_ldap_init.h)
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/ap_ldap_init.h?p2=httpd/httpd/trunk/include/ap_ldap_init.h&p1=apr/apr/trunk/include/apr_ldap_init.h&r1=1128716&r2=1129808&rev=1129808&view=diff
==============================================================================
--- apr/apr/trunk/include/apr_ldap_init.h (original)
+++ httpd/httpd/trunk/include/ap_ldap_init.h Tue May 31 17:10:11 2011
@@ -15,20 +15,20 @@
  */
 
 /**
- * @file apr_ldap_init.h
- * @brief  APR-UTIL LDAP ldap_init() functions
+ * @file ap_ldap_init.h
+ * @brief  AP-UTIL LDAP ldap_init() functions
  */
-#ifndef APR_LDAP_INIT_H
-#define APR_LDAP_INIT_H
+#ifndef AP_LDAP_INIT_H
+#define AP_LDAP_INIT_H
 
 /**
- * @addtogroup APR_Util_LDAP
+ * @addtogroup AP_Util_LDAP
  * @{
  */
 
-#include "apr_ldap.h"
+#include "ap_ldap.h"
 
-#if APR_HAS_LDAP
+#if AP_HAS_LDAP
 
 #ifdef __cplusplus
 extern "C" {
@@ -39,41 +39,41 @@ extern "C" {
  * Macro to detect security related return values.
  */
 #if defined(LDAP_INSUFFICIENT_ACCESS)
-#define APU_LDAP_INSUFFICIENT_ACCESS LDAP_INSUFFICIENT_ACCESS
+#define AP_LDAP_INSUFFICIENT_ACCESS LDAP_INSUFFICIENT_ACCESS
 #elif defined(LDAP_INSUFFICIENT_RIGHTS)
-#define APU_LDAP_INSUFFICIENT_ACCESS LDAP_INSUFFICIENT_RIGHTS
-#elif defined(APR_HAS_MICROSOFT_LDAPSDK)
+#define AP_LDAP_INSUFFICIENT_ACCESS LDAP_INSUFFICIENT_RIGHTS
+#elif defined(AP_HAS_MICROSOFT_LDAPSDK)
 /* The macros above fail to contemplate that LDAP_RETCODE values
  * may be represented by an enum.  autoconf tests would be much
  * more robust.
  */
-#define APU_LDAP_INSUFFICIENT_ACCESS LDAP_INSUFFICIENT_RIGHTS
+#define AP_LDAP_INSUFFICIENT_ACCESS LDAP_INSUFFICIENT_RIGHTS
 #else
 #error The security return codes must be added to support this LDAP toolkit.
 #endif
 
 #if defined(LDAP_SECURITY_ERROR)
-#define APU_LDAP_SECURITY_ERROR LDAP_SECURITY_ERROR
+#define AP_LDAP_SECURITY_ERROR LDAP_SECURITY_ERROR
 #else
-#define APU_LDAP_SECURITY_ERROR(n)	\
+#define AP_LDAP_SECURITY_ERROR(n)	\
     (LDAP_INAPPROPRIATE_AUTH == n) ? 1 \
     : (LDAP_INVALID_CREDENTIALS == n) ? 1 \
-    : (APU_LDAP_INSUFFICIENT_ACCESS == n) ? 1 \
+    : (AP_LDAP_INSUFFICIENT_ACCESS == n) ? 1 \
     : 0
 #endif
 
 
 /**
- * APR LDAP SSL Initialise function
+ * MODLDAP SSL Initialise function
  *
  * This function initialises SSL on the underlying LDAP toolkit
  * if this is necessary.
  *
- * If a CA certificate is provided, this is set, however the setting
+ * @bug ??? If a CA certificate is provided, this is set, however the setting
  * of certificates via this method has been deprecated and will be removed in
- * APR v2.0.
+ * APR v2.0 ???
  *
- * The apr_ldap_set_option() function with the APR_LDAP_OPT_TLS_CERT option
+ * The ap_ldap_set_option() function with the AP_LDAP_OPT_TLS_CERT option
  * should be used instead to set certificates.
  *
  * If SSL support is not available on this platform, or a problem
@@ -83,27 +83,27 @@ extern "C" {
  * @param pool The pool to use
  * @param cert_auth_file The name of the certificate to use, can be NULL
  * @param cert_file_type The type of certificate specified. See the
- * apr_ldap_set_option() APR_LDAP_OPT_TLS_CERT option for details.
+ * ap_ldap_set_option() AP_LDAP_OPT_TLS_CERT option for details.
  * @param result_err The returned result
  */
-APR_DECLARE_LDAP(int) apr_ldap_ssl_init(apr_pool_t *pool,
-                                        const char *cert_auth_file,
-                                        int cert_file_type,
-                                        apr_ldap_err_t **result_err);
+MODLDAP_DECLARE(int) ap_ldap_ssl_init(apr_pool_t *pool,
+                                      const char *cert_auth_file,
+                                      int cert_file_type,
+                                      ap_ldap_err_t **result_err);
 
 /**
- * APR LDAP SSL De-Initialise function
+ * MODLDAP SSL De-Initialise function
  *
  * This function tears down any SSL certificate setup previously
- * set using apr_ldap_ssl_init(). It should be called to clean
+ * set using ap_ldap_ssl_init(). It should be called to clean
  * up if a graceful restart of a service is attempted.
- * @todo currently we do not check whether apr_ldap_ssl_init()
+ * @todo currently we do not check whether ap_ldap_ssl_init()
  * has been called first - we probably should.
  */
-APR_DECLARE_LDAP(int) apr_ldap_ssl_deinit(void);
+MODLDAP_DECLARE(int) ap_ldap_ssl_deinit(void);
 
 /**
- * APR LDAP initialise function
+ * MODLDAP initialise function
  *
  * This function is responsible for initialising an LDAP
  * connection in a toolkit independant way. It does the
@@ -118,14 +118,14 @@ APR_DECLARE_LDAP(int) apr_ldap_ssl_deini
  * toolkit supports it, the following values are accepted for
  * secure:
  *
- * APR_LDAP_NONE: No encryption
- * APR_LDAP_SSL: SSL encryption (ldaps://)
- * APR_LDAP_STARTTLS: Force STARTTLS on ldap://
+ * AP_LDAP_NONE: No encryption
+ * AP_LDAP_SSL: SSL encryption (ldaps://)
+ * AP_LDAP_STARTTLS: Force STARTTLS on ldap://
  * @remark The Novell toolkit is only able to set the SSL mode via this
  * function. To work around this limitation, set the SSL mode here if no
  * per connection client certificates are present, otherwise set secure
- * APR_LDAP_NONE here, then set the per connection client certificates,
- * followed by setting the SSL mode via apr_ldap_set_option(). As Novell
+ * AP_LDAP_NONE here, then set the per connection client certificates,
+ * followed by setting the SSL mode via ap_ldap_set_option(). As Novell
  * does not support per connection client certificates, this problem is
  * worked around while still being compatible with other LDAP toolkits.
  * @param pool The pool to use
@@ -136,30 +136,30 @@ APR_DECLARE_LDAP(int) apr_ldap_ssl_deini
  * @param secure The security mode to set
  * @param result_err The returned result
  */
-APR_DECLARE_LDAP(int) apr_ldap_init(apr_pool_t *pool,
-                                    LDAP **ldap,
-                                    const char *hostname,
-                                    int portno,
-                                    int secure,
-                                    apr_ldap_err_t **result_err);
+MODLDAP_DECLARE(int) ap_ldap_init(apr_pool_t *pool,
+                                  LDAP **ldap,
+                                  const char *hostname,
+                                  int portno,
+                                  int secure,
+                                  ap_ldap_err_t **result_err);
 
 /**
- * APR LDAP info function
+ * MODLDAP info function
  *
  * This function returns a string describing the LDAP toolkit
  * currently in use. The string is placed inside result_err->reason.
  * @param pool The pool to use
  * @param result_err The returned result
  */
-APR_DECLARE_LDAP(int) apr_ldap_info(apr_pool_t *pool,
-                                    apr_ldap_err_t **result_err);
+MODLDAP_DECLARE(int) ap_ldap_info(apr_pool_t *pool,
+                                  ap_ldap_err_t **result_err);
 
 #ifdef __cplusplus
 }
 #endif
 
-#endif /* APR_HAS_LDAP */
+#endif /* AP_HAS_LDAP */
 
 /** @} */
 
-#endif /* APR_LDAP_URL_H */
+#endif /* AP_LDAP_URL_H */

Copied: httpd/httpd/trunk/include/ap_ldap_option.h (from r1128716, apr/apr/trunk/include/apr_ldap_option.h)
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/ap_ldap_option.h?p2=httpd/httpd/trunk/include/ap_ldap_option.h&p1=apr/apr/trunk/include/apr_ldap_option.h&r1=1128716&r2=1129808&rev=1129808&view=diff
==============================================================================
--- apr/apr/trunk/include/apr_ldap_option.h (original)
+++ httpd/httpd/trunk/include/ap_ldap_option.h Tue May 31 17:10:11 2011
@@ -15,20 +15,20 @@
  */
 
 /**
- * @file apr_ldap_option.h
- * @brief  APR-UTIL LDAP ldap_*_option() functions
+ * @file ap_ldap_option.h
+ * @brief MODLDAP ldap_*_option() functions
  */
-#ifndef APR_LDAP_OPTION_H
-#define APR_LDAP_OPTION_H
+#ifndef AP_LDAP_OPTION_H
+#define AP_LDAP_OPTION_H
 
 /**
- * @addtogroup APR_Util_LDAP
+ * @addtogroup AP_Util_LDAP
  * @{
  */
 
-#include "apr_ldap.h"
+#include "ap_ldap.h"
 
-#if APR_HAS_LDAP
+#if AP_HAS_LDAP
 
 #ifdef __cplusplus
 extern "C" {
@@ -36,42 +36,42 @@ extern "C" {
 
 /*
  * The following defines handle the different TLS certificate
- * options available. If these options are missing, APR will try and
+ * options available. If these options are missing, this API
  * emulate support for this using the deprecated ldap_start_tls_s()
  * function.
  */
 /**
- * Set SSL mode to one of APR_LDAP_NONE, APR_LDAP_SSL, APR_LDAP_STARTTLS
- * or APR_LDAP_STOPTLS.
+ * Set SSL mode to one of AP_LDAP_NONE, AP_LDAP_SSL, AP_LDAP_STARTTLS
+ * or AP_LDAP_STOPTLS.
  */
-#define APR_LDAP_OPT_TLS 0x6fff
+#define AP_LDAP_OPT_TLS 0x6fff
 /**
  * Set zero or more CA certificates, client certificates or private
  * keys globally, or per connection (where supported).
  */
-#define APR_LDAP_OPT_TLS_CERT 0x6ffe
+#define AP_LDAP_OPT_TLS_CERT 0x6ffe
 /**
  * Set the LDAP library to no verify the server certificate.  This means
  * all servers are considered trusted.
  */
-#define APR_LDAP_OPT_VERIFY_CERT 0x6ffd
+#define AP_LDAP_OPT_VERIFY_CERT 0x6ffd
 /**
  * Set the LDAP library to indicate if referrals should be chased during
  * LDAP searches.
  */
-#define APR_LDAP_OPT_REFERRALS 0x6ffc
+#define AP_LDAP_OPT_REFERRALS 0x6ffc
 /**
  * Set the LDAP library to indicate a maximum number of referral hops to
  * chase before giving up on the search.
  */
-#define APR_LDAP_OPT_REFHOPLIMIT 0x6ffb
+#define AP_LDAP_OPT_REFHOPLIMIT 0x6ffb
 
 /**
  * Structures for the apr_set_option() cases
  */
 
 /**
- * APR_LDAP_OPT_TLS_CERT
+ * AP_LDAP_OPT_TLS_CERT
  *
  * This structure includes possible options to set certificates on
  * system initialisation. Different SDKs have different certificate
@@ -81,19 +81,19 @@ extern "C" {
  * Netscape:
  * Needs the CA cert database (cert7.db), the client cert database (key3.db)
  * and the security module file (secmod.db) set at the system initialisation
- * time. Three types are supported: APR_LDAP_CERT7_DB, APR_LDAP_KEY3_DB and
- * APR_LDAP_SECMOD.
+ * time. Three types are supported: AP_LDAP_CERT7_DB, AP_LDAP_KEY3_DB and
+ * AP_LDAP_SECMOD.
  *
  * To specify a client cert connection, a certificate nickname needs to be
- * provided with a type of APR_LDAP_CERT.
+ * provided with a type of AP_LDAP_CERT.
  * int ldapssl_enable_clientauth( LDAP *ld, char *keynickname,
  * char *keypasswd, char *certnickname );
  * keynickname is currently not used, and should be set to ""
  *
  * Novell:
  * Needs CA certificates and client certificates set at system initialisation
- * time. Three types are supported: APR_LDAP_CA*, APR_LDAP_CERT* and
- * APR_LDAP_KEY*.
+ * time. Three types are supported: AP_LDAP_CA*, AP_LDAP_CERT* and
+ * AP_LDAP_KEY*.
  *
  * Certificates cannot be specified per connection.
  *
@@ -111,66 +111,66 @@ extern "C" {
  *
  * OpenSSL:
  * Needs one or more CA certificates to be set at system initialisation time
- * with a type of APR_LDAP_CA*.
+ * with a type of AP_LDAP_CA*.
  *
  * May have one or more client certificates set per connection with a type of
- * APR_LDAP_CERT*, and keys with APR_LDAP_KEY*.
+ * AP_LDAP_CERT*, and keys with AP_LDAP_KEY*.
  */
 /** CA certificate type unknown */
-#define APR_LDAP_CA_TYPE_UNKNOWN    0
+#define AP_LDAP_CA_TYPE_UNKNOWN    0
 /** binary DER encoded CA certificate */
-#define APR_LDAP_CA_TYPE_DER        1
+#define AP_LDAP_CA_TYPE_DER        1
 /** PEM encoded CA certificate */
-#define APR_LDAP_CA_TYPE_BASE64     2
+#define AP_LDAP_CA_TYPE_BASE64     2
 /** Netscape/Mozilla cert7.db CA certificate database */
-#define APR_LDAP_CA_TYPE_CERT7_DB   3
+#define AP_LDAP_CA_TYPE_CERT7_DB   3
 /** Netscape/Mozilla secmod file */
-#define APR_LDAP_CA_TYPE_SECMOD     4
+#define AP_LDAP_CA_TYPE_SECMOD     4
 /** Client certificate type unknown */
-#define APR_LDAP_CERT_TYPE_UNKNOWN  5
+#define AP_LDAP_CERT_TYPE_UNKNOWN  5
 /** binary DER encoded client certificate */
-#define APR_LDAP_CERT_TYPE_DER      6
+#define AP_LDAP_CERT_TYPE_DER      6
 /** PEM encoded client certificate */
-#define APR_LDAP_CERT_TYPE_BASE64   7
+#define AP_LDAP_CERT_TYPE_BASE64   7
 /** Netscape/Mozilla key3.db client certificate database */
-#define APR_LDAP_CERT_TYPE_KEY3_DB  8
+#define AP_LDAP_CERT_TYPE_KEY3_DB  8
 /** Netscape/Mozilla client certificate nickname */
-#define APR_LDAP_CERT_TYPE_NICKNAME 9
+#define AP_LDAP_CERT_TYPE_NICKNAME 9
 /** Private key type unknown */
-#define APR_LDAP_KEY_TYPE_UNKNOWN   10
+#define AP_LDAP_KEY_TYPE_UNKNOWN   10
 /** binary DER encoded private key */
-#define APR_LDAP_KEY_TYPE_DER       11
+#define AP_LDAP_KEY_TYPE_DER       11
 /** PEM encoded private key */
-#define APR_LDAP_KEY_TYPE_BASE64    12
+#define AP_LDAP_KEY_TYPE_BASE64    12
 /** PKCS#12 encoded client certificate */
-#define APR_LDAP_CERT_TYPE_PFX      13
+#define AP_LDAP_CERT_TYPE_PFX      13
 /** PKCS#12 encoded private key */
-#define APR_LDAP_KEY_TYPE_PFX       14
+#define AP_LDAP_KEY_TYPE_PFX       14
 /** Openldap directory full of base64-encoded cert 
  * authorities with hashes in corresponding .0 directory
  */
-#define APR_LDAP_CA_TYPE_CACERTDIR_BASE64 15
+#define AP_LDAP_CA_TYPE_CACERTDIR_BASE64 15
 
 
 /**
  * Certificate structure.
  *
  * This structure is used to store certificate details. An array of
- * these structures is passed to apr_ldap_set_option() to set CA
+ * these structures is passed to ap_ldap_set_option() to set CA
  * and client certificates.
- * @param type Type of certificate APR_LDAP_*_TYPE_*
+ * @param type Type of certificate AP_LDAP_*_TYPE_*
  * @param path Path, file or nickname of the certificate
  * @param password Optional password, can be NULL
  */
-typedef struct apr_ldap_opt_tls_cert_t apr_ldap_opt_tls_cert_t;
-struct apr_ldap_opt_tls_cert_t {
+typedef struct ap_ldap_opt_tls_cert_t ap_ldap_opt_tls_cert_t;
+struct ap_ldap_opt_tls_cert_t {
     int type;
     const char *path;
     const char *password;
 };
 
 /**
- * APR_LDAP_OPT_TLS
+ * AP_LDAP_OPT_TLS
  *
  * This sets the SSL level on the LDAP handle.
  *
@@ -194,16 +194,16 @@ struct apr_ldap_opt_tls_cert_t {
  */
 
 /** No encryption */
-#define APR_LDAP_NONE 0
+#define AP_LDAP_NONE 0
 /** SSL encryption (ldaps://) */
-#define APR_LDAP_SSL 1
+#define AP_LDAP_SSL 1
 /** TLS encryption (STARTTLS) */
-#define APR_LDAP_STARTTLS 2
+#define AP_LDAP_STARTTLS 2
 /** end TLS encryption (STOPTLS) */
-#define APR_LDAP_STOPTLS 3
+#define AP_LDAP_STOPTLS 3
 
 /**
- * APR LDAP get option function
+ * MODLDAP get option function
  *
  * This function gets option values from a given LDAP session if
  * one was specified. It maps to the native ldap_get_option() function.
@@ -211,17 +211,17 @@ struct apr_ldap_opt_tls_cert_t {
  * @param ldap The LDAP handle
  * @param option The LDAP_OPT_* option to return
  * @param outvalue The value returned (if any)
- * @param result_err The apr_ldap_err_t structure contained detailed results
+ * @param result_err The ap_ldap_err_t structure contained detailed results
  *        of the operation.
  */
-APR_DECLARE_LDAP(int) apr_ldap_get_option(apr_pool_t *pool,
-                                          LDAP *ldap,
-                                          int option,
-                                          void *outvalue,
-                                          apr_ldap_err_t **result_err);
+MODLDAP_DECLARE(int) ap_ldap_get_option(apr_pool_t *pool,
+                                        LDAP *ldap,
+                                        int option,
+                                        void *outvalue,
+                                        ap_ldap_err_t **result_err);
 
 /**
- * APR LDAP set option function
+ * MODLDAP set option function
  * 
  * This function sets option values to a given LDAP session if
  * one was specified. It maps to the native ldap_set_option() function.
@@ -233,22 +233,22 @@ APR_DECLARE_LDAP(int) apr_ldap_get_optio
  * @param ldap The LDAP handle
  * @param option The LDAP_OPT_* option to set
  * @param invalue The value to set
- * @param result_err The apr_ldap_err_t structure contained detailed results
+ * @param result_err The ap_ldap_err_t structure contained detailed results
  *        of the operation.
  */
-APR_DECLARE_LDAP(int) apr_ldap_set_option(apr_pool_t *pool,
-                                          LDAP *ldap,
-                                          int option,
-                                          const void *invalue,
-                                          apr_ldap_err_t **result_err);
+MODLDAP_DECLARE(int) ap_ldap_set_option(apr_pool_t *pool,
+                                        LDAP *ldap,
+                                        int option,
+                                        const void *invalue,
+                                        ap_ldap_err_t **result_err);
 
 #ifdef __cplusplus
 }
 #endif
 
-#endif /* APR_HAS_LDAP */
+#endif /* AP_HAS_LDAP */
 
 /** @} */
 
-#endif /* APR_LDAP_OPTION_H */
+#endif /* AP_LDAP_OPTION_H */
 

Copied: httpd/httpd/trunk/include/ap_ldap_rebind.h (from r1128716, apr/apr/trunk/include/apr_ldap_rebind.h)
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/ap_ldap_rebind.h?p2=httpd/httpd/trunk/include/ap_ldap_rebind.h&p1=apr/apr/trunk/include/apr_ldap_rebind.h&r1=1128716&r2=1129808&rev=1129808&view=diff
==============================================================================
--- apr/apr/trunk/include/apr_ldap_rebind.h (original)
+++ httpd/httpd/trunk/include/ap_ldap_rebind.h Tue May 31 17:10:11 2011
@@ -15,13 +15,13 @@
  */
 
 /**
- * The APR LDAP rebind functions provide an implementation of
+ * The MODLDAP rebind functions provide an implementation of
  * a rebind procedure that can be used to allow clients to chase referrals,
  * using the same credentials used to log in originally.
  *
  * Use of this implementation is optional.
  *
- * @file apr_ldap_rebind.h
+ * @file ap_ldap_rebind.h
  * @brief Apache LDAP library
  */
 
@@ -29,30 +29,30 @@
 #define APU_LDAP_REBIND_H
 
 /**
- * @addtogroup APR_Util_LDAP
+ * @addtogroup AP_Util_LDAP
  * @{
  **/
 
 #if defined(DOXYGEN)
-#include "apr_ldap.h"
+#include "ap_ldap.h"
 #endif
 
 /*
  * Handle the case when LDAP is enabled
  */
-#if APR_HAS_LDAP
+#if AP_HAS_LDAP
 
 /**
- * APR LDAP initialize rebind lock
+ * MODLDAP initialize rebind lock
  *
  * This function creates the lock for controlling access to the xref list..
  * @param pool Pool to use when creating the xref_lock.
  */
-APR_DECLARE_LDAP(apr_status_t) apr_ldap_rebind_init(apr_pool_t *pool);
+MODLDAP_DECLARE(apr_status_t) ap_ldap_rebind_init(apr_pool_t *pool);
 
 
 /**
- * APR LDAP rebind_add function
+ * MODLDAP rebind_add function
  *
  * This function creates a cross reference entry for the specified ldap
  * connection. The rebind callback function will look up this ldap 
@@ -62,7 +62,7 @@ APR_DECLARE_LDAP(apr_status_t) apr_ldap_
  * This function will add the callback to the LDAP handle passed in.
  *
  * A cleanup is registered within the pool provided to remove this
- * entry when the pool is removed. Alternatively apr_ldap_rebind_remove()
+ * entry when the pool is removed. Alternatively ap_ldap_rebind_remove()
  * can be called to explicitly remove the entry at will.
  *
  * @param pool The pool to use
@@ -72,13 +72,13 @@ APR_DECLARE_LDAP(apr_status_t) apr_ldap_
  * @param bindPW The bind Password to be used for any binds while 
  *               chasing referrals on this ldap connection.
  */
-APR_DECLARE_LDAP(apr_status_t) apr_ldap_rebind_add(apr_pool_t *pool,
-                                                   LDAP *ld,
-                                                   const char *bindDN,
-                                                   const char *bindPW);
+MODLDAP_DECLARE(apr_status_t) ap_ldap_rebind_add(apr_pool_t *pool,
+                                                 LDAP *ld,
+                                                 const char *bindDN,
+                                                 const char *bindPW);
 
 /**
- * APR LDAP rebind_remove function
+ * MODLDAP rebind_remove function
  *
  * This function removes the rebind cross reference entry for the
  * specified ldap connection.
@@ -88,9 +88,9 @@ APR_DECLARE_LDAP(apr_status_t) apr_ldap_
  *
  * @param ld The LDAP connectionhandle
  */
-APR_DECLARE_LDAP(apr_status_t) apr_ldap_rebind_remove(LDAP *ld);
+MODLDAP_DECLARE(apr_status_t) ap_ldap_rebind_remove(LDAP *ld);
 
-#endif /* APR_HAS_LDAP */
+#endif /* AP_HAS_LDAP */
 
 /** @} */
 

Copied: httpd/httpd/trunk/include/ap_ldap_url.h (from r1128716, apr/apr/trunk/include/apr_ldap_url.h)
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/ap_ldap_url.h?p2=httpd/httpd/trunk/include/ap_ldap_url.h&p1=apr/apr/trunk/include/apr_ldap_url.h&r1=1128716&r2=1129808&rev=1129808&view=diff
==============================================================================
--- apr/apr/trunk/include/apr_ldap_url.h (original)
+++ httpd/httpd/trunk/include/ap_ldap_url.h Tue May 31 17:10:11 2011
@@ -15,22 +15,22 @@
  */
 
 /**
- * @file apr_ldap_url.h
- * @brief  APR-UTIL LDAP ldap_init() functions
+ * @file ap_ldap_url.h
+ * @brief MODLDAP ldap_init() functions
  */
-#ifndef APR_LDAP_URL_H
-#define APR_LDAP_URL_H
+#ifndef AP_LDAP_URL_H
+#define AP_LDAP_URL_H
 
 /**
- * @addtogroup APR_Util_LDAP
+ * @addtogroup AP_Util_LDAP
  * @{
  */
 
 #if defined(DOXYGEN)
-#include "apr_ldap.h"
+#include "ap_ldap.h"
 #endif
 
-#if APR_HAS_LDAP
+#if AP_HAS_LDAP
 
 #include "apu.h"
 #include "apr_pools.h"
@@ -40,8 +40,8 @@ extern "C" {
 #endif /* __cplusplus */
 
 /** Structure to access an exploded LDAP URL */
-typedef struct apr_ldap_url_desc_t {
-    struct  apr_ldap_url_desc_t  *lud_next;
+typedef struct ap_ldap_url_desc_t {
+    struct  ap_ldap_url_desc_t  *lud_next;
     char    *lud_scheme;
     char    *lud_host;
     int     lud_port;
@@ -51,39 +51,39 @@ typedef struct apr_ldap_url_desc_t {
     char    *lud_filter;
     char    **lud_exts;
     int     lud_crit_exts;
-} apr_ldap_url_desc_t;
+} ap_ldap_url_desc_t;
 
-#ifndef APR_LDAP_URL_SUCCESS
-#define APR_LDAP_URL_SUCCESS          0x00    /* Success */
-#define APR_LDAP_URL_ERR_MEM          0x01    /* can't allocate memory space */
-#define APR_LDAP_URL_ERR_PARAM        0x02    /* parameter is bad */
-#define APR_LDAP_URL_ERR_BADSCHEME    0x03    /* URL doesn't begin with "ldap[si]://" */
-#define APR_LDAP_URL_ERR_BADENCLOSURE 0x04    /* URL is missing trailing ">" */
-#define APR_LDAP_URL_ERR_BADURL       0x05    /* URL is bad */
-#define APR_LDAP_URL_ERR_BADHOST      0x06    /* host port is bad */
-#define APR_LDAP_URL_ERR_BADATTRS     0x07    /* bad (or missing) attributes */
-#define APR_LDAP_URL_ERR_BADSCOPE     0x08    /* scope string is invalid (or missing) */
-#define APR_LDAP_URL_ERR_BADFILTER    0x09    /* bad or missing filter */
-#define APR_LDAP_URL_ERR_BADEXTS      0x0a    /* bad or missing extensions */
+#ifndef AP_LDAP_URL_SUCCESS
+#define AP_LDAP_URL_SUCCESS          0x00    /* Success */
+#define AP_LDAP_URL_ERR_MEM          0x01    /* can't allocate memory space */
+#define AP_LDAP_URL_ERR_PARAM        0x02    /* parameter is bad */
+#define AP_LDAP_URL_ERR_BADSCHEME    0x03    /* URL doesn't begin with "ldap[si]://" */
+#define AP_LDAP_URL_ERR_BADENCLOSURE 0x04    /* URL is missing trailing ">" */
+#define AP_LDAP_URL_ERR_BADURL       0x05    /* URL is bad */
+#define AP_LDAP_URL_ERR_BADHOST      0x06    /* host port is bad */
+#define AP_LDAP_URL_ERR_BADATTRS     0x07    /* bad (or missing) attributes */
+#define AP_LDAP_URL_ERR_BADSCOPE     0x08    /* scope string is invalid (or missing) */
+#define AP_LDAP_URL_ERR_BADFILTER    0x09    /* bad or missing filter */
+#define AP_LDAP_URL_ERR_BADEXTS      0x0a    /* bad or missing extensions */
 #endif
 
 /**
  * Is this URL an ldap url? ldap://
  * @param url The url to test
  */
-APR_DECLARE(int) apr_ldap_is_ldap_url(const char *url);
+MODLDAP_DECLARE(int) ap_ldap_is_ldap_url(const char *url);
 
 /**
  * Is this URL an SSL ldap url? ldaps://
  * @param url The url to test
  */
-APR_DECLARE(int) apr_ldap_is_ldaps_url(const char *url);
+MODLDAP_DECLARE(int) ap_ldap_is_ldaps_url(const char *url);
 
 /**
  * Is this URL an ldap socket url? ldapi://
  * @param url The url to test
  */
-APR_DECLARE(int) apr_ldap_is_ldapi_url(const char *url);
+MODLDAP_DECLARE(int) ap_ldap_is_ldapi_url(const char *url);
 
 /**
  * Parse an LDAP URL.
@@ -92,10 +92,10 @@ APR_DECLARE(int) apr_ldap_is_ldapi_url(c
  * @param ludpp The structure to return the exploded URL
  * @param result_err The result structure of the operation
  */
-APR_DECLARE(int) apr_ldap_url_parse_ext(apr_pool_t *pool,
-                                        const char *url_in,
-                                        apr_ldap_url_desc_t **ludpp,
-                                        apr_ldap_err_t **result_err);
+MODLDAP_DECLARE(int) ap_ldap_url_parse_ext(apr_pool_t *pool,
+                                           const char *url_in,
+                                           ap_ldap_url_desc_t **ludpp,
+                                           ap_ldap_err_t **result_err);
 
 /**
  * Parse an LDAP URL.
@@ -104,17 +104,17 @@ APR_DECLARE(int) apr_ldap_url_parse_ext(
  * @param ludpp The structure to return the exploded URL
  * @param result_err The result structure of the operation
  */
-APR_DECLARE(int) apr_ldap_url_parse(apr_pool_t *pool,
-                                    const char *url_in,
-                                    apr_ldap_url_desc_t **ludpp,
-                                    apr_ldap_err_t **result_err);
+MODLDAP_DECLARE(int) ap_ldap_url_parse(apr_pool_t *pool,
+                                       const char *url_in,
+                                       ap_ldap_url_desc_t **ludpp,
+                                       ap_ldap_err_t **result_err);
 
 #ifdef __cplusplus
 }
 #endif
 
-#endif /* APR_HAS_LDAP */
+#endif /* AP_HAS_LDAP */
 
 /** @} */
 
-#endif /* APR_LDAP_URL_H */
+#endif /* AP_LDAP_URL_H */

Modified: httpd/httpd/trunk/include/util_ldap.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/util_ldap.h?rev=1129808&r1=1129807&r2=1129808&view=diff
==============================================================================
--- httpd/httpd/trunk/include/util_ldap.h (original)
+++ httpd/httpd/trunk/include/util_ldap.h Tue May 31 17:10:11 2011
@@ -28,10 +28,10 @@
 #include "apr_thread_rwlock.h"
 #include "apr_tables.h"
 #include "apr_time.h"
-#include "apr_ldap.h"
-#include "apr_ldap_rebind.h"
+#include "ap_ldap.h"
+#include "ap_ldap_rebind.h"
 
-#if APR_HAS_MICROSOFT_LDAPSDK
+#if AP_HAS_MICROSOFT_LDAPSDK
 #define AP_LDAP_IS_SERVER_DOWN(s)                ((s) == LDAP_SERVER_DOWN \
                 ||(s) == LDAP_UNAVAILABLE)
 #else
@@ -44,7 +44,7 @@
 #endif
 
 /* this whole thing disappears if LDAP is not enabled */
-#if APR_HAS_LDAP
+#if AP_HAS_LDAP
 
 /* Apache header files */
 #include "ap_config.h"
@@ -194,7 +194,7 @@ APR_DECLARE_OPTIONAL_FN(int,uldap_connec
  *            that was connected.
  * @tip This function unbinds from the LDAP server, and clears ldc->ldap.
  *      It is possible to rebind to this server again using the same ldc
- *      structure, using apr_ldap_open_connection().
+ *      structure, using ap_ldap_open_connection().
  * @fn util_ldap_close_connection(util_ldap_connection_t *ldc)
  */
 APR_DECLARE_OPTIONAL_FN(void,uldap_connection_close,(util_ldap_connection_t *ldc));
@@ -222,7 +222,7 @@ APR_DECLARE_OPTIONAL_FN(apr_status_t,uld
  * @tip Once a connection is found and returned, a lock will be acquired to
  *      lock that particular connection, so that another thread does not try and
  *      use this connection while it is busy. Once you are finished with a connection,
- *      apr_ldap_connection_close() must be called to release this connection.
+ *      ap_ldap_connection_close() must be called to release this connection.
  * @fn util_ldap_connection_t *util_ldap_connection_find(request_rec *r, const char *host, int port,
  *                                                           const char *binddn, const char *bindpw, deref_options deref,
  *                                                           int netscapessl, int starttls)
@@ -351,7 +351,7 @@ APR_DECLARE_OPTIONAL_FN(int,uldap_cache_
  */
 APR_DECLARE_OPTIONAL_FN(int,uldap_ssl_supported,(request_rec *r));
 
-/* from apr_ldap_cache.c */
+/* from ap_ldap_cache.c */
 
 /**
  * Init the LDAP cache
@@ -366,7 +366,7 @@ APR_DECLARE_OPTIONAL_FN(int,uldap_ssl_su
  */
 apr_status_t util_ldap_cache_init(apr_pool_t *pool, util_ldap_state_t *st);
 
-/* from apr_ldap_cache_mgr.c */
+/* from ap_ldap_cache_mgr.c */
 
 /**
  * Display formatted stats for cache
@@ -379,5 +379,5 @@ char *util_ald_cache_display(request_rec
 #ifdef __cplusplus
 }
 #endif
-#endif /* APR_HAS_LDAP */
+#endif /* AP_HAS_LDAP */
 #endif /* UTIL_LDAP_H */

Modified: httpd/httpd/trunk/modules/aaa/config.m4
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/aaa/config.m4?rev=1129808&r1=1129807&r2=1129808&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/aaa/config.m4 (original)
+++ httpd/httpd/trunk/modules/aaa/config.m4 Tue May 31 17:10:11 2011
@@ -39,11 +39,12 @@ APACHE_MODULE(authz_core, core authoriza
 
 dnl LDAP authentication module. This module has both the authn and authz
 dnl modules in one, so as to share the LDAP server config directives.
+dnl XXX FIXME
 APACHE_MODULE(authnz_ldap, LDAP based authentication, , , no, [
   if test -z "$apu_config" ; then
-      MOD_AUTHNZ_LDAP_LDADD="`$apr_config --ldap-libs`"
+      MOD_AUTHNZ_LDAP_LDADD="$LDADD_ldap"
   else
-      MOD_AUTHNZ_LDAP_LDADD="`$apu_config --ldap-libs`"
+      MOD_AUTHNZ_LDAP_LDADD="$LDADD_ldap"
   fi
   AC_SUBST(MOD_AUTHNZ_LDAP_LDADD)
 ])

Modified: httpd/httpd/trunk/modules/aaa/mod_authnz_ldap.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/aaa/mod_authnz_ldap.c?rev=1129808&r1=1129807&r2=1129808&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/aaa/mod_authnz_ldap.c (original)
+++ httpd/httpd/trunk/modules/aaa/mod_authnz_ldap.c Tue May 31 17:10:11 2011
@@ -34,8 +34,8 @@
 
 #include <ctype.h>
 
-#if !APR_HAS_LDAP
-#error mod_authnz_ldap requires APR-util to have LDAP support built in. To fix add --with-ldap to ./configure.
+#if !AP_HAS_LDAP
+#error mod_authnz_ldap requires LDAP support. To fix add --with-ldap to ./configure.
 #endif
 
 static char *default_attributes[3] = { "member", "uniqueMember", NULL };
@@ -256,7 +256,7 @@ static void authn_ldap_build_filter(char
      * LDAP filter metachars are escaped.
      */
     filtbuf_end = filtbuf + FILTER_LENGTH - 1;
-#if APR_HAS_MICROSOFT_LDAPSDK
+#if AP_HAS_MICROSOFT_LDAPSDK
     for (p = user, q=filtbuf + strlen(filtbuf);
          *p && q < filtbuf_end; ) {
         if (strchr("*()\\", *p) != NULL) {
@@ -1333,12 +1333,12 @@ static const char *mod_auth_ldap_parse_u
                                     const char *mode)
 {
     int rc;
-    apr_ldap_url_desc_t *urld;
-    apr_ldap_err_t *result;
+    ap_ldap_url_desc_t *urld;
+    ap_ldap_err_t *result;
 
     authn_ldap_config_t *sec = config;
 
-    rc = apr_ldap_url_parse(cmd->pool, url, &(urld), &(result));
+    rc = ap_ldap_url_parse(cmd->pool, url, &(urld), &(result));
     if (rc != APR_SUCCESS) {
         return result->reason;
     }
@@ -1391,13 +1391,13 @@ static const char *mod_auth_ldap_parse_u
 
     if (mode) {
         if (0 == strcasecmp("NONE", mode)) {
-            sec->secure = APR_LDAP_NONE;
+            sec->secure = AP_LDAP_NONE;
         }
         else if (0 == strcasecmp("SSL", mode)) {
-            sec->secure = APR_LDAP_SSL;
+            sec->secure = AP_LDAP_SSL;
         }
         else if (0 == strcasecmp("TLS", mode) || 0 == strcasecmp("STARTTLS", mode)) {
-            sec->secure = APR_LDAP_STARTTLS;
+            sec->secure = AP_LDAP_STARTTLS;
         }
         else {
             return "Invalid LDAP connection mode setting: must be one of NONE, "
@@ -1409,7 +1409,7 @@ static const char *mod_auth_ldap_parse_u
       */
     if (strncasecmp(url, "ldaps", 5) == 0)
     {
-        sec->secure = APR_LDAP_SSL;
+        sec->secure = AP_LDAP_SSL;
         sec->port = urld->lud_port? urld->lud_port : LDAPS_PORT;
     }
     else
@@ -1431,7 +1431,7 @@ static const char *mod_auth_ldap_parse_u
                   urld->lud_scope == LDAP_SCOPE_BASE? "base" :
                   urld->lud_scope == LDAP_SCOPE_ONELEVEL? "onelevel" : "unknown"),
                  urld->lud_filter,
-                 sec->secure == APR_LDAP_SSL  ? "using SSL": "not using SSL"
+                 sec->secure == AP_LDAP_SSL  ? "using SSL": "not using SSL"
                  );
 
     return NULL;

Copied: httpd/httpd/trunk/modules/ldap/ap_ldap_init.c (from r1128716, apr/apr/trunk/ldap/apr_ldap_init.c)
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ldap/ap_ldap_init.c?p2=httpd/httpd/trunk/modules/ldap/ap_ldap_init.c&p1=apr/apr/trunk/ldap/apr_ldap_init.c&r1=1128716&r2=1129808&rev=1129808&view=diff
==============================================================================
--- apr/apr/trunk/ldap/apr_ldap_init.c (original)
+++ httpd/httpd/trunk/modules/ldap/ap_ldap_init.c Tue May 31 17:10:11 2011
@@ -15,7 +15,7 @@
  */
 
 /*
- * apr_ldap_init.c: LDAP v2/v3 common initialise
+ * ap_ldap_init.c: LDAP v2/v3 common initialise
  * 
  * Original code from auth_ldap module for Apache v1.3:
  * Copyright 1998, 1999 Enbridge Pipelines Inc. 
@@ -24,19 +24,14 @@
 
 #include "apr.h"
 #include "apu.h"
-#include "apr_private.h"
 
-#if APR_HAVE_MODULAR_DSO
-#define APU_DSO_LDAP_BUILD
-#endif
-
-#include "apr_ldap.h"
-#include "apu_internal.h"
+#include "ap_config.h"
+#include "ap_ldap.h"
 #include "apr_errno.h"
 #include "apr_pools.h"
 #include "apr_strings.h"
 
-#if APR_HAS_LDAP
+#if AP_HAS_LDAP
 
 /**
  * APR LDAP SSL Initialise function
@@ -48,7 +43,7 @@
  * of certificates via this method has been deprecated and will be removed in
  * APR v2.0.
  *
- * The apr_ldap_set_option() function with the APR_LDAP_OPT_TLS_CERT option
+ * The ap_ldap_set_option() function with the AP_LDAP_OPT_TLS_CERT option
  * should be used instead to set certificates.
  *
  * If SSL support is not available on this platform, or a problem
@@ -56,28 +51,28 @@
  * will return APR_EGENERAL. Further LDAP specific error information
  * can be found in result_err.
  */
-APR_DECLARE_LDAP(int) apr_ldap_ssl_init(apr_pool_t *pool,
-                                        const char *cert_auth_file,
-                                        int cert_file_type,
-                                        apr_ldap_err_t **result_err)
+MODLDAP_DECLARE(int) ap_ldap_ssl_init(apr_pool_t *pool,
+                                      const char *cert_auth_file,
+                                      int cert_file_type,
+                                      ap_ldap_err_t **result_err)
 {
 
-    apr_ldap_err_t *result = (apr_ldap_err_t *)apr_pcalloc(pool, sizeof(apr_ldap_err_t));
+    ap_ldap_err_t *result = (ap_ldap_err_t *)apr_pcalloc(pool, sizeof(ap_ldap_err_t));
     *result_err = result;
 
-#if APR_HAS_LDAP_SSL /* compiled with ssl support */
+#if AP_HAS_LDAP_SSL /* compiled with ssl support */
 
     /* Novell */
-#if APR_HAS_NOVELL_LDAPSDK
+#if AP_HAS_NOVELL_LDAPSDK
     ldapssl_client_init(NULL, NULL);
 #endif
 
     /* if a certificate was specified, set it */
     if (cert_auth_file) {
-        apr_ldap_opt_tls_cert_t *cert = (apr_ldap_opt_tls_cert_t *)apr_pcalloc(pool, sizeof(apr_ldap_opt_tls_cert_t));
+        ap_ldap_opt_tls_cert_t *cert = (ap_ldap_opt_tls_cert_t *)apr_pcalloc(pool, sizeof(ap_ldap_opt_tls_cert_t));
         cert->type = cert_file_type;
         cert->path = cert_auth_file;
-        return apr_ldap_set_option(pool, NULL, APR_LDAP_OPT_TLS_CERT, (void *)cert, result_err);
+        return ap_ldap_set_option(pool, NULL, AP_LDAP_OPT_TLS_CERT, (void *)cert, result_err);
     }
 
 #else  /* not compiled with SSL Support */
@@ -86,7 +81,7 @@ APR_DECLARE_LDAP(int) apr_ldap_ssl_init(
                          "Not built with SSL support";
         result->rc = -1;
     }
-#endif /* APR_HAS_LDAP_SSL */
+#endif /* AP_HAS_LDAP_SSL */
 
     if (result->rc != -1) {
         result->msg = ldap_err2string(result->rc);
@@ -105,18 +100,18 @@ APR_DECLARE_LDAP(int) apr_ldap_ssl_init(
  * APR LDAP SSL De-Initialise function
  *
  * This function tears down any SSL certificate setup previously
- * set using apr_ldap_ssl_init(). It should be called to clean
+ * set using ap_ldap_ssl_init(). It should be called to clean
  * up if a graceful restart of a service is attempted.
  *
  * This function only does anything on Netware.
  *
- * @todo currently we do not check whether apr_ldap_ssl_init()
+ * @todo currently we do not check whether ap_ldap_ssl_init()
  * has been called first - should we?
  */
-APR_DECLARE_LDAP(int) apr_ldap_ssl_deinit(void)
+MODLDAP_DECLARE(int) ap_ldap_ssl_deinit(void)
 {
 
-#if APR_HAS_LDAP_SSL && APR_HAS_LDAPSSL_CLIENT_DEINIT
+#if AP_HAS_LDAP_SSL && AP_HAS_LDAPSSL_CLIENT_DEINIT
     ldapssl_client_deinit();
 #endif
     return APR_SUCCESS;
@@ -140,34 +135,34 @@ APR_DECLARE_LDAP(int) apr_ldap_ssl_deini
  * toolkit supports it, the following values are accepted for
  * secure:
  *
- * APR_LDAP_NONE: No encryption
- * APR_LDAP_SSL: SSL encryption (ldaps://)
- * APR_LDAP_STARTTLS: Force STARTTLS on ldap://
- */
-APR_DECLARE_LDAP(int) apr_ldap_init(apr_pool_t *pool,
-                                    LDAP **ldap,
-                                    const char *hostname,
-                                    int portno,
-                                    int secure,
-                                    apr_ldap_err_t **result_err)
+ * AP_LDAP_NONE: No encryption
+ * AP_LDAP_SSL: SSL encryption (ldaps://)
+ * AP_LDAP_STARTTLS: Force STARTTLS on ldap://
+ */
+MODLDAP_DECLARE(int) ap_ldap_init(apr_pool_t *pool,
+                                  LDAP **ldap,
+                                  const char *hostname,
+                                  int portno,
+                                  int secure,
+                                  ap_ldap_err_t **result_err)
 {
 
-    apr_ldap_err_t *result = (apr_ldap_err_t *)apr_pcalloc(pool, sizeof(apr_ldap_err_t));
+    ap_ldap_err_t *result = (ap_ldap_err_t *)apr_pcalloc(pool, sizeof(ap_ldap_err_t));
     *result_err = result;
 
-#if APR_HAS_LDAPSSL_INIT
+#if AP_HAS_LDAPSSL_INIT
     *ldap = ldapssl_init(hostname, portno, 0);
-#elif APR_HAS_LDAP_SSLINIT
+#elif AP_HAS_LDAP_SSLINIT
     *ldap = ldap_sslinit((char *)hostname, portno, 0);
 #else
     *ldap = ldap_init((char *)hostname, portno);
 #endif
     if (*ldap != NULL) {
-        return apr_ldap_set_option(pool, *ldap, APR_LDAP_OPT_TLS, &secure, result_err);
+        return ap_ldap_set_option(pool, *ldap, AP_LDAP_OPT_TLS, &secure, result_err);
     }
     else {
         /* handle the error case */
-        apr_ldap_err_t *result = (apr_ldap_err_t *)apr_pcalloc(pool, sizeof(apr_ldap_err_t));
+        ap_ldap_err_t *result = (ap_ldap_err_t *)apr_pcalloc(pool, sizeof(ap_ldap_err_t));
         *result_err = result;
 
         result->reason = "APR LDAP: Unable to initialize the LDAP connection";
@@ -184,10 +179,10 @@ APR_DECLARE_LDAP(int) apr_ldap_init(apr_
  * This function returns a string describing the LDAP toolkit
  * currently in use. The string is placed inside result_err->reason.
  */
-APR_DECLARE_LDAP(int) apr_ldap_info(apr_pool_t *pool,
-                                    apr_ldap_err_t **result_err)
+MODLDAP_DECLARE(int) ap_ldap_info(apr_pool_t *pool,
+                                  ap_ldap_err_t **result_err)
 {
-    apr_ldap_err_t *result = (apr_ldap_err_t *)apr_pcalloc(pool, sizeof(apr_ldap_err_t));
+    ap_ldap_err_t *result = (ap_ldap_err_t *)apr_pcalloc(pool, sizeof(ap_ldap_err_t));
     *result_err = result;
 
     result->reason = "APR LDAP: Built with "
@@ -197,23 +192,4 @@ APR_DECLARE_LDAP(int) apr_ldap_info(apr_
     
 }
 
-#if APR_HAVE_MODULAR_DSO
-
-/* For DSO builds, export the table of entry points into the apr_ldap DSO
- * See include/private/apu_internal.h for the corresponding declarations
- */
-APR_MODULE_DECLARE_DATA struct apr__ldap_dso_fntable apr__ldap_fns = {
-    apr_ldap_info,
-    apr_ldap_init,
-    apr_ldap_ssl_init,
-    apr_ldap_ssl_deinit,
-    apr_ldap_get_option,
-    apr_ldap_set_option,
-    apr_ldap_rebind_init,
-    apr_ldap_rebind_add,
-    apr_ldap_rebind_remove
-};
-
-#endif /* APR_HAVE_MODULAR_DSO */
-
-#endif /* APR_HAS_LDAP */
+#endif /* AP_HAS_LDAP */



Mime
View raw message