Commit f6b69e83 authored by Graham Leggett's avatar Graham Leggett
Browse files

Overhaul handling of LDAP error conditions, so that the util_ldap_*

functions leave the connections in a sane state after errors have
occurred.
PR:	27748, 17274, 17599, 18661, 21787, 24595, 24683, 27134, 27271
Obtained from:
Submitted by:
Reviewed by:	minfrin, jim, trawick, bnicholes


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/APACHE_2_0_BRANCH@103728 13f79535-47bb-0310-9956-ffa450edef68
parent ee2f33dd
Loading
Loading
Loading
Loading
+5 −0
Changes for CHANGES: 5 added lines, 0 removed lines.
Original line number Diff line number Diff line
Changes with Apache 2.0.50
  *) Overhaul handling of LDAP error conditions, so that the util_ldap_*
     functions leave the connections in a sane state after errors have
     occurred. PR 27748, 17274, 17599, 18661, 21787, 24595, 24683, 27134,
     27271 [Graham Leggett]
                                                                                
  *) mod_ldap calls ldap_simple_bind_s() to validate the user
     credentials.  If the bind fails, the connection is left
     in an unbound state.  Make sure that the ldap connection
+1 −12
Changes for STATUS: 1 added line, 12 removed lines.
Original line number Diff line number Diff line
APACHE 2.0 STATUS:                                              -*-text-*-
Last modified at [$Date: 2004/05/21 22:22:06 $]
Last modified at [$Date: 2004/05/21 22:42:55 $]

Release:

@@ -101,17 +101,6 @@ PATCHES TO BACKPORT FROM 2.1
       PR 24437 [Jess Holle <jessh@ptc.com>]
       +1: minfrin, jim, trawick, bnicholes

    *) Overhaul handling of LDAP error conditions, so that the util_ldap_*
       functions leave the connections in a sane state after errors have
       occurred.
       include/util_ldap.h r1.18
       modules/experimental/NWGNUauthldap r1.12
       modules/experimental/NWGNUutilldap r1.9
       modules/experimental/mod_auth_ldap.c r1.24
       modules/experimental/util_ldap.c r1.28
       PR 27748, 17274, 17599, 18661, 21787, 24595, 24683, 27134, 27271       
       +1: minfrin, jim, trawick, bnicholes

    *) RPM spec file changes: changed default dependancy to link to db4
       instead of db3. Fixed complaints about unpackaged files.
       build/rpm/httpd.spec.in 
+14 −3
Changes for include/util_ldap.h: 14 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -155,14 +155,25 @@ LDAP_DECLARE(int) util_ldap_connection_open(request_rec *r,
LDAP_DECLARE(void) util_ldap_connection_close(util_ldap_connection_t *ldc);

/**
 * Destroy a connection to an LDAP server
 * Unbind a connection to an LDAP server
 * @param ldc A structure containing the expanded details of the server
 *            that was connected.
 * @tip This function unbinds the LDAP connection, and disconnects from
 *      the server. It is used during error conditions, to bring the LDAP
 *      connection back to a known state.
 * @deffunc apr_status_t util_ldap_connection_unbind(util_ldap_connection_t *ldc)
 */
LDAP_DECLARE_NONSTD(apr_status_t) util_ldap_connection_unbind(void *param);

/**
 * Cleanup a connection to an LDAP server
 * @param ldc A structure containing the expanded details of the server
 *            that was connected.
 * @tip This function is registered with the pool cleanup to close down the
 *      LDAP connections when the server is finished with them.
 * @deffunc apr_status_t util_ldap_connection_destroy(util_ldap_connection_t *ldc)
 * @deffunc apr_status_t util_ldap_connection_cleanup(util_ldap_connection_t *ldc)
 */
LDAP_DECLARE_NONSTD(apr_status_t) util_ldap_connection_destroy(void *param);
LDAP_DECLARE_NONSTD(apr_status_t) util_ldap_connection_cleanup(void *param);

/**
 * Find a connection in a list of connections
+2 −1
Changes for modules/experimental/NWGNUauthldap: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -209,7 +209,8 @@ FILE_nlm_copyright =
FILES_nlm_Ximports = \
	util_ldap_connection_find \
	util_ldap_connection_close \
	util_ldap_connection_destroy \
	util_ldap_connection_unbind \
	util_ldap_connection_cleanup \
	util_ldap_cache_checkuserid \
	util_ldap_cache_compare \
	util_ldap_cache_comparedn \
+2 −1
Changes for modules/experimental/NWGNUutilldap: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -223,7 +223,8 @@ FILES_nlm_exports = \
	ldap_module \
	util_ldap_connection_find \
	util_ldap_connection_close \
	util_ldap_connection_destroy \
	util_ldap_connection_unbind \
	util_ldap_connection_cleanup \
	util_ldap_cache_checkuserid \
	util_ldap_cache_compare \
	util_ldap_cache_comparedn \
Loading