Blindly fix TLS/SASL external interaction.

This commit is contained in:
Kurt Zeilenga 2001-09-09 03:42:26 +00:00
parent 3c844f0225
commit 553d80cedd
3 changed files with 6 additions and 8 deletions

View File

@ -663,6 +663,7 @@ ldap_int_sasl_bind(
int int
ldap_int_sasl_external( ldap_int_sasl_external(
LDAP *ld, LDAP *ld,
LDAPConn *conn,
const char * authid, const char * authid,
ber_len_t ssf ) ber_len_t ssf )
{ {
@ -670,11 +671,7 @@ ldap_int_sasl_external(
sasl_conn_t *ctx; sasl_conn_t *ctx;
sasl_external_properties_t extprops; sasl_external_properties_t extprops;
if( ld->ld_defconn == NULL ) { ctx = conn->lconn_sasl_ctx;
return LDAP_LOCAL_ERROR;
}
ctx = ld->ld_defconn->lconn_sasl_ctx;
if ( ctx == NULL ) { if ( ctx == NULL ) {
return LDAP_LOCAL_ERROR; return LDAP_LOCAL_ERROR;

View 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_close LDAP_P(( LDAP *ld, LDAPConn *conn ));
LDAP_F (int) ldap_int_sasl_external LDAP_P(( 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, LDAP_F (int) ldap_int_sasl_get_option LDAP_P(( LDAP *ld,
int option, void *arg )); int option, void *arg ));

View File

@ -1046,7 +1046,7 @@ int
ldap_int_tls_start ( LDAP *ld, LDAPConn *conn, LDAPURLDesc *srv ) ldap_int_tls_start ( LDAP *ld, LDAPConn *conn, LDAPURLDesc *srv )
{ {
Sockbuf *sb = conn->lconn_sb; Sockbuf *sb = conn->lconn_sb;
void *ctx = ld->ld_defconn->lconn_tls_ctx; /* void *ctx = ld->ld_defconn->lconn_tls_ctx; */
char *host; char *host;
void *ssl; void *ssl;
@ -1090,7 +1090,7 @@ ldap_int_tls_start ( LDAP *ld, LDAPConn *conn, LDAPURLDesc *srv )
ssf = ldap_pvt_tls_get_strength( ssl ); ssf = ldap_pvt_tls_get_strength( ssl );
authid = ldap_pvt_tls_get_peer( 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; return LDAP_SUCCESS;