mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
Fix setting c_authz_backend for SASL binds:
in slap_sasl2dn, make sure it's set for base DN searches as well. in do_bind, don't zero it during multi-stage binds.
This commit is contained in:
parent
7fdb38bca9
commit
a073e28510
@ -57,7 +57,9 @@ do_bind(
|
|||||||
* Force to connection to "anonymous" until bind succeeds.
|
* Force to connection to "anonymous" until bind succeeds.
|
||||||
*/
|
*/
|
||||||
ldap_pvt_thread_mutex_lock( &conn->c_mutex );
|
ldap_pvt_thread_mutex_lock( &conn->c_mutex );
|
||||||
|
if ( conn->c_sasl_bind_in_progress ) be = conn->c_authz_backend;
|
||||||
connection2anonymous( conn );
|
connection2anonymous( conn );
|
||||||
|
if ( conn->c_sasl_bind_in_progress ) conn->c_authz_backend = be;
|
||||||
ldap_pvt_thread_mutex_unlock( &conn->c_mutex );
|
ldap_pvt_thread_mutex_unlock( &conn->c_mutex );
|
||||||
|
|
||||||
if ( op->o_dn.bv_val != NULL ) {
|
if ( op->o_dn.bv_val != NULL ) {
|
||||||
|
@ -495,11 +495,10 @@ void slap_sasl2dn( Connection *conn, struct berval *saslname, struct berval *dn
|
|||||||
uri.scope, LDAP_DEREF_NEVER, 1, 0,
|
uri.scope, LDAP_DEREF_NEVER, 1, 0,
|
||||||
filter, NULL, NULL, 1 );
|
filter, NULL, NULL, 1 );
|
||||||
|
|
||||||
|
FINISHED:
|
||||||
if( dn->bv_len ) {
|
if( dn->bv_len ) {
|
||||||
conn->c_authz_backend = be;
|
conn->c_authz_backend = be;
|
||||||
}
|
}
|
||||||
|
|
||||||
FINISHED:
|
|
||||||
if( uri.dn.bv_len ) ch_free( uri.dn.bv_val );
|
if( uri.dn.bv_len ) ch_free( uri.dn.bv_val );
|
||||||
if( uri.filter.bv_len ) ch_free( uri.filter.bv_val );
|
if( uri.filter.bv_len ) ch_free( uri.filter.bv_val );
|
||||||
if( filter ) filter_free( filter );
|
if( filter ) filter_free( filter );
|
||||||
|
Loading…
Reference in New Issue
Block a user