mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-22 07:39:35 -05:00
ITS#2423 free SASL prompts
This commit is contained in:
parent
a14acc68e2
commit
103f70c3bf
1 changed files with 3 additions and 5 deletions
|
|
@ -942,13 +942,14 @@ retry:
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
char *passwd = ri->ri_password ? ber_strdup( ri->ri_password ) : NULL;
|
|
||||||
void *defaults = lutil_sasl_defaults( ri->ri_ldp, ri->ri_saslmech,
|
void *defaults = lutil_sasl_defaults( ri->ri_ldp, ri->ri_saslmech,
|
||||||
ri->ri_realm, ri->ri_authcId, passwd, ri->ri_authzId );
|
ri->ri_realm, ri->ri_authcId, ri->ri_password, ri->ri_authzId );
|
||||||
|
|
||||||
ldrc = ldap_sasl_interactive_bind_s( ri->ri_ldp, ri->ri_bind_dn,
|
ldrc = ldap_sasl_interactive_bind_s( ri->ri_ldp, ri->ri_bind_dn,
|
||||||
ri->ri_saslmech, NULL, NULL,
|
ri->ri_saslmech, NULL, NULL,
|
||||||
LDAP_SASL_QUIET, lutil_sasl_interact, defaults );
|
LDAP_SASL_QUIET, lutil_sasl_interact, defaults );
|
||||||
|
|
||||||
|
lutil_sasl_freedefs( defaults );
|
||||||
if ( ldrc != LDAP_SUCCESS ) {
|
if ( ldrc != LDAP_SUCCESS ) {
|
||||||
#ifdef NEW_LOGGING
|
#ifdef NEW_LOGGING
|
||||||
LDAP_LOG ( OPERATION, ERR, "do_bind: "
|
LDAP_LOG ( OPERATION, ERR, "do_bind: "
|
||||||
|
|
@ -963,9 +964,6 @@ retry:
|
||||||
ri->ri_ldp = NULL;
|
ri->ri_ldp = NULL;
|
||||||
return( BIND_ERR_SASL_FAILED );
|
return( BIND_ERR_SASL_FAILED );
|
||||||
}
|
}
|
||||||
|
|
||||||
ber_memfree( passwd );
|
|
||||||
ber_memfree( defaults );
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#else
|
#else
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue