Commit 0ec14c8f authored by Graham Leggett's avatar Graham Leggett
Browse files

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
record is updated to show that the connection is no longer
bound.
PR:
Obtained from:
Submitted by:
Reviewed by:	bnicholes, minfrin, jim


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/APACHE_2_0_BRANCH@103721 13f79535-47bb-0310-9956-ffa450edef68
parent 4424a484
Loading
Loading
Loading
Loading
+6 −0
Changes for CHANGES: 6 added lines, 0 removed lines.
Original line number Diff line number Diff line
Changes with Apache 2.0.50
  *) 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
     record is updated to show that the connection is no longer
     bound. [Brad Nicholes]
  *) Ensure that lines in the request which are too long are 
     properly terminated before logging.
     [Tsurutani Naoki <turutani scphys.kyoto-u.ac.jp>]
+1 −10
Changes for STATUS: 1 added line, 10 removed lines.
Original line number Diff line number Diff line
APACHE 2.0 STATUS:                                              -*-text-*-
Last modified at [$Date: 2004/05/21 16:07:39 $]
Last modified at [$Date: 2004/05/21 20:02:20 $]

Release:

@@ -123,15 +123,6 @@ PATCHES TO BACKPORT FROM 2.1
       PR: 13511
       +1: jorton

    *) 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
       record is updated to show that the connection is no longer
       bound.
       modules/experimental/util_ldap.c: r1.27
       +1: bnicholes, jim
       +1: minfrin (confirmed fixes long standing timeout bug)
        
    *) mod_ssl: Fix potential SEGV in 'shmcb' session cache.
       modules/ssl/ssl_scache_shmcb.c: r1.26
       +1: madhum, jorton
+7 −3
Changes for modules/experimental/util_ldap.c: 7 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -333,9 +333,6 @@ LDAP_DECLARE(int) util_ldap_connection_open(request_rec *r,
            break;
    }

    ldc->bound = 1;
    ldc->reason = "LDAP: connection open successful";

    /* free the handle if there was an error
    */
    if (LDAP_SUCCESS != result)
@@ -345,6 +342,10 @@ LDAP_DECLARE(int) util_ldap_connection_open(request_rec *r,
        ldc->bound = 0;
        ldc->reason = "LDAP: ldap_simple_bind_s() failed";
    }
	else {
		ldc->bound = 1;
		ldc->reason = "LDAP: connection open successful";
	}

    return(result);
}
@@ -875,6 +876,9 @@ start_over:
    if (result != LDAP_SUCCESS) {
        ldc->reason = "ldap_simple_bind_s() to check user credentials failed";
        ldap_msgfree(res);
        ldap_unbind_s(ldc->ldap);
        ldc->ldap = NULL;
        ldc->bound = 0;
        return result;
    }
    else {