]> git.sur5r.net Git - openldap/commitdiff
Blindly fix TLS/SASL external interaction.
authorKurt Zeilenga <kurt@openldap.org>
Sun, 9 Sep 2001 03:42:26 +0000 (03:42 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Sun, 9 Sep 2001 03:42:26 +0000 (03:42 +0000)
libraries/libldap/cyrus.c
libraries/libldap/ldap-int.h
libraries/libldap/tls.c

index 20589a5a6a274cf1891fb057acecd5e1be9bac33..f813404fc71d3f8ee6a583eeea413d8b9cbca49e 100644 (file)
@@ -663,6 +663,7 @@ ldap_int_sasl_bind(
 int
 ldap_int_sasl_external(
        LDAP *ld,
+       LDAPConn *conn,
        const char * authid,
        ber_len_t ssf )
 {
@@ -670,11 +671,7 @@ ldap_int_sasl_external(
        sasl_conn_t *ctx;
        sasl_external_properties_t extprops;
 
-       if( ld->ld_defconn == NULL ) {
-               return LDAP_LOCAL_ERROR;
-       }
-
-       ctx = ld->ld_defconn->lconn_sasl_ctx;
+       ctx = conn->lconn_sasl_ctx;
 
        if ( ctx == NULL ) {
                return LDAP_LOCAL_ERROR;
index 80a66c5ae9f98295c06ae75085448ad7acc81f82..70e0417a7dfe9efe445eac213e829c95512538d7 100644 (file)
@@ -529,7 +529,8 @@ LDAP_F (int) ldap_int_sasl_open LDAP_P((
 LDAP_F (int) ldap_int_sasl_close LDAP_P(( LDAP *ld, LDAPConn *conn ));
 
 LDAP_F (int) ldap_int_sasl_external LDAP_P((
-       LDAP *ld, const char* authid, ber_len_t ssf ));
+       LDAP *ld, LDAPConn *conn,
+       const char* authid, ber_len_t ssf ));
 
 LDAP_F (int) ldap_int_sasl_get_option LDAP_P(( LDAP *ld,
        int option, void *arg ));
index 653caa3ee88578b974932e901d3e905b7af3d768..237708ab0d7be2e1de11b9b48fb5a17b26ee8c02 100644 (file)
@@ -1046,7 +1046,7 @@ int
 ldap_int_tls_start ( LDAP *ld, LDAPConn *conn, LDAPURLDesc *srv )
 {
        Sockbuf *sb = conn->lconn_sb;
-       void *ctx = ld->ld_defconn->lconn_tls_ctx;
+       /* void *ctx = ld->ld_defconn->lconn_tls_ctx; */
        char *host;
        void *ssl;
 
@@ -1090,7 +1090,7 @@ ldap_int_tls_start ( LDAP *ld, LDAPConn *conn, LDAPURLDesc *srv )
                ssf = ldap_pvt_tls_get_strength( ssl );
                authid = ldap_pvt_tls_get_peer( ssl );
 
-               (void) ldap_int_sasl_external( ld, authid, ssf );
+               (void) ldap_int_sasl_external( ld, conn, authid, ssf );
        }
 
        return LDAP_SUCCESS;