mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-02-18 18:18:06 -05:00
Import ITS#2717 SASL_MECH fix from HEAD
This commit is contained in:
parent
ee333c45c2
commit
1738a87190
1 changed files with 9 additions and 2 deletions
|
|
@ -427,6 +427,7 @@ ldap_sasl_interactive_bind_s(
|
|||
void *defaults )
|
||||
{
|
||||
int rc;
|
||||
char *smechs = NULL;
|
||||
|
||||
#if defined( LDAP_R_COMPILE ) && defined( HAVE_CYRUS_SASL )
|
||||
ldap_pvt_thread_mutex_lock( &ldap_int_sasl_mutex );
|
||||
|
|
@ -441,9 +442,14 @@ ldap_sasl_interactive_bind_s(
|
|||
return rc < 0 ? rc : 0;
|
||||
} else
|
||||
#endif
|
||||
if( mechs == NULL || *mechs == '\0' ) {
|
||||
char *smechs;
|
||||
|
||||
#ifdef HAVE_CYRUS_SASL
|
||||
if( mechs == NULL || *mechs == '\0' ) {
|
||||
mechs = ld->ld_options.ldo_def_sasl_mech;
|
||||
}
|
||||
#endif
|
||||
|
||||
if( mechs == NULL || *mechs == '\0' ) {
|
||||
rc = ldap_pvt_sasl_getmechs( ld, &smechs );
|
||||
|
||||
if( rc != LDAP_SUCCESS ) {
|
||||
|
|
@ -481,6 +487,7 @@ done:
|
|||
#if defined( LDAP_R_COMPILE ) && defined( HAVE_CYRUS_SASL )
|
||||
ldap_pvt_thread_mutex_unlock( &ldap_int_sasl_mutex );
|
||||
#endif
|
||||
if ( smechs ) LDAP_FREE( smechs );
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue