From 353f627aa4c66a84f9252323ffa6a3fe4b8b7c2e Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Thu, 6 Jun 2002 01:44:38 +0000 Subject: [PATCH] Eliminate SASL client session_callbacks. Since proc was always NULL they never did anything anyway. --- libraries/libldap/cyrus.c | 21 ++------------------- libraries/libldap/ldap-int.h | 1 - 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/libraries/libldap/cyrus.c b/libraries/libldap/cyrus.c index c35eb0d5a9..b2707577df 100644 --- a/libraries/libldap/cyrus.c +++ b/libraries/libldap/cyrus.c @@ -434,19 +434,6 @@ ldap_int_sasl_open( int rc; sasl_conn_t *ctx; - sasl_callback_t *session_callbacks = - LDAP_CALLOC( 2, sizeof( sasl_callback_t ) ); - - if( session_callbacks == NULL ) return LDAP_NO_MEMORY; - - session_callbacks[0].id = SASL_CB_USER; - session_callbacks[0].proc = NULL; - session_callbacks[0].context = ld; - - session_callbacks[1].id = SASL_CB_LIST_END; - session_callbacks[1].proc = NULL; - session_callbacks[1].context = NULL; - assert( lc->lconn_sasl_ctx == NULL ); if ( host == NULL ) { @@ -456,14 +443,13 @@ ldap_int_sasl_open( #if SASL_VERSION_MAJOR >= 2 rc = sasl_client_new( "ldap", host, NULL, NULL, - session_callbacks, 0, &ctx ); + NULL, 0, &ctx ); #else - rc = sasl_client_new( "ldap", host, session_callbacks, + rc = sasl_client_new( "ldap", host, NULL, SASL_SECURITY_LAYER, &ctx ); #endif if ( rc != SASL_OK ) { - LDAP_FREE( session_callbacks ); ld->ld_errno = sasl_err2ldap( rc ); return ld->ld_errno; } @@ -477,7 +463,6 @@ ldap_int_sasl_open( #endif lc->lconn_sasl_ctx = ctx; - lc->lconn_sasl_cbs = session_callbacks; if( ssf ) { #if SASL_VERSION_MAJOR >= 2 @@ -510,8 +495,6 @@ int ldap_int_sasl_close( LDAP *ld, LDAPConn *lc ) if( ctx != NULL ) { sasl_dispose( &ctx ); lc->lconn_sasl_ctx = NULL; - LDAP_FREE( lc->lconn_sasl_cbs ); - lc->lconn_sasl_cbs = NULL; } return LDAP_SUCCESS; diff --git a/libraries/libldap/ldap-int.h b/libraries/libldap/ldap-int.h index cd10cde790..4ad20dd9f4 100644 --- a/libraries/libldap/ldap-int.h +++ b/libraries/libldap/ldap-int.h @@ -189,7 +189,6 @@ typedef struct ldap_conn { #endif #ifdef HAVE_CYRUS_SASL void *lconn_sasl_ctx; - void *lconn_sasl_cbs; #endif int lconn_refcnt; time_t lconn_lastused; /* time */ -- 2.39.5