mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
Fix prev commit, use c_authtype
This commit is contained in:
parent
d9aec4ef28
commit
e85cd1e154
@ -1035,7 +1035,7 @@ backend_check_restrictions(
|
|||||||
if( requires & SLAP_REQUIRE_STRONG ) {
|
if( requires & SLAP_REQUIRE_STRONG ) {
|
||||||
/* should check mechanism */
|
/* should check mechanism */
|
||||||
if( ( op->o_transport_ssf < ssf->sss_transport
|
if( ( op->o_transport_ssf < ssf->sss_transport
|
||||||
&& op->o_authmech.bv_len == 0 ) || op->o_dn.bv_len == 0 )
|
&& op->o_authtype == LDAP_AUTH_SIMPLE ) || op->o_dn.bv_len == 0 )
|
||||||
{
|
{
|
||||||
rs->sr_text = "strong authentication required";
|
rs->sr_text = "strong authentication required";
|
||||||
rs->sr_err = LDAP_STRONG_AUTH_REQUIRED;
|
rs->sr_err = LDAP_STRONG_AUTH_REQUIRED;
|
||||||
@ -1044,7 +1044,7 @@ backend_check_restrictions(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if( requires & SLAP_REQUIRE_SASL ) {
|
if( requires & SLAP_REQUIRE_SASL ) {
|
||||||
if( op->o_authmech.bv_len == 0 || op->o_dn.bv_len == 0 ) {
|
if( op->o_authtype != LDAP_AUTH_SASL || op->o_dn.bv_len == 0 ) {
|
||||||
rs->sr_text = "SASL authentication required";
|
rs->sr_text = "SASL authentication required";
|
||||||
rs->sr_err = LDAP_STRONG_AUTH_REQUIRED;
|
rs->sr_err = LDAP_STRONG_AUTH_REQUIRED;
|
||||||
return rs->sr_err;
|
return rs->sr_err;
|
||||||
|
@ -684,8 +684,11 @@ do_bind(
|
|||||||
#endif /* defined( LDAP_SLAPI ) */
|
#endif /* defined( LDAP_SLAPI ) */
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if ( rs->sr_err == LDAP_SUCCESS && method != LDAP_AUTH_SASL ) {
|
if ( rs->sr_err == LDAP_SUCCESS ) {
|
||||||
ber_dupbv( &op->o_conn->c_authmech, &mech );
|
if ( method != LDAP_AUTH_SASL ) {
|
||||||
|
ber_dupbv( &op->o_conn->c_authmech, &mech );
|
||||||
|
}
|
||||||
|
op->o_conn->c_authtype = method;
|
||||||
}
|
}
|
||||||
|
|
||||||
op->o_conn->c_sasl_bindop = NULL;
|
op->o_conn->c_sasl_bindop = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user